weboob.capabilities.shop

exception weboob.capabilities.shop.OrderNotFound(msg='Order not found')

Bases: weboob.capabilities.base.UserError

Raised when an order is not found.

class weboob.capabilities.shop.Order(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Purchase order.
Variables:
  • date – (date, datetime) Date when the order was placed
  • shipping – (Decimal) Shipping price
  • discount – (Decimal) Discounts
  • tax – (Decimal) Tax
  • total – (Decimal) Total
class weboob.capabilities.shop.Payment(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Payment for an order.
Variables:
  • date – (date, datetime) The date when payment was applied
  • method – (unicode) Payment method; e.g. “VISA 1234”
  • amount – (Decimal) Payment amount
class weboob.capabilities.shop.Item(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Purchased item within an order.
Variables:
  • label – (unicode) Item label
  • price – (Decimal) Item price
class weboob.capabilities.shop.CapShop

Bases: weboob.capabilities.collection.CapCollection

Capability of online shops to see orders history.

get_currency()

Get the currency this shop uses.

Return type:str
get_order(id)

Get an order from its ID.

Parameters:id (str) – ID of the order
Return type:Order
Raises:OrderNotFound
iter_items(order)

Iter items of a specific order.

Parameters:order (Order) – order to get items
Return type:iter[Item]
Raises:OrderNotFound
iter_orders()

Iter history of orders.

Return type:iter[Order]
iter_payments(order)

Iter payments of a specific order.

Parameters:order (Order) – order to get payments
Return type:iter[Payment]
Raises:OrderNotFound
iter_resources(objs, split_path)

Iter resources.

Default implementation of this method is to return on top-level all orders (by calling iter_accounts()).

Parameters:
  • objs (tuple[BaseObject]) – type of objects to get
  • split_path (list) – path to discover
Return type:

iter[BaseObject]