Class: CyberSourceMergedSpec::ValidateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ValidateRequest
- Defined in:
- lib/cyber_source_merged_spec/models/validate_request.rb
Overview
ValidateRequest Model.
Instance Attribute Summary collapse
-
#client_reference_information ⇒ ClientReferenceInformation48
TODO: Write general description for this method.
-
#consumer_authentication_information ⇒ ConsumerAuthenticationInformation9
TODO: Write general description for this method.
-
#device_information ⇒ DeviceInformation15
TODO: Write general description for this method.
-
#order_information ⇒ OrderInformation39
TODO: Write general description for this method.
-
#payment_information ⇒ PaymentInformation35
TODO: Write general description for this method.
-
#processing_information ⇒ ProcessingInformation57
TODO: Write general description for this method.
-
#token_information ⇒ TokenInformation5
TODO: Write general description for this method.
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(client_reference_information: SKIP, processing_information: SKIP, order_information: SKIP, payment_information: SKIP, consumer_authentication_information: SKIP, device_information: SKIP, token_information: SKIP, additional_properties: nil) ⇒ ValidateRequest
constructor
A new instance of ValidateRequest.
-
#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(client_reference_information: SKIP, processing_information: SKIP, order_information: SKIP, payment_information: SKIP, consumer_authentication_information: SKIP, device_information: SKIP, token_information: SKIP, additional_properties: nil) ⇒ ValidateRequest
Returns a new instance of ValidateRequest.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 72 def initialize(client_reference_information: SKIP, processing_information: SKIP, order_information: SKIP, payment_information: SKIP, consumer_authentication_information: SKIP, device_information: SKIP, token_information: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless client_reference_information == SKIP @client_reference_information = client_reference_information end @processing_information = processing_information unless processing_information == SKIP @order_information = order_information unless order_information == SKIP @payment_information = payment_information unless payment_information == SKIP unless consumer_authentication_information == SKIP @consumer_authentication_information = consumer_authentication_information end @device_information = device_information unless device_information == SKIP @token_information = token_information unless token_information == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#client_reference_information ⇒ ClientReferenceInformation48
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 14 def client_reference_information @client_reference_information end |
#consumer_authentication_information ⇒ ConsumerAuthenticationInformation9
TODO: Write general description for this method
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 30 def consumer_authentication_information @consumer_authentication_information end |
#device_information ⇒ DeviceInformation15
TODO: Write general description for this method
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 34 def device_information @device_information end |
#order_information ⇒ OrderInformation39
TODO: Write general description for this method
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 22 def order_information @order_information end |
#payment_information ⇒ PaymentInformation35
TODO: Write general description for this method
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 26 def payment_information @payment_information end |
#processing_information ⇒ ProcessingInformation57
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 18 def processing_information @processing_information end |
#token_information ⇒ TokenInformation5
TODO: Write general description for this method
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 38 def token_information @token_information end |
Class Method Details
.from_element(root) ⇒ Object
137 138 139 140 141 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/cyber_source_merged_spec/models/validate_request.rb', line 137 def self.from_element(root) client_reference_information = XmlUtilities.from_element( root, 'ClientReferenceInformation48', ClientReferenceInformation48 ) processing_information = XmlUtilities.from_element( root, 'ProcessingInformation57', ProcessingInformation57 ) order_information = XmlUtilities.from_element(root, 'OrderInformation39', OrderInformation39) payment_information = XmlUtilities.from_element(root, 'PaymentInformation35', PaymentInformation35) consumer_authentication_information = XmlUtilities.from_element( root, 'ConsumerAuthenticationInformation9', ConsumerAuthenticationInformation9 ) device_information = XmlUtilities.from_element(root, 'DeviceInformation15', DeviceInformation15) token_information = XmlUtilities.from_element(root, 'TokenInformation5', TokenInformation5) new(client_reference_information: client_reference_information, processing_information: processing_information, order_information: order_information, payment_information: payment_information, consumer_authentication_information: consumer_authentication_information, device_information: device_information, token_information: token_information, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 98 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. if hash['clientReferenceInformation'] client_reference_information = ClientReferenceInformation48.from_hash(hash['clientReferenceInformation']) end processing_information = ProcessingInformation57.from_hash(hash['processingInformation']) if hash['processingInformation'] order_information = OrderInformation39.from_hash(hash['orderInformation']) if hash['orderInformation'] payment_information = PaymentInformation35.from_hash(hash['paymentInformation']) if hash['paymentInformation'] if hash['consumerAuthenticationInformation'] consumer_authentication_information = ConsumerAuthenticationInformation9.from_hash(hash['consumerAuthenticationInformation']) end device_information = DeviceInformation15.from_hash(hash['deviceInformation']) if hash['deviceInformation'] token_information = TokenInformation5.from_hash(hash['tokenInformation']) if hash['tokenInformation'] # 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. ValidateRequest.new(client_reference_information: client_reference_information, processing_information: processing_information, order_information: order_information, payment_information: payment_information, consumer_authentication_information: consumer_authentication_information, device_information: device_information, token_information: token_information, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['client_reference_information'] = 'clientReferenceInformation' @_hash['processing_information'] = 'processingInformation' @_hash['order_information'] = 'orderInformation' @_hash['payment_information'] = 'paymentInformation' @_hash['consumer_authentication_information'] = 'consumerAuthenticationInformation' @_hash['device_information'] = 'deviceInformation' @_hash['token_information'] = 'tokenInformation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
68 69 70 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 68 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 55 def self.optionals %w[ client_reference_information processing_information order_information payment_information consumer_authentication_information device_information token_information ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
206 207 208 209 210 211 212 213 214 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 206 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_reference_information: #{@client_reference_information.inspect},"\ " processing_information: #{@processing_information.inspect}, order_information:"\ " #{@order_information.inspect}, payment_information: #{@payment_information.inspect},"\ " consumer_authentication_information: #{@consumer_authentication_information.inspect},"\ " device_information: #{@device_information.inspect}, token_information:"\ " #{@token_information.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
195 196 197 198 199 200 201 202 203 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 195 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_reference_information: #{@client_reference_information},"\ " processing_information: #{@processing_information}, order_information:"\ " #{@order_information}, payment_information: #{@payment_information},"\ " consumer_authentication_information: #{@consumer_authentication_information},"\ " device_information: #{@device_information}, token_information: #{@token_information},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/cyber_source_merged_spec/models/validate_request.rb', line 170 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'ClientReferenceInformation48', client_reference_information) XmlUtilities.add_as_subelement(doc, root, 'ProcessingInformation57', processing_information) XmlUtilities.add_as_subelement(doc, root, 'OrderInformation39', order_information) XmlUtilities.add_as_subelement(doc, root, 'PaymentInformation35', payment_information) XmlUtilities.add_as_subelement(doc, root, 'ConsumerAuthenticationInformation9', consumer_authentication_information) XmlUtilities.add_as_subelement(doc, root, 'DeviceInformation15', device_information) XmlUtilities.add_as_subelement(doc, root, 'TokenInformation5', token_information) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |