Class: CyberSourceMergedSpec::ClientReferenceInformation64
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ClientReferenceInformation64
- Defined in:
- lib/cyber_source_merged_spec/models/client_reference_information64.rb
Overview
ClientReferenceInformation64 Model.
Instance Attribute Summary collapse
-
#application_name ⇒ String
The name of the Connection Method that the originator uses to send a transaction request to CyberSource.
-
#application_user ⇒ String
The entity that is responsible for running the transaction and submitting the processing request to CyberSource.
-
#application_version ⇒ String
Version of the CyberSource application or integration used for a transaction.
-
#code ⇒ String
Originator-generated order reference or tracking number.
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(code: SKIP, application_name: SKIP, application_version: SKIP, application_user: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation64
constructor
A new instance of ClientReferenceInformation64.
-
#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(code: SKIP, application_name: SKIP, application_version: SKIP, application_user: SKIP, additional_properties: nil) ⇒ ClientReferenceInformation64
Returns a new instance of ClientReferenceInformation64.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 59 def initialize(code: SKIP, application_name: SKIP, application_version: SKIP, application_user: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @code = code unless code == SKIP @application_name = application_name unless application_name == SKIP @application_version = application_version unless application_version == SKIP @application_user = application_user unless application_user == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#application_name ⇒ String
The name of the Connection Method that the originator uses to send a transaction request to CyberSource.
21 22 23 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 21 def application_name @application_name end |
#application_user ⇒ String
The entity that is responsible for running the transaction and submitting the processing request to CyberSource. This could be a person, a system, or a connection method.
32 33 34 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 32 def application_user @application_user end |
#application_version ⇒ String
Version of the CyberSource application or integration used for a transaction.
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 26 def application_version @application_version end |
#code ⇒ String
Originator-generated order reference or tracking number. It is recommended that you send a unique value for each transaction so that you can perform meaningful searches for the transaction.
16 17 18 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 16 def code @code end |
Class Method Details
.from_element(root) ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 100 def self.from_element(root) code = XmlUtilities.from_element(root, 'code', String) application_name = XmlUtilities.from_element(root, 'applicationName', String) application_version = XmlUtilities.from_element(root, 'applicationVersion', String) application_user = XmlUtilities.from_element(root, 'applicationUser', String) new(code: code, application_name: application_name, application_version: application_version, application_user: application_user, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code = hash.key?('code') ? hash['code'] : SKIP application_name = hash.key?('applicationName') ? hash['applicationName'] : SKIP application_version = hash.key?('applicationVersion') ? hash['applicationVersion'] : SKIP application_user = hash.key?('applicationUser') ? hash['applicationUser'] : 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. ClientReferenceInformation64.new(code: code, application_name: application_name, application_version: application_version, application_user: application_user, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'code' @_hash['application_name'] = 'applicationName' @_hash['application_version'] = 'applicationVersion' @_hash['application_user'] = 'applicationUser' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 48 49 50 51 52 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 45 def self.optionals %w[ code application_name application_version application_user ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
142 143 144 145 146 147 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 142 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, application_name: #{@application_name.inspect},"\ " application_version: #{@application_version.inspect}, application_user:"\ " #{@application_user.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
134 135 136 137 138 139 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 134 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, application_name: #{@application_name},"\ " application_version: #{@application_version}, application_user: #{@application_user},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/cyber_source_merged_spec/models/client_reference_information64.rb', line 117 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'code', code) XmlUtilities.add_as_subelement(doc, root, 'applicationName', application_name) XmlUtilities.add_as_subelement(doc, root, 'applicationVersion', application_version) XmlUtilities.add_as_subelement(doc, root, 'applicationUser', application_user) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |