Class: CyberSourceMergedSpec::TokenInformation6
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::TokenInformation6
- Defined in:
- lib/cyber_source_merged_spec/models/token_information6.rb
Overview
TokenInformation6 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).
-
#transient_token ⇒ String
A temporary ID that represents the customer's payment data (which is securely stored in Visa Data Centers).
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(transient_token: SKIP, jti: SKIP, additional_properties: nil) ⇒ TokenInformation6
constructor
A new instance of TokenInformation6.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(transient_token: SKIP, jti: SKIP, additional_properties: nil) ⇒ TokenInformation6
Returns a new instance of TokenInformation6.
48 49 50 51 52 53 54 55 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 48 def initialize(transient_token: SKIP, jti: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @transient_token = transient_token unless transient_token == SKIP @jti = jti unless jti == SKIP @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).
25 26 27 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 25 def jti @jti end |
#transient_token ⇒ String
A temporary ID that represents the customer's payment data (which is securely stored in Visa Data Centers). Flex Microform generates this ID and sets it to expire within 15 minutes from when the ID is generated or until the first payment authorization is carried out (whichever occurs first). Valid value for the ID is a 64-character, alphanumeric string. Example: 1D08M4YB968R1F7YVL4TBBKYVNRIR02VZFH9CBYSQIJJXORPI1NK5C98D7F6EB53
20 21 22 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 20 def transient_token @transient_token end |
Class Method Details
.from_element(root) ⇒ Object
79 80 81 82 83 84 85 86 87 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 79 def self.from_element(root) transient_token = XmlUtilities.from_element(root, 'transientToken', String) jti = XmlUtilities.from_element(root, 'jti', String) new(transient_token: transient_token, jti: jti, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 58 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. transient_token = hash.key?('transientToken') ? hash['transientToken'] : SKIP jti = hash.key?('jti') ? hash['jti'] : SKIP # 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. TokenInformation6.new(transient_token: transient_token, jti: jti, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['transient_token'] = 'transientToken' @_hash['jti'] = 'jti' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 36 def self.optionals %w[ transient_token jti ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
109 110 111 112 113 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 109 def inspect class_name = self.class.name.split('::').last "<#{class_name} transient_token: #{@transient_token.inspect}, jti: #{@jti.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} transient_token: #{@transient_token}, jti: #{@jti}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/cyber_source_merged_spec/models/token_information6.rb', line 89 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'transientToken', transient_token) XmlUtilities.add_as_subelement(doc, root, 'jti', jti) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |