def from_dictionary(self, dictionary):
     super(LineItem, 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 'invoiceData' in dictionary:
         if not isinstance(dictionary['invoiceData'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['invoiceData']))
         value = LineItemInvoiceData()
         self.invoice_data = value.from_dictionary(
             dictionary['invoiceData'])
     if 'level3InterchangeInformation' in dictionary:
         if not isinstance(dictionary['level3InterchangeInformation'],
                           dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['level3InterchangeInformation']))
         value = LineItemLevel3InterchangeInformation()
         self.level3_interchange_information = value.from_dictionary(
             dictionary['level3InterchangeInformation'])
     if 'orderLineDetails' in dictionary:
         if not isinstance(dictionary['orderLineDetails'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['orderLineDetails']))
         value = OrderLineDetails()
         self.order_line_details = value.from_dictionary(
             dictionary['orderLineDetails'])
     return self
 def from_dictionary(self, dictionary):
     super(AbstractThreeDSecure, self).from_dictionary(dictionary)
     if 'authenticationAmount' in dictionary:
         if not isinstance(dictionary['authenticationAmount'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['authenticationAmount']))
         value = AmountOfMoney()
         self.authentication_amount = value.from_dictionary(
             dictionary['authenticationAmount'])
     if 'authenticationFlow' in dictionary:
         self.authentication_flow = dictionary['authenticationFlow']
     if 'challengeCanvasSize' in dictionary:
         self.challenge_canvas_size = dictionary['challengeCanvasSize']
     if 'challengeIndicator' in dictionary:
         self.challenge_indicator = dictionary['challengeIndicator']
     if 'exemptionRequest' in dictionary:
         self.exemption_request = dictionary['exemptionRequest']
     if 'priorThreeDSecureData' in dictionary:
         if not isinstance(dictionary['priorThreeDSecureData'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['priorThreeDSecureData']))
         value = ThreeDSecureData()
         self.prior_three_d_secure_data = value.from_dictionary(
             dictionary['priorThreeDSecureData'])
     if 'sdkData' in dictionary:
         if not isinstance(dictionary['sdkData'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['sdkData']))
         value = SdkDataInput()
         self.sdk_data = value.from_dictionary(dictionary['sdkData'])
     if 'skipAuthentication' in dictionary:
         self.skip_authentication = dictionary['skipAuthentication']
     return self
 def from_dictionary(self, dictionary):
     super(DisputeOutput, 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 'contactPerson' in dictionary:
         self.contact_person = dictionary['contactPerson']
     if 'creationDetails' in dictionary:
         if not isinstance(dictionary['creationDetails'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['creationDetails']))
         value = DisputeCreationDetail()
         self.creation_details = value.from_dictionary(dictionary['creationDetails'])
     if 'emailAddress' in dictionary:
         self.email_address = dictionary['emailAddress']
     if 'files' in dictionary:
         if not isinstance(dictionary['files'], list):
             raise TypeError('value \'{}\' is not a list'.format(dictionary['files']))
         self.files = []
         for element in dictionary['files']:
             value = HostedFile()
             self.files.append(value.from_dictionary(element))
     if 'reference' in dictionary:
         if not isinstance(dictionary['reference'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['reference']))
         value = DisputeReference()
         self.reference = value.from_dictionary(dictionary['reference'])
     if 'replyTo' in dictionary:
         self.reply_to = dictionary['replyTo']
     if 'requestMessage' in dictionary:
         self.request_message = dictionary['requestMessage']
     if 'responseMessage' in dictionary:
         self.response_message = dictionary['responseMessage']
     return self
示例#4
0
 def from_dictionary(self, dictionary):
     super(RefundRequest, 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 'bankRefundMethodSpecificInput' in dictionary:
         if not isinstance(dictionary['bankRefundMethodSpecificInput'],
                           dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['bankRefundMethodSpecificInput']))
         value = BankRefundMethodSpecificInput()
         self.bank_refund_method_specific_input = value.from_dictionary(
             dictionary['bankRefundMethodSpecificInput'])
     if 'customer' in dictionary:
         if not isinstance(dictionary['customer'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['customer']))
         value = RefundCustomer()
         self.customer = value.from_dictionary(dictionary['customer'])
     if 'refundDate' in dictionary:
         self.refund_date = dictionary['refundDate']
     if 'refundReferences' in dictionary:
         if not isinstance(dictionary['refundReferences'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['refundReferences']))
         value = RefundReferences()
         self.refund_references = value.from_dictionary(
             dictionary['refundReferences'])
     return self
 def from_dictionary(self, dictionary):
     super(ThreeDSecureResults, self).from_dictionary(dictionary)
     if 'acsTransactionId' in dictionary:
         self.acs_transaction_id = dictionary['acsTransactionId']
     if 'appliedExemption' in dictionary:
         self.applied_exemption = dictionary['appliedExemption']
     if 'authenticationAmount' in dictionary:
         if not isinstance(dictionary['authenticationAmount'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['authenticationAmount']))
         value = AmountOfMoney()
         self.authentication_amount = value.from_dictionary(
             dictionary['authenticationAmount'])
     if 'cavv' in dictionary:
         self.cavv = dictionary['cavv']
     if 'directoryServerTransactionId' in dictionary:
         self.directory_server_transaction_id = dictionary[
             'directoryServerTransactionId']
     if 'eci' in dictionary:
         self.eci = dictionary['eci']
     if 'exemptionOutput' in dictionary:
         if not isinstance(dictionary['exemptionOutput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['exemptionOutput']))
         value = ExemptionOutput()
         self.exemption_output = value.from_dictionary(
             dictionary['exemptionOutput'])
     if 'schemeRiskScore' in dictionary:
         self.scheme_risk_score = dictionary['schemeRiskScore']
     if 'sdkData' in dictionary:
         if not isinstance(dictionary['sdkData'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['sdkData']))
         value = SdkDataOutput()
         self.sdk_data = value.from_dictionary(dictionary['sdkData'])
     if 'threeDSecureData' in dictionary:
         if not isinstance(dictionary['threeDSecureData'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['threeDSecureData']))
         value = ThreeDSecureData()
         self.three_d_secure_data = value.from_dictionary(
             dictionary['threeDSecureData'])
     if 'threeDSecureVersion' in dictionary:
         self.three_d_secure_version = dictionary['threeDSecureVersion']
     if 'threeDServerTransactionId' in dictionary:
         self.three_d_server_transaction_id = dictionary[
             'threeDServerTransactionId']
     if 'xid' in dictionary:
         self.xid = dictionary['xid']
     return self
示例#6
0
 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
示例#7
0
 def from_dictionary(self, dictionary):
     super(GiftCardPurchase, 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 'numberOfGiftCards' in dictionary:
         self.number_of_gift_cards = dictionary['numberOfGiftCards']
     return self
 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
示例#9
0
 def from_dictionary(self, dictionary):
     super(PaymentContext, 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 'countryCode' in dictionary:
         self.country_code = dictionary['countryCode']
     if 'isRecurring' in dictionary:
         self.is_recurring = dictionary['isRecurring']
     return self
示例#10
0
 def from_dictionary(self, dictionary):
     super(SettlementDetails, self).from_dictionary(dictionary)
     if 'acquirerReferenceNumber' in dictionary:
         self.acquirer_reference_number = dictionary['acquirerReferenceNumber']
     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 'paymentId' in dictionary:
         self.payment_id = dictionary['paymentId']
     if 'retrievalReferenceNumber' in dictionary:
         self.retrieval_reference_number = dictionary['retrievalReferenceNumber']
     return self
 def from_dictionary(self, dictionary):
     super(CreateDisputeRequest, 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 'contactPerson' in dictionary:
         self.contact_person = dictionary['contactPerson']
     if 'emailAddress' in dictionary:
         self.email_address = dictionary['emailAddress']
     if 'replyTo' in dictionary:
         self.reply_to = dictionary['replyTo']
     if 'requestMessage' in dictionary:
         self.request_message = dictionary['requestMessage']
     return self
示例#12
0
 def from_dictionary(self, dictionary):
     super(Installments, self).from_dictionary(dictionary)
     if 'amountOfMoneyPerInstallment' in dictionary:
         if not isinstance(dictionary['amountOfMoneyPerInstallment'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['amountOfMoneyPerInstallment']))
         value = AmountOfMoney()
         self.amount_of_money_per_installment = value.from_dictionary(
             dictionary['amountOfMoneyPerInstallment'])
     if 'frequencyOfInstallments' in dictionary:
         self.frequency_of_installments = dictionary[
             'frequencyOfInstallments']
     if 'interestRate' in dictionary:
         self.interest_rate = dictionary['interestRate']
     if 'numberOfInstallments' in dictionary:
         self.number_of_installments = dictionary['numberOfInstallments']
     return self
示例#13
0
 def from_dictionary(self, dictionary):
     super(CreatePayoutRequest, 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 'bankAccountBban' in dictionary:
         if not isinstance(dictionary['bankAccountBban'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['bankAccountBban']))
         value = BankAccountBban()
         self.bank_account_bban = value.from_dictionary(
             dictionary['bankAccountBban'])
     if 'bankAccountIban' in dictionary:
         if not isinstance(dictionary['bankAccountIban'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['bankAccountIban']))
         value = BankAccountIban()
         self.bank_account_iban = value.from_dictionary(
             dictionary['bankAccountIban'])
     if 'bankTransferPayoutMethodSpecificInput' in dictionary:
         if not isinstance(
                 dictionary['bankTransferPayoutMethodSpecificInput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['bankTransferPayoutMethodSpecificInput']))
         value = BankTransferPayoutMethodSpecificInput()
         self.bank_transfer_payout_method_specific_input = value.from_dictionary(
             dictionary['bankTransferPayoutMethodSpecificInput'])
     if 'cardPayoutMethodSpecificInput' in dictionary:
         if not isinstance(dictionary['cardPayoutMethodSpecificInput'],
                           dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['cardPayoutMethodSpecificInput']))
         value = CardPayoutMethodSpecificInput()
         self.card_payout_method_specific_input = value.from_dictionary(
             dictionary['cardPayoutMethodSpecificInput'])
     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 'payoutDate' in dictionary:
         self.payout_date = dictionary['payoutDate']
     if 'payoutDetails' in dictionary:
         if not isinstance(dictionary['payoutDetails'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['payoutDetails']))
         value = PayoutDetails()
         self.payout_details = value.from_dictionary(
             dictionary['payoutDetails'])
     if 'payoutText' in dictionary:
         self.payout_text = dictionary['payoutText']
     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'])
     if 'swiftCode' in dictionary:
         self.swift_code = dictionary['swiftCode']
     return self