Class: UnivapayClientSdk::TokenResponseCardData
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::TokenResponseCardData
- Defined in:
- lib/univapay_client_sdk/models/token_response_card_data.rb
Overview
Token Response Card Data schema.
Instance Attribute Summary collapse
-
#billing ⇒ TokenResponseCardDataBilling
Token Response Card Data Billing schema.
-
#card ⇒ TokenResponseCardDataCard
Token Response Card Data Card schema.
-
#cvv_authorize ⇒ TokenResponseCardDataCvvAuthorize
Token Response Card Data Cvv Authorize schema.
-
#cvv_authorize_check ⇒ TokenResponseCardDataCvvAuthorizeCheck
Token Response Card Data Cvv Authorize Check schema.
-
#three_ds ⇒ TokenResponseCardDataThreeDs
Token Response Card Data Three Ds schema.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(card: SKIP, billing: SKIP, cvv_authorize: SKIP, cvv_authorize_check: SKIP, three_ds: SKIP, additional_properties: nil) ⇒ TokenResponseCardData
constructor
A new instance of TokenResponseCardData.
-
#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(card: SKIP, billing: SKIP, cvv_authorize: SKIP, cvv_authorize_check: SKIP, three_ds: SKIP, additional_properties: nil) ⇒ TokenResponseCardData
Returns a new instance of TokenResponseCardData.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 59 def initialize(card: SKIP, billing: SKIP, cvv_authorize: SKIP, cvv_authorize_check: SKIP, three_ds: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @card = card unless card == SKIP @billing = billing unless billing == SKIP @cvv_authorize = unless == SKIP @cvv_authorize_check = unless == SKIP @three_ds = three_ds unless three_ds == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#billing ⇒ TokenResponseCardDataBilling
Token Response Card Data Billing schema.
18 19 20 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 18 def billing @billing end |
#card ⇒ TokenResponseCardDataCard
Token Response Card Data Card schema.
14 15 16 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 14 def card @card end |
#cvv_authorize ⇒ TokenResponseCardDataCvvAuthorize
Token Response Card Data Cvv Authorize schema.
22 23 24 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 22 def @cvv_authorize end |
#cvv_authorize_check ⇒ TokenResponseCardDataCvvAuthorizeCheck
Token Response Card Data Cvv Authorize Check schema.
26 27 28 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 26 def @cvv_authorize_check end |
#three_ds ⇒ TokenResponseCardDataThreeDs
Token Response Card Data Three Ds schema.
30 31 32 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 30 def three_ds @three_ds end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. card = TokenResponseCardDataCard.from_hash(hash['card']) if hash['card'] billing = TokenResponseCardDataBilling.from_hash(hash['billing']) if hash['billing'] = TokenResponseCardDataCvvAuthorize.from_hash(hash['cvv_authorize']) if hash['cvv_authorize'] if hash['cvv_authorize_check'] = TokenResponseCardDataCvvAuthorizeCheck.from_hash(hash['cvv_authorize_check']) end three_ds = TokenResponseCardDataThreeDs.from_hash(hash['three_ds']) if hash['three_ds'] # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. TokenResponseCardData.new(card: card, billing: billing, cvv_authorize: , cvv_authorize_check: , three_ds: three_ds, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['card'] = 'card' @_hash['billing'] = 'billing' @_hash['cvv_authorize'] = 'cvv_authorize' @_hash['cvv_authorize_check'] = 'cvv_authorize_check' @_hash['three_ds'] = 'three_ds' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 44 def self.optionals %w[ card billing cvv_authorize cvv_authorize_check three_ds ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
105 106 107 108 109 110 111 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 105 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
122 123 124 125 126 127 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 122 def inspect class_name = self.class.name.split('::').last "<#{class_name} card: #{@card.inspect}, billing: #{@billing.inspect}, cvv_authorize:"\ " #{@cvv_authorize.inspect}, cvv_authorize_check: #{@cvv_authorize_check.inspect}, three_ds:"\ " #{@three_ds.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
114 115 116 117 118 119 |
# File 'lib/univapay_client_sdk/models/token_response_card_data.rb', line 114 def to_s class_name = self.class.name.split('::').last "<#{class_name} card: #{@card}, billing: #{@billing}, cvv_authorize: #{@cvv_authorize},"\ " cvv_authorize_check: #{@cvv_authorize_check}, three_ds: #{@three_ds},"\ " additional_properties: #{@additional_properties}>" end |