Method: PaypalServerSdk::CardVerificationProcessorResponse.from_hash
- Defined in:
- lib/paypal_server_sdk/models/card_verification_processor_response.rb
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 50 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. avs_code = hash.key?('avs_code') ? hash['avs_code'] : SKIP cvv_code = hash.key?('cvv_code') ? hash['cvv_code'] : SKIP # Create object from extracted values. CardVerificationProcessorResponse.new(avs_code: avs_code, cvv_code: cvv_code) end |