Class: CyberSourceMergedSpec::CapturePaymentRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::CapturePaymentRequest
- Defined in:
- lib/cyber_source_merged_spec/models/capture_payment_request.rb
Overview
CapturePaymentRequest Model.
Instance Attribute Summary collapse
-
#aggregator_information ⇒ AggregatorInformation1
TODO: Write general description for this method.
-
#buyer_information ⇒ BuyerInformation2
TODO: Write general description for this method.
-
#client_reference_information ⇒ ClientReferenceInformation
TODO: Write general description for this method.
-
#device_information ⇒ DeviceInformation3
TODO: Write general description for this method.
-
#installment_information ⇒ InstallmentInformation2
The object containing the secure data that the merchant defines.
-
#merchant_defined_information ⇒ Array[MerchantDefinedInformation]
The object containing the custom data that the merchant defines.
-
#merchant_defined_secure_information ⇒ MerchantDefinedSecureInformation
The object containing the secure data that the merchant defines.
-
#merchant_information ⇒ MerchantInformation3
TODO: Write general description for this method.
-
#order_information ⇒ OrderInformation6
TODO: Write general description for this method.
-
#payment_information ⇒ PaymentInformation4
TODO: Write general description for this method.
-
#point_of_sale_information ⇒ PointOfSaleInformation6
TODO: Write general description for this method.
-
#processing_information ⇒ ProcessingInformation5
TODO: Write general description for this method.
-
#processor_information ⇒ ProcessorInformation7
The object containing the secure data that the merchant defines.
-
#promotion_information ⇒ PromotionInformation
The object containing the secure data that the merchant defines.
-
#travel_information ⇒ TravelInformation
The object containing the secure data that the merchant defines.
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, payment_information: SKIP, order_information: SKIP, buyer_information: SKIP, device_information: SKIP, merchant_information: SKIP, aggregator_information: SKIP, point_of_sale_information: SKIP, merchant_defined_information: SKIP, merchant_defined_secure_information: SKIP, installment_information: SKIP, travel_information: SKIP, promotion_information: SKIP, processor_information: SKIP, additional_properties: nil) ⇒ CapturePaymentRequest
constructor
A new instance of CapturePaymentRequest.
-
#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, payment_information: SKIP, order_information: SKIP, buyer_information: SKIP, device_information: SKIP, merchant_information: SKIP, aggregator_information: SKIP, point_of_sale_information: SKIP, merchant_defined_information: SKIP, merchant_defined_secure_information: SKIP, installment_information: SKIP, travel_information: SKIP, promotion_information: SKIP, processor_information: SKIP, additional_properties: nil) ⇒ CapturePaymentRequest
Returns a new instance of CapturePaymentRequest.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 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 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 120 def initialize(client_reference_information: SKIP, processing_information: SKIP, payment_information: SKIP, order_information: SKIP, buyer_information: SKIP, device_information: SKIP, merchant_information: SKIP, aggregator_information: SKIP, point_of_sale_information: SKIP, merchant_defined_information: SKIP, merchant_defined_secure_information: SKIP, installment_information: SKIP, travel_information: SKIP, promotion_information: SKIP, processor_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 @payment_information = payment_information unless payment_information == SKIP @order_information = order_information unless order_information == SKIP @buyer_information = buyer_information unless buyer_information == SKIP @device_information = device_information unless device_information == SKIP @merchant_information = merchant_information unless merchant_information == SKIP @aggregator_information = aggregator_information unless aggregator_information == SKIP unless point_of_sale_information == SKIP @point_of_sale_information = point_of_sale_information end unless merchant_defined_information == SKIP @merchant_defined_information = merchant_defined_information end unless merchant_defined_secure_information == SKIP @merchant_defined_secure_information = merchant_defined_secure_information end @installment_information = installment_information unless installment_information == SKIP @travel_information = travel_information unless travel_information == SKIP @promotion_information = promotion_information unless promotion_information == SKIP @processor_information = processor_information unless processor_information == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#aggregator_information ⇒ AggregatorInformation1
TODO: Write general description for this method
42 43 44 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 42 def aggregator_information @aggregator_information end |
#buyer_information ⇒ BuyerInformation2
TODO: Write general description for this method
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 30 def buyer_information @buyer_information end |
#client_reference_information ⇒ ClientReferenceInformation
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 14 def client_reference_information @client_reference_information end |
#device_information ⇒ DeviceInformation3
TODO: Write general description for this method
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 34 def device_information @device_information end |
#installment_information ⇒ InstallmentInformation2
The object containing the secure data that the merchant defines.
58 59 60 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 58 def installment_information @installment_information end |
#merchant_defined_information ⇒ Array[MerchantDefinedInformation]
The object containing the custom data that the merchant defines.
50 51 52 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 50 def merchant_defined_information @merchant_defined_information end |
#merchant_defined_secure_information ⇒ MerchantDefinedSecureInformation
The object containing the secure data that the merchant defines.
54 55 56 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 54 def merchant_defined_secure_information @merchant_defined_secure_information end |
#merchant_information ⇒ MerchantInformation3
TODO: Write general description for this method
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 38 def merchant_information @merchant_information end |
#order_information ⇒ OrderInformation6
TODO: Write general description for this method
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 26 def order_information @order_information end |
#payment_information ⇒ PaymentInformation4
TODO: Write general description for this method
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 22 def payment_information @payment_information end |
#point_of_sale_information ⇒ PointOfSaleInformation6
TODO: Write general description for this method
46 47 48 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 46 def point_of_sale_information @point_of_sale_information end |
#processing_information ⇒ ProcessingInformation5
TODO: Write general description for this method
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 18 def processing_information @processing_information end |
#processor_information ⇒ ProcessorInformation7
The object containing the secure data that the merchant defines.
70 71 72 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 70 def processor_information @processor_information end |
#promotion_information ⇒ PromotionInformation
The object containing the secure data that the merchant defines.
66 67 68 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 66 def promotion_information @promotion_information end |
#travel_information ⇒ TravelInformation
The object containing the secure data that the merchant defines.
62 63 64 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 62 def travel_information @travel_information end |
Class Method Details
.from_element(root) ⇒ Object
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 237 def self.from_element(root) client_reference_information = XmlUtilities.from_element( root, 'ClientReferenceInformation', ClientReferenceInformation ) processing_information = XmlUtilities.from_element( root, 'ProcessingInformation5', ProcessingInformation5 ) payment_information = XmlUtilities.from_element(root, 'PaymentInformation4', PaymentInformation4) order_information = XmlUtilities.from_element(root, 'OrderInformation6', OrderInformation6) buyer_information = XmlUtilities.from_element(root, 'BuyerInformation2', BuyerInformation2) device_information = XmlUtilities.from_element(root, 'DeviceInformation3', DeviceInformation3) merchant_information = XmlUtilities.from_element(root, 'MerchantInformation3', MerchantInformation3) aggregator_information = XmlUtilities.from_element( root, 'AggregatorInformation1', AggregatorInformation1 ) point_of_sale_information = XmlUtilities.from_element( root, 'PointOfSaleInformation6', PointOfSaleInformation6 ) merchant_defined_information = XmlUtilities.from_element_to_array( root, 'MerchantDefinedInformation', MerchantDefinedInformation ) merchant_defined_secure_information = XmlUtilities.from_element( root, 'MerchantDefinedSecureInformation', MerchantDefinedSecureInformation ) installment_information = XmlUtilities.from_element( root, 'InstallmentInformation2', InstallmentInformation2 ) travel_information = XmlUtilities.from_element(root, 'TravelInformation', TravelInformation) promotion_information = XmlUtilities.from_element(root, 'PromotionInformation', PromotionInformation) processor_information = XmlUtilities.from_element(root, 'ProcessorInformation7', ProcessorInformation7) new(client_reference_information: client_reference_information, processing_information: processing_information, payment_information: payment_information, order_information: order_information, buyer_information: buyer_information, device_information: device_information, merchant_information: merchant_information, aggregator_information: aggregator_information, point_of_sale_information: point_of_sale_information, merchant_defined_information: merchant_defined_information, merchant_defined_secure_information: merchant_defined_secure_information, installment_information: installment_information, travel_information: travel_information, promotion_information: promotion_information, processor_information: processor_information, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 165 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. if hash['clientReferenceInformation'] client_reference_information = ClientReferenceInformation.from_hash(hash['clientReferenceInformation']) end processing_information = ProcessingInformation5.from_hash(hash['processingInformation']) if hash['processingInformation'] payment_information = PaymentInformation4.from_hash(hash['paymentInformation']) if hash['paymentInformation'] order_information = OrderInformation6.from_hash(hash['orderInformation']) if hash['orderInformation'] buyer_information = BuyerInformation2.from_hash(hash['buyerInformation']) if hash['buyerInformation'] device_information = DeviceInformation3.from_hash(hash['deviceInformation']) if hash['deviceInformation'] merchant_information = MerchantInformation3.from_hash(hash['merchantInformation']) if hash['merchantInformation'] aggregator_information = AggregatorInformation1.from_hash(hash['aggregatorInformation']) if hash['aggregatorInformation'] if hash['pointOfSaleInformation'] point_of_sale_information = PointOfSaleInformation6.from_hash(hash['pointOfSaleInformation']) end # Parameter is an array, so we need to iterate through it merchant_defined_information = nil unless hash['merchantDefinedInformation'].nil? merchant_defined_information = [] hash['merchantDefinedInformation'].each do |structure| merchant_defined_information << (MerchantDefinedInformation.from_hash(structure) if structure) end end merchant_defined_information = SKIP unless hash.key?('merchantDefinedInformation') if hash['merchantDefinedSecureInformation'] merchant_defined_secure_information = MerchantDefinedSecureInformation.from_hash(hash['merchantDefinedSecureInformation']) end installment_information = InstallmentInformation2.from_hash(hash['installmentInformation']) if hash['installmentInformation'] travel_information = TravelInformation.from_hash(hash['travelInformation']) if hash['travelInformation'] promotion_information = PromotionInformation.from_hash(hash['promotionInformation']) if hash['promotionInformation'] processor_information = ProcessorInformation7.from_hash(hash['processorInformation']) if hash['processorInformation'] # 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. CapturePaymentRequest.new(client_reference_information: client_reference_information, processing_information: processing_information, payment_information: payment_information, order_information: order_information, buyer_information: buyer_information, device_information: device_information, merchant_information: merchant_information, aggregator_information: aggregator_information, point_of_sale_information: point_of_sale_information, merchant_defined_information: merchant_defined_information, merchant_defined_secure_information: merchant_defined_secure_information, installment_information: installment_information, travel_information: travel_information, promotion_information: promotion_information, processor_information: processor_information, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 73 def self.names @_hash = {} if @_hash.nil? @_hash['client_reference_information'] = 'clientReferenceInformation' @_hash['processing_information'] = 'processingInformation' @_hash['payment_information'] = 'paymentInformation' @_hash['order_information'] = 'orderInformation' @_hash['buyer_information'] = 'buyerInformation' @_hash['device_information'] = 'deviceInformation' @_hash['merchant_information'] = 'merchantInformation' @_hash['aggregator_information'] = 'aggregatorInformation' @_hash['point_of_sale_information'] = 'pointOfSaleInformation' @_hash['merchant_defined_information'] = 'merchantDefinedInformation' @_hash['merchant_defined_secure_information'] = 'merchantDefinedSecureInformation' @_hash['installment_information'] = 'installmentInformation' @_hash['travel_information'] = 'travelInformation' @_hash['promotion_information'] = 'promotionInformation' @_hash['processor_information'] = 'processorInformation' @_hash end |
.nullables ⇒ Object
An array for nullable fields
116 117 118 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 116 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 95 def self.optionals %w[ client_reference_information processing_information payment_information order_information buyer_information device_information merchant_information aggregator_information point_of_sale_information merchant_defined_information merchant_defined_secure_information installment_information travel_information promotion_information processor_information ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 359 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_reference_information: #{@client_reference_information.inspect},"\ " processing_information: #{@processing_information.inspect}, payment_information:"\ " #{@payment_information.inspect}, order_information: #{@order_information.inspect},"\ " buyer_information: #{@buyer_information.inspect}, device_information:"\ " #{@device_information.inspect}, merchant_information: #{@merchant_information.inspect},"\ " aggregator_information: #{@aggregator_information.inspect}, point_of_sale_information:"\ " #{@point_of_sale_information.inspect}, merchant_defined_information:"\ " #{@merchant_defined_information.inspect}, merchant_defined_secure_information:"\ " #{@merchant_defined_secure_information.inspect}, installment_information:"\ " #{@installment_information.inspect}, travel_information: #{@travel_information.inspect},"\ " promotion_information: #{@promotion_information.inspect}, processor_information:"\ " #{@processor_information.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 343 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_reference_information: #{@client_reference_information},"\ " processing_information: #{@processing_information}, payment_information:"\ " #{@payment_information}, order_information: #{@order_information}, buyer_information:"\ " #{@buyer_information}, device_information: #{@device_information}, merchant_information:"\ " #{@merchant_information}, aggregator_information: #{@aggregator_information},"\ " point_of_sale_information: #{@point_of_sale_information}, merchant_defined_information:"\ " #{@merchant_defined_information}, merchant_defined_secure_information:"\ " #{@merchant_defined_secure_information}, installment_information:"\ " #{@installment_information}, travel_information: #{@travel_information},"\ " promotion_information: #{@promotion_information}, processor_information:"\ " #{@processor_information}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
# File 'lib/cyber_source_merged_spec/models/capture_payment_request.rb', line 301 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'ClientReferenceInformation', client_reference_information) XmlUtilities.add_as_subelement(doc, root, 'ProcessingInformation5', processing_information) XmlUtilities.add_as_subelement(doc, root, 'PaymentInformation4', payment_information) XmlUtilities.add_as_subelement(doc, root, 'OrderInformation6', order_information) XmlUtilities.add_as_subelement(doc, root, 'BuyerInformation2', buyer_information) XmlUtilities.add_as_subelement(doc, root, 'DeviceInformation3', device_information) XmlUtilities.add_as_subelement(doc, root, 'MerchantInformation3', merchant_information) XmlUtilities.add_as_subelement(doc, root, 'AggregatorInformation1', aggregator_information) XmlUtilities.add_as_subelement(doc, root, 'PointOfSaleInformation6', point_of_sale_information) XmlUtilities.add_array_as_subelement(doc, root, 'MerchantDefinedInformation', merchant_defined_information) XmlUtilities.add_as_subelement(doc, root, 'MerchantDefinedSecureInformation', merchant_defined_secure_information) XmlUtilities.add_as_subelement(doc, root, 'InstallmentInformation2', installment_information) XmlUtilities.add_as_subelement(doc, root, 'TravelInformation', travel_information) XmlUtilities.add_as_subelement(doc, root, 'PromotionInformation', promotion_information) XmlUtilities.add_as_subelement(doc, root, 'ProcessorInformation7', processor_information) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |