Source code for ingenico.connect.sdk.domain.payout.definitions.payout_details

# -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/
#
from ingenico.connect.sdk.data_object import DataObject
from ingenico.connect.sdk.domain.definitions.amount_of_money import AmountOfMoney
from ingenico.connect.sdk.domain.payout.definitions.payout_customer import PayoutCustomer
from ingenico.connect.sdk.domain.payout.definitions.payout_references import PayoutReferences


[docs]class PayoutDetails(DataObject): __amount_of_money = None __customer = None __references = None @property def amount_of_money(self): """ | Object containing amount and ISO currency code attributes Type: :class:`ingenico.connect.sdk.domain.definitions.amount_of_money.AmountOfMoney` """ return self.__amount_of_money @amount_of_money.setter def amount_of_money(self, value): self.__amount_of_money = value @property def customer(self): """ | Object containing the details of the customer. Type: :class:`ingenico.connect.sdk.domain.payout.definitions.payout_customer.PayoutCustomer` """ return self.__customer @customer.setter def customer(self, value): self.__customer = value @property def references(self): """ | Object that holds all reference properties that are linked to this transaction Type: :class:`ingenico.connect.sdk.domain.payout.definitions.payout_references.PayoutReferences` """ return self.__references @references.setter def references(self, value): self.__references = value
[docs] def to_dictionary(self): dictionary = super(PayoutDetails, self).to_dictionary() if self.amount_of_money is not None: dictionary['amountOfMoney'] = self.amount_of_money.to_dictionary() if self.customer is not None: dictionary['customer'] = self.customer.to_dictionary() if self.references is not None: dictionary['references'] = self.references.to_dictionary() return dictionary
[docs] def from_dictionary(self, dictionary): super(PayoutDetails, self).from_dictionary(dictionary) if 'amountOfMoney' in dictionary: if not isinstance(dictionary['amountOfMoney'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['amountOfMoney'])) value = AmountOfMoney() self.amount_of_money = value.from_dictionary(dictionary['amountOfMoney']) if 'customer' in dictionary: if not isinstance(dictionary['customer'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['customer'])) value = PayoutCustomer() self.customer = value.from_dictionary(dictionary['customer']) if 'references' in dictionary: if not isinstance(dictionary['references'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['references'])) value = PayoutReferences() self.references = value.from_dictionary(dictionary['references']) return self