Class: VisaAcceptanceMergedSpec::PostPaymentInstrumentResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::PostPaymentInstrumentResponse
- Defined in:
- lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb
Overview
PostPaymentInstrumentResponse Model.
Instance Attribute Summary collapse
-
#bank_account ⇒ BankAccount
The type of Payment Instrument.
-
#bill_to ⇒ BillTo15
The type of Payment Instrument.
-
#buyer_information ⇒ BuyerInformation13
The type of Payment Instrument.
-
#card ⇒ Card12
The type of Payment Instrument.
-
#default ⇒ TrueClass | FalseClass
Flag that indicates whether customer payment instrument is the dafault.
-
#embedded ⇒ Embedded9
The type of Payment Instrument.
-
#id ⇒ String
The Id of the Payment Instrument Token.
-
#instrument_identifier ⇒ InstrumentIdentifier10
The type of Payment Instrument.
-
#links ⇒ Links20
TODO: Write general description for this method.
-
#merchant_information ⇒ MerchantInformation18
The type of Payment Instrument.
-
#metadata ⇒ Metadata1
The type of Payment Instrument.
-
#object ⇒ String
The type.
-
#processing_information ⇒ TmsPaymentInstrumentProcessingInfo
The type of Payment Instrument.
-
#state ⇒ String
Issuers state for the card number.
-
#type ⇒ String
The type of Payment Instrument.
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(links: SKIP, id: SKIP, object: SKIP, default: SKIP, state: SKIP, type: SKIP, bank_account: SKIP, card: SKIP, buyer_information: SKIP, bill_to: SKIP, processing_information: SKIP, merchant_information: SKIP, instrument_identifier: SKIP, metadata: SKIP, embedded: SKIP, additional_properties: nil) ⇒ PostPaymentInstrumentResponse
constructor
A new instance of PostPaymentInstrumentResponse.
-
#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(links: SKIP, id: SKIP, object: SKIP, default: SKIP, state: SKIP, type: SKIP, bank_account: SKIP, card: SKIP, buyer_information: SKIP, bill_to: SKIP, processing_information: SKIP, merchant_information: SKIP, instrument_identifier: SKIP, metadata: SKIP, embedded: SKIP, additional_properties: nil) ⇒ PostPaymentInstrumentResponse
Returns a new instance of PostPaymentInstrumentResponse.
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 147 def initialize(links: SKIP, id: SKIP, object: SKIP, default: SKIP, state: SKIP, type: SKIP, bank_account: SKIP, card: SKIP, buyer_information: SKIP, bill_to: SKIP, processing_information: SKIP, merchant_information: SKIP, instrument_identifier: SKIP, metadata: SKIP, embedded: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @links = links unless links == SKIP @id = id unless id == SKIP @object = object unless object == SKIP @default = default unless default == SKIP @state = state unless state == SKIP @type = type unless type == SKIP @bank_account = bank_account unless bank_account == SKIP @card = card unless card == SKIP @buyer_information = buyer_information unless buyer_information == SKIP @bill_to = bill_to unless bill_to == SKIP @processing_information = processing_information unless processing_information == SKIP @merchant_information = merchant_information unless merchant_information == SKIP @instrument_identifier = instrument_identifier unless instrument_identifier == SKIP @metadata = unless == SKIP @embedded = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#bank_account ⇒ BankAccount
The type of Payment Instrument. Possible Values:
- cardHash
50 51 52 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 50 def bank_account @bank_account end |
#bill_to ⇒ BillTo15
The type of Payment Instrument. Possible Values:
- cardHash
68 69 70 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 68 def bill_to @bill_to end |
#buyer_information ⇒ BuyerInformation13
The type of Payment Instrument. Possible Values:
- cardHash
62 63 64 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 62 def buyer_information @buyer_information end |
#card ⇒ Card12
The type of Payment Instrument. Possible Values:
- cardHash
56 57 58 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 56 def card @card end |
#default ⇒ TrueClass | FalseClass
Flag that indicates whether customer payment instrument is the dafault. Possible Values:
true: Payment instrument is customer's default.false: Payment instrument is not customer's default.
31 32 33 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 31 def default @default end |
#embedded ⇒ Embedded9
The type of Payment Instrument. Possible Values:
- cardHash
98 99 100 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 98 def @embedded end |
#id ⇒ String
The Id of the Payment Instrument Token.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 18 def id @id end |
#instrument_identifier ⇒ InstrumentIdentifier10
The type of Payment Instrument. Possible Values:
- cardHash
86 87 88 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 86 def instrument_identifier @instrument_identifier end |
#links ⇒ Links20
TODO: Write general description for this method
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 14 def links @links end |
#merchant_information ⇒ MerchantInformation18
The type of Payment Instrument. Possible Values:
- cardHash
80 81 82 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 80 def merchant_information @merchant_information end |
#metadata ⇒ Metadata1
The type of Payment Instrument. Possible Values:
- cardHash
92 93 94 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 92 def @metadata end |
#object ⇒ String
The type. Possible Values:
- paymentInstrument
24 25 26 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 24 def object @object end |
#processing_information ⇒ TmsPaymentInstrumentProcessingInfo
The type of Payment Instrument. Possible Values:
- cardHash
74 75 76 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 74 def processing_information @processing_information end |
#state ⇒ String
Issuers state for the card number. Possible Values:
- ACTIVE
- CLOSED : The account has been closed.
38 39 40 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 38 def state @state end |
#type ⇒ String
The type of Payment Instrument. Possible Values:
- cardHash
44 45 46 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 44 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 175 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. links = Links20.from_hash(hash['_links']) if hash['_links'] id = hash.key?('id') ? hash['id'] : SKIP object = hash.key?('object') ? hash['object'] : SKIP default = hash.key?('default') ? hash['default'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP bank_account = BankAccount.from_hash(hash['bankAccount']) if hash['bankAccount'] card = Card12.from_hash(hash['card']) if hash['card'] buyer_information = BuyerInformation13.from_hash(hash['buyerInformation']) if hash['buyerInformation'] bill_to = BillTo15.from_hash(hash['billTo']) if hash['billTo'] if hash['processingInformation'] processing_information = TmsPaymentInstrumentProcessingInfo.from_hash(hash['processingInformation']) end merchant_information = MerchantInformation18.from_hash(hash['merchantInformation']) if hash['merchantInformation'] instrument_identifier = InstrumentIdentifier10.from_hash(hash['instrumentIdentifier']) if hash['instrumentIdentifier'] = Metadata1.from_hash(hash['metadata']) if hash['metadata'] = Embedded9.from_hash(hash['_embedded']) if hash['_embedded'] # 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. PostPaymentInstrumentResponse.new(links: links, id: id, object: object, default: default, state: state, type: type, bank_account: bank_account, card: card, buyer_information: buyer_information, bill_to: bill_to, processing_information: processing_information, merchant_information: merchant_information, instrument_identifier: instrument_identifier, metadata: , embedded: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 101 def self.names @_hash = {} if @_hash.nil? @_hash['links'] = '_links' @_hash['id'] = 'id' @_hash['object'] = 'object' @_hash['default'] = 'default' @_hash['state'] = 'state' @_hash['type'] = 'type' @_hash['bank_account'] = 'bankAccount' @_hash['card'] = 'card' @_hash['buyer_information'] = 'buyerInformation' @_hash['bill_to'] = 'billTo' @_hash['processing_information'] = 'processingInformation' @_hash['merchant_information'] = 'merchantInformation' @_hash['instrument_identifier'] = 'instrumentIdentifier' @_hash['metadata'] = 'metadata' @_hash['embedded'] = '_embedded' @_hash end |
.nullables ⇒ Object
An array for nullable fields
143 144 145 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 143 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 122 def self.optionals %w[ links id object default state type bank_account card buyer_information bill_to processing_information merchant_information instrument_identifier metadata embedded ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 238 def inspect class_name = self.class.name.split('::').last "<#{class_name} links: #{@links.inspect}, id: #{@id.inspect}, object: #{@object.inspect},"\ " default: #{@default.inspect}, state: #{@state.inspect}, type: #{@type.inspect},"\ " bank_account: #{@bank_account.inspect}, card: #{@card.inspect}, buyer_information:"\ " #{@buyer_information.inspect}, bill_to: #{@bill_to.inspect}, processing_information:"\ " #{@processing_information.inspect}, merchant_information:"\ " #{@merchant_information.inspect}, instrument_identifier:"\ " #{@instrument_identifier.inspect}, metadata: #{@metadata.inspect}, embedded:"\ " #{@embedded.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
227 228 229 230 231 232 233 234 235 |
# File 'lib/visa_acceptance_merged_spec/models/post_payment_instrument_response.rb', line 227 def to_s class_name = self.class.name.split('::').last "<#{class_name} links: #{@links}, id: #{@id}, object: #{@object}, default: #{@default},"\ " state: #{@state}, type: #{@type}, bank_account: #{@bank_account}, card: #{@card},"\ " buyer_information: #{@buyer_information}, bill_to: #{@bill_to}, processing_information:"\ " #{@processing_information}, merchant_information: #{@merchant_information},"\ " instrument_identifier: #{@instrument_identifier}, metadata: #{@metadata}, embedded:"\ " #{@embedded}, additional_properties: #{@additional_properties}>" end |