woob.capabilities.bill

class woob.capabilities.bill.Bill(*args, **kwargs)

Bases: woob.capabilities.bill.Document, woob.capabilities.base.Currency

Bill.

Variables
  • total_price – (Decimal) Price to pay

  • currency – (str) Currency (default: None)

  • vat – (Decimal) VAT included in the price

  • pre_tax_price – (Decimal) Price without the VAT or other taxes

  • duedate – (date, datetime) The day the bill must be paid

  • startdate – (date, datetime) The first day the bill applies to

  • finishdate – (date, datetime) The last day the bill applies to

property income
property price
class woob.capabilities.bill.CapDocument

Bases: woob.capabilities.collection.CapCollection

accepted_document_types = ()

Tuple of document types handled by the module (DocumentTypes)

download_document(id)

Download a document.

Parameters

id – ID of document

Return type

bytes

Raises

DocumentNotFound

download_document_pdf(id)

Download a document, convert it to PDF if it isn’t the document format.

Parameters

id – ID of document

Return type

bytes

Raises

DocumentNotFound

get_balance(subscription)

Get the balance of a subscription.

Parameters

subscription (Subscription) – subscription to get balance

Return type

class:Detail

get_details(subscription)

Get details of a subscription.

Parameters

subscription (Subscription) – subscription to get details

Return type

iter[Detail]

get_document(id)

Get a document.

Parameters

id – ID of document

Return type

Document

Raises

DocumentNotFound

get_subscription(_id)

Get a subscription.

Parameters

_id – ID of subscription

Return type

Subscription

Raises

SubscriptionNotFound

iter_bills(subscription)

Iter bills.

Parameters

subscription (Subscription) – subscription to get bills

Return type

iter[Bill]

iter_bills_history(subscription)

Iter history of a subscription.

Parameters

subscription (Subscription) – subscription to get history

Return type

iter[Detail]

iter_documents(subscription)

Iter documents.

Parameters

subscription (Subscription) – subscription to get documents

Return type

iter[Document]

iter_documents_by_types(subscription, accepted_types)

Iter documents with specific types.

Parameters
  • subscription (Subscription) – subscription to get documents

  • accepted_types ([DocumentTypes]) – list of document types that should be returned

Return type

iter[Document]

iter_documents_history(subscription)

Iter history of a subscription.

Parameters

subscription (Subscription) – subscription to get history

Return type

iter[Detail]

iter_resources(objs, split_path)

Iter resources. Will return iter_subscriptions().

iter_subscription()

Iter subscriptions.

Return type

iter[Subscription]

class woob.capabilities.bill.Detail(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject, woob.capabilities.base.Currency

Detail of a subscription

Variables
  • label – (str) label of the detail line

  • infos – (str) information

  • datetime – (date, datetime) date information

  • price – (Decimal) Total price, taxes included

  • vat – (Decimal) Value added Tax

  • currency – (str) Currency (default: None)

  • quantity – (Decimal) Number of units consumed

  • unit – (str) Unit of the consumption

class woob.capabilities.bill.Document(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject

Document.

Variables
  • date – (date, datetime) The day the document has been sent to the subscriber

  • format – (str) file format of the document

  • label – (str) label of document

  • type – (str) type of document

  • transactions – (list) List of transaction ID related to the document (default: [])

  • has_file – (bool) Boolean to set if file is available (default: True)

  • number – (str) Number of the document (if present and meaningful for user)

exception woob.capabilities.bill.DocumentNotFound(msg='Document not found')

Bases: woob.capabilities.base.UserError

Raised when a document is not found.

class woob.capabilities.bill.DocumentTypes

Bases: object

BILL = 'bill'

Bill

CERTIFICATE = 'certificate'

Certificate from the organisation to the subscriber

CONTRACT = 'contract'

Contract between organisation and subscriber

INCOME_TAX = 'income_tax'
KIID = 'kiid'

Key Investor Information Document

NOTICE = 'notice'

Notice from the organisation to the subscriber

OTHER = 'other'
REPORT = 'report'

Informative report

RIB = 'RIB'

French bank account identification document

STATEMENT = 'statement'

Bank statement

class woob.capabilities.bill.Subscription(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject

Subscription to a service.

Variables
  • label – (str) label of subscription

  • subscriber – (str) Subscriber name or identifier (for companies)

  • validity – (date, datetime) End validity date of the subscription (if any)

  • renewdate – (date, datetime) Reset date of consumption, for time based suscription (monthly, yearly, etc)

exception woob.capabilities.bill.SubscriptionNotFound(msg='Subscription not found')

Bases: woob.capabilities.base.UserError

Raised when a subscription is not found.