Class: VisaAcceptanceMergedSpec::TokenInformation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::TokenInformation
- Defined in:
- lib/visa_acceptance_merged_spec/models/token_information.rb
Overview
TokenInformation Model.
Instance Attribute Summary collapse
-
#jti ⇒ String
TMS Transient Token, 64 hexadecimal id value representing captured payment credentials (including Sensitive Authentication Data, e.g. CVV).
-
#network_token_option ⇒ String
Indicates whether a payment network token associated with a TMS token should be used for authorization.
-
#payment_instrument ⇒ PaymentInstrument1
Flex API Transient Token encoded as JWT (JSON Web Token), e.g.
-
#shipping_address ⇒ ShippingAddress1
Flex API Transient Token encoded as JWT (JSON Web Token), e.g.
-
#token_provisioning_information ⇒ TokenProvisioningInformation
Indicates whether a payment network token associated with a TMS token should be used for authorization.
-
#transient_token_jwt ⇒ String
Flex API Transient Token encoded as JWT (JSON Web Token), e.g.
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(jti: SKIP, transient_token_jwt: SKIP, payment_instrument: SKIP, shipping_address: SKIP, network_token_option: SKIP, token_provisioning_information: SKIP, additional_properties: nil) ⇒ TokenInformation
constructor
A new instance of TokenInformation.
-
#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(jti: SKIP, transient_token_jwt: SKIP, payment_instrument: SKIP, shipping_address: SKIP, network_token_option: SKIP, token_provisioning_information: SKIP, additional_properties: nil) ⇒ TokenInformation
Returns a new instance of TokenInformation.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 84 def initialize(jti: SKIP, transient_token_jwt: SKIP, payment_instrument: SKIP, shipping_address: SKIP, network_token_option: SKIP, token_provisioning_information: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @jti = jti unless jti == SKIP @transient_token_jwt = transient_token_jwt unless transient_token_jwt == SKIP @payment_instrument = payment_instrument unless payment_instrument == SKIP @shipping_address = shipping_address unless shipping_address == SKIP @network_token_option = network_token_option unless network_token_option == SKIP unless token_provisioning_information == SKIP @token_provisioning_information = token_provisioning_information end @additional_properties = additional_properties end |
Instance Attribute Details
#jti ⇒ String
TMS Transient Token, 64 hexadecimal id value representing captured payment credentials (including Sensitive Authentication Data, e.g. CVV).
15 16 17 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 15 def jti @jti end |
#network_token_option ⇒ String
Indicates whether a payment network token associated with a TMS token should be used for authorization. This field can contain one of following values:
ignore: Use a tokenized card number for an authorization, even if the TMS token has an associated payment network token.prefer: (Default) Use an associated payment network token for an authorization if the TMS token has one; otherwise, use the tokenized card number.
41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 41 def network_token_option @network_token_option end |
#payment_instrument ⇒ PaymentInstrument1
Flex API Transient Token encoded as JWT (JSON Web Token), e.g. Flex microform or Unified Payment checkout result.
25 26 27 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 25 def payment_instrument @payment_instrument end |
#shipping_address ⇒ ShippingAddress1
Flex API Transient Token encoded as JWT (JSON Web Token), e.g. Flex microform or Unified Payment checkout result.
30 31 32 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 30 def shipping_address @shipping_address end |
#token_provisioning_information ⇒ TokenProvisioningInformation
Indicates whether a payment network token associated with a TMS token should be used for authorization. This field can contain one of following values:
ignore: Use a tokenized card number for an authorization, even if the TMS token has an associated payment network token.prefer: (Default) Use an associated payment network token for an authorization if the TMS token has one; otherwise, use the tokenized card number.
52 53 54 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 52 def token_provisioning_information @token_provisioning_information end |
#transient_token_jwt ⇒ String
Flex API Transient Token encoded as JWT (JSON Web Token), e.g. Flex microform or Unified Payment checkout result.
20 21 22 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 20 def transient_token_jwt @transient_token_jwt end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 105 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. jti = hash.key?('jti') ? hash['jti'] : SKIP transient_token_jwt = hash.key?('transientTokenJwt') ? hash['transientTokenJwt'] : SKIP payment_instrument = PaymentInstrument1.from_hash(hash['paymentInstrument']) if hash['paymentInstrument'] shipping_address = ShippingAddress1.from_hash(hash['shippingAddress']) if hash['shippingAddress'] network_token_option = hash.key?('networkTokenOption') ? hash['networkTokenOption'] : SKIP if hash['tokenProvisioningInformation'] token_provisioning_information = TokenProvisioningInformation.from_hash(hash['tokenProvisioningInformation']) end # 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. TokenInformation.new(jti: jti, transient_token_jwt: transient_token_jwt, payment_instrument: payment_instrument, shipping_address: shipping_address, network_token_option: network_token_option, token_provisioning_information: token_provisioning_information, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 55 def self.names @_hash = {} if @_hash.nil? @_hash['jti'] = 'jti' @_hash['transient_token_jwt'] = 'transientTokenJwt' @_hash['payment_instrument'] = 'paymentInstrument' @_hash['shipping_address'] = 'shippingAddress' @_hash['network_token_option'] = 'networkTokenOption' @_hash['token_provisioning_information'] = 'tokenProvisioningInformation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
80 81 82 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 80 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
68 69 70 71 72 73 74 75 76 77 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 68 def self.optionals %w[ jti transient_token_jwt payment_instrument shipping_address network_token_option token_provisioning_information ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
149 150 151 152 153 154 155 156 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 149 def inspect class_name = self.class.name.split('::').last "<#{class_name} jti: #{@jti.inspect}, transient_token_jwt: #{@transient_token_jwt.inspect},"\ " payment_instrument: #{@payment_instrument.inspect}, shipping_address:"\ " #{@shipping_address.inspect}, network_token_option: #{@network_token_option.inspect},"\ " token_provisioning_information: #{@token_provisioning_information.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
140 141 142 143 144 145 146 |
# File 'lib/visa_acceptance_merged_spec/models/token_information.rb', line 140 def to_s class_name = self.class.name.split('::').last "<#{class_name} jti: #{@jti}, transient_token_jwt: #{@transient_token_jwt},"\ " payment_instrument: #{@payment_instrument}, shipping_address: #{@shipping_address},"\ " network_token_option: #{@network_token_option}, token_provisioning_information:"\ " #{@token_provisioning_information}, additional_properties: #{@additional_properties}>" end |