<s> from braintree . attribute_getter import AttributeGetter <EOL> from braintree . configuration import Configuration <EOL> from braintree . risk_data import RiskData <EOL> from braintree . resource import Resource <EOL> class CreditCardVerification ( AttributeGetter ) : <EOL> class Status ( object ) : <EOL> """<STR_LIT>""" <EOL> Failed = "<STR_LIT>" <EOL> GatewayRejected = "<STR_LIT>" <EOL> ProcessorDeclined = "<STR_LIT>" <EOL> Unrecognized = "<STR_LIT>" <EOL> Verified = "<STR_LIT>" <EOL> def __init__ ( self , gateway , attributes ) : <EOL> AttributeGetter . __init__ ( self , attributes ) <EOL> if "<STR_LIT>" not in attributes : <EOL> self . processor_response_code = None <EOL> if "<STR_LIT>" not in attributes : <EOL> self . processor_response_text = None <EOL> if "<STR_LIT>" in attributes : <EOL> self . risk_data = RiskData ( attributes [ "<STR_LIT>" ] ) <EOL> else : <EOL> self . risk_data = None <EOL> @ staticmethod <EOL> def find ( verification_id ) : <EOL> return Configuration . gateway ( ) . verification . find ( verification_id ) <EOL> @ staticmethod <EOL> def search ( * query ) : <EOL> return Configuration . gateway ( ) . verification . search ( * query ) <EOL> @ staticmethod <EOL> def create ( params ) : <EOL> Resource . verify_keys ( params , CreditCardVerification . create_signature ( ) ) <EOL> return Configuration . gateway ( ) . verification . create ( params ) <EOL> @ staticmethod <EOL> def create_signature ( ) : <EOL> billing_address_params = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" <EOL> ] <EOL> credit_card_params = [ <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , { "<STR_LIT>" : billing_address_params } <EOL> ] <EOL> return [ { "<STR_LIT>" : credit_card_params } , { "<STR_LIT>" : [ "<STR_LIT>" , "<STR_LIT>" ] } ] <EOL> def __eq__ ( self , other ) : <EOL> if not isinstance ( other , CreditCardVerification ) : <EOL> return False <EOL> return self . id == other . id </s>
