Class: VisaAcceptanceMergedSpec::PaymentInformation1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::PaymentInformation1
- Defined in:
- lib/visa_acceptance_merged_spec/models/payment_information1.rb
Overview
PaymentInformation1 Model.
Instance Attribute Summary collapse
-
#account_features ⇒ AccountFeatures
TODO: Write general description for this method.
-
#account_type ⇒ String
Type of payment card account.
-
#bank ⇒ Bank1
TODO: Write general description for this method.
-
#bin ⇒ String
Credit card BIN (the first six digits of the credit card).Derived either from the
cc_binrequest field or from the first six characters of thecustomer_cc_numfield. -
#bin_country ⇒ String
Country (two-digit country code) associated with the BIN of the customer’s card used for the payment.
-
#card ⇒ Card1
TODO: Write general description for this method.
-
#customer ⇒ Customer
TODO: Write general description for this method.
-
#e_wallet ⇒ EWallet1
Country (two-digit country code) associated with the BIN of the customer’s card used for the payment.
-
#instrument_identifier ⇒ InstrumentIdentifier2
TODO: Write general description for this method.
-
#issuer ⇒ String
Name of the bank or entity that issued the card account.
-
#payment_instrument ⇒ PaymentInstrument
TODO: Write general description for this method.
-
#scheme ⇒ String
Subtype of card account.
-
#shipping_address ⇒ ShippingAddress
TODO: Write general description for this method.
-
#tokenized_card ⇒ TokenizedCard1
TODO: Write general description for this method.
-
#tokenized_payment_method ⇒ TokenizedPaymentMethod1
TODO: Write general description for this method.
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(card: SKIP, tokenized_card: SKIP, tokenized_payment_method: SKIP, account_features: SKIP, bank: SKIP, customer: SKIP, payment_instrument: SKIP, instrument_identifier: SKIP, shipping_address: SKIP, scheme: SKIP, bin: SKIP, account_type: SKIP, issuer: SKIP, bin_country: SKIP, e_wallet: SKIP, additional_properties: nil) ⇒ PaymentInformation1
constructor
A new instance of PaymentInformation1.
-
#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, tokenized_card: SKIP, tokenized_payment_method: SKIP, account_features: SKIP, bank: SKIP, customer: SKIP, payment_instrument: SKIP, instrument_identifier: SKIP, shipping_address: SKIP, scheme: SKIP, bin: SKIP, account_type: SKIP, issuer: SKIP, bin_country: SKIP, e_wallet: SKIP, additional_properties: nil) ⇒ PaymentInformation1
Returns a new instance of PaymentInformation1.
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 142 def initialize(card: SKIP, tokenized_card: SKIP, tokenized_payment_method: SKIP, account_features: SKIP, bank: SKIP, customer: SKIP, payment_instrument: SKIP, instrument_identifier: SKIP, shipping_address: SKIP, scheme: SKIP, bin: SKIP, account_type: SKIP, issuer: SKIP, bin_country: SKIP, e_wallet: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @card = card unless card == SKIP @tokenized_card = tokenized_card unless tokenized_card == SKIP @tokenized_payment_method = tokenized_payment_method unless tokenized_payment_method == SKIP @account_features = account_features unless account_features == SKIP @bank = bank unless bank == SKIP @customer = customer unless customer == SKIP @payment_instrument = payment_instrument unless payment_instrument == SKIP @instrument_identifier = instrument_identifier unless instrument_identifier == SKIP @shipping_address = shipping_address unless shipping_address == SKIP @scheme = scheme unless scheme == SKIP @bin = bin unless bin == SKIP @account_type = account_type unless account_type == SKIP @issuer = issuer unless issuer == SKIP @bin_country = bin_country unless bin_country == SKIP @e_wallet = e_wallet unless e_wallet == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_features ⇒ AccountFeatures
TODO: Write general description for this method
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 26 def account_features @account_features end |
#account_type ⇒ String
Type of payment card account. This field can refer to a credit card, debit card, or prepaid card account type.
71 72 73 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 71 def account_type @account_type end |
#bank ⇒ Bank1
TODO: Write general description for this method
30 31 32 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 30 def bank @bank end |
#bin ⇒ String
Credit card BIN (the first six digits of the credit card).Derived either
from the cc_bin request field
or from the first six characters of the customer_cc_num field.
65 66 67 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 65 def bin @bin end |
#bin_country ⇒ String
Country (two-digit country code) associated with the BIN of the customer’s card used for the payment. Returned if the information is available. Use this field for additional information when reviewing orders. This information is also displayed in the details page of the Visa Acceptance Business Center.
84 85 86 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 84 def bin_country @bin_country end |
#card ⇒ Card1
TODO: Write general description for this method
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 14 def card @card end |
#customer ⇒ Customer
TODO: Write general description for this method
34 35 36 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 34 def customer @customer end |
#e_wallet ⇒ EWallet1
Country (two-digit country code) associated with the BIN of the customer’s card used for the payment. Returned if the information is available. Use this field for additional information when reviewing orders. This information is also displayed in the details page of the Visa Acceptance Business Center.
93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 93 def e_wallet @e_wallet end |
#instrument_identifier ⇒ InstrumentIdentifier2
TODO: Write general description for this method
42 43 44 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 42 def instrument_identifier @instrument_identifier end |
#issuer ⇒ String
Name of the bank or entity that issued the card account.
75 76 77 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 75 def issuer @issuer end |
#payment_instrument ⇒ PaymentInstrument
TODO: Write general description for this method
38 39 40 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 38 def payment_instrument @payment_instrument end |
#scheme ⇒ String
Subtype of card account. This field can contain one of the following values:
- Maestro International
- Maestro UK Domestic
- MasterCard Credit
- MasterCard Debit
- Visa Credit
- Visa Debit
- Visa Electron Note Additional values may be present.
59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 59 def scheme @scheme end |
#shipping_address ⇒ ShippingAddress
TODO: Write general description for this method
46 47 48 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 46 def shipping_address @shipping_address end |
#tokenized_card ⇒ TokenizedCard1
TODO: Write general description for this method
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 18 def tokenized_card @tokenized_card end |
#tokenized_payment_method ⇒ TokenizedPaymentMethod1
TODO: Write general description for this method
22 23 24 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 22 def tokenized_payment_method @tokenized_payment_method end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
171 172 173 174 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 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 171 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. card = Card1.from_hash(hash['card']) if hash['card'] tokenized_card = TokenizedCard1.from_hash(hash['tokenizedCard']) if hash['tokenizedCard'] if hash['tokenizedPaymentMethod'] tokenized_payment_method = TokenizedPaymentMethod1.from_hash(hash['tokenizedPaymentMethod']) end account_features = AccountFeatures.from_hash(hash['accountFeatures']) if hash['accountFeatures'] bank = Bank1.from_hash(hash['bank']) if hash['bank'] customer = Customer.from_hash(hash['customer']) if hash['customer'] payment_instrument = PaymentInstrument.from_hash(hash['paymentInstrument']) if hash['paymentInstrument'] instrument_identifier = InstrumentIdentifier2.from_hash(hash['instrumentIdentifier']) if hash['instrumentIdentifier'] shipping_address = ShippingAddress.from_hash(hash['shippingAddress']) if hash['shippingAddress'] scheme = hash.key?('scheme') ? hash['scheme'] : SKIP bin = hash.key?('bin') ? hash['bin'] : SKIP account_type = hash.key?('accountType') ? hash['accountType'] : SKIP issuer = hash.key?('issuer') ? hash['issuer'] : SKIP bin_country = hash.key?('binCountry') ? hash['binCountry'] : SKIP e_wallet = EWallet1.from_hash(hash['eWallet']) if hash['eWallet'] # 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. PaymentInformation1.new(card: card, tokenized_card: tokenized_card, tokenized_payment_method: tokenized_payment_method, account_features: account_features, bank: bank, customer: customer, payment_instrument: payment_instrument, instrument_identifier: instrument_identifier, shipping_address: shipping_address, scheme: scheme, bin: bin, account_type: account_type, issuer: issuer, bin_country: bin_country, e_wallet: e_wallet, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 96 def self.names @_hash = {} if @_hash.nil? @_hash['card'] = 'card' @_hash['tokenized_card'] = 'tokenizedCard' @_hash['tokenized_payment_method'] = 'tokenizedPaymentMethod' @_hash['account_features'] = 'accountFeatures' @_hash['bank'] = 'bank' @_hash['customer'] = 'customer' @_hash['payment_instrument'] = 'paymentInstrument' @_hash['instrument_identifier'] = 'instrumentIdentifier' @_hash['shipping_address'] = 'shippingAddress' @_hash['scheme'] = 'scheme' @_hash['bin'] = 'bin' @_hash['account_type'] = 'accountType' @_hash['issuer'] = 'issuer' @_hash['bin_country'] = 'binCountry' @_hash['e_wallet'] = 'eWallet' @_hash end |
.nullables ⇒ Object
An array for nullable fields
138 139 140 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 138 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 117 def self.optionals %w[ card tokenized_card tokenized_payment_method account_features bank customer payment_instrument instrument_identifier shipping_address scheme bin account_type issuer bin_country e_wallet ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 236 def inspect class_name = self.class.name.split('::').last "<#{class_name} card: #{@card.inspect}, tokenized_card: #{@tokenized_card.inspect},"\ " tokenized_payment_method: #{@tokenized_payment_method.inspect}, account_features:"\ " #{@account_features.inspect}, bank: #{@bank.inspect}, customer: #{@customer.inspect},"\ " payment_instrument: #{@payment_instrument.inspect}, instrument_identifier:"\ " #{@instrument_identifier.inspect}, shipping_address: #{@shipping_address.inspect}, scheme:"\ " #{@scheme.inspect}, bin: #{@bin.inspect}, account_type: #{@account_type.inspect}, issuer:"\ " #{@issuer.inspect}, bin_country: #{@bin_country.inspect}, e_wallet: #{@e_wallet.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
224 225 226 227 228 229 230 231 232 233 |
# File 'lib/visa_acceptance_merged_spec/models/payment_information1.rb', line 224 def to_s class_name = self.class.name.split('::').last "<#{class_name} card: #{@card}, tokenized_card: #{@tokenized_card},"\ " tokenized_payment_method: #{@tokenized_payment_method}, account_features:"\ " #{@account_features}, bank: #{@bank}, customer: #{@customer}, payment_instrument:"\ " #{@payment_instrument}, instrument_identifier: #{@instrument_identifier},"\ " shipping_address: #{@shipping_address}, scheme: #{@scheme}, bin: #{@bin}, account_type:"\ " #{@account_type}, issuer: #{@issuer}, bin_country: #{@bin_country}, e_wallet:"\ " #{@e_wallet}, additional_properties: #{@additional_properties}>" end |