Class: VisaAcceptanceMergedSpec::TokenInformation1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::TokenInformation1
- Defined in:
- lib/visa_acceptance_merged_spec/models/token_information1.rb
Overview
TokenInformation1 Model.
Instance Attribute Summary collapse
-
#customer ⇒ Customer4
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault.
-
#instrument_identifier ⇒ InstrumentIdentifier3
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault.
-
#instrumentidentifier_new ⇒ TrueClass | FalseClass
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault.
-
#payment_instrument ⇒ PaymentInstrument4
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault.
-
#shipping_address ⇒ ShippingAddress4
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault.
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(instrumentidentifier_new: SKIP, customer: SKIP, payment_instrument: SKIP, shipping_address: SKIP, instrument_identifier: SKIP, additional_properties: nil) ⇒ TokenInformation1
constructor
A new instance of TokenInformation1.
-
#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(instrumentidentifier_new: SKIP, customer: SKIP, payment_instrument: SKIP, shipping_address: SKIP, instrument_identifier: SKIP, additional_properties: nil) ⇒ TokenInformation1
Returns a new instance of TokenInformation1.
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 79 def initialize(instrumentidentifier_new: SKIP, customer: SKIP, payment_instrument: SKIP, shipping_address: SKIP, instrument_identifier: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @instrumentidentifier_new = instrumentidentifier_new unless instrumentidentifier_new == SKIP @customer = customer unless customer == SKIP @payment_instrument = payment_instrument unless payment_instrument == SKIP @shipping_address = shipping_address unless shipping_address == SKIP @instrument_identifier = instrument_identifier unless instrument_identifier == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#customer ⇒ Customer4
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault. A value of false means the card number or bank account used to create an Instrument Identifier already existed in the token vault.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 26 def customer @customer end |
#instrument_identifier ⇒ InstrumentIdentifier3
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault. A value of false means the card number or bank account used to create an Instrument Identifier already existed in the token vault.
50 51 52 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 50 def instrument_identifier @instrument_identifier end |
#instrumentidentifier_new ⇒ TrueClass | FalseClass
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault. A value of false means the card number or bank account used to create an Instrument Identifier already existed in the token vault.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 18 def instrumentidentifier_new @instrumentidentifier_new end |
#payment_instrument ⇒ PaymentInstrument4
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault. A value of false means the card number or bank account used to create an Instrument Identifier already existed in the token vault.
34 35 36 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 34 def payment_instrument @payment_instrument end |
#shipping_address ⇒ ShippingAddress4
A value of true means the card number or bank account used to create an Instrument Identifier was new and did not already exist in the token vault. A value of false means the card number or bank account used to create an Instrument Identifier already existed in the token vault.
42 43 44 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 42 def shipping_address @shipping_address end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. instrumentidentifier_new = hash.key?('instrumentidentifierNew') ? hash['instrumentidentifierNew'] : SKIP customer = Customer4.from_hash(hash['customer']) if hash['customer'] payment_instrument = PaymentInstrument4.from_hash(hash['paymentInstrument']) if hash['paymentInstrument'] shipping_address = ShippingAddress4.from_hash(hash['shippingAddress']) if hash['shippingAddress'] instrument_identifier = InstrumentIdentifier3.from_hash(hash['instrumentIdentifier']) if hash['instrumentIdentifier'] # 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. TokenInformation1.new(instrumentidentifier_new: instrumentidentifier_new, customer: customer, payment_instrument: payment_instrument, shipping_address: shipping_address, instrument_identifier: instrument_identifier, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['instrumentidentifier_new'] = 'instrumentidentifierNew' @_hash['customer'] = 'customer' @_hash['payment_instrument'] = 'paymentInstrument' @_hash['shipping_address'] = 'shippingAddress' @_hash['instrument_identifier'] = 'instrumentIdentifier' @_hash end |
.nullables ⇒ Object
An array for nullable fields
75 76 77 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 75 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
64 65 66 67 68 69 70 71 72 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 64 def self.optionals %w[ instrumentidentifier_new customer payment_instrument shipping_address instrument_identifier ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
134 135 136 137 138 139 140 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 134 def inspect class_name = self.class.name.split('::').last "<#{class_name} instrumentidentifier_new: #{@instrumentidentifier_new.inspect}, customer:"\ " #{@customer.inspect}, payment_instrument: #{@payment_instrument.inspect},"\ " shipping_address: #{@shipping_address.inspect}, instrument_identifier:"\ " #{@instrument_identifier.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
125 126 127 128 129 130 131 |
# File 'lib/visa_acceptance_merged_spec/models/token_information1.rb', line 125 def to_s class_name = self.class.name.split('::').last "<#{class_name} instrumentidentifier_new: #{@instrumentidentifier_new}, customer:"\ " #{@customer}, payment_instrument: #{@payment_instrument}, shipping_address:"\ " #{@shipping_address}, instrument_identifier: #{@instrument_identifier},"\ " additional_properties: #{@additional_properties}>" end |