Class: PaypalServerSdk::CardVerificationProcessorResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::CardVerificationProcessorResponse
- Defined in:
- lib/paypal_server_sdk/models/card_verification_processor_response.rb
Overview
The processor response information for payment requests, such as direct credit card transactions.
Instance Attribute Summary collapse
-
#avs_code ⇒ AvsCode
The address verification code for Visa, Discover, Mastercard, or American Express transactions.
-
#cvv_code ⇒ CvvCode
The card verification value code for for Visa, Discover, Mastercard, or American Express.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(avs_code: SKIP, cvv_code: SKIP) ⇒ CardVerificationProcessorResponse
constructor
A new instance of CardVerificationProcessorResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(avs_code: SKIP, cvv_code: SKIP) ⇒ CardVerificationProcessorResponse
Returns a new instance of CardVerificationProcessorResponse.
44 45 46 47 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 44 def initialize(avs_code: SKIP, cvv_code: SKIP) @avs_code = avs_code unless avs_code == SKIP @cvv_code = cvv_code unless cvv_code == SKIP end |
Instance Attribute Details
#avs_code ⇒ AvsCode
The address verification code for Visa, Discover, Mastercard, or American Express transactions.
16 17 18 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 16 def avs_code @avs_code end |
#cvv_code ⇒ CvvCode
The card verification value code for for Visa, Discover, Mastercard, or American Express.
21 22 23 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 21 def cvv_code @cvv_code end |
Class Method Details
.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 |
.names ⇒ Object
A mapping from model property names to API property names.
24 25 26 27 28 29 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 24 def self.names @_hash = {} if @_hash.nil? @_hash['avs_code'] = 'avs_code' @_hash['cvv_code'] = 'cvv_code' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
32 33 34 35 36 37 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 32 def self.optionals %w[ avs_code cvv_code ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
69 70 71 72 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 69 def inspect class_name = self.class.name.split('::').last "<#{class_name} avs_code: #{@avs_code.inspect}, cvv_code: #{@cvv_code.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
63 64 65 66 |
# File 'lib/paypal_server_sdk/models/card_verification_processor_response.rb', line 63 def to_s class_name = self.class.name.split('::').last "<#{class_name} avs_code: #{@avs_code}, cvv_code: #{@cvv_code}>" end |