#NEWLINE# def __init__( self , gateway , attributes ) : #NEWLINE# #INDENT# if ( 'refund_id' in attributes ) : #NEWLINE# #INDENT# self . _refund_id = attributes [ 'refund_id' ] #NEWLINE# del attributes [ 'refund_id' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _refund_id = None #NEWLINE# #UNINDENT# Resource . __init__ ( self , gateway , attributes ) #NEWLINE# self . amount = Decimal ( self . amount ) #NEWLINE# if self . tax_amount : #NEWLINE# #INDENT# self . tax_amount = Decimal ( self . tax_amount ) #NEWLINE# #UNINDENT# if ( 'billing' in attributes ) : #NEWLINE# #INDENT# self . billing_details = Address ( gateway , attributes . pop ( 'billing' ) ) #NEWLINE# #UNINDENT# if ( 'credit_card' in attributes ) : #NEWLINE# #INDENT# self . credit_card_details = CreditCard ( gateway , attributes . pop ( 'credit_card' ) ) #NEWLINE# #UNINDENT# if ( 'paypal' in attributes ) : #NEWLINE# #INDENT# self . paypal_details = PayPalAccount ( gateway , attributes . pop ( 'paypal' ) ) #NEWLINE# #UNINDENT# if ( 'europe_bank_account' in attributes ) : #NEWLINE# #INDENT# self . europe_bank_account_details = EuropeBankAccount ( gateway , attributes . pop ( 'europe_bank_account' ) ) #NEWLINE# #UNINDENT# if ( 'apple_pay' in attributes ) : #NEWLINE# #INDENT# self . apple_pay_details = ApplePayCard ( gateway , attributes . pop ( 'apple_pay' ) ) #NEWLINE# #UNINDENT# if ( 'coinbase_account' in attributes ) : #NEWLINE# #INDENT# self . coinbase_details = CoinbaseAccount ( gateway , attributes . pop ( 'coinbase_account' ) ) #NEWLINE# #UNINDENT# if ( 'android_pay_card' in attributes ) : #NEWLINE# #INDENT# self . android_pay_card_details = AndroidPayCard ( gateway , attributes . pop ( 'android_pay_card' ) ) #NEWLINE# #UNINDENT# if ( 'amex_express_checkout_card' in attributes ) : #NEWLINE# #INDENT# self . amex_express_checkout_card_details = AmexExpressCheckoutCard ( gateway , attributes . pop ( 'amex_express_checkout_card' ) ) #NEWLINE# #UNINDENT# if ( 'venmo_account' in attributes ) : #NEWLINE# #INDENT# self . venmo_account_details = VenmoAccount ( gateway , attributes . pop ( 'venmo_account' ) ) #NEWLINE# #UNINDENT# if ( 'customer' in attributes ) : #NEWLINE# #INDENT# self . customer_details = Customer ( gateway , attributes . pop ( 'customer' ) ) #NEWLINE# #UNINDENT# if ( 'shipping' in attributes ) : #NEWLINE# #INDENT# self . shipping_details = Address ( gateway , attributes . pop ( 'shipping' ) ) #NEWLINE# #UNINDENT# if ( 'add_ons' in attributes ) : #NEWLINE# #INDENT# self . add_ons = [ AddOn ( gateway , add_on ) for add_on in self . add_ons ] #NEWLINE# #UNINDENT# if ( 'discounts' in attributes ) : #NEWLINE# #INDENT# self . discounts = [ Discount ( gateway , discount ) for discount in self . discounts ] #NEWLINE# #UNINDENT# if ( 'status_history' in attributes ) : #NEWLINE# #INDENT# self . status_history = [ StatusEvent ( gateway , status_event ) for status_event in self . status_history ] #NEWLINE# #UNINDENT# if ( 'subscription' in attributes ) : #NEWLINE# #INDENT# self . subscription_details = SubscriptionDetails ( attributes . pop ( 'subscription' ) ) #NEWLINE# #UNINDENT# if ( 'descriptor' in attributes ) : #NEWLINE# #INDENT# self . descriptor = Descriptor ( gateway , attributes . pop ( 'descriptor' ) ) #NEWLINE# #UNINDENT# if ( 'disbursement_details' in attributes ) : #NEWLINE# #INDENT# self . disbursement_details = DisbursementDetail ( attributes . pop ( 'disbursement_details' ) ) #NEWLINE# #UNINDENT# if ( 'disputes' in attributes ) : #NEWLINE# #INDENT# self . disputes = [ Dispute ( dispute ) for dispute in self . disputes ] #NEWLINE# #UNINDENT# if ( 'payment_instrument_type' in attributes ) : #NEWLINE# #INDENT# self . payment_instrument_type = attributes [ 'payment_instrument_type' ] #NEWLINE# #UNINDENT# if ( 'risk_data' in attributes ) : #NEWLINE# #INDENT# self . risk_data = RiskData ( attributes [ 'risk_data' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . risk_data = None #NEWLINE# #UNINDENT# if ( ( 'three_d_secure_info' in attributes ) and ( not ( attributes [ 'three_d_secure_info' ] is None ) ) ) : #NEWLINE# #INDENT# self . three_d_secure_info = ThreeDSecureInfo ( attributes [ 'three_d_secure_info' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . three_d_secure_info = None #NEWLINE# #UNINDENT# if ( 'facilitator_details' in attributes ) : #NEWLINE# #INDENT# self . facilitator_details = FacilitatorDetails ( attributes . pop ( 'facilitator_details' ) )