Skip to content

Feature/get account by nif

Administrator requested to merge feature/get-account-by-NIF into master
  • Commit 1: Add method to get account by partner's NIF
In [1]: from pymasmovil.models.account import Account

In [2]: from pymasmovil.models.session import Session

In [3]: session = Session.create()

In [4]: NIF = "41581508S"

In [5]: account = Account.get_by_NIF(session, NIF)

In [6]: account
Out[6]: <pymasmovil.models.account.Account at 0x7fa1e8ea9a30>

In [7]: account.name
Out[7]: 'Gerard'
  • Commit 2: Use "cls" instead of Account in classmethods

  • Commit 3: Update changelog

Info: Updating the Account._routeto version v1 does not cause problems in the other class methods ("get", "create", "get_order_item_by_phone", "get_asset_by_phone"), as tested manually:

Edited by Administrator

Merge request reports

Loading