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_4_order_information_invoice_details.rb
CHANGED
@@ -1,305 +1,305 @@
|
|
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 InlineResponse2004OrderInformationInvoiceDetails
|
17
|
-
# Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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)
|
18
|
-
attr_accessor :purchase_order_number
|
19
|
-
|
20
|
-
# Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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)
|
21
|
-
attr_accessor :purchase_order_date
|
22
|
-
|
23
|
-
# Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the 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)
|
24
|
-
attr_accessor :taxable
|
25
|
-
|
26
|
-
# VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number
|
28
|
-
|
29
|
-
# International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code
|
31
|
-
|
32
|
-
attr_accessor :transaction_advice_addendum
|
33
|
-
|
34
|
-
# Indicates whether CyberSource sent the Level III information to the processor. The possible values are: If your account is not enabled for Level III data or if you did not include the purchasing level field in your request, CyberSource does not include the Level III data in the request sent to the processor. For processor-specific information, see the bill_purchasing_level3_enabled 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)
|
35
|
-
attr_accessor :level3_transmission_status
|
36
|
-
|
37
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
-
def self.attribute_map
|
39
|
-
{
|
40
|
-
:'purchase_order_number' => :'purchaseOrderNumber',
|
41
|
-
:'purchase_order_date' => :'purchaseOrderDate',
|
42
|
-
:'taxable' => :'taxable',
|
43
|
-
:'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber',
|
44
|
-
:'commodity_code' => :'commodityCode',
|
45
|
-
:'transaction_advice_addendum' => :'transactionAdviceAddendum',
|
46
|
-
:'level3_transmission_status' => :'level3TransmissionStatus'
|
47
|
-
}
|
48
|
-
end
|
49
|
-
|
50
|
-
# Attribute type mapping.
|
51
|
-
def self.swagger_types
|
52
|
-
{
|
53
|
-
:'purchase_order_number' => :'String',
|
54
|
-
:'purchase_order_date' => :'String',
|
55
|
-
:'taxable' => :'BOOLEAN',
|
56
|
-
:'vat_invoice_reference_number' => :'String',
|
57
|
-
:'commodity_code' => :'String',
|
58
|
-
:'transaction_advice_addendum' => :'Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>',
|
59
|
-
:'level3_transmission_status' => :'BOOLEAN'
|
60
|
-
}
|
61
|
-
end
|
62
|
-
|
63
|
-
# Initializes the object
|
64
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
-
def initialize(attributes = {})
|
66
|
-
return unless attributes.is_a?(Hash)
|
67
|
-
|
68
|
-
# convert string to symbol for hash key
|
69
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
70
|
-
|
71
|
-
if attributes.has_key?(:'purchaseOrderNumber')
|
72
|
-
self.purchase_order_number = attributes[:'purchaseOrderNumber']
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes.has_key?(:'purchaseOrderDate')
|
76
|
-
self.purchase_order_date = attributes[:'purchaseOrderDate']
|
77
|
-
end
|
78
|
-
|
79
|
-
if attributes.has_key?(:'taxable')
|
80
|
-
self.taxable = attributes[:'taxable']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes.has_key?(:'vatInvoiceReferenceNumber')
|
84
|
-
self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber']
|
85
|
-
end
|
86
|
-
|
87
|
-
if attributes.has_key?(:'commodityCode')
|
88
|
-
self.commodity_code = attributes[:'commodityCode']
|
89
|
-
end
|
90
|
-
|
91
|
-
if attributes.has_key?(:'transactionAdviceAddendum')
|
92
|
-
if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array)
|
93
|
-
self.transaction_advice_addendum = value
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
if attributes.has_key?(:'level3TransmissionStatus')
|
98
|
-
self.level3_transmission_status = attributes[:'level3TransmissionStatus']
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
103
|
-
# @return Array for valid properties with the reasons
|
104
|
-
def list_invalid_properties
|
105
|
-
invalid_properties = Array.new
|
106
|
-
if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
107
|
-
invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.')
|
108
|
-
end
|
109
|
-
|
110
|
-
if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
111
|
-
invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.')
|
112
|
-
end
|
113
|
-
|
114
|
-
if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
115
|
-
invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.')
|
116
|
-
end
|
117
|
-
|
118
|
-
if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
119
|
-
invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 4.')
|
120
|
-
end
|
121
|
-
|
122
|
-
invalid_properties
|
123
|
-
end
|
124
|
-
|
125
|
-
# Check to see if the all the properties in the model are valid
|
126
|
-
# @return true if the model is valid
|
127
|
-
def valid?
|
128
|
-
return false if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
129
|
-
return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
130
|
-
return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
131
|
-
return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
132
|
-
true
|
133
|
-
end
|
134
|
-
|
135
|
-
# Custom attribute writer method with validation
|
136
|
-
# @param [Object] purchase_order_number Value to be assigned
|
137
|
-
def purchase_order_number=(purchase_order_number)
|
138
|
-
if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25
|
139
|
-
fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.'
|
140
|
-
end
|
141
|
-
|
142
|
-
@purchase_order_number = purchase_order_number
|
143
|
-
end
|
144
|
-
|
145
|
-
# Custom attribute writer method with validation
|
146
|
-
# @param [Object] purchase_order_date Value to be assigned
|
147
|
-
def purchase_order_date=(purchase_order_date)
|
148
|
-
if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10
|
149
|
-
fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.'
|
150
|
-
end
|
151
|
-
|
152
|
-
@purchase_order_date = purchase_order_date
|
153
|
-
end
|
154
|
-
|
155
|
-
# Custom attribute writer method with validation
|
156
|
-
# @param [Object] vat_invoice_reference_number Value to be assigned
|
157
|
-
def vat_invoice_reference_number=(vat_invoice_reference_number)
|
158
|
-
if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15
|
159
|
-
fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.'
|
160
|
-
end
|
161
|
-
|
162
|
-
@vat_invoice_reference_number = vat_invoice_reference_number
|
163
|
-
end
|
164
|
-
|
165
|
-
# Custom attribute writer method with validation
|
166
|
-
# @param [Object] commodity_code Value to be assigned
|
167
|
-
def commodity_code=(commodity_code)
|
168
|
-
if !commodity_code.nil? && commodity_code.to_s.length > 4
|
169
|
-
fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.'
|
170
|
-
end
|
171
|
-
|
172
|
-
@commodity_code = commodity_code
|
173
|
-
end
|
174
|
-
|
175
|
-
# Checks equality by comparing each attribute.
|
176
|
-
# @param [Object] Object to be compared
|
177
|
-
def ==(o)
|
178
|
-
return true if self.equal?(o)
|
179
|
-
self.class == o.class &&
|
180
|
-
purchase_order_number == o.purchase_order_number &&
|
181
|
-
purchase_order_date == o.purchase_order_date &&
|
182
|
-
taxable == o.taxable &&
|
183
|
-
vat_invoice_reference_number == o.vat_invoice_reference_number &&
|
184
|
-
commodity_code == o.commodity_code &&
|
185
|
-
transaction_advice_addendum == o.transaction_advice_addendum &&
|
186
|
-
level3_transmission_status == o.level3_transmission_status
|
187
|
-
end
|
188
|
-
|
189
|
-
# @see the `==` method
|
190
|
-
# @param [Object] Object to be compared
|
191
|
-
def eql?(o)
|
192
|
-
self == o
|
193
|
-
end
|
194
|
-
|
195
|
-
# Calculates hash code according to all attributes.
|
196
|
-
# @return [Fixnum] Hash code
|
197
|
-
def hash
|
198
|
-
[purchase_order_number, purchase_order_date, taxable, vat_invoice_reference_number, commodity_code, transaction_advice_addendum, level3_transmission_status].hash
|
199
|
-
end
|
200
|
-
|
201
|
-
# Builds the object from hash
|
202
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
203
|
-
# @return [Object] Returns the model itself
|
204
|
-
def build_from_hash(attributes)
|
205
|
-
return nil unless attributes.is_a?(Hash)
|
206
|
-
self.class.swagger_types.each_pair do |key, type|
|
207
|
-
if type =~ /\AArray<(.*)>/i
|
208
|
-
# check to ensure the input is an array given that the the attribute
|
209
|
-
# is documented as an array but the input is not
|
210
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
211
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
212
|
-
end
|
213
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
214
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
215
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
216
|
-
end
|
217
|
-
|
218
|
-
self
|
219
|
-
end
|
220
|
-
|
221
|
-
# Deserializes the data based on type
|
222
|
-
# @param string type Data type
|
223
|
-
# @param string value Value to be deserialized
|
224
|
-
# @return [Object] Deserialized data
|
225
|
-
def _deserialize(type, value)
|
226
|
-
case type.to_sym
|
227
|
-
when :DateTime
|
228
|
-
DateTime.parse(value)
|
229
|
-
when :Date
|
230
|
-
Date.parse(value)
|
231
|
-
when :String
|
232
|
-
value.to_s
|
233
|
-
when :Integer
|
234
|
-
value.to_i
|
235
|
-
when :Float
|
236
|
-
value.to_f
|
237
|
-
when :BOOLEAN
|
238
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
239
|
-
true
|
240
|
-
else
|
241
|
-
false
|
242
|
-
end
|
243
|
-
when :Object
|
244
|
-
# generic object (usually a Hash), return directly
|
245
|
-
value
|
246
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
247
|
-
inner_type = Regexp.last_match[:inner_type]
|
248
|
-
value.map { |v| _deserialize(inner_type, v) }
|
249
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
250
|
-
k_type = Regexp.last_match[:k_type]
|
251
|
-
v_type = Regexp.last_match[:v_type]
|
252
|
-
{}.tap do |hash|
|
253
|
-
value.each do |k, v|
|
254
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
255
|
-
end
|
256
|
-
end
|
257
|
-
else # model
|
258
|
-
temp_model = CyberSource.const_get(type).new
|
259
|
-
temp_model.build_from_hash(value)
|
260
|
-
end
|
261
|
-
end
|
262
|
-
|
263
|
-
# Returns the string representation of the object
|
264
|
-
# @return [String] String presentation of the object
|
265
|
-
def to_s
|
266
|
-
to_hash.to_s
|
267
|
-
end
|
268
|
-
|
269
|
-
# to_body is an alias to to_hash (backward compatibility)
|
270
|
-
# @return [Hash] Returns the object in the form of hash
|
271
|
-
def to_body
|
272
|
-
to_hash
|
273
|
-
end
|
274
|
-
|
275
|
-
# Returns the object in the form of hash
|
276
|
-
# @return [Hash] Returns the object in the form of hash
|
277
|
-
def to_hash
|
278
|
-
hash = {}
|
279
|
-
self.class.attribute_map.each_pair do |attr, param|
|
280
|
-
value = self.send(attr)
|
281
|
-
next if value.nil?
|
282
|
-
hash[param] = _to_hash(value)
|
283
|
-
end
|
284
|
-
hash
|
285
|
-
end
|
286
|
-
|
287
|
-
# Outputs non-array value in the form of hash
|
288
|
-
# For object, use to_hash. Otherwise, just return the value
|
289
|
-
# @param [Object] value Any valid value
|
290
|
-
# @return [Hash] Returns the value in the form of hash
|
291
|
-
def _to_hash(value)
|
292
|
-
if value.is_a?(Array)
|
293
|
-
value.compact.map { |v| _to_hash(v) }
|
294
|
-
elsif value.is_a?(Hash)
|
295
|
-
{}.tap do |hash|
|
296
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
297
|
-
end
|
298
|
-
elsif value.respond_to? :to_hash
|
299
|
-
value.to_hash
|
300
|
-
else
|
301
|
-
value
|
302
|
-
end
|
303
|
-
end
|
304
|
-
end
|
305
|
-
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 InlineResponse2004OrderInformationInvoiceDetails
|
17
|
+
# Value used by your customer to identify the order. This value is typically a purchase order number. CyberSource recommends that you do not populate the field with all zeros or nines. For processor-specific information, see the user_po 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)
|
18
|
+
attr_accessor :purchase_order_number
|
19
|
+
|
20
|
+
# Date the order was processed. `Format: YYYY-MM-DD`. For processor-specific information, see the purchaser_order_date 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)
|
21
|
+
attr_accessor :purchase_order_date
|
22
|
+
|
23
|
+
# Flag that indicates whether an order is taxable. This value must be true if the sum of all _lineItems[].taxAmount_ values > 0. If you do not include any _lineItems[].taxAmount_ values in your request, CyberSource does not include _invoiceDetails.taxable_ in the data it sends to the processor. For processor-specific information, see the 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)
|
24
|
+
attr_accessor :taxable
|
25
|
+
|
26
|
+
# VAT invoice number associated with the transaction. For processor-specific information, see the vat_invoice_ref_number 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 :vat_invoice_reference_number
|
28
|
+
|
29
|
+
# International description code of the overall order’s goods or services or the Categorizes purchases for VAT reporting. Contact your acquirer for a list of codes. For processor-specific information, see the summary_commodity_code 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 :commodity_code
|
31
|
+
|
32
|
+
attr_accessor :transaction_advice_addendum
|
33
|
+
|
34
|
+
# Indicates whether CyberSource sent the Level III information to the processor. The possible values are: If your account is not enabled for Level III data or if you did not include the purchasing level field in your request, CyberSource does not include the Level III data in the request sent to the processor. For processor-specific information, see the bill_purchasing_level3_enabled 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)
|
35
|
+
attr_accessor :level3_transmission_status
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'purchase_order_number' => :'purchaseOrderNumber',
|
41
|
+
:'purchase_order_date' => :'purchaseOrderDate',
|
42
|
+
:'taxable' => :'taxable',
|
43
|
+
:'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber',
|
44
|
+
:'commodity_code' => :'commodityCode',
|
45
|
+
:'transaction_advice_addendum' => :'transactionAdviceAddendum',
|
46
|
+
:'level3_transmission_status' => :'level3TransmissionStatus'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'purchase_order_number' => :'String',
|
54
|
+
:'purchase_order_date' => :'String',
|
55
|
+
:'taxable' => :'BOOLEAN',
|
56
|
+
:'vat_invoice_reference_number' => :'String',
|
57
|
+
:'commodity_code' => :'String',
|
58
|
+
:'transaction_advice_addendum' => :'Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>',
|
59
|
+
:'level3_transmission_status' => :'BOOLEAN'
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
return unless attributes.is_a?(Hash)
|
67
|
+
|
68
|
+
# convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
70
|
+
|
71
|
+
if attributes.has_key?(:'purchaseOrderNumber')
|
72
|
+
self.purchase_order_number = attributes[:'purchaseOrderNumber']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'purchaseOrderDate')
|
76
|
+
self.purchase_order_date = attributes[:'purchaseOrderDate']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.has_key?(:'taxable')
|
80
|
+
self.taxable = attributes[:'taxable']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'vatInvoiceReferenceNumber')
|
84
|
+
self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'commodityCode')
|
88
|
+
self.commodity_code = attributes[:'commodityCode']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'transactionAdviceAddendum')
|
92
|
+
if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array)
|
93
|
+
self.transaction_advice_addendum = value
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'level3TransmissionStatus')
|
98
|
+
self.level3_transmission_status = attributes[:'level3TransmissionStatus']
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
103
|
+
# @return Array for valid properties with the reasons
|
104
|
+
def list_invalid_properties
|
105
|
+
invalid_properties = Array.new
|
106
|
+
if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
107
|
+
invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.')
|
108
|
+
end
|
109
|
+
|
110
|
+
if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
111
|
+
invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.')
|
112
|
+
end
|
113
|
+
|
114
|
+
if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
115
|
+
invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
119
|
+
invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 4.')
|
120
|
+
end
|
121
|
+
|
122
|
+
invalid_properties
|
123
|
+
end
|
124
|
+
|
125
|
+
# Check to see if the all the properties in the model are valid
|
126
|
+
# @return true if the model is valid
|
127
|
+
def valid?
|
128
|
+
return false if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
129
|
+
return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
130
|
+
return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
131
|
+
return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
132
|
+
true
|
133
|
+
end
|
134
|
+
|
135
|
+
# Custom attribute writer method with validation
|
136
|
+
# @param [Object] purchase_order_number Value to be assigned
|
137
|
+
def purchase_order_number=(purchase_order_number)
|
138
|
+
if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25
|
139
|
+
fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.'
|
140
|
+
end
|
141
|
+
|
142
|
+
@purchase_order_number = purchase_order_number
|
143
|
+
end
|
144
|
+
|
145
|
+
# Custom attribute writer method with validation
|
146
|
+
# @param [Object] purchase_order_date Value to be assigned
|
147
|
+
def purchase_order_date=(purchase_order_date)
|
148
|
+
if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10
|
149
|
+
fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.'
|
150
|
+
end
|
151
|
+
|
152
|
+
@purchase_order_date = purchase_order_date
|
153
|
+
end
|
154
|
+
|
155
|
+
# Custom attribute writer method with validation
|
156
|
+
# @param [Object] vat_invoice_reference_number Value to be assigned
|
157
|
+
def vat_invoice_reference_number=(vat_invoice_reference_number)
|
158
|
+
if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15
|
159
|
+
fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.'
|
160
|
+
end
|
161
|
+
|
162
|
+
@vat_invoice_reference_number = vat_invoice_reference_number
|
163
|
+
end
|
164
|
+
|
165
|
+
# Custom attribute writer method with validation
|
166
|
+
# @param [Object] commodity_code Value to be assigned
|
167
|
+
def commodity_code=(commodity_code)
|
168
|
+
if !commodity_code.nil? && commodity_code.to_s.length > 4
|
169
|
+
fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.'
|
170
|
+
end
|
171
|
+
|
172
|
+
@commodity_code = commodity_code
|
173
|
+
end
|
174
|
+
|
175
|
+
# Checks equality by comparing each attribute.
|
176
|
+
# @param [Object] Object to be compared
|
177
|
+
def ==(o)
|
178
|
+
return true if self.equal?(o)
|
179
|
+
self.class == o.class &&
|
180
|
+
purchase_order_number == o.purchase_order_number &&
|
181
|
+
purchase_order_date == o.purchase_order_date &&
|
182
|
+
taxable == o.taxable &&
|
183
|
+
vat_invoice_reference_number == o.vat_invoice_reference_number &&
|
184
|
+
commodity_code == o.commodity_code &&
|
185
|
+
transaction_advice_addendum == o.transaction_advice_addendum &&
|
186
|
+
level3_transmission_status == o.level3_transmission_status
|
187
|
+
end
|
188
|
+
|
189
|
+
# @see the `==` method
|
190
|
+
# @param [Object] Object to be compared
|
191
|
+
def eql?(o)
|
192
|
+
self == o
|
193
|
+
end
|
194
|
+
|
195
|
+
# Calculates hash code according to all attributes.
|
196
|
+
# @return [Fixnum] Hash code
|
197
|
+
def hash
|
198
|
+
[purchase_order_number, purchase_order_date, taxable, vat_invoice_reference_number, commodity_code, transaction_advice_addendum, level3_transmission_status].hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Builds the object from hash
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
203
|
+
# @return [Object] Returns the model itself
|
204
|
+
def build_from_hash(attributes)
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
206
|
+
self.class.swagger_types.each_pair do |key, type|
|
207
|
+
if type =~ /\AArray<(.*)>/i
|
208
|
+
# check to ensure the input is an array given that the the attribute
|
209
|
+
# is documented as an array but the input is not
|
210
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
211
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
212
|
+
end
|
213
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
214
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
215
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
216
|
+
end
|
217
|
+
|
218
|
+
self
|
219
|
+
end
|
220
|
+
|
221
|
+
# Deserializes the data based on type
|
222
|
+
# @param string type Data type
|
223
|
+
# @param string value Value to be deserialized
|
224
|
+
# @return [Object] Deserialized data
|
225
|
+
def _deserialize(type, value)
|
226
|
+
case type.to_sym
|
227
|
+
when :DateTime
|
228
|
+
DateTime.parse(value)
|
229
|
+
when :Date
|
230
|
+
Date.parse(value)
|
231
|
+
when :String
|
232
|
+
value.to_s
|
233
|
+
when :Integer
|
234
|
+
value.to_i
|
235
|
+
when :Float
|
236
|
+
value.to_f
|
237
|
+
when :BOOLEAN
|
238
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
239
|
+
true
|
240
|
+
else
|
241
|
+
false
|
242
|
+
end
|
243
|
+
when :Object
|
244
|
+
# generic object (usually a Hash), return directly
|
245
|
+
value
|
246
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
247
|
+
inner_type = Regexp.last_match[:inner_type]
|
248
|
+
value.map { |v| _deserialize(inner_type, v) }
|
249
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
250
|
+
k_type = Regexp.last_match[:k_type]
|
251
|
+
v_type = Regexp.last_match[:v_type]
|
252
|
+
{}.tap do |hash|
|
253
|
+
value.each do |k, v|
|
254
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
255
|
+
end
|
256
|
+
end
|
257
|
+
else # model
|
258
|
+
temp_model = CyberSource.const_get(type).new
|
259
|
+
temp_model.build_from_hash(value)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Returns the string representation of the object
|
264
|
+
# @return [String] String presentation of the object
|
265
|
+
def to_s
|
266
|
+
to_hash.to_s
|
267
|
+
end
|
268
|
+
|
269
|
+
# to_body is an alias to to_hash (backward compatibility)
|
270
|
+
# @return [Hash] Returns the object in the form of hash
|
271
|
+
def to_body
|
272
|
+
to_hash
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the object in the form of hash
|
276
|
+
# @return [Hash] Returns the object in the form of hash
|
277
|
+
def to_hash
|
278
|
+
hash = {}
|
279
|
+
self.class.attribute_map.each_pair do |attr, param|
|
280
|
+
value = self.send(attr)
|
281
|
+
next if value.nil?
|
282
|
+
hash[param] = _to_hash(value)
|
283
|
+
end
|
284
|
+
hash
|
285
|
+
end
|
286
|
+
|
287
|
+
# Outputs non-array value in the form of hash
|
288
|
+
# For object, use to_hash. Otherwise, just return the value
|
289
|
+
# @param [Object] value Any valid value
|
290
|
+
# @return [Hash] Returns the value in the form of hash
|
291
|
+
def _to_hash(value)
|
292
|
+
if value.is_a?(Array)
|
293
|
+
value.compact.map { |v| _to_hash(v) }
|
294
|
+
elsif value.is_a?(Hash)
|
295
|
+
{}.tap do |hash|
|
296
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
297
|
+
end
|
298
|
+
elsif value.respond_to? :to_hash
|
299
|
+
value.to_hash
|
300
|
+
else
|
301
|
+
value
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|