cyberSource_client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/AuthenticationSDK/Cybersource.gemspec +23 -23
- data/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +62 -62
- data/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +50 -50
- data/AuthenticationSDK/authentication/jwt/JwtToken.rb +62 -62
- data/AuthenticationSDK/authentication/payloadDigest/digest.rb +10 -10
- data/AuthenticationSDK/core/Authorization.rb +24 -24
- data/AuthenticationSDK/core/ITokenGeneration.rb +4 -4
- data/AuthenticationSDK/core/Logger.rb +26 -26
- data/AuthenticationSDK/core/MerchantConfig.rb +181 -181
- data/AuthenticationSDK/util/ApiException.rb +18 -18
- data/AuthenticationSDK/util/Cache.rb +36 -36
- data/AuthenticationSDK/util/Constants.rb +133 -133
- data/AuthenticationSDK/util/PropertiesUtil.rb +21 -21
- data/AuthenticationSDK/util/Utility.rb +30 -30
- data/lib/cyberSource_client.rb +286 -286
- data/lib/cyberSource_client/api/capture_api.rb +133 -133
- data/lib/cyberSource_client/api/credit_api.rb +127 -127
- data/lib/cyberSource_client/api/default_api.rb +75 -75
- data/lib/cyberSource_client/api/instrument_identifier_api.rb +393 -393
- data/lib/cyberSource_client/api/key_generation_api.rb +75 -75
- data/lib/cyberSource_client/api/payment_api.rb +127 -127
- data/lib/cyberSource_client/api/payment_instrument_api.rb +312 -312
- data/lib/cyberSource_client/api/refund_api.rb +191 -191
- data/lib/cyberSource_client/api/reversal_api.rb +133 -133
- data/lib/cyberSource_client/api/tokenization_api.rb +71 -71
- data/lib/cyberSource_client/api/void_api.rb +307 -307
- data/lib/cyberSource_client/api_client.rb +437 -437
- data/lib/cyberSource_client/api_error.rb +38 -38
- data/lib/cyberSource_client/configuration.rb +202 -202
- data/lib/cyberSource_client/models/auth_reversal_request.rb +219 -219
- data/lib/cyberSource_client/models/body.rb +295 -295
- data/lib/cyberSource_client/models/body_1.rb +183 -183
- data/lib/cyberSource_client/models/body_2.rb +331 -331
- data/lib/cyberSource_client/models/body_3.rb +331 -331
- data/lib/cyberSource_client/models/capture_payment_request.rb +267 -267
- data/lib/cyberSource_client/models/card_info.rb +214 -214
- data/lib/cyberSource_client/models/create_credit_request.rb +267 -267
- data/lib/cyberSource_client/models/create_payment_request.rb +285 -285
- data/lib/cyberSource_client/models/der_public_key.rb +205 -205
- data/lib/cyberSource_client/models/error.rb +192 -192
- data/lib/cyberSource_client/models/error_links.rb +205 -205
- data/lib/cyberSource_client/models/error_response.rb +192 -192
- data/lib/cyberSource_client/models/generate_public_key_request.rb +184 -184
- data/lib/cyberSource_client/models/inline_response_200.rb +202 -202
- data/lib/cyberSource_client/models/inline_response_200_1.rb +255 -255
- data/lib/cyberSource_client/models/inline_response_200_2.rb +377 -377
- data/lib/cyberSource_client/models/inline_response_200_2_buyer_information.rb +270 -270
- data/lib/cyberSource_client/models/inline_response_200_2_device_information.rb +219 -219
- data/lib/cyberSource_client/models/inline_response_200_2_merchant_information.rb +233 -233
- data/lib/cyberSource_client/models/inline_response_200_2_order_information.rb +230 -230
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_amount_details.rb +385 -385
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_bill_to.rb +459 -459
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_invoice_details.rb +315 -315
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_line_items.rb +564 -564
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_ship_to.rb +429 -429
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information.rb +192 -192
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information_card.rb +274 -274
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information_tokenized_card.rb +299 -299
- data/lib/cyberSource_client/models/inline_response_200_2_processing_information.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information.rb +227 -227
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information_avs.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information_card_verification.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_200_3.rb +314 -314
- data/lib/cyberSource_client/models/inline_response_200_4.rb +350 -350
- data/lib/cyberSource_client/models/inline_response_200_4_device_information.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_200_4_order_information.rb +230 -230
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_amount_details.rb +360 -360
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_invoice_details.rb +305 -305
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_ship_to.rb +249 -249
- data/lib/cyberSource_client/models/inline_response_200_4_processing_information.rb +208 -208
- data/lib/cyberSource_client/models/inline_response_200_4_processing_information_authorization_options.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_200_5.rb +305 -305
- data/lib/cyberSource_client/models/inline_response_200_6.rb +305 -305
- data/lib/cyberSource_client/models/inline_response_200_7.rb +295 -295
- data/lib/cyberSource_client/models/inline_response_200_8.rb +277 -277
- data/lib/cyberSource_client/models/inline_response_200_8__links.rb +219 -219
- data/lib/cyberSource_client/models/inline_response_200_8__links_first.rb +184 -184
- data/lib/cyberSource_client/models/inline_response_200_8__links_last.rb +184 -184
- data/lib/cyberSource_client/models/inline_response_200_8__links_next.rb +184 -184
- data/lib/cyberSource_client/models/inline_response_200_8__links_prev.rb +184 -184
- data/lib/cyberSource_client/models/inline_response_200_8__links_self.rb +184 -184
- data/lib/cyberSource_client/models/inline_response_200_der.rb +205 -205
- data/lib/cyberSource_client/models/inline_response_200_jwk.rb +225 -225
- data/lib/cyberSource_client/models/inline_response_201.rb +350 -350
- data/lib/cyberSource_client/models/inline_response_201_1.rb +332 -332
- data/lib/cyberSource_client/models/inline_response_201_1_authorization_information.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_1_processor_information.rb +324 -324
- data/lib/cyberSource_client/models/inline_response_201_1_reversal_amount_details.rb +249 -249
- data/lib/cyberSource_client/models/inline_response_201_2.rb +314 -314
- data/lib/cyberSource_client/models/inline_response_201_2__links.rb +201 -201
- data/lib/cyberSource_client/models/inline_response_201_2_order_information.rb +192 -192
- data/lib/cyberSource_client/models/inline_response_201_2_order_information_amount_details.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_2_processor_information.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_201_3.rb +323 -323
- data/lib/cyberSource_client/models/inline_response_201_3__links.rb +192 -192
- data/lib/cyberSource_client/models/inline_response_201_3_order_information.rb +183 -183
- data/lib/cyberSource_client/models/inline_response_201_3_processor_information.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_3_refund_amount_details.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_4.rb +323 -323
- data/lib/cyberSource_client/models/inline_response_201_4_credit_amount_details.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_5.rb +280 -280
- data/lib/cyberSource_client/models/inline_response_201_5_void_amount_details.rb +219 -219
- data/lib/cyberSource_client/models/inline_response_201_6.rb +331 -331
- data/lib/cyberSource_client/models/inline_response_201__embedded.rb +183 -183
- data/lib/cyberSource_client/models/inline_response_201__embedded_capture.rb +193 -193
- data/lib/cyberSource_client/models/inline_response_201__embedded_capture__links.rb +183 -183
- data/lib/cyberSource_client/models/inline_response_201__links.rb +201 -201
- data/lib/cyberSource_client/models/inline_response_201__links_self.rb +194 -194
- data/lib/cyberSource_client/models/inline_response_201_client_reference_information.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_201_error_information.rb +239 -239
- data/lib/cyberSource_client/models/inline_response_201_error_information_details.rb +228 -228
- data/lib/cyberSource_client/models/inline_response_201_order_information.rb +192 -192
- data/lib/cyberSource_client/models/inline_response_201_order_information_amount_details.rb +249 -249
- data/lib/cyberSource_client/models/inline_response_201_order_information_invoice_details.rb +184 -184
- data/lib/cyberSource_client/models/inline_response_201_payment_information.rb +201 -201
- data/lib/cyberSource_client/models/inline_response_201_payment_information_account_features.rb +623 -623
- data/lib/cyberSource_client/models/inline_response_201_payment_information_card.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_201_payment_information_tokenized_card.rb +349 -349
- data/lib/cyberSource_client/models/inline_response_201_point_of_sale_information.rb +208 -208
- data/lib/cyberSource_client/models/inline_response_201_point_of_sale_information_emv.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_201_processor_information.rb +642 -642
- data/lib/cyberSource_client/models/inline_response_201_processor_information_avs.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_processor_information_card_verification.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_processor_information_consumer_authentication_response.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_processor_information_customer.rb +199 -199
- data/lib/cyberSource_client/models/inline_response_201_processor_information_electronic_verification_results.rb +474 -474
- data/lib/cyberSource_client/models/inline_response_201_processor_information_issuer.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_201_processor_information_merchant_advice.rb +224 -224
- data/lib/cyberSource_client/models/inline_response_400.rb +271 -271
- data/lib/cyberSource_client/models/inline_response_400_1.rb +271 -271
- data/lib/cyberSource_client/models/inline_response_400_2.rb +271 -271
- data/lib/cyberSource_client/models/inline_response_400_3.rb +271 -271
- data/lib/cyberSource_client/models/inline_response_400_4.rb +271 -271
- data/lib/cyberSource_client/models/inline_response_400_5.rb +259 -259
- data/lib/cyberSource_client/models/inline_response_400_6.rb +202 -202
- data/lib/cyberSource_client/models/inline_response_409.rb +183 -183
- data/lib/cyberSource_client/models/inline_response_409__links.rb +183 -183
- data/lib/cyberSource_client/models/inline_response_409__links_payment_instruments.rb +183 -183
- data/lib/cyberSource_client/models/inline_response_502.rb +260 -260
- data/lib/cyberSource_client/models/inline_response_default.rb +192 -192
- data/lib/cyberSource_client/models/inline_response_default__links.rb +205 -205
- data/lib/cyberSource_client/models/inline_response_default__links_next.rb +204 -204
- data/lib/cyberSource_client/models/inline_response_default_response_status.rb +225 -225
- data/lib/cyberSource_client/models/inline_response_default_response_status_details.rb +194 -194
- data/lib/cyberSource_client/models/instrumentidentifiers__links.rb +201 -201
- data/lib/cyberSource_client/models/instrumentidentifiers__links_self.rb +183 -183
- data/lib/cyberSource_client/models/instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb +184 -184
- data/lib/cyberSource_client/models/instrumentidentifiers_bank_account.rb +194 -194
- data/lib/cyberSource_client/models/instrumentidentifiers_card.rb +184 -184
- data/lib/cyberSource_client/models/instrumentidentifiers_details.rb +194 -194
- data/lib/cyberSource_client/models/instrumentidentifiers_metadata.rb +184 -184
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information.rb +183 -183
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options.rb +183 -183
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options_initiator.rb +183 -183
- data/lib/cyberSource_client/models/json_web_key.rb +225 -225
- data/lib/cyberSource_client/models/key_parameters.rb +184 -184
- data/lib/cyberSource_client/models/key_result.rb +202 -202
- data/lib/cyberSource_client/models/link.rb +204 -204
- data/lib/cyberSource_client/models/links.rb +205 -205
- data/lib/cyberSource_client/models/oct_create_payment_request.rb +237 -237
- data/lib/cyberSource_client/models/paymentinstruments_bank_account.rb +184 -184
- data/lib/cyberSource_client/models/paymentinstruments_bill_to.rb +284 -284
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information.rb +215 -215
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information_issued_by.rb +184 -184
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information_personal_identification.rb +203 -203
- data/lib/cyberSource_client/models/paymentinstruments_card.rb +278 -278
- data/lib/cyberSource_client/models/paymentinstruments_instrument_identifier.rb +295 -295
- data/lib/cyberSource_client/models/paymentinstruments_merchant_information.rb +183 -183
- data/lib/cyberSource_client/models/paymentinstruments_merchant_information_merchant_descriptor.rb +184 -184
- data/lib/cyberSource_client/models/paymentinstruments_processing_information.rb +193 -193
- data/lib/cyberSource_client/models/paymentinstruments_processing_information_bank_transfer_options.rb +184 -184
- data/lib/cyberSource_client/models/paymentsflexv1tokens_card_info.rb +214 -214
- data/lib/cyberSource_client/models/refund_capture_request.rb +267 -267
- data/lib/cyberSource_client/models/refund_payment_request.rb +267 -267
- data/lib/cyberSource_client/models/response_status.rb +225 -225
- data/lib/cyberSource_client/models/response_status_details.rb +194 -194
- data/lib/cyberSource_client/models/tokenize_parameters.rb +193 -193
- data/lib/cyberSource_client/models/tokenize_request.rb +193 -193
- data/lib/cyberSource_client/models/tokenize_result.rb +255 -255
- data/lib/cyberSource_client/models/v2credits_point_of_sale_information.rb +183 -183
- data/lib/cyberSource_client/models/v2credits_point_of_sale_information_emv.rb +221 -221
- data/lib/cyberSource_client/models/v2credits_processing_information.rb +383 -383
- data/lib/cyberSource_client/models/v2payments_aggregator_information.rb +233 -233
- data/lib/cyberSource_client/models/v2payments_aggregator_information_sub_merchant.rb +424 -424
- data/lib/cyberSource_client/models/v2payments_buyer_information.rb +285 -285
- data/lib/cyberSource_client/models/v2payments_buyer_information_personal_identification.rb +252 -252
- data/lib/cyberSource_client/models/v2payments_client_reference_information.rb +219 -219
- data/lib/cyberSource_client/models/v2payments_consumer_authentication_information.rb +374 -374
- data/lib/cyberSource_client/models/v2payments_device_information.rb +249 -249
- data/lib/cyberSource_client/models/v2payments_merchant_defined_information.rb +224 -224
- data/lib/cyberSource_client/models/v2payments_merchant_information.rb +308 -308
- data/lib/cyberSource_client/models/v2payments_merchant_information_merchant_descriptor.rb +374 -374
- data/lib/cyberSource_client/models/v2payments_order_information.rb +230 -230
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details.rb +605 -605
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_amex_additional_amounts.rb +224 -224
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_surcharge.rb +209 -209
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_tax_details.rb +328 -328
- data/lib/cyberSource_client/models/v2payments_order_information_bill_to.rb +618 -618
- data/lib/cyberSource_client/models/v2payments_order_information_invoice_details.rb +330 -330
- data/lib/cyberSource_client/models/v2payments_order_information_invoice_details_transaction_advice_addendum.rb +199 -199
- data/lib/cyberSource_client/models/v2payments_order_information_line_items.rb +649 -649
- data/lib/cyberSource_client/models/v2payments_order_information_ship_to.rb +474 -474
- data/lib/cyberSource_client/models/v2payments_order_information_shipping_details.rb +234 -234
- data/lib/cyberSource_client/models/v2payments_payment_information.rb +210 -210
- data/lib/cyberSource_client/models/v2payments_payment_information_card.rb +474 -474
- data/lib/cyberSource_client/models/v2payments_payment_information_customer.rb +202 -202
- data/lib/cyberSource_client/models/v2payments_payment_information_fluid_data.rb +259 -259
- data/lib/cyberSource_client/models/v2payments_payment_information_tokenized_card.rb +424 -424
- data/lib/cyberSource_client/models/v2payments_point_of_sale_information.rb +440 -440
- data/lib/cyberSource_client/models/v2payments_point_of_sale_information_emv.rb +256 -256
- data/lib/cyberSource_client/models/v2payments_processing_information.rb +432 -432
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options.rb +361 -361
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_initiator.rb +247 -247
- data/lib/cyberSource_client/models/{v2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction.rb → v2payments_processing_information_authorization_options_merchant_initiated_transaction.rb} +224 -224
- data/lib/cyberSource_client/models/v2payments_processing_information_capture_options.rb +267 -267
- data/lib/cyberSource_client/models/v2payments_processing_information_issuer.rb +199 -199
- data/lib/cyberSource_client/models/v2payments_processing_information_recurring_options.rb +198 -198
- data/lib/cyberSource_client/models/v2payments_recipient_information.rb +249 -249
- data/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information.rb +233 -233
- data/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information_sub_merchant.rb +374 -374
- data/lib/cyberSource_client/models/v2paymentsidcaptures_buyer_information.rb +224 -224
- data/lib/cyberSource_client/models/v2paymentsidcaptures_merchant_information.rb +258 -258
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information.rb +230 -230
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_amount_details.rb +546 -546
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_bill_to.rb +449 -449
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_invoice_details.rb +320 -320
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_ship_to.rb +249 -249
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_shipping_details.rb +199 -199
- data/lib/cyberSource_client/models/v2paymentsidcaptures_payment_information.rb +183 -183
- data/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information.rb +208 -208
- data/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information_emv.rb +211 -211
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information.rb +351 -351
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_authorization_options.rb +249 -249
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_capture_options.rb +242 -242
- data/lib/cyberSource_client/models/v2paymentsidrefunds_merchant_information.rb +258 -258
- data/lib/cyberSource_client/models/v2paymentsidrefunds_order_information.rb +230 -230
- data/lib/cyberSource_client/models/v2paymentsidrefunds_order_information_line_items.rb +639 -639
- data/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information.rb +183 -183
- data/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information_card.rb +374 -374
- data/lib/cyberSource_client/models/v2paymentsidrefunds_point_of_sale_information.rb +183 -183
- data/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information.rb +333 -333
- data/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information_recurring_options.rb +186 -186
- data/lib/cyberSource_client/models/v2paymentsidreversals_client_reference_information.rb +209 -209
- data/lib/cyberSource_client/models/v2paymentsidreversals_order_information.rb +185 -185
- data/lib/cyberSource_client/models/v2paymentsidreversals_order_information_line_items.rb +233 -233
- data/lib/cyberSource_client/models/v2paymentsidreversals_point_of_sale_information.rb +183 -183
- data/lib/cyberSource_client/models/v2paymentsidreversals_processing_information.rb +308 -308
- data/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information.rb +211 -211
- data/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information_amount_details.rb +224 -224
- data/lib/cyberSource_client/models/v2payouts_merchant_information.rb +258 -258
- data/lib/cyberSource_client/models/v2payouts_merchant_information_merchant_descriptor.rb +324 -324
- data/lib/cyberSource_client/models/v2payouts_order_information.rb +192 -192
- data/lib/cyberSource_client/models/v2payouts_order_information_amount_details.rb +249 -249
- data/lib/cyberSource_client/models/v2payouts_order_information_bill_to.rb +443 -443
- data/lib/cyberSource_client/models/v2payouts_payment_information.rb +183 -183
- data/lib/cyberSource_client/models/v2payouts_payment_information_card.rb +299 -299
- data/lib/cyberSource_client/models/v2payouts_processing_information.rb +283 -283
- data/lib/cyberSource_client/models/v2payouts_processing_information_payouts_options.rb +274 -274
- data/lib/cyberSource_client/models/v2payouts_recipient_information.rb +433 -433
- data/lib/cyberSource_client/models/v2payouts_sender_information.rb +517 -517
- data/lib/cyberSource_client/models/v2payouts_sender_information_account.rb +233 -233
- data/lib/cyberSource_client/models/void_capture_request.rb +183 -183
- data/lib/cyberSource_client/models/void_credit_request.rb +183 -183
- data/lib/cyberSource_client/models/void_payment_request.rb +183 -183
- data/lib/cyberSource_client/models/void_refund_request.rb +183 -183
- data/lib/cyberSource_client/version.rb +15 -15
- metadata +4 -4
data/lib/cyberSource_client/models/inline_response_200_2_order_information_amount_details.rb
CHANGED
@@ -1,385 +1,385 @@
|
|
1
|
-
=begin
|
2
|
-
#CyberSource Flex API
|
3
|
-
|
4
|
-
#Simple PAN tokenization service
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.0.1
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module CyberSource
|
16
|
-
class InlineResponse2002OrderInformationAmountDetails
|
17
|
-
# Amount that was authorized.
|
18
|
-
attr_accessor :authorized_amount
|
19
|
-
|
20
|
-
# Grand total for the order. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. * CTV, FDCCompass, Paymentech (<= 12) For processor-specific information, see the grand_total_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
21
|
-
attr_accessor :total_amount
|
22
|
-
|
23
|
-
# Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API.
|
24
|
-
attr_accessor :currency
|
25
|
-
|
26
|
-
# Total discount amount applied to the order. For processor-specific information, see the order_discount_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
27
|
-
attr_accessor :discount_amount
|
28
|
-
|
29
|
-
# Total charges for any import or export duties included in the order. For processor-specific information, see the duty_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
30
|
-
attr_accessor :duty_amount
|
31
|
-
|
32
|
-
# Total tax amount for all the items in the order. For processor-specific information, see the total_tax_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
33
|
-
attr_accessor :tax_amount
|
34
|
-
|
35
|
-
# Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
36
|
-
attr_accessor :national_tax_included
|
37
|
-
|
38
|
-
# Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
39
|
-
attr_accessor :freight_amount
|
40
|
-
|
41
|
-
attr_accessor :tax_details
|
42
|
-
|
43
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
-
def self.attribute_map
|
45
|
-
{
|
46
|
-
:'authorized_amount' => :'authorizedAmount',
|
47
|
-
:'total_amount' => :'totalAmount',
|
48
|
-
:'currency' => :'currency',
|
49
|
-
:'discount_amount' => :'discountAmount',
|
50
|
-
:'duty_amount' => :'dutyAmount',
|
51
|
-
:'tax_amount' => :'taxAmount',
|
52
|
-
:'national_tax_included' => :'nationalTaxIncluded',
|
53
|
-
:'freight_amount' => :'freightAmount',
|
54
|
-
:'tax_details' => :'taxDetails'
|
55
|
-
}
|
56
|
-
end
|
57
|
-
|
58
|
-
# Attribute type mapping.
|
59
|
-
def self.swagger_types
|
60
|
-
{
|
61
|
-
:'authorized_amount' => :'String',
|
62
|
-
:'total_amount' => :'String',
|
63
|
-
:'currency' => :'String',
|
64
|
-
:'discount_amount' => :'String',
|
65
|
-
:'duty_amount' => :'String',
|
66
|
-
:'tax_amount' => :'String',
|
67
|
-
:'national_tax_included' => :'String',
|
68
|
-
:'freight_amount' => :'String',
|
69
|
-
:'tax_details' => :'Array<V2paymentsOrderInformationAmountDetailsTaxDetails>'
|
70
|
-
}
|
71
|
-
end
|
72
|
-
|
73
|
-
# Initializes the object
|
74
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
-
def initialize(attributes = {})
|
76
|
-
return unless attributes.is_a?(Hash)
|
77
|
-
|
78
|
-
# convert string to symbol for hash key
|
79
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
80
|
-
|
81
|
-
if attributes.has_key?(:'authorizedAmount')
|
82
|
-
self.authorized_amount = attributes[:'authorizedAmount']
|
83
|
-
end
|
84
|
-
|
85
|
-
if attributes.has_key?(:'totalAmount')
|
86
|
-
self.total_amount = attributes[:'totalAmount']
|
87
|
-
end
|
88
|
-
|
89
|
-
if attributes.has_key?(:'currency')
|
90
|
-
self.currency = attributes[:'currency']
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.has_key?(:'discountAmount')
|
94
|
-
self.discount_amount = attributes[:'discountAmount']
|
95
|
-
end
|
96
|
-
|
97
|
-
if attributes.has_key?(:'dutyAmount')
|
98
|
-
self.duty_amount = attributes[:'dutyAmount']
|
99
|
-
end
|
100
|
-
|
101
|
-
if attributes.has_key?(:'taxAmount')
|
102
|
-
self.tax_amount = attributes[:'taxAmount']
|
103
|
-
end
|
104
|
-
|
105
|
-
if attributes.has_key?(:'nationalTaxIncluded')
|
106
|
-
self.national_tax_included = attributes[:'nationalTaxIncluded']
|
107
|
-
end
|
108
|
-
|
109
|
-
if attributes.has_key?(:'freightAmount')
|
110
|
-
self.freight_amount = attributes[:'freightAmount']
|
111
|
-
end
|
112
|
-
|
113
|
-
if attributes.has_key?(:'taxDetails')
|
114
|
-
if (value = attributes[:'taxDetails']).is_a?(Array)
|
115
|
-
self.tax_details = value
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
-
# @return Array for valid properties with the reasons
|
122
|
-
def list_invalid_properties
|
123
|
-
invalid_properties = Array.new
|
124
|
-
if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15
|
125
|
-
invalid_properties.push('invalid value for "authorized_amount", the character length must be smaller than or equal to 15.')
|
126
|
-
end
|
127
|
-
|
128
|
-
if !@total_amount.nil? && @total_amount.to_s.length > 19
|
129
|
-
invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 19.')
|
130
|
-
end
|
131
|
-
|
132
|
-
if !@currency.nil? && @currency.to_s.length > 3
|
133
|
-
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
134
|
-
end
|
135
|
-
|
136
|
-
if !@discount_amount.nil? && @discount_amount.to_s.length > 15
|
137
|
-
invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.')
|
138
|
-
end
|
139
|
-
|
140
|
-
if !@duty_amount.nil? && @duty_amount.to_s.length > 15
|
141
|
-
invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.')
|
142
|
-
end
|
143
|
-
|
144
|
-
if !@tax_amount.nil? && @tax_amount.to_s.length > 12
|
145
|
-
invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 12.')
|
146
|
-
end
|
147
|
-
|
148
|
-
if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1
|
149
|
-
invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.')
|
150
|
-
end
|
151
|
-
|
152
|
-
if !@freight_amount.nil? && @freight_amount.to_s.length > 13
|
153
|
-
invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.')
|
154
|
-
end
|
155
|
-
|
156
|
-
invalid_properties
|
157
|
-
end
|
158
|
-
|
159
|
-
# Check to see if the all the properties in the model are valid
|
160
|
-
# @return true if the model is valid
|
161
|
-
def valid?
|
162
|
-
return false if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15
|
163
|
-
return false if !@total_amount.nil? && @total_amount.to_s.length > 19
|
164
|
-
return false if !@currency.nil? && @currency.to_s.length > 3
|
165
|
-
return false if !@discount_amount.nil? && @discount_amount.to_s.length > 15
|
166
|
-
return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15
|
167
|
-
return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12
|
168
|
-
return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1
|
169
|
-
return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13
|
170
|
-
true
|
171
|
-
end
|
172
|
-
|
173
|
-
# Custom attribute writer method with validation
|
174
|
-
# @param [Object] authorized_amount Value to be assigned
|
175
|
-
def authorized_amount=(authorized_amount)
|
176
|
-
if !authorized_amount.nil? && authorized_amount.to_s.length > 15
|
177
|
-
fail ArgumentError, 'invalid value for "authorized_amount", the character length must be smaller than or equal to 15.'
|
178
|
-
end
|
179
|
-
|
180
|
-
@authorized_amount = authorized_amount
|
181
|
-
end
|
182
|
-
|
183
|
-
# Custom attribute writer method with validation
|
184
|
-
# @param [Object] total_amount Value to be assigned
|
185
|
-
def total_amount=(total_amount)
|
186
|
-
if !total_amount.nil? && total_amount.to_s.length > 19
|
187
|
-
fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 19.'
|
188
|
-
end
|
189
|
-
|
190
|
-
@total_amount = total_amount
|
191
|
-
end
|
192
|
-
|
193
|
-
# Custom attribute writer method with validation
|
194
|
-
# @param [Object] currency Value to be assigned
|
195
|
-
def currency=(currency)
|
196
|
-
if !currency.nil? && currency.to_s.length > 3
|
197
|
-
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
198
|
-
end
|
199
|
-
|
200
|
-
@currency = currency
|
201
|
-
end
|
202
|
-
|
203
|
-
# Custom attribute writer method with validation
|
204
|
-
# @param [Object] discount_amount Value to be assigned
|
205
|
-
def discount_amount=(discount_amount)
|
206
|
-
if !discount_amount.nil? && discount_amount.to_s.length > 15
|
207
|
-
fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.'
|
208
|
-
end
|
209
|
-
|
210
|
-
@discount_amount = discount_amount
|
211
|
-
end
|
212
|
-
|
213
|
-
# Custom attribute writer method with validation
|
214
|
-
# @param [Object] duty_amount Value to be assigned
|
215
|
-
def duty_amount=(duty_amount)
|
216
|
-
if !duty_amount.nil? && duty_amount.to_s.length > 15
|
217
|
-
fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.'
|
218
|
-
end
|
219
|
-
|
220
|
-
@duty_amount = duty_amount
|
221
|
-
end
|
222
|
-
|
223
|
-
# Custom attribute writer method with validation
|
224
|
-
# @param [Object] tax_amount Value to be assigned
|
225
|
-
def tax_amount=(tax_amount)
|
226
|
-
if !tax_amount.nil? && tax_amount.to_s.length > 12
|
227
|
-
fail ArgumentError, 'invalid value for "tax_amount", the character length must be smaller than or equal to 12.'
|
228
|
-
end
|
229
|
-
|
230
|
-
@tax_amount = tax_amount
|
231
|
-
end
|
232
|
-
|
233
|
-
# Custom attribute writer method with validation
|
234
|
-
# @param [Object] national_tax_included Value to be assigned
|
235
|
-
def national_tax_included=(national_tax_included)
|
236
|
-
if !national_tax_included.nil? && national_tax_included.to_s.length > 1
|
237
|
-
fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.'
|
238
|
-
end
|
239
|
-
|
240
|
-
@national_tax_included = national_tax_included
|
241
|
-
end
|
242
|
-
|
243
|
-
# Custom attribute writer method with validation
|
244
|
-
# @param [Object] freight_amount Value to be assigned
|
245
|
-
def freight_amount=(freight_amount)
|
246
|
-
if !freight_amount.nil? && freight_amount.to_s.length > 13
|
247
|
-
fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.'
|
248
|
-
end
|
249
|
-
|
250
|
-
@freight_amount = freight_amount
|
251
|
-
end
|
252
|
-
|
253
|
-
# Checks equality by comparing each attribute.
|
254
|
-
# @param [Object] Object to be compared
|
255
|
-
def ==(o)
|
256
|
-
return true if self.equal?(o)
|
257
|
-
self.class == o.class &&
|
258
|
-
authorized_amount == o.authorized_amount &&
|
259
|
-
total_amount == o.total_amount &&
|
260
|
-
currency == o.currency &&
|
261
|
-
discount_amount == o.discount_amount &&
|
262
|
-
duty_amount == o.duty_amount &&
|
263
|
-
tax_amount == o.tax_amount &&
|
264
|
-
national_tax_included == o.national_tax_included &&
|
265
|
-
freight_amount == o.freight_amount &&
|
266
|
-
tax_details == o.tax_details
|
267
|
-
end
|
268
|
-
|
269
|
-
# @see the `==` method
|
270
|
-
# @param [Object] Object to be compared
|
271
|
-
def eql?(o)
|
272
|
-
self == o
|
273
|
-
end
|
274
|
-
|
275
|
-
# Calculates hash code according to all attributes.
|
276
|
-
# @return [Fixnum] Hash code
|
277
|
-
def hash
|
278
|
-
[authorized_amount, total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, freight_amount, tax_details].hash
|
279
|
-
end
|
280
|
-
|
281
|
-
# Builds the object from hash
|
282
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
283
|
-
# @return [Object] Returns the model itself
|
284
|
-
def build_from_hash(attributes)
|
285
|
-
return nil unless attributes.is_a?(Hash)
|
286
|
-
self.class.swagger_types.each_pair do |key, type|
|
287
|
-
if type =~ /\AArray<(.*)>/i
|
288
|
-
# check to ensure the input is an array given that the the attribute
|
289
|
-
# is documented as an array but the input is not
|
290
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
291
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
292
|
-
end
|
293
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
294
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
295
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
296
|
-
end
|
297
|
-
|
298
|
-
self
|
299
|
-
end
|
300
|
-
|
301
|
-
# Deserializes the data based on type
|
302
|
-
# @param string type Data type
|
303
|
-
# @param string value Value to be deserialized
|
304
|
-
# @return [Object] Deserialized data
|
305
|
-
def _deserialize(type, value)
|
306
|
-
case type.to_sym
|
307
|
-
when :DateTime
|
308
|
-
DateTime.parse(value)
|
309
|
-
when :Date
|
310
|
-
Date.parse(value)
|
311
|
-
when :String
|
312
|
-
value.to_s
|
313
|
-
when :Integer
|
314
|
-
value.to_i
|
315
|
-
when :Float
|
316
|
-
value.to_f
|
317
|
-
when :BOOLEAN
|
318
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
319
|
-
true
|
320
|
-
else
|
321
|
-
false
|
322
|
-
end
|
323
|
-
when :Object
|
324
|
-
# generic object (usually a Hash), return directly
|
325
|
-
value
|
326
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
327
|
-
inner_type = Regexp.last_match[:inner_type]
|
328
|
-
value.map { |v| _deserialize(inner_type, v) }
|
329
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
330
|
-
k_type = Regexp.last_match[:k_type]
|
331
|
-
v_type = Regexp.last_match[:v_type]
|
332
|
-
{}.tap do |hash|
|
333
|
-
value.each do |k, v|
|
334
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
335
|
-
end
|
336
|
-
end
|
337
|
-
else # model
|
338
|
-
temp_model = CyberSource.const_get(type).new
|
339
|
-
temp_model.build_from_hash(value)
|
340
|
-
end
|
341
|
-
end
|
342
|
-
|
343
|
-
# Returns the string representation of the object
|
344
|
-
# @return [String] String presentation of the object
|
345
|
-
def to_s
|
346
|
-
to_hash.to_s
|
347
|
-
end
|
348
|
-
|
349
|
-
# to_body is an alias to to_hash (backward compatibility)
|
350
|
-
# @return [Hash] Returns the object in the form of hash
|
351
|
-
def to_body
|
352
|
-
to_hash
|
353
|
-
end
|
354
|
-
|
355
|
-
# Returns the object in the form of hash
|
356
|
-
# @return [Hash] Returns the object in the form of hash
|
357
|
-
def to_hash
|
358
|
-
hash = {}
|
359
|
-
self.class.attribute_map.each_pair do |attr, param|
|
360
|
-
value = self.send(attr)
|
361
|
-
next if value.nil?
|
362
|
-
hash[param] = _to_hash(value)
|
363
|
-
end
|
364
|
-
hash
|
365
|
-
end
|
366
|
-
|
367
|
-
# Outputs non-array value in the form of hash
|
368
|
-
# For object, use to_hash. Otherwise, just return the value
|
369
|
-
# @param [Object] value Any valid value
|
370
|
-
# @return [Hash] Returns the value in the form of hash
|
371
|
-
def _to_hash(value)
|
372
|
-
if value.is_a?(Array)
|
373
|
-
value.compact.map { |v| _to_hash(v) }
|
374
|
-
elsif value.is_a?(Hash)
|
375
|
-
{}.tap do |hash|
|
376
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
377
|
-
end
|
378
|
-
elsif value.respond_to? :to_hash
|
379
|
-
value.to_hash
|
380
|
-
else
|
381
|
-
value
|
382
|
-
end
|
383
|
-
end
|
384
|
-
end
|
385
|
-
end
|
1
|
+
=begin
|
2
|
+
#CyberSource Flex API
|
3
|
+
|
4
|
+
#Simple PAN tokenization service
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CyberSource
|
16
|
+
class InlineResponse2002OrderInformationAmountDetails
|
17
|
+
# Amount that was authorized.
|
18
|
+
attr_accessor :authorized_amount
|
19
|
+
|
20
|
+
# Grand total for the order. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. * CTV, FDCCompass, Paymentech (<= 12) For processor-specific information, see the grand_total_amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
21
|
+
attr_accessor :total_amount
|
22
|
+
|
23
|
+
# Currency used for the order. Use the three-character ISO Standard Currency Codes. For an authorization reversal or a capture, you must use the same currency that you used in your request for Payment API.
|
24
|
+
attr_accessor :currency
|
25
|
+
|
26
|
+
# Total discount amount applied to the order. For processor-specific information, see the order_discount_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
27
|
+
attr_accessor :discount_amount
|
28
|
+
|
29
|
+
# Total charges for any import or export duties included in the order. For processor-specific information, see the duty_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
30
|
+
attr_accessor :duty_amount
|
31
|
+
|
32
|
+
# Total tax amount for all the items in the order. For processor-specific information, see the total_tax_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
33
|
+
attr_accessor :tax_amount
|
34
|
+
|
35
|
+
# Flag that indicates whether a national tax is included in the order total. Possible values: - **0**: national tax not included - **1**: national tax included For processor-specific information, see the national_tax_indicator field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
36
|
+
attr_accessor :national_tax_included
|
37
|
+
|
38
|
+
# Total freight or shipping and handling charges for the order. When you include this field in your request, you must also include the **totalAmount** field. For processor-specific information, see the freight_amount field in [Level II and Level III Processing Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/Level_2_3_SCMP_API/html)
|
39
|
+
attr_accessor :freight_amount
|
40
|
+
|
41
|
+
attr_accessor :tax_details
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
:'authorized_amount' => :'authorizedAmount',
|
47
|
+
:'total_amount' => :'totalAmount',
|
48
|
+
:'currency' => :'currency',
|
49
|
+
:'discount_amount' => :'discountAmount',
|
50
|
+
:'duty_amount' => :'dutyAmount',
|
51
|
+
:'tax_amount' => :'taxAmount',
|
52
|
+
:'national_tax_included' => :'nationalTaxIncluded',
|
53
|
+
:'freight_amount' => :'freightAmount',
|
54
|
+
:'tax_details' => :'taxDetails'
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute type mapping.
|
59
|
+
def self.swagger_types
|
60
|
+
{
|
61
|
+
:'authorized_amount' => :'String',
|
62
|
+
:'total_amount' => :'String',
|
63
|
+
:'currency' => :'String',
|
64
|
+
:'discount_amount' => :'String',
|
65
|
+
:'duty_amount' => :'String',
|
66
|
+
:'tax_amount' => :'String',
|
67
|
+
:'national_tax_included' => :'String',
|
68
|
+
:'freight_amount' => :'String',
|
69
|
+
:'tax_details' => :'Array<V2paymentsOrderInformationAmountDetailsTaxDetails>'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Initializes the object
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
def initialize(attributes = {})
|
76
|
+
return unless attributes.is_a?(Hash)
|
77
|
+
|
78
|
+
# convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
80
|
+
|
81
|
+
if attributes.has_key?(:'authorizedAmount')
|
82
|
+
self.authorized_amount = attributes[:'authorizedAmount']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'totalAmount')
|
86
|
+
self.total_amount = attributes[:'totalAmount']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'currency')
|
90
|
+
self.currency = attributes[:'currency']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'discountAmount')
|
94
|
+
self.discount_amount = attributes[:'discountAmount']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'dutyAmount')
|
98
|
+
self.duty_amount = attributes[:'dutyAmount']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'taxAmount')
|
102
|
+
self.tax_amount = attributes[:'taxAmount']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'nationalTaxIncluded')
|
106
|
+
self.national_tax_included = attributes[:'nationalTaxIncluded']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'freightAmount')
|
110
|
+
self.freight_amount = attributes[:'freightAmount']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'taxDetails')
|
114
|
+
if (value = attributes[:'taxDetails']).is_a?(Array)
|
115
|
+
self.tax_details = value
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
+
# @return Array for valid properties with the reasons
|
122
|
+
def list_invalid_properties
|
123
|
+
invalid_properties = Array.new
|
124
|
+
if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15
|
125
|
+
invalid_properties.push('invalid value for "authorized_amount", the character length must be smaller than or equal to 15.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if !@total_amount.nil? && @total_amount.to_s.length > 19
|
129
|
+
invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 19.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if !@currency.nil? && @currency.to_s.length > 3
|
133
|
+
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
134
|
+
end
|
135
|
+
|
136
|
+
if !@discount_amount.nil? && @discount_amount.to_s.length > 15
|
137
|
+
invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 15.')
|
138
|
+
end
|
139
|
+
|
140
|
+
if !@duty_amount.nil? && @duty_amount.to_s.length > 15
|
141
|
+
invalid_properties.push('invalid value for "duty_amount", the character length must be smaller than or equal to 15.')
|
142
|
+
end
|
143
|
+
|
144
|
+
if !@tax_amount.nil? && @tax_amount.to_s.length > 12
|
145
|
+
invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 12.')
|
146
|
+
end
|
147
|
+
|
148
|
+
if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1
|
149
|
+
invalid_properties.push('invalid value for "national_tax_included", the character length must be smaller than or equal to 1.')
|
150
|
+
end
|
151
|
+
|
152
|
+
if !@freight_amount.nil? && @freight_amount.to_s.length > 13
|
153
|
+
invalid_properties.push('invalid value for "freight_amount", the character length must be smaller than or equal to 13.')
|
154
|
+
end
|
155
|
+
|
156
|
+
invalid_properties
|
157
|
+
end
|
158
|
+
|
159
|
+
# Check to see if the all the properties in the model are valid
|
160
|
+
# @return true if the model is valid
|
161
|
+
def valid?
|
162
|
+
return false if !@authorized_amount.nil? && @authorized_amount.to_s.length > 15
|
163
|
+
return false if !@total_amount.nil? && @total_amount.to_s.length > 19
|
164
|
+
return false if !@currency.nil? && @currency.to_s.length > 3
|
165
|
+
return false if !@discount_amount.nil? && @discount_amount.to_s.length > 15
|
166
|
+
return false if !@duty_amount.nil? && @duty_amount.to_s.length > 15
|
167
|
+
return false if !@tax_amount.nil? && @tax_amount.to_s.length > 12
|
168
|
+
return false if !@national_tax_included.nil? && @national_tax_included.to_s.length > 1
|
169
|
+
return false if !@freight_amount.nil? && @freight_amount.to_s.length > 13
|
170
|
+
true
|
171
|
+
end
|
172
|
+
|
173
|
+
# Custom attribute writer method with validation
|
174
|
+
# @param [Object] authorized_amount Value to be assigned
|
175
|
+
def authorized_amount=(authorized_amount)
|
176
|
+
if !authorized_amount.nil? && authorized_amount.to_s.length > 15
|
177
|
+
fail ArgumentError, 'invalid value for "authorized_amount", the character length must be smaller than or equal to 15.'
|
178
|
+
end
|
179
|
+
|
180
|
+
@authorized_amount = authorized_amount
|
181
|
+
end
|
182
|
+
|
183
|
+
# Custom attribute writer method with validation
|
184
|
+
# @param [Object] total_amount Value to be assigned
|
185
|
+
def total_amount=(total_amount)
|
186
|
+
if !total_amount.nil? && total_amount.to_s.length > 19
|
187
|
+
fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 19.'
|
188
|
+
end
|
189
|
+
|
190
|
+
@total_amount = total_amount
|
191
|
+
end
|
192
|
+
|
193
|
+
# Custom attribute writer method with validation
|
194
|
+
# @param [Object] currency Value to be assigned
|
195
|
+
def currency=(currency)
|
196
|
+
if !currency.nil? && currency.to_s.length > 3
|
197
|
+
fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
|
198
|
+
end
|
199
|
+
|
200
|
+
@currency = currency
|
201
|
+
end
|
202
|
+
|
203
|
+
# Custom attribute writer method with validation
|
204
|
+
# @param [Object] discount_amount Value to be assigned
|
205
|
+
def discount_amount=(discount_amount)
|
206
|
+
if !discount_amount.nil? && discount_amount.to_s.length > 15
|
207
|
+
fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 15.'
|
208
|
+
end
|
209
|
+
|
210
|
+
@discount_amount = discount_amount
|
211
|
+
end
|
212
|
+
|
213
|
+
# Custom attribute writer method with validation
|
214
|
+
# @param [Object] duty_amount Value to be assigned
|
215
|
+
def duty_amount=(duty_amount)
|
216
|
+
if !duty_amount.nil? && duty_amount.to_s.length > 15
|
217
|
+
fail ArgumentError, 'invalid value for "duty_amount", the character length must be smaller than or equal to 15.'
|
218
|
+
end
|
219
|
+
|
220
|
+
@duty_amount = duty_amount
|
221
|
+
end
|
222
|
+
|
223
|
+
# Custom attribute writer method with validation
|
224
|
+
# @param [Object] tax_amount Value to be assigned
|
225
|
+
def tax_amount=(tax_amount)
|
226
|
+
if !tax_amount.nil? && tax_amount.to_s.length > 12
|
227
|
+
fail ArgumentError, 'invalid value for "tax_amount", the character length must be smaller than or equal to 12.'
|
228
|
+
end
|
229
|
+
|
230
|
+
@tax_amount = tax_amount
|
231
|
+
end
|
232
|
+
|
233
|
+
# Custom attribute writer method with validation
|
234
|
+
# @param [Object] national_tax_included Value to be assigned
|
235
|
+
def national_tax_included=(national_tax_included)
|
236
|
+
if !national_tax_included.nil? && national_tax_included.to_s.length > 1
|
237
|
+
fail ArgumentError, 'invalid value for "national_tax_included", the character length must be smaller than or equal to 1.'
|
238
|
+
end
|
239
|
+
|
240
|
+
@national_tax_included = national_tax_included
|
241
|
+
end
|
242
|
+
|
243
|
+
# Custom attribute writer method with validation
|
244
|
+
# @param [Object] freight_amount Value to be assigned
|
245
|
+
def freight_amount=(freight_amount)
|
246
|
+
if !freight_amount.nil? && freight_amount.to_s.length > 13
|
247
|
+
fail ArgumentError, 'invalid value for "freight_amount", the character length must be smaller than or equal to 13.'
|
248
|
+
end
|
249
|
+
|
250
|
+
@freight_amount = freight_amount
|
251
|
+
end
|
252
|
+
|
253
|
+
# Checks equality by comparing each attribute.
|
254
|
+
# @param [Object] Object to be compared
|
255
|
+
def ==(o)
|
256
|
+
return true if self.equal?(o)
|
257
|
+
self.class == o.class &&
|
258
|
+
authorized_amount == o.authorized_amount &&
|
259
|
+
total_amount == o.total_amount &&
|
260
|
+
currency == o.currency &&
|
261
|
+
discount_amount == o.discount_amount &&
|
262
|
+
duty_amount == o.duty_amount &&
|
263
|
+
tax_amount == o.tax_amount &&
|
264
|
+
national_tax_included == o.national_tax_included &&
|
265
|
+
freight_amount == o.freight_amount &&
|
266
|
+
tax_details == o.tax_details
|
267
|
+
end
|
268
|
+
|
269
|
+
# @see the `==` method
|
270
|
+
# @param [Object] Object to be compared
|
271
|
+
def eql?(o)
|
272
|
+
self == o
|
273
|
+
end
|
274
|
+
|
275
|
+
# Calculates hash code according to all attributes.
|
276
|
+
# @return [Fixnum] Hash code
|
277
|
+
def hash
|
278
|
+
[authorized_amount, total_amount, currency, discount_amount, duty_amount, tax_amount, national_tax_included, freight_amount, tax_details].hash
|
279
|
+
end
|
280
|
+
|
281
|
+
# Builds the object from hash
|
282
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
283
|
+
# @return [Object] Returns the model itself
|
284
|
+
def build_from_hash(attributes)
|
285
|
+
return nil unless attributes.is_a?(Hash)
|
286
|
+
self.class.swagger_types.each_pair do |key, type|
|
287
|
+
if type =~ /\AArray<(.*)>/i
|
288
|
+
# check to ensure the input is an array given that the the attribute
|
289
|
+
# is documented as an array but the input is not
|
290
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
291
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
292
|
+
end
|
293
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
294
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
295
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
296
|
+
end
|
297
|
+
|
298
|
+
self
|
299
|
+
end
|
300
|
+
|
301
|
+
# Deserializes the data based on type
|
302
|
+
# @param string type Data type
|
303
|
+
# @param string value Value to be deserialized
|
304
|
+
# @return [Object] Deserialized data
|
305
|
+
def _deserialize(type, value)
|
306
|
+
case type.to_sym
|
307
|
+
when :DateTime
|
308
|
+
DateTime.parse(value)
|
309
|
+
when :Date
|
310
|
+
Date.parse(value)
|
311
|
+
when :String
|
312
|
+
value.to_s
|
313
|
+
when :Integer
|
314
|
+
value.to_i
|
315
|
+
when :Float
|
316
|
+
value.to_f
|
317
|
+
when :BOOLEAN
|
318
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
319
|
+
true
|
320
|
+
else
|
321
|
+
false
|
322
|
+
end
|
323
|
+
when :Object
|
324
|
+
# generic object (usually a Hash), return directly
|
325
|
+
value
|
326
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
327
|
+
inner_type = Regexp.last_match[:inner_type]
|
328
|
+
value.map { |v| _deserialize(inner_type, v) }
|
329
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
330
|
+
k_type = Regexp.last_match[:k_type]
|
331
|
+
v_type = Regexp.last_match[:v_type]
|
332
|
+
{}.tap do |hash|
|
333
|
+
value.each do |k, v|
|
334
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
335
|
+
end
|
336
|
+
end
|
337
|
+
else # model
|
338
|
+
temp_model = CyberSource.const_get(type).new
|
339
|
+
temp_model.build_from_hash(value)
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
# Returns the string representation of the object
|
344
|
+
# @return [String] String presentation of the object
|
345
|
+
def to_s
|
346
|
+
to_hash.to_s
|
347
|
+
end
|
348
|
+
|
349
|
+
# to_body is an alias to to_hash (backward compatibility)
|
350
|
+
# @return [Hash] Returns the object in the form of hash
|
351
|
+
def to_body
|
352
|
+
to_hash
|
353
|
+
end
|
354
|
+
|
355
|
+
# Returns the object in the form of hash
|
356
|
+
# @return [Hash] Returns the object in the form of hash
|
357
|
+
def to_hash
|
358
|
+
hash = {}
|
359
|
+
self.class.attribute_map.each_pair do |attr, param|
|
360
|
+
value = self.send(attr)
|
361
|
+
next if value.nil?
|
362
|
+
hash[param] = _to_hash(value)
|
363
|
+
end
|
364
|
+
hash
|
365
|
+
end
|
366
|
+
|
367
|
+
# Outputs non-array value in the form of hash
|
368
|
+
# For object, use to_hash. Otherwise, just return the value
|
369
|
+
# @param [Object] value Any valid value
|
370
|
+
# @return [Hash] Returns the value in the form of hash
|
371
|
+
def _to_hash(value)
|
372
|
+
if value.is_a?(Array)
|
373
|
+
value.compact.map { |v| _to_hash(v) }
|
374
|
+
elsif value.is_a?(Hash)
|
375
|
+
{}.tap do |hash|
|
376
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
377
|
+
end
|
378
|
+
elsif value.respond_to? :to_hash
|
379
|
+
value.to_hash
|
380
|
+
else
|
381
|
+
value
|
382
|
+
end
|
383
|
+
end
|
384
|
+
end
|
385
|
+
end
|