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/v2paymentsidcaptures_order_information_invoice_details.rb
CHANGED
@@ -1,320 +1,320 @@
|
|
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 V2paymentsidcapturesOrderInformationInvoiceDetails
|
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
|
-
# The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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 :purchase_contact_name
|
25
|
-
|
26
|
-
# 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)
|
27
|
-
attr_accessor :taxable
|
28
|
-
|
29
|
-
# 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)
|
30
|
-
attr_accessor :vat_invoice_reference_number
|
31
|
-
|
32
|
-
# 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)
|
33
|
-
attr_accessor :commodity_code
|
34
|
-
|
35
|
-
attr_accessor :transaction_advice_addendum
|
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
|
-
:'purchase_contact_name' => :'purchaseContactName',
|
43
|
-
:'taxable' => :'taxable',
|
44
|
-
:'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber',
|
45
|
-
:'commodity_code' => :'commodityCode',
|
46
|
-
:'transaction_advice_addendum' => :'transactionAdviceAddendum'
|
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
|
-
:'purchase_contact_name' => :'String',
|
56
|
-
:'taxable' => :'BOOLEAN',
|
57
|
-
:'vat_invoice_reference_number' => :'String',
|
58
|
-
:'commodity_code' => :'String',
|
59
|
-
:'transaction_advice_addendum' => :'Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>'
|
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?(:'purchaseContactName')
|
80
|
-
self.purchase_contact_name = attributes[:'purchaseContactName']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes.has_key?(:'taxable')
|
84
|
-
self.taxable = attributes[:'taxable']
|
85
|
-
end
|
86
|
-
|
87
|
-
if attributes.has_key?(:'vatInvoiceReferenceNumber')
|
88
|
-
self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber']
|
89
|
-
end
|
90
|
-
|
91
|
-
if attributes.has_key?(:'commodityCode')
|
92
|
-
self.commodity_code = attributes[:'commodityCode']
|
93
|
-
end
|
94
|
-
|
95
|
-
if attributes.has_key?(:'transactionAdviceAddendum')
|
96
|
-
if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array)
|
97
|
-
self.transaction_advice_addendum = value
|
98
|
-
end
|
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 !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36
|
115
|
-
invalid_properties.push('invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.')
|
116
|
-
end
|
117
|
-
|
118
|
-
if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
119
|
-
invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.')
|
120
|
-
end
|
121
|
-
|
122
|
-
if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
123
|
-
invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 4.')
|
124
|
-
end
|
125
|
-
|
126
|
-
invalid_properties
|
127
|
-
end
|
128
|
-
|
129
|
-
# Check to see if the all the properties in the model are valid
|
130
|
-
# @return true if the model is valid
|
131
|
-
def valid?
|
132
|
-
return false if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
133
|
-
return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
134
|
-
return false if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36
|
135
|
-
return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
136
|
-
return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
137
|
-
true
|
138
|
-
end
|
139
|
-
|
140
|
-
# Custom attribute writer method with validation
|
141
|
-
# @param [Object] purchase_order_number Value to be assigned
|
142
|
-
def purchase_order_number=(purchase_order_number)
|
143
|
-
if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25
|
144
|
-
fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.'
|
145
|
-
end
|
146
|
-
|
147
|
-
@purchase_order_number = purchase_order_number
|
148
|
-
end
|
149
|
-
|
150
|
-
# Custom attribute writer method with validation
|
151
|
-
# @param [Object] purchase_order_date Value to be assigned
|
152
|
-
def purchase_order_date=(purchase_order_date)
|
153
|
-
if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10
|
154
|
-
fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.'
|
155
|
-
end
|
156
|
-
|
157
|
-
@purchase_order_date = purchase_order_date
|
158
|
-
end
|
159
|
-
|
160
|
-
# Custom attribute writer method with validation
|
161
|
-
# @param [Object] purchase_contact_name Value to be assigned
|
162
|
-
def purchase_contact_name=(purchase_contact_name)
|
163
|
-
if !purchase_contact_name.nil? && purchase_contact_name.to_s.length > 36
|
164
|
-
fail ArgumentError, 'invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.'
|
165
|
-
end
|
166
|
-
|
167
|
-
@purchase_contact_name = purchase_contact_name
|
168
|
-
end
|
169
|
-
|
170
|
-
# Custom attribute writer method with validation
|
171
|
-
# @param [Object] vat_invoice_reference_number Value to be assigned
|
172
|
-
def vat_invoice_reference_number=(vat_invoice_reference_number)
|
173
|
-
if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15
|
174
|
-
fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.'
|
175
|
-
end
|
176
|
-
|
177
|
-
@vat_invoice_reference_number = vat_invoice_reference_number
|
178
|
-
end
|
179
|
-
|
180
|
-
# Custom attribute writer method with validation
|
181
|
-
# @param [Object] commodity_code Value to be assigned
|
182
|
-
def commodity_code=(commodity_code)
|
183
|
-
if !commodity_code.nil? && commodity_code.to_s.length > 4
|
184
|
-
fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.'
|
185
|
-
end
|
186
|
-
|
187
|
-
@commodity_code = commodity_code
|
188
|
-
end
|
189
|
-
|
190
|
-
# Checks equality by comparing each attribute.
|
191
|
-
# @param [Object] Object to be compared
|
192
|
-
def ==(o)
|
193
|
-
return true if self.equal?(o)
|
194
|
-
self.class == o.class &&
|
195
|
-
purchase_order_number == o.purchase_order_number &&
|
196
|
-
purchase_order_date == o.purchase_order_date &&
|
197
|
-
purchase_contact_name == o.purchase_contact_name &&
|
198
|
-
taxable == o.taxable &&
|
199
|
-
vat_invoice_reference_number == o.vat_invoice_reference_number &&
|
200
|
-
commodity_code == o.commodity_code &&
|
201
|
-
transaction_advice_addendum == o.transaction_advice_addendum
|
202
|
-
end
|
203
|
-
|
204
|
-
# @see the `==` method
|
205
|
-
# @param [Object] Object to be compared
|
206
|
-
def eql?(o)
|
207
|
-
self == o
|
208
|
-
end
|
209
|
-
|
210
|
-
# Calculates hash code according to all attributes.
|
211
|
-
# @return [Fixnum] Hash code
|
212
|
-
def hash
|
213
|
-
[purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, transaction_advice_addendum].hash
|
214
|
-
end
|
215
|
-
|
216
|
-
# Builds the object from hash
|
217
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
218
|
-
# @return [Object] Returns the model itself
|
219
|
-
def build_from_hash(attributes)
|
220
|
-
return nil unless attributes.is_a?(Hash)
|
221
|
-
self.class.swagger_types.each_pair do |key, type|
|
222
|
-
if type =~ /\AArray<(.*)>/i
|
223
|
-
# check to ensure the input is an array given that the the attribute
|
224
|
-
# is documented as an array but the input is not
|
225
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
226
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
227
|
-
end
|
228
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
229
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
230
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
231
|
-
end
|
232
|
-
|
233
|
-
self
|
234
|
-
end
|
235
|
-
|
236
|
-
# Deserializes the data based on type
|
237
|
-
# @param string type Data type
|
238
|
-
# @param string value Value to be deserialized
|
239
|
-
# @return [Object] Deserialized data
|
240
|
-
def _deserialize(type, value)
|
241
|
-
case type.to_sym
|
242
|
-
when :DateTime
|
243
|
-
DateTime.parse(value)
|
244
|
-
when :Date
|
245
|
-
Date.parse(value)
|
246
|
-
when :String
|
247
|
-
value.to_s
|
248
|
-
when :Integer
|
249
|
-
value.to_i
|
250
|
-
when :Float
|
251
|
-
value.to_f
|
252
|
-
when :BOOLEAN
|
253
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
254
|
-
true
|
255
|
-
else
|
256
|
-
false
|
257
|
-
end
|
258
|
-
when :Object
|
259
|
-
# generic object (usually a Hash), return directly
|
260
|
-
value
|
261
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
262
|
-
inner_type = Regexp.last_match[:inner_type]
|
263
|
-
value.map { |v| _deserialize(inner_type, v) }
|
264
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
265
|
-
k_type = Regexp.last_match[:k_type]
|
266
|
-
v_type = Regexp.last_match[:v_type]
|
267
|
-
{}.tap do |hash|
|
268
|
-
value.each do |k, v|
|
269
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
270
|
-
end
|
271
|
-
end
|
272
|
-
else # model
|
273
|
-
temp_model = CyberSource.const_get(type).new
|
274
|
-
temp_model.build_from_hash(value)
|
275
|
-
end
|
276
|
-
end
|
277
|
-
|
278
|
-
# Returns the string representation of the object
|
279
|
-
# @return [String] String presentation of the object
|
280
|
-
def to_s
|
281
|
-
to_hash.to_s
|
282
|
-
end
|
283
|
-
|
284
|
-
# to_body is an alias to to_hash (backward compatibility)
|
285
|
-
# @return [Hash] Returns the object in the form of hash
|
286
|
-
def to_body
|
287
|
-
to_hash
|
288
|
-
end
|
289
|
-
|
290
|
-
# Returns the object in the form of hash
|
291
|
-
# @return [Hash] Returns the object in the form of hash
|
292
|
-
def to_hash
|
293
|
-
hash = {}
|
294
|
-
self.class.attribute_map.each_pair do |attr, param|
|
295
|
-
value = self.send(attr)
|
296
|
-
next if value.nil?
|
297
|
-
hash[param] = _to_hash(value)
|
298
|
-
end
|
299
|
-
hash
|
300
|
-
end
|
301
|
-
|
302
|
-
# Outputs non-array value in the form of hash
|
303
|
-
# For object, use to_hash. Otherwise, just return the value
|
304
|
-
# @param [Object] value Any valid value
|
305
|
-
# @return [Hash] Returns the value in the form of hash
|
306
|
-
def _to_hash(value)
|
307
|
-
if value.is_a?(Array)
|
308
|
-
value.compact.map { |v| _to_hash(v) }
|
309
|
-
elsif value.is_a?(Hash)
|
310
|
-
{}.tap do |hash|
|
311
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
312
|
-
end
|
313
|
-
elsif value.respond_to? :to_hash
|
314
|
-
value.to_hash
|
315
|
-
else
|
316
|
-
value
|
317
|
-
end
|
318
|
-
end
|
319
|
-
end
|
320
|
-
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 V2paymentsidcapturesOrderInformationInvoiceDetails
|
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
|
+
# The name of the individual or the company contacted for company authorized purchases. For processor-specific information, see the authorized_contact_name 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 :purchase_contact_name
|
25
|
+
|
26
|
+
# 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)
|
27
|
+
attr_accessor :taxable
|
28
|
+
|
29
|
+
# 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)
|
30
|
+
attr_accessor :vat_invoice_reference_number
|
31
|
+
|
32
|
+
# 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)
|
33
|
+
attr_accessor :commodity_code
|
34
|
+
|
35
|
+
attr_accessor :transaction_advice_addendum
|
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
|
+
:'purchase_contact_name' => :'purchaseContactName',
|
43
|
+
:'taxable' => :'taxable',
|
44
|
+
:'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber',
|
45
|
+
:'commodity_code' => :'commodityCode',
|
46
|
+
:'transaction_advice_addendum' => :'transactionAdviceAddendum'
|
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
|
+
:'purchase_contact_name' => :'String',
|
56
|
+
:'taxable' => :'BOOLEAN',
|
57
|
+
:'vat_invoice_reference_number' => :'String',
|
58
|
+
:'commodity_code' => :'String',
|
59
|
+
:'transaction_advice_addendum' => :'Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>'
|
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?(:'purchaseContactName')
|
80
|
+
self.purchase_contact_name = attributes[:'purchaseContactName']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.has_key?(:'taxable')
|
84
|
+
self.taxable = attributes[:'taxable']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.has_key?(:'vatInvoiceReferenceNumber')
|
88
|
+
self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber']
|
89
|
+
end
|
90
|
+
|
91
|
+
if attributes.has_key?(:'commodityCode')
|
92
|
+
self.commodity_code = attributes[:'commodityCode']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.has_key?(:'transactionAdviceAddendum')
|
96
|
+
if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array)
|
97
|
+
self.transaction_advice_addendum = value
|
98
|
+
end
|
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 !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36
|
115
|
+
invalid_properties.push('invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
119
|
+
invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.')
|
120
|
+
end
|
121
|
+
|
122
|
+
if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
123
|
+
invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 4.')
|
124
|
+
end
|
125
|
+
|
126
|
+
invalid_properties
|
127
|
+
end
|
128
|
+
|
129
|
+
# Check to see if the all the properties in the model are valid
|
130
|
+
# @return true if the model is valid
|
131
|
+
def valid?
|
132
|
+
return false if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
133
|
+
return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
134
|
+
return false if !@purchase_contact_name.nil? && @purchase_contact_name.to_s.length > 36
|
135
|
+
return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
136
|
+
return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
137
|
+
true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method with validation
|
141
|
+
# @param [Object] purchase_order_number Value to be assigned
|
142
|
+
def purchase_order_number=(purchase_order_number)
|
143
|
+
if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25
|
144
|
+
fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.'
|
145
|
+
end
|
146
|
+
|
147
|
+
@purchase_order_number = purchase_order_number
|
148
|
+
end
|
149
|
+
|
150
|
+
# Custom attribute writer method with validation
|
151
|
+
# @param [Object] purchase_order_date Value to be assigned
|
152
|
+
def purchase_order_date=(purchase_order_date)
|
153
|
+
if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10
|
154
|
+
fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.'
|
155
|
+
end
|
156
|
+
|
157
|
+
@purchase_order_date = purchase_order_date
|
158
|
+
end
|
159
|
+
|
160
|
+
# Custom attribute writer method with validation
|
161
|
+
# @param [Object] purchase_contact_name Value to be assigned
|
162
|
+
def purchase_contact_name=(purchase_contact_name)
|
163
|
+
if !purchase_contact_name.nil? && purchase_contact_name.to_s.length > 36
|
164
|
+
fail ArgumentError, 'invalid value for "purchase_contact_name", the character length must be smaller than or equal to 36.'
|
165
|
+
end
|
166
|
+
|
167
|
+
@purchase_contact_name = purchase_contact_name
|
168
|
+
end
|
169
|
+
|
170
|
+
# Custom attribute writer method with validation
|
171
|
+
# @param [Object] vat_invoice_reference_number Value to be assigned
|
172
|
+
def vat_invoice_reference_number=(vat_invoice_reference_number)
|
173
|
+
if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15
|
174
|
+
fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.'
|
175
|
+
end
|
176
|
+
|
177
|
+
@vat_invoice_reference_number = vat_invoice_reference_number
|
178
|
+
end
|
179
|
+
|
180
|
+
# Custom attribute writer method with validation
|
181
|
+
# @param [Object] commodity_code Value to be assigned
|
182
|
+
def commodity_code=(commodity_code)
|
183
|
+
if !commodity_code.nil? && commodity_code.to_s.length > 4
|
184
|
+
fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.'
|
185
|
+
end
|
186
|
+
|
187
|
+
@commodity_code = commodity_code
|
188
|
+
end
|
189
|
+
|
190
|
+
# Checks equality by comparing each attribute.
|
191
|
+
# @param [Object] Object to be compared
|
192
|
+
def ==(o)
|
193
|
+
return true if self.equal?(o)
|
194
|
+
self.class == o.class &&
|
195
|
+
purchase_order_number == o.purchase_order_number &&
|
196
|
+
purchase_order_date == o.purchase_order_date &&
|
197
|
+
purchase_contact_name == o.purchase_contact_name &&
|
198
|
+
taxable == o.taxable &&
|
199
|
+
vat_invoice_reference_number == o.vat_invoice_reference_number &&
|
200
|
+
commodity_code == o.commodity_code &&
|
201
|
+
transaction_advice_addendum == o.transaction_advice_addendum
|
202
|
+
end
|
203
|
+
|
204
|
+
# @see the `==` method
|
205
|
+
# @param [Object] Object to be compared
|
206
|
+
def eql?(o)
|
207
|
+
self == o
|
208
|
+
end
|
209
|
+
|
210
|
+
# Calculates hash code according to all attributes.
|
211
|
+
# @return [Fixnum] Hash code
|
212
|
+
def hash
|
213
|
+
[purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, transaction_advice_addendum].hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Builds the object from hash
|
217
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
218
|
+
# @return [Object] Returns the model itself
|
219
|
+
def build_from_hash(attributes)
|
220
|
+
return nil unless attributes.is_a?(Hash)
|
221
|
+
self.class.swagger_types.each_pair do |key, type|
|
222
|
+
if type =~ /\AArray<(.*)>/i
|
223
|
+
# check to ensure the input is an array given that the the attribute
|
224
|
+
# is documented as an array but the input is not
|
225
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
226
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
227
|
+
end
|
228
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
229
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
230
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
231
|
+
end
|
232
|
+
|
233
|
+
self
|
234
|
+
end
|
235
|
+
|
236
|
+
# Deserializes the data based on type
|
237
|
+
# @param string type Data type
|
238
|
+
# @param string value Value to be deserialized
|
239
|
+
# @return [Object] Deserialized data
|
240
|
+
def _deserialize(type, value)
|
241
|
+
case type.to_sym
|
242
|
+
when :DateTime
|
243
|
+
DateTime.parse(value)
|
244
|
+
when :Date
|
245
|
+
Date.parse(value)
|
246
|
+
when :String
|
247
|
+
value.to_s
|
248
|
+
when :Integer
|
249
|
+
value.to_i
|
250
|
+
when :Float
|
251
|
+
value.to_f
|
252
|
+
when :BOOLEAN
|
253
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
254
|
+
true
|
255
|
+
else
|
256
|
+
false
|
257
|
+
end
|
258
|
+
when :Object
|
259
|
+
# generic object (usually a Hash), return directly
|
260
|
+
value
|
261
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
262
|
+
inner_type = Regexp.last_match[:inner_type]
|
263
|
+
value.map { |v| _deserialize(inner_type, v) }
|
264
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
265
|
+
k_type = Regexp.last_match[:k_type]
|
266
|
+
v_type = Regexp.last_match[:v_type]
|
267
|
+
{}.tap do |hash|
|
268
|
+
value.each do |k, v|
|
269
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
else # model
|
273
|
+
temp_model = CyberSource.const_get(type).new
|
274
|
+
temp_model.build_from_hash(value)
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
# Returns the string representation of the object
|
279
|
+
# @return [String] String presentation of the object
|
280
|
+
def to_s
|
281
|
+
to_hash.to_s
|
282
|
+
end
|
283
|
+
|
284
|
+
# to_body is an alias to to_hash (backward compatibility)
|
285
|
+
# @return [Hash] Returns the object in the form of hash
|
286
|
+
def to_body
|
287
|
+
to_hash
|
288
|
+
end
|
289
|
+
|
290
|
+
# Returns the object in the form of hash
|
291
|
+
# @return [Hash] Returns the object in the form of hash
|
292
|
+
def to_hash
|
293
|
+
hash = {}
|
294
|
+
self.class.attribute_map.each_pair do |attr, param|
|
295
|
+
value = self.send(attr)
|
296
|
+
next if value.nil?
|
297
|
+
hash[param] = _to_hash(value)
|
298
|
+
end
|
299
|
+
hash
|
300
|
+
end
|
301
|
+
|
302
|
+
# Outputs non-array value in the form of hash
|
303
|
+
# For object, use to_hash. Otherwise, just return the value
|
304
|
+
# @param [Object] value Any valid value
|
305
|
+
# @return [Hash] Returns the value in the form of hash
|
306
|
+
def _to_hash(value)
|
307
|
+
if value.is_a?(Array)
|
308
|
+
value.compact.map { |v| _to_hash(v) }
|
309
|
+
elsif value.is_a?(Hash)
|
310
|
+
{}.tap do |hash|
|
311
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
312
|
+
end
|
313
|
+
elsif value.respond_to? :to_hash
|
314
|
+
value.to_hash
|
315
|
+
else
|
316
|
+
value
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|