コード例 #1
0
 def from_dictionary(self, dictionary):
     super(CapturePaymentRequest, self).from_dictionary(dictionary)
     if 'amount' in dictionary:
         self.amount = dictionary['amount']
     if 'isFinal' in dictionary:
         self.is_final = dictionary['isFinal']
     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
コード例 #2
0
 def from_dictionary(self, dictionary):
     super(OperationOutput, 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 'id' in dictionary:
         self.id = dictionary['id']
     if 'paymentMethod' in dictionary:
         self.payment_method = dictionary['paymentMethod']
     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'])
     if 'status' in dictionary:
         self.status = dictionary['status']
     if 'statusOutput' in dictionary:
         if not isinstance(dictionary['statusOutput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['statusOutput']))
         value = PaymentStatusOutput()
         self.status_output = value.from_dictionary(
             dictionary['statusOutput'])
     return self
コード例 #3
0
 def from_dictionary(self, dictionary):
     super(CaptureOutput, 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 'amountPaid' in dictionary:
         self.amount_paid = dictionary['amountPaid']
     if 'cardPaymentMethodSpecificOutput' in dictionary:
         if not isinstance(dictionary['cardPaymentMethodSpecificOutput'],
                           dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['cardPaymentMethodSpecificOutput']))
         value = CardPaymentMethodSpecificOutput()
         self.card_payment_method_specific_output = value.from_dictionary(
             dictionary['cardPaymentMethodSpecificOutput'])
     if 'merchantParameters' in dictionary:
         self.merchant_parameters = dictionary['merchantParameters']
     if 'mobilePaymentMethodSpecificOutput' in dictionary:
         if not isinstance(dictionary['mobilePaymentMethodSpecificOutput'],
                           dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['mobilePaymentMethodSpecificOutput']))
         value = MobilePaymentMethodSpecificOutput()
         self.mobile_payment_method_specific_output = value.from_dictionary(
             dictionary['mobilePaymentMethodSpecificOutput'])
     if 'paymentMethod' in dictionary:
         self.payment_method = dictionary['paymentMethod']
     if 'redirectPaymentMethodSpecificOutput' in dictionary:
         if not isinstance(
                 dictionary['redirectPaymentMethodSpecificOutput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['redirectPaymentMethodSpecificOutput']))
         value = RedirectPaymentMethodSpecificOutput()
         self.redirect_payment_method_specific_output = value.from_dictionary(
             dictionary['redirectPaymentMethodSpecificOutput'])
     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'])
     if 'sepaDirectDebitPaymentMethodSpecificOutput' in dictionary:
         if not isinstance(
                 dictionary['sepaDirectDebitPaymentMethodSpecificOutput'],
                 dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(
                 dictionary['sepaDirectDebitPaymentMethodSpecificOutput']))
         value = SepaDirectDebitPaymentMethodSpecificOutput()
         self.sepa_direct_debit_payment_method_specific_output = value.from_dictionary(
             dictionary['sepaDirectDebitPaymentMethodSpecificOutput'])
     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 '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
コード例 #5
0
 def from_dictionary(self, dictionary):
     super(RefundOutput, 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 'amountPaid' in dictionary:
         self.amount_paid = dictionary['amountPaid']
     if 'cardRefundMethodSpecificOutput' in dictionary:
         if not isinstance(dictionary['cardRefundMethodSpecificOutput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['cardRefundMethodSpecificOutput']))
         value = RefundCardMethodSpecificOutput()
         self.card_refund_method_specific_output = value.from_dictionary(dictionary['cardRefundMethodSpecificOutput'])
     if 'eWalletRefundMethodSpecificOutput' in dictionary:
         if not isinstance(dictionary['eWalletRefundMethodSpecificOutput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['eWalletRefundMethodSpecificOutput']))
         value = RefundEWalletMethodSpecificOutput()
         self.e_wallet_refund_method_specific_output = value.from_dictionary(dictionary['eWalletRefundMethodSpecificOutput'])
     if 'merchantParameters' in dictionary:
         self.merchant_parameters = dictionary['merchantParameters']
     if 'mobileRefundMethodSpecificOutput' in dictionary:
         if not isinstance(dictionary['mobileRefundMethodSpecificOutput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['mobileRefundMethodSpecificOutput']))
         value = RefundMobileMethodSpecificOutput()
         self.mobile_refund_method_specific_output = value.from_dictionary(dictionary['mobileRefundMethodSpecificOutput'])
     if 'paymentMethod' in dictionary:
         self.payment_method = dictionary['paymentMethod']
     if 'redirectRefundMethodSpecificOutput' in dictionary:
         if not isinstance(dictionary['redirectRefundMethodSpecificOutput'], dict):
             raise TypeError('value \'{}\' is not a dictionary'.format(dictionary['redirectRefundMethodSpecificOutput']))
         value = RefundRedirectMethodSpecificOutput()
         self.redirect_refund_method_specific_output = value.from_dictionary(dictionary['redirectRefundMethodSpecificOutput'])
     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
コード例 #6
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 '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 '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