woob.capabilities.shop

class woob.capabilities.shop.CapShop

Bases: woob.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]

class woob.capabilities.shop.Item(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject

Purchased item within an order.

Variables
  • label – (str) Item label

  • price – (Decimal) Item price

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

Bases: woob.capabilities.base.BaseObject

Purchase order.

Variables
  • shipping – (Decimal) Shipping price

  • discount – (Decimal) Discounts

  • tax – (Decimal) Tax

  • total – (Decimal) Total

date = <woob.capabilities.date.DateField object>
exception woob.capabilities.shop.OrderNotFound(msg='Order not found')

Bases: woob.capabilities.base.UserError

Raised when an order is not found.

class woob.capabilities.shop.Payment(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject

Payment for an order.

Variables
  • method – (str) Payment method; e.g. “VISA 1234”

  • amount – (Decimal) Payment amount

date = <woob.capabilities.date.DateField object>