Source code for worldline.connect.sdk.v1.domain.order_output

# -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://apireference.connect.worldline-solutions.com/
#
from worldline.connect.sdk.domain.data_object import DataObject
from worldline.connect.sdk.v1.domain.amount_of_money import AmountOfMoney
from worldline.connect.sdk.v1.domain.payment_references import PaymentReferences


[docs]class OrderOutput(DataObject): __amount_of_money = None __references = None @property def amount_of_money(self): """ | Object containing amount and ISO currency code attributes Type: :class:`worldline.connect.sdk.v1.domain.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 references(self): """ | Object that holds all reference properties that are linked to this transaction Type: :class:`worldline.connect.sdk.v1.domain.payment_references.PaymentReferences` """ return self.__references @references.setter def references(self, value): self.__references = value
[docs] def to_dictionary(self): dictionary = super(OrderOutput, self).to_dictionary() if self.amount_of_money is not None: dictionary['amountOfMoney'] = self.amount_of_money.to_dictionary() if self.references is not None: dictionary['references'] = self.references.to_dictionary() return dictionary
[docs] def from_dictionary(self, dictionary): super(OrderOutput, 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 'references' in dictionary: if not isinstance(dictionary['references'], dict): raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['references'])) value = PaymentReferences() self.references = value.from_dictionary(dictionary['references']) return self