Acquire.Accounting._refund module

class Refund(credit_note=None, authorisation=None)[source]

Bases: object

This class holds the refund for a transaction. This is sent by the credited account or other authorised party to refund a transaction. Refunds must succeed, so potentially they can allow accounts to breach overdraft limits etc.

authorisation()[source]

Return the authorisation for the refund

static create(credit_notes, authorisation)[source]

Construct a series of refunds from the passed credit notes, each of which is authorised using the passed authorisation. This will refund all of the transactions passed in full

credit_account_uid()[source]

Return the UID of the account from which this refund will be drawn

credit_note()[source]

Return the credit note that this is refunding

debit_account_uid()[source]

Return the UID of the account from which this refund will return value

debit_note_uid()[source]

Return the UID of the debit note that this is refunding

static from_data(data)[source]

Return a Refund from the passed json-decoded dictionary

is_null()[source]

Return whether or not this Refund is null

to_data()[source]

Return the data for this object as a dictionary that can be serialised to json

transaction()[source]

Return a transaction that corresponds to the real transfer of value back from the credit to debit accounts (remembering that the original debit account will be the new credit account, and the original credit account will be the new debit account).

transaction_uid()[source]

Return the UID of the transaction for which this is the refund. The transaction UID is the same as the UID for the original debit note

value()[source]

Return the value of the refund