#NEWLINE# def _parse_payment_method( self , response ) : #NEWLINE# #INDENT# if ( 'paypal_account' in response ) : #NEWLINE# #INDENT# return PayPalAccount ( self . gateway , response [ 'paypal_account' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'credit_card' in response ) : #NEWLINE# #INDENT# return CreditCard ( self . gateway , response [ 'credit_card' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'europe_bank_account' in response ) : #NEWLINE# #INDENT# return EuropeBankAccount ( self . gateway , response [ 'europe_bank_account' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'apple_pay_card' in response ) : #NEWLINE# #INDENT# return ApplePayCard ( self . gateway , response [ 'apple_pay_card' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'android_pay_card' in response ) : #NEWLINE# #INDENT# return AndroidPayCard ( self . gateway , response [ 'android_pay_card' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'amex_express_checkout_card' in response ) : #NEWLINE# #INDENT# return AmexExpressCheckoutCard ( self . gateway , response [ 'amex_express_checkout_card' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'coinbase_account' in name ) : #NEWLINE# #INDENT# return CoinbaseAccount ( self . gateway , response [ 'coinbase_account' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'venmo_account' in response ) : #NEWLINE# #INDENT# return VenmoAccount ( self . gateway , response [ 'venmo_account' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'payment_method_nonce' in response ) : #NEWLINE# #INDENT# return PaymentMethodNonce ( self . gateway , response [ 'payment_method_nonce' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'success' in response ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name = list ( response ) [ 0 ] #NEWLINE# return UnknownPaymentMethod ( self . gateway , response [ name ] )