cybersource_rest_client 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/AuthenticationSDK/Cybersource.gemspec +23 -0
- data/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +62 -0
- data/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +50 -0
- data/AuthenticationSDK/authentication/jwt/JwtToken.rb +62 -0
- data/AuthenticationSDK/authentication/payloadDigest/digest.rb +10 -0
- data/AuthenticationSDK/core/Authorization.rb +24 -0
- data/AuthenticationSDK/core/ITokenGeneration.rb +4 -0
- data/AuthenticationSDK/core/Logger.rb +26 -0
- data/AuthenticationSDK/core/MerchantConfig.rb +181 -0
- data/AuthenticationSDK/util/ApiException.rb +19 -0
- data/AuthenticationSDK/util/Cache.rb +36 -0
- data/AuthenticationSDK/util/Constants.rb +134 -0
- data/AuthenticationSDK/util/PropertiesUtil.rb +21 -0
- data/AuthenticationSDK/util/Utility.rb +31 -0
- data/lib/cyberSource_client.rb +286 -0
- data/lib/cyberSource_client/api/capture_api.rb +133 -0
- data/lib/cyberSource_client/api/credit_api.rb +127 -0
- data/lib/cyberSource_client/api/default_api.rb +75 -0
- data/lib/cyberSource_client/api/instrument_identifier_api.rb +393 -0
- data/lib/cyberSource_client/api/key_generation_api.rb +75 -0
- data/lib/cyberSource_client/api/payment_api.rb +127 -0
- data/lib/cyberSource_client/api/payment_instrument_api.rb +312 -0
- data/lib/cyberSource_client/api/refund_api.rb +191 -0
- data/lib/cyberSource_client/api/reversal_api.rb +133 -0
- data/lib/cyberSource_client/api/tokenization_api.rb +71 -0
- data/lib/cyberSource_client/api/void_api.rb +307 -0
- data/lib/cyberSource_client/api_client.rb +437 -0
- data/lib/cyberSource_client/api_error.rb +38 -0
- data/lib/cyberSource_client/configuration.rb +202 -0
- data/lib/cyberSource_client/models/auth_reversal_request.rb +219 -0
- data/lib/cyberSource_client/models/body.rb +295 -0
- data/lib/cyberSource_client/models/body_1.rb +183 -0
- data/lib/cyberSource_client/models/body_2.rb +331 -0
- data/lib/cyberSource_client/models/body_3.rb +331 -0
- data/lib/cyberSource_client/models/capture_payment_request.rb +267 -0
- data/lib/cyberSource_client/models/card_info.rb +214 -0
- data/lib/cyberSource_client/models/create_credit_request.rb +267 -0
- data/lib/cyberSource_client/models/create_payment_request.rb +285 -0
- data/lib/cyberSource_client/models/der_public_key.rb +205 -0
- data/lib/cyberSource_client/models/error.rb +192 -0
- data/lib/cyberSource_client/models/error_links.rb +205 -0
- data/lib/cyberSource_client/models/error_response.rb +192 -0
- data/lib/cyberSource_client/models/generate_public_key_request.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200.rb +202 -0
- data/lib/cyberSource_client/models/inline_response_200_1.rb +255 -0
- data/lib/cyberSource_client/models/inline_response_200_2.rb +377 -0
- data/lib/cyberSource_client/models/inline_response_200_2_buyer_information.rb +270 -0
- data/lib/cyberSource_client/models/inline_response_200_2_device_information.rb +219 -0
- data/lib/cyberSource_client/models/inline_response_200_2_merchant_information.rb +233 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information.rb +230 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_amount_details.rb +385 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_bill_to.rb +459 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_invoice_details.rb +315 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_line_items.rb +564 -0
- data/lib/cyberSource_client/models/inline_response_200_2_order_information_ship_to.rb +429 -0
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information_card.rb +274 -0
- data/lib/cyberSource_client/models/inline_response_200_2_payment_information_tokenized_card.rb +299 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processing_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information.rb +227 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information_avs.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_2_processor_information_card_verification.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_3.rb +314 -0
- data/lib/cyberSource_client/models/inline_response_200_4.rb +350 -0
- data/lib/cyberSource_client/models/inline_response_200_4_device_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information.rb +230 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_amount_details.rb +360 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_invoice_details.rb +305 -0
- data/lib/cyberSource_client/models/inline_response_200_4_order_information_ship_to.rb +249 -0
- data/lib/cyberSource_client/models/inline_response_200_4_processing_information.rb +208 -0
- data/lib/cyberSource_client/models/inline_response_200_4_processing_information_authorization_options.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_200_5.rb +305 -0
- data/lib/cyberSource_client/models/inline_response_200_6.rb +305 -0
- data/lib/cyberSource_client/models/inline_response_200_7.rb +295 -0
- data/lib/cyberSource_client/models/inline_response_200_8.rb +277 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links.rb +219 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_first.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_last.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_next.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_prev.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_8__links_self.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_200_der.rb +205 -0
- data/lib/cyberSource_client/models/inline_response_200_jwk.rb +225 -0
- data/lib/cyberSource_client/models/inline_response_201.rb +350 -0
- data/lib/cyberSource_client/models/inline_response_201_1.rb +332 -0
- data/lib/cyberSource_client/models/inline_response_201_1_authorization_information.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_1_processor_information.rb +324 -0
- data/lib/cyberSource_client/models/inline_response_201_1_reversal_amount_details.rb +249 -0
- data/lib/cyberSource_client/models/inline_response_201_2.rb +314 -0
- data/lib/cyberSource_client/models/inline_response_201_2__links.rb +201 -0
- data/lib/cyberSource_client/models/inline_response_201_2_order_information.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_201_2_order_information_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_2_processor_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_3.rb +323 -0
- data/lib/cyberSource_client/models/inline_response_201_3__links.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_201_3_order_information.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_201_3_processor_information.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_3_refund_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_4.rb +323 -0
- data/lib/cyberSource_client/models/inline_response_201_4_credit_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_5.rb +280 -0
- data/lib/cyberSource_client/models/inline_response_201_5_void_amount_details.rb +219 -0
- data/lib/cyberSource_client/models/inline_response_201_6.rb +331 -0
- data/lib/cyberSource_client/models/inline_response_201__embedded.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_201__embedded_capture.rb +193 -0
- data/lib/cyberSource_client/models/inline_response_201__embedded_capture__links.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_201__links.rb +201 -0
- data/lib/cyberSource_client/models/inline_response_201__links_self.rb +194 -0
- data/lib/cyberSource_client/models/inline_response_201_client_reference_information.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_error_information.rb +239 -0
- data/lib/cyberSource_client/models/inline_response_201_error_information_details.rb +228 -0
- data/lib/cyberSource_client/models/inline_response_201_order_information.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_201_order_information_amount_details.rb +249 -0
- data/lib/cyberSource_client/models/inline_response_201_order_information_invoice_details.rb +184 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information.rb +201 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information_account_features.rb +623 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information_card.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_payment_information_tokenized_card.rb +349 -0
- data/lib/cyberSource_client/models/inline_response_201_point_of_sale_information.rb +208 -0
- data/lib/cyberSource_client/models/inline_response_201_point_of_sale_information_emv.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information.rb +642 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_avs.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_card_verification.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_consumer_authentication_response.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_customer.rb +199 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_electronic_verification_results.rb +474 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_issuer.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_201_processor_information_merchant_advice.rb +224 -0
- data/lib/cyberSource_client/models/inline_response_400.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_1.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_2.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_3.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_4.rb +271 -0
- data/lib/cyberSource_client/models/inline_response_400_5.rb +259 -0
- data/lib/cyberSource_client/models/inline_response_400_6.rb +202 -0
- data/lib/cyberSource_client/models/inline_response_409.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_409__links.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_409__links_payment_instruments.rb +183 -0
- data/lib/cyberSource_client/models/inline_response_502.rb +260 -0
- data/lib/cyberSource_client/models/inline_response_default.rb +192 -0
- data/lib/cyberSource_client/models/inline_response_default__links.rb +205 -0
- data/lib/cyberSource_client/models/inline_response_default__links_next.rb +204 -0
- data/lib/cyberSource_client/models/inline_response_default_response_status.rb +225 -0
- data/lib/cyberSource_client/models/inline_response_default_response_status_details.rb +194 -0
- data/lib/cyberSource_client/models/instrumentidentifiers__links.rb +201 -0
- data/lib/cyberSource_client/models/instrumentidentifiers__links_self.rb +183 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_authorization_options_merchant_initiated_transaction.rb +184 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_bank_account.rb +194 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_card.rb +184 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_details.rb +194 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_metadata.rb +184 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information.rb +183 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options.rb +183 -0
- data/lib/cyberSource_client/models/instrumentidentifiers_processing_information_authorization_options_initiator.rb +183 -0
- data/lib/cyberSource_client/models/json_web_key.rb +225 -0
- data/lib/cyberSource_client/models/key_parameters.rb +184 -0
- data/lib/cyberSource_client/models/key_result.rb +202 -0
- data/lib/cyberSource_client/models/link.rb +204 -0
- data/lib/cyberSource_client/models/links.rb +205 -0
- data/lib/cyberSource_client/models/oct_create_payment_request.rb +237 -0
- data/lib/cyberSource_client/models/paymentinstruments_bank_account.rb +184 -0
- data/lib/cyberSource_client/models/paymentinstruments_bill_to.rb +284 -0
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information.rb +215 -0
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information_issued_by.rb +184 -0
- data/lib/cyberSource_client/models/paymentinstruments_buyer_information_personal_identification.rb +203 -0
- data/lib/cyberSource_client/models/paymentinstruments_card.rb +278 -0
- data/lib/cyberSource_client/models/paymentinstruments_instrument_identifier.rb +295 -0
- data/lib/cyberSource_client/models/paymentinstruments_merchant_information.rb +183 -0
- data/lib/cyberSource_client/models/paymentinstruments_merchant_information_merchant_descriptor.rb +184 -0
- data/lib/cyberSource_client/models/paymentinstruments_processing_information.rb +193 -0
- data/lib/cyberSource_client/models/paymentinstruments_processing_information_bank_transfer_options.rb +184 -0
- data/lib/cyberSource_client/models/paymentsflexv1tokens_card_info.rb +214 -0
- data/lib/cyberSource_client/models/refund_capture_request.rb +267 -0
- data/lib/cyberSource_client/models/refund_payment_request.rb +267 -0
- data/lib/cyberSource_client/models/response_status.rb +225 -0
- data/lib/cyberSource_client/models/response_status_details.rb +194 -0
- data/lib/cyberSource_client/models/tokenize_parameters.rb +193 -0
- data/lib/cyberSource_client/models/tokenize_request.rb +193 -0
- data/lib/cyberSource_client/models/tokenize_result.rb +255 -0
- data/lib/cyberSource_client/models/v2credits_point_of_sale_information.rb +183 -0
- data/lib/cyberSource_client/models/v2credits_point_of_sale_information_emv.rb +221 -0
- data/lib/cyberSource_client/models/v2credits_processing_information.rb +383 -0
- data/lib/cyberSource_client/models/v2payments_aggregator_information.rb +233 -0
- data/lib/cyberSource_client/models/v2payments_aggregator_information_sub_merchant.rb +424 -0
- data/lib/cyberSource_client/models/v2payments_buyer_information.rb +285 -0
- data/lib/cyberSource_client/models/v2payments_buyer_information_personal_identification.rb +252 -0
- data/lib/cyberSource_client/models/v2payments_client_reference_information.rb +219 -0
- data/lib/cyberSource_client/models/v2payments_consumer_authentication_information.rb +374 -0
- data/lib/cyberSource_client/models/v2payments_device_information.rb +249 -0
- data/lib/cyberSource_client/models/v2payments_merchant_defined_information.rb +224 -0
- data/lib/cyberSource_client/models/v2payments_merchant_information.rb +308 -0
- data/lib/cyberSource_client/models/v2payments_merchant_information_merchant_descriptor.rb +374 -0
- data/lib/cyberSource_client/models/v2payments_order_information.rb +230 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details.rb +605 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_amex_additional_amounts.rb +224 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_surcharge.rb +209 -0
- data/lib/cyberSource_client/models/v2payments_order_information_amount_details_tax_details.rb +328 -0
- data/lib/cyberSource_client/models/v2payments_order_information_bill_to.rb +618 -0
- data/lib/cyberSource_client/models/v2payments_order_information_invoice_details.rb +330 -0
- data/lib/cyberSource_client/models/v2payments_order_information_invoice_details_transaction_advice_addendum.rb +199 -0
- data/lib/cyberSource_client/models/v2payments_order_information_line_items.rb +649 -0
- data/lib/cyberSource_client/models/v2payments_order_information_ship_to.rb +474 -0
- data/lib/cyberSource_client/models/v2payments_order_information_shipping_details.rb +234 -0
- data/lib/cyberSource_client/models/v2payments_payment_information.rb +210 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_card.rb +474 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_customer.rb +202 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_fluid_data.rb +259 -0
- data/lib/cyberSource_client/models/v2payments_payment_information_tokenized_card.rb +424 -0
- data/lib/cyberSource_client/models/v2payments_point_of_sale_information.rb +440 -0
- data/lib/cyberSource_client/models/v2payments_point_of_sale_information_emv.rb +256 -0
- data/lib/cyberSource_client/models/v2payments_processing_information.rb +432 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options.rb +361 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_initiator.rb +247 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_authorization_options_merchant_initiated_transaction.rb +224 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_capture_options.rb +267 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_issuer.rb +199 -0
- data/lib/cyberSource_client/models/v2payments_processing_information_recurring_options.rb +198 -0
- data/lib/cyberSource_client/models/v2payments_recipient_information.rb +249 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information.rb +233 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_aggregator_information_sub_merchant.rb +374 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_buyer_information.rb +224 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_merchant_information.rb +258 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information.rb +230 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_amount_details.rb +546 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_bill_to.rb +449 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_invoice_details.rb +320 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_ship_to.rb +249 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_order_information_shipping_details.rb +199 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_payment_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information.rb +208 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_point_of_sale_information_emv.rb +211 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information.rb +351 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_authorization_options.rb +249 -0
- data/lib/cyberSource_client/models/v2paymentsidcaptures_processing_information_capture_options.rb +242 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_merchant_information.rb +258 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_order_information.rb +230 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_order_information_line_items.rb +639 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_payment_information_card.rb +374 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_point_of_sale_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information.rb +333 -0
- data/lib/cyberSource_client/models/v2paymentsidrefunds_processing_information_recurring_options.rb +186 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_client_reference_information.rb +209 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_order_information.rb +185 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_order_information_line_items.rb +233 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_point_of_sale_information.rb +183 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_processing_information.rb +308 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information.rb +211 -0
- data/lib/cyberSource_client/models/v2paymentsidreversals_reversal_information_amount_details.rb +224 -0
- data/lib/cyberSource_client/models/v2payouts_merchant_information.rb +258 -0
- data/lib/cyberSource_client/models/v2payouts_merchant_information_merchant_descriptor.rb +324 -0
- data/lib/cyberSource_client/models/v2payouts_order_information.rb +192 -0
- data/lib/cyberSource_client/models/v2payouts_order_information_amount_details.rb +249 -0
- data/lib/cyberSource_client/models/v2payouts_order_information_bill_to.rb +443 -0
- data/lib/cyberSource_client/models/v2payouts_payment_information.rb +183 -0
- data/lib/cyberSource_client/models/v2payouts_payment_information_card.rb +299 -0
- data/lib/cyberSource_client/models/v2payouts_processing_information.rb +283 -0
- data/lib/cyberSource_client/models/v2payouts_processing_information_payouts_options.rb +274 -0
- data/lib/cyberSource_client/models/v2payouts_recipient_information.rb +433 -0
- data/lib/cyberSource_client/models/v2payouts_sender_information.rb +517 -0
- data/lib/cyberSource_client/models/v2payouts_sender_information_account.rb +233 -0
- data/lib/cyberSource_client/models/void_capture_request.rb +183 -0
- data/lib/cyberSource_client/models/void_credit_request.rb +183 -0
- data/lib/cyberSource_client/models/void_payment_request.rb +183 -0
- data/lib/cyberSource_client/models/void_refund_request.rb +183 -0
- data/lib/cyberSource_client/version.rb +15 -0
- metadata +572 -0
@@ -0,0 +1,315 @@
|
|
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 InlineResponse2002OrderInformationInvoiceDetails
|
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
|
+
# Identifier for the merchandise. Possible value: - 1000: Gift card This field is supported only for **American Express Direct**.
|
33
|
+
attr_accessor :merchandise_code
|
34
|
+
|
35
|
+
attr_accessor :transaction_advice_addendum
|
36
|
+
|
37
|
+
# 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)
|
38
|
+
attr_accessor :level3_transmission_status
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'purchase_order_number' => :'purchaseOrderNumber',
|
44
|
+
:'purchase_order_date' => :'purchaseOrderDate',
|
45
|
+
:'taxable' => :'taxable',
|
46
|
+
:'vat_invoice_reference_number' => :'vatInvoiceReferenceNumber',
|
47
|
+
:'commodity_code' => :'commodityCode',
|
48
|
+
:'merchandise_code' => :'merchandiseCode',
|
49
|
+
:'transaction_advice_addendum' => :'transactionAdviceAddendum',
|
50
|
+
:'level3_transmission_status' => :'level3TransmissionStatus'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'purchase_order_number' => :'String',
|
58
|
+
:'purchase_order_date' => :'String',
|
59
|
+
:'taxable' => :'BOOLEAN',
|
60
|
+
:'vat_invoice_reference_number' => :'String',
|
61
|
+
:'commodity_code' => :'String',
|
62
|
+
:'merchandise_code' => :'Float',
|
63
|
+
:'transaction_advice_addendum' => :'Array<V2paymentsOrderInformationInvoiceDetailsTransactionAdviceAddendum>',
|
64
|
+
:'level3_transmission_status' => :'BOOLEAN'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Initializes the object
|
69
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
70
|
+
def initialize(attributes = {})
|
71
|
+
return unless attributes.is_a?(Hash)
|
72
|
+
|
73
|
+
# convert string to symbol for hash key
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
75
|
+
|
76
|
+
if attributes.has_key?(:'purchaseOrderNumber')
|
77
|
+
self.purchase_order_number = attributes[:'purchaseOrderNumber']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'purchaseOrderDate')
|
81
|
+
self.purchase_order_date = attributes[:'purchaseOrderDate']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'taxable')
|
85
|
+
self.taxable = attributes[:'taxable']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.has_key?(:'vatInvoiceReferenceNumber')
|
89
|
+
self.vat_invoice_reference_number = attributes[:'vatInvoiceReferenceNumber']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.has_key?(:'commodityCode')
|
93
|
+
self.commodity_code = attributes[:'commodityCode']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'merchandiseCode')
|
97
|
+
self.merchandise_code = attributes[:'merchandiseCode']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'transactionAdviceAddendum')
|
101
|
+
if (value = attributes[:'transactionAdviceAddendum']).is_a?(Array)
|
102
|
+
self.transaction_advice_addendum = value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'level3TransmissionStatus')
|
107
|
+
self.level3_transmission_status = attributes[:'level3TransmissionStatus']
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
112
|
+
# @return Array for valid properties with the reasons
|
113
|
+
def list_invalid_properties
|
114
|
+
invalid_properties = Array.new
|
115
|
+
if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
116
|
+
invalid_properties.push('invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.')
|
117
|
+
end
|
118
|
+
|
119
|
+
if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
120
|
+
invalid_properties.push('invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.')
|
121
|
+
end
|
122
|
+
|
123
|
+
if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
124
|
+
invalid_properties.push('invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.')
|
125
|
+
end
|
126
|
+
|
127
|
+
if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
128
|
+
invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 4.')
|
129
|
+
end
|
130
|
+
|
131
|
+
invalid_properties
|
132
|
+
end
|
133
|
+
|
134
|
+
# Check to see if the all the properties in the model are valid
|
135
|
+
# @return true if the model is valid
|
136
|
+
def valid?
|
137
|
+
return false if !@purchase_order_number.nil? && @purchase_order_number.to_s.length > 25
|
138
|
+
return false if !@purchase_order_date.nil? && @purchase_order_date.to_s.length > 10
|
139
|
+
return false if !@vat_invoice_reference_number.nil? && @vat_invoice_reference_number.to_s.length > 15
|
140
|
+
return false if !@commodity_code.nil? && @commodity_code.to_s.length > 4
|
141
|
+
true
|
142
|
+
end
|
143
|
+
|
144
|
+
# Custom attribute writer method with validation
|
145
|
+
# @param [Object] purchase_order_number Value to be assigned
|
146
|
+
def purchase_order_number=(purchase_order_number)
|
147
|
+
if !purchase_order_number.nil? && purchase_order_number.to_s.length > 25
|
148
|
+
fail ArgumentError, 'invalid value for "purchase_order_number", the character length must be smaller than or equal to 25.'
|
149
|
+
end
|
150
|
+
|
151
|
+
@purchase_order_number = purchase_order_number
|
152
|
+
end
|
153
|
+
|
154
|
+
# Custom attribute writer method with validation
|
155
|
+
# @param [Object] purchase_order_date Value to be assigned
|
156
|
+
def purchase_order_date=(purchase_order_date)
|
157
|
+
if !purchase_order_date.nil? && purchase_order_date.to_s.length > 10
|
158
|
+
fail ArgumentError, 'invalid value for "purchase_order_date", the character length must be smaller than or equal to 10.'
|
159
|
+
end
|
160
|
+
|
161
|
+
@purchase_order_date = purchase_order_date
|
162
|
+
end
|
163
|
+
|
164
|
+
# Custom attribute writer method with validation
|
165
|
+
# @param [Object] vat_invoice_reference_number Value to be assigned
|
166
|
+
def vat_invoice_reference_number=(vat_invoice_reference_number)
|
167
|
+
if !vat_invoice_reference_number.nil? && vat_invoice_reference_number.to_s.length > 15
|
168
|
+
fail ArgumentError, 'invalid value for "vat_invoice_reference_number", the character length must be smaller than or equal to 15.'
|
169
|
+
end
|
170
|
+
|
171
|
+
@vat_invoice_reference_number = vat_invoice_reference_number
|
172
|
+
end
|
173
|
+
|
174
|
+
# Custom attribute writer method with validation
|
175
|
+
# @param [Object] commodity_code Value to be assigned
|
176
|
+
def commodity_code=(commodity_code)
|
177
|
+
if !commodity_code.nil? && commodity_code.to_s.length > 4
|
178
|
+
fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 4.'
|
179
|
+
end
|
180
|
+
|
181
|
+
@commodity_code = commodity_code
|
182
|
+
end
|
183
|
+
|
184
|
+
# Checks equality by comparing each attribute.
|
185
|
+
# @param [Object] Object to be compared
|
186
|
+
def ==(o)
|
187
|
+
return true if self.equal?(o)
|
188
|
+
self.class == o.class &&
|
189
|
+
purchase_order_number == o.purchase_order_number &&
|
190
|
+
purchase_order_date == o.purchase_order_date &&
|
191
|
+
taxable == o.taxable &&
|
192
|
+
vat_invoice_reference_number == o.vat_invoice_reference_number &&
|
193
|
+
commodity_code == o.commodity_code &&
|
194
|
+
merchandise_code == o.merchandise_code &&
|
195
|
+
transaction_advice_addendum == o.transaction_advice_addendum &&
|
196
|
+
level3_transmission_status == o.level3_transmission_status
|
197
|
+
end
|
198
|
+
|
199
|
+
# @see the `==` method
|
200
|
+
# @param [Object] Object to be compared
|
201
|
+
def eql?(o)
|
202
|
+
self == o
|
203
|
+
end
|
204
|
+
|
205
|
+
# Calculates hash code according to all attributes.
|
206
|
+
# @return [Fixnum] Hash code
|
207
|
+
def hash
|
208
|
+
[purchase_order_number, purchase_order_date, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum, level3_transmission_status].hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Builds the object from hash
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
213
|
+
# @return [Object] Returns the model itself
|
214
|
+
def build_from_hash(attributes)
|
215
|
+
return nil unless attributes.is_a?(Hash)
|
216
|
+
self.class.swagger_types.each_pair do |key, type|
|
217
|
+
if type =~ /\AArray<(.*)>/i
|
218
|
+
# check to ensure the input is an array given that the the attribute
|
219
|
+
# is documented as an array but the input is not
|
220
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
221
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
222
|
+
end
|
223
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
224
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
225
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
226
|
+
end
|
227
|
+
|
228
|
+
self
|
229
|
+
end
|
230
|
+
|
231
|
+
# Deserializes the data based on type
|
232
|
+
# @param string type Data type
|
233
|
+
# @param string value Value to be deserialized
|
234
|
+
# @return [Object] Deserialized data
|
235
|
+
def _deserialize(type, value)
|
236
|
+
case type.to_sym
|
237
|
+
when :DateTime
|
238
|
+
DateTime.parse(value)
|
239
|
+
when :Date
|
240
|
+
Date.parse(value)
|
241
|
+
when :String
|
242
|
+
value.to_s
|
243
|
+
when :Integer
|
244
|
+
value.to_i
|
245
|
+
when :Float
|
246
|
+
value.to_f
|
247
|
+
when :BOOLEAN
|
248
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
249
|
+
true
|
250
|
+
else
|
251
|
+
false
|
252
|
+
end
|
253
|
+
when :Object
|
254
|
+
# generic object (usually a Hash), return directly
|
255
|
+
value
|
256
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
257
|
+
inner_type = Regexp.last_match[:inner_type]
|
258
|
+
value.map { |v| _deserialize(inner_type, v) }
|
259
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
260
|
+
k_type = Regexp.last_match[:k_type]
|
261
|
+
v_type = Regexp.last_match[:v_type]
|
262
|
+
{}.tap do |hash|
|
263
|
+
value.each do |k, v|
|
264
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
else # model
|
268
|
+
temp_model = CyberSource.const_get(type).new
|
269
|
+
temp_model.build_from_hash(value)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
# Returns the string representation of the object
|
274
|
+
# @return [String] String presentation of the object
|
275
|
+
def to_s
|
276
|
+
to_hash.to_s
|
277
|
+
end
|
278
|
+
|
279
|
+
# to_body is an alias to to_hash (backward compatibility)
|
280
|
+
# @return [Hash] Returns the object in the form of hash
|
281
|
+
def to_body
|
282
|
+
to_hash
|
283
|
+
end
|
284
|
+
|
285
|
+
# Returns the object in the form of hash
|
286
|
+
# @return [Hash] Returns the object in the form of hash
|
287
|
+
def to_hash
|
288
|
+
hash = {}
|
289
|
+
self.class.attribute_map.each_pair do |attr, param|
|
290
|
+
value = self.send(attr)
|
291
|
+
next if value.nil?
|
292
|
+
hash[param] = _to_hash(value)
|
293
|
+
end
|
294
|
+
hash
|
295
|
+
end
|
296
|
+
|
297
|
+
# Outputs non-array value in the form of hash
|
298
|
+
# For object, use to_hash. Otherwise, just return the value
|
299
|
+
# @param [Object] value Any valid value
|
300
|
+
# @return [Hash] Returns the value in the form of hash
|
301
|
+
def _to_hash(value)
|
302
|
+
if value.is_a?(Array)
|
303
|
+
value.compact.map { |v| _to_hash(v) }
|
304
|
+
elsif value.is_a?(Hash)
|
305
|
+
{}.tap do |hash|
|
306
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
307
|
+
end
|
308
|
+
elsif value.respond_to? :to_hash
|
309
|
+
value.to_hash
|
310
|
+
else
|
311
|
+
value
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
@@ -0,0 +1,564 @@
|
|
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 InlineResponse2002OrderInformationLineItems
|
17
|
+
# Type of product. This value is used to determine the category that the product is in: electronic, handling, physical, service, or shipping. The default value is **default**. For a payment, when you set this field to a value other than default or any of the values related to shipping and handling, below fields _quantity_, _productName_, and _productSKU_ are required.
|
18
|
+
attr_accessor :product_code
|
19
|
+
|
20
|
+
# For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and handling.
|
21
|
+
attr_accessor :product_name
|
22
|
+
|
23
|
+
# Identification code for the product. For PAYMENT and CAPTURE API, this field is required when above _productCode_ is not **default** or one of the values related to shipping and/or handling.
|
24
|
+
attr_accessor :product_sku
|
25
|
+
|
26
|
+
# For a payment or capture, this field is required when _productCode_ is not **default** or one of the values related to shipping and handling.
|
27
|
+
attr_accessor :quantity
|
28
|
+
|
29
|
+
# Per-item price of the product. This value cannot be negative. You can include a decimal point (.), but you cannot include any other special characters. CyberSource truncates the amount to the correct number of decimal places. For processor-specific information, see the amount field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
30
|
+
attr_accessor :unit_price
|
31
|
+
|
32
|
+
# Unit of measure, or unit of measure code, for the item.
|
33
|
+
attr_accessor :unit_of_measure
|
34
|
+
|
35
|
+
# Total amount for the item. Normally calculated as the unit price x quantity.
|
36
|
+
attr_accessor :total_amount
|
37
|
+
|
38
|
+
# Total tax to apply to the product. This value cannot be negative. The tax amount and the offer amount must be in the same currency. The tax amount field is additive. The following example uses a two-exponent currency such as USD: 1. You include each line item in your request. ..- 1st line item has amount=10.00, quantity=1, and taxAmount=0.80 ..- 2nd line item has amount=20.00, quantity=1, and taxAmount=1.60 2. The total amount authorized will be 32.40, not 30.00 with 2.40 of tax included. This field is frequently used for Level II and Level III transactions.
|
39
|
+
attr_accessor :tax_amount
|
40
|
+
|
41
|
+
# Tax rate applied to the item. See \"Numbered Elements,\" page 14. Visa: Valid range is 0.01 to 0.99 (1% to 99%, with only whole percentage values accepted; values with additional decimal places will be truncated). Mastercard: Valid range is 0.00001 to 0.99999 (0.001% to 99.999%).
|
42
|
+
attr_accessor :tax_rate
|
43
|
+
|
44
|
+
# Type of tax being applied to the item. Possible values: Below values are used by **RBS WorldPay Atlanta**, **FDC Nashville Global**, **Litle** - 0000: unknown tax type - 0001: federal/national sales tax - 0002: state sales tax - 0003: city sales tax - 0004: local sales tax - 0005: municipal sales tax - 0006: other tax - 0010: value-added tax - 0011: goods and services tax - 0012: provincial sales tax - 0013: harmonized sales tax - 0014: Quebec sales tax (QST) - 0020: room tax - 0021: occupancy tax - 0022: energy tax - Blank: Tax not supported on line item.
|
45
|
+
attr_accessor :tax_type_code
|
46
|
+
|
47
|
+
# Flag that indicates whether the tax amount is included in the Line Item Total.
|
48
|
+
attr_accessor :amount_includes_tax
|
49
|
+
|
50
|
+
# Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes.
|
51
|
+
attr_accessor :commodity_code
|
52
|
+
|
53
|
+
# Discount applied to the item.
|
54
|
+
attr_accessor :discount_amount
|
55
|
+
|
56
|
+
# Flag that indicates whether the amount is discounted. If you do not provide a value but you set Discount Amount to a value greater than zero, then CyberSource sets this field to **true**.
|
57
|
+
attr_accessor :discount_applied
|
58
|
+
|
59
|
+
# Rate the item is discounted. Maximum of 2 decimal places. Example 5.25 (=5.25%)
|
60
|
+
attr_accessor :discount_rate
|
61
|
+
|
62
|
+
# Field to support an invoice number for a transaction. You must specify the number of line items that will include an invoice number. By default, the first line item will include an invoice number field. The invoice number field can be included for up to 10 line items.
|
63
|
+
attr_accessor :invoice_number
|
64
|
+
|
65
|
+
attr_accessor :tax_details
|
66
|
+
|
67
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
68
|
+
def self.attribute_map
|
69
|
+
{
|
70
|
+
:'product_code' => :'productCode',
|
71
|
+
:'product_name' => :'productName',
|
72
|
+
:'product_sku' => :'productSku',
|
73
|
+
:'quantity' => :'quantity',
|
74
|
+
:'unit_price' => :'unitPrice',
|
75
|
+
:'unit_of_measure' => :'unitOfMeasure',
|
76
|
+
:'total_amount' => :'totalAmount',
|
77
|
+
:'tax_amount' => :'taxAmount',
|
78
|
+
:'tax_rate' => :'taxRate',
|
79
|
+
:'tax_type_code' => :'taxTypeCode',
|
80
|
+
:'amount_includes_tax' => :'amountIncludesTax',
|
81
|
+
:'commodity_code' => :'commodityCode',
|
82
|
+
:'discount_amount' => :'discountAmount',
|
83
|
+
:'discount_applied' => :'discountApplied',
|
84
|
+
:'discount_rate' => :'discountRate',
|
85
|
+
:'invoice_number' => :'invoiceNumber',
|
86
|
+
:'tax_details' => :'taxDetails'
|
87
|
+
}
|
88
|
+
end
|
89
|
+
|
90
|
+
# Attribute type mapping.
|
91
|
+
def self.swagger_types
|
92
|
+
{
|
93
|
+
:'product_code' => :'String',
|
94
|
+
:'product_name' => :'String',
|
95
|
+
:'product_sku' => :'String',
|
96
|
+
:'quantity' => :'Float',
|
97
|
+
:'unit_price' => :'String',
|
98
|
+
:'unit_of_measure' => :'String',
|
99
|
+
:'total_amount' => :'String',
|
100
|
+
:'tax_amount' => :'String',
|
101
|
+
:'tax_rate' => :'String',
|
102
|
+
:'tax_type_code' => :'String',
|
103
|
+
:'amount_includes_tax' => :'BOOLEAN',
|
104
|
+
:'commodity_code' => :'String',
|
105
|
+
:'discount_amount' => :'String',
|
106
|
+
:'discount_applied' => :'BOOLEAN',
|
107
|
+
:'discount_rate' => :'String',
|
108
|
+
:'invoice_number' => :'String',
|
109
|
+
:'tax_details' => :'Array<V2paymentsOrderInformationAmountDetailsTaxDetails>'
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
113
|
+
# Initializes the object
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
def initialize(attributes = {})
|
116
|
+
return unless attributes.is_a?(Hash)
|
117
|
+
|
118
|
+
# convert string to symbol for hash key
|
119
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
120
|
+
|
121
|
+
if attributes.has_key?(:'productCode')
|
122
|
+
self.product_code = attributes[:'productCode']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.has_key?(:'productName')
|
126
|
+
self.product_name = attributes[:'productName']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.has_key?(:'productSku')
|
130
|
+
self.product_sku = attributes[:'productSku']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'quantity')
|
134
|
+
self.quantity = attributes[:'quantity']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'unitPrice')
|
138
|
+
self.unit_price = attributes[:'unitPrice']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'unitOfMeasure')
|
142
|
+
self.unit_of_measure = attributes[:'unitOfMeasure']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'totalAmount')
|
146
|
+
self.total_amount = attributes[:'totalAmount']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'taxAmount')
|
150
|
+
self.tax_amount = attributes[:'taxAmount']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'taxRate')
|
154
|
+
self.tax_rate = attributes[:'taxRate']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'taxTypeCode')
|
158
|
+
self.tax_type_code = attributes[:'taxTypeCode']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'amountIncludesTax')
|
162
|
+
self.amount_includes_tax = attributes[:'amountIncludesTax']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'commodityCode')
|
166
|
+
self.commodity_code = attributes[:'commodityCode']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.has_key?(:'discountAmount')
|
170
|
+
self.discount_amount = attributes[:'discountAmount']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.has_key?(:'discountApplied')
|
174
|
+
self.discount_applied = attributes[:'discountApplied']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.has_key?(:'discountRate')
|
178
|
+
self.discount_rate = attributes[:'discountRate']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.has_key?(:'invoiceNumber')
|
182
|
+
self.invoice_number = attributes[:'invoiceNumber']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.has_key?(:'taxDetails')
|
186
|
+
if (value = attributes[:'taxDetails']).is_a?(Array)
|
187
|
+
self.tax_details = value
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
193
|
+
# @return Array for valid properties with the reasons
|
194
|
+
def list_invalid_properties
|
195
|
+
invalid_properties = Array.new
|
196
|
+
if !@product_code.nil? && @product_code.to_s.length > 255
|
197
|
+
invalid_properties.push('invalid value for "product_code", the character length must be smaller than or equal to 255.')
|
198
|
+
end
|
199
|
+
|
200
|
+
if !@product_name.nil? && @product_name.to_s.length > 255
|
201
|
+
invalid_properties.push('invalid value for "product_name", the character length must be smaller than or equal to 255.')
|
202
|
+
end
|
203
|
+
|
204
|
+
if !@product_sku.nil? && @product_sku.to_s.length > 255
|
205
|
+
invalid_properties.push('invalid value for "product_sku", the character length must be smaller than or equal to 255.')
|
206
|
+
end
|
207
|
+
|
208
|
+
if !@quantity.nil? && @quantity > 9999999999
|
209
|
+
invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 9999999999.')
|
210
|
+
end
|
211
|
+
|
212
|
+
if !@quantity.nil? && @quantity < 1
|
213
|
+
invalid_properties.push('invalid value for "quantity", must be greater than or equal to 1.')
|
214
|
+
end
|
215
|
+
|
216
|
+
if !@unit_price.nil? && @unit_price.to_s.length > 15
|
217
|
+
invalid_properties.push('invalid value for "unit_price", the character length must be smaller than or equal to 15.')
|
218
|
+
end
|
219
|
+
|
220
|
+
if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12
|
221
|
+
invalid_properties.push('invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.')
|
222
|
+
end
|
223
|
+
|
224
|
+
if !@total_amount.nil? && @total_amount.to_s.length > 13
|
225
|
+
invalid_properties.push('invalid value for "total_amount", the character length must be smaller than or equal to 13.')
|
226
|
+
end
|
227
|
+
|
228
|
+
if !@tax_amount.nil? && @tax_amount.to_s.length > 15
|
229
|
+
invalid_properties.push('invalid value for "tax_amount", the character length must be smaller than or equal to 15.')
|
230
|
+
end
|
231
|
+
|
232
|
+
if !@tax_rate.nil? && @tax_rate.to_s.length > 7
|
233
|
+
invalid_properties.push('invalid value for "tax_rate", the character length must be smaller than or equal to 7.')
|
234
|
+
end
|
235
|
+
|
236
|
+
if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4
|
237
|
+
invalid_properties.push('invalid value for "tax_type_code", the character length must be smaller than or equal to 4.')
|
238
|
+
end
|
239
|
+
|
240
|
+
if !@commodity_code.nil? && @commodity_code.to_s.length > 15
|
241
|
+
invalid_properties.push('invalid value for "commodity_code", the character length must be smaller than or equal to 15.')
|
242
|
+
end
|
243
|
+
|
244
|
+
if !@discount_amount.nil? && @discount_amount.to_s.length > 13
|
245
|
+
invalid_properties.push('invalid value for "discount_amount", the character length must be smaller than or equal to 13.')
|
246
|
+
end
|
247
|
+
|
248
|
+
if !@discount_rate.nil? && @discount_rate.to_s.length > 6
|
249
|
+
invalid_properties.push('invalid value for "discount_rate", the character length must be smaller than or equal to 6.')
|
250
|
+
end
|
251
|
+
|
252
|
+
if !@invoice_number.nil? && @invoice_number.to_s.length > 23
|
253
|
+
invalid_properties.push('invalid value for "invoice_number", the character length must be smaller than or equal to 23.')
|
254
|
+
end
|
255
|
+
|
256
|
+
invalid_properties
|
257
|
+
end
|
258
|
+
|
259
|
+
# Check to see if the all the properties in the model are valid
|
260
|
+
# @return true if the model is valid
|
261
|
+
def valid?
|
262
|
+
return false if !@product_code.nil? && @product_code.to_s.length > 255
|
263
|
+
return false if !@product_name.nil? && @product_name.to_s.length > 255
|
264
|
+
return false if !@product_sku.nil? && @product_sku.to_s.length > 255
|
265
|
+
return false if !@quantity.nil? && @quantity > 9999999999
|
266
|
+
return false if !@quantity.nil? && @quantity < 1
|
267
|
+
return false if !@unit_price.nil? && @unit_price.to_s.length > 15
|
268
|
+
return false if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12
|
269
|
+
return false if !@total_amount.nil? && @total_amount.to_s.length > 13
|
270
|
+
return false if !@tax_amount.nil? && @tax_amount.to_s.length > 15
|
271
|
+
return false if !@tax_rate.nil? && @tax_rate.to_s.length > 7
|
272
|
+
return false if !@tax_type_code.nil? && @tax_type_code.to_s.length > 4
|
273
|
+
return false if !@commodity_code.nil? && @commodity_code.to_s.length > 15
|
274
|
+
return false if !@discount_amount.nil? && @discount_amount.to_s.length > 13
|
275
|
+
return false if !@discount_rate.nil? && @discount_rate.to_s.length > 6
|
276
|
+
return false if !@invoice_number.nil? && @invoice_number.to_s.length > 23
|
277
|
+
true
|
278
|
+
end
|
279
|
+
|
280
|
+
# Custom attribute writer method with validation
|
281
|
+
# @param [Object] product_code Value to be assigned
|
282
|
+
def product_code=(product_code)
|
283
|
+
if !product_code.nil? && product_code.to_s.length > 255
|
284
|
+
fail ArgumentError, 'invalid value for "product_code", the character length must be smaller than or equal to 255.'
|
285
|
+
end
|
286
|
+
|
287
|
+
@product_code = product_code
|
288
|
+
end
|
289
|
+
|
290
|
+
# Custom attribute writer method with validation
|
291
|
+
# @param [Object] product_name Value to be assigned
|
292
|
+
def product_name=(product_name)
|
293
|
+
if !product_name.nil? && product_name.to_s.length > 255
|
294
|
+
fail ArgumentError, 'invalid value for "product_name", the character length must be smaller than or equal to 255.'
|
295
|
+
end
|
296
|
+
|
297
|
+
@product_name = product_name
|
298
|
+
end
|
299
|
+
|
300
|
+
# Custom attribute writer method with validation
|
301
|
+
# @param [Object] product_sku Value to be assigned
|
302
|
+
def product_sku=(product_sku)
|
303
|
+
if !product_sku.nil? && product_sku.to_s.length > 255
|
304
|
+
fail ArgumentError, 'invalid value for "product_sku", the character length must be smaller than or equal to 255.'
|
305
|
+
end
|
306
|
+
|
307
|
+
@product_sku = product_sku
|
308
|
+
end
|
309
|
+
|
310
|
+
# Custom attribute writer method with validation
|
311
|
+
# @param [Object] quantity Value to be assigned
|
312
|
+
def quantity=(quantity)
|
313
|
+
if !quantity.nil? && quantity > 9999999999
|
314
|
+
fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 9999999999.'
|
315
|
+
end
|
316
|
+
|
317
|
+
if !quantity.nil? && quantity < 1
|
318
|
+
fail ArgumentError, 'invalid value for "quantity", must be greater than or equal to 1.'
|
319
|
+
end
|
320
|
+
|
321
|
+
@quantity = quantity
|
322
|
+
end
|
323
|
+
|
324
|
+
# Custom attribute writer method with validation
|
325
|
+
# @param [Object] unit_price Value to be assigned
|
326
|
+
def unit_price=(unit_price)
|
327
|
+
if !unit_price.nil? && unit_price.to_s.length > 15
|
328
|
+
fail ArgumentError, 'invalid value for "unit_price", the character length must be smaller than or equal to 15.'
|
329
|
+
end
|
330
|
+
|
331
|
+
@unit_price = unit_price
|
332
|
+
end
|
333
|
+
|
334
|
+
# Custom attribute writer method with validation
|
335
|
+
# @param [Object] unit_of_measure Value to be assigned
|
336
|
+
def unit_of_measure=(unit_of_measure)
|
337
|
+
if !unit_of_measure.nil? && unit_of_measure.to_s.length > 12
|
338
|
+
fail ArgumentError, 'invalid value for "unit_of_measure", the character length must be smaller than or equal to 12.'
|
339
|
+
end
|
340
|
+
|
341
|
+
@unit_of_measure = unit_of_measure
|
342
|
+
end
|
343
|
+
|
344
|
+
# Custom attribute writer method with validation
|
345
|
+
# @param [Object] total_amount Value to be assigned
|
346
|
+
def total_amount=(total_amount)
|
347
|
+
if !total_amount.nil? && total_amount.to_s.length > 13
|
348
|
+
fail ArgumentError, 'invalid value for "total_amount", the character length must be smaller than or equal to 13.'
|
349
|
+
end
|
350
|
+
|
351
|
+
@total_amount = total_amount
|
352
|
+
end
|
353
|
+
|
354
|
+
# Custom attribute writer method with validation
|
355
|
+
# @param [Object] tax_amount Value to be assigned
|
356
|
+
def tax_amount=(tax_amount)
|
357
|
+
if !tax_amount.nil? && tax_amount.to_s.length > 15
|
358
|
+
fail ArgumentError, 'invalid value for "tax_amount", the character length must be smaller than or equal to 15.'
|
359
|
+
end
|
360
|
+
|
361
|
+
@tax_amount = tax_amount
|
362
|
+
end
|
363
|
+
|
364
|
+
# Custom attribute writer method with validation
|
365
|
+
# @param [Object] tax_rate Value to be assigned
|
366
|
+
def tax_rate=(tax_rate)
|
367
|
+
if !tax_rate.nil? && tax_rate.to_s.length > 7
|
368
|
+
fail ArgumentError, 'invalid value for "tax_rate", the character length must be smaller than or equal to 7.'
|
369
|
+
end
|
370
|
+
|
371
|
+
@tax_rate = tax_rate
|
372
|
+
end
|
373
|
+
|
374
|
+
# Custom attribute writer method with validation
|
375
|
+
# @param [Object] tax_type_code Value to be assigned
|
376
|
+
def tax_type_code=(tax_type_code)
|
377
|
+
if !tax_type_code.nil? && tax_type_code.to_s.length > 4
|
378
|
+
fail ArgumentError, 'invalid value for "tax_type_code", the character length must be smaller than or equal to 4.'
|
379
|
+
end
|
380
|
+
|
381
|
+
@tax_type_code = tax_type_code
|
382
|
+
end
|
383
|
+
|
384
|
+
# Custom attribute writer method with validation
|
385
|
+
# @param [Object] commodity_code Value to be assigned
|
386
|
+
def commodity_code=(commodity_code)
|
387
|
+
if !commodity_code.nil? && commodity_code.to_s.length > 15
|
388
|
+
fail ArgumentError, 'invalid value for "commodity_code", the character length must be smaller than or equal to 15.'
|
389
|
+
end
|
390
|
+
|
391
|
+
@commodity_code = commodity_code
|
392
|
+
end
|
393
|
+
|
394
|
+
# Custom attribute writer method with validation
|
395
|
+
# @param [Object] discount_amount Value to be assigned
|
396
|
+
def discount_amount=(discount_amount)
|
397
|
+
if !discount_amount.nil? && discount_amount.to_s.length > 13
|
398
|
+
fail ArgumentError, 'invalid value for "discount_amount", the character length must be smaller than or equal to 13.'
|
399
|
+
end
|
400
|
+
|
401
|
+
@discount_amount = discount_amount
|
402
|
+
end
|
403
|
+
|
404
|
+
# Custom attribute writer method with validation
|
405
|
+
# @param [Object] discount_rate Value to be assigned
|
406
|
+
def discount_rate=(discount_rate)
|
407
|
+
if !discount_rate.nil? && discount_rate.to_s.length > 6
|
408
|
+
fail ArgumentError, 'invalid value for "discount_rate", the character length must be smaller than or equal to 6.'
|
409
|
+
end
|
410
|
+
|
411
|
+
@discount_rate = discount_rate
|
412
|
+
end
|
413
|
+
|
414
|
+
# Custom attribute writer method with validation
|
415
|
+
# @param [Object] invoice_number Value to be assigned
|
416
|
+
def invoice_number=(invoice_number)
|
417
|
+
if !invoice_number.nil? && invoice_number.to_s.length > 23
|
418
|
+
fail ArgumentError, 'invalid value for "invoice_number", the character length must be smaller than or equal to 23.'
|
419
|
+
end
|
420
|
+
|
421
|
+
@invoice_number = invoice_number
|
422
|
+
end
|
423
|
+
|
424
|
+
# Checks equality by comparing each attribute.
|
425
|
+
# @param [Object] Object to be compared
|
426
|
+
def ==(o)
|
427
|
+
return true if self.equal?(o)
|
428
|
+
self.class == o.class &&
|
429
|
+
product_code == o.product_code &&
|
430
|
+
product_name == o.product_name &&
|
431
|
+
product_sku == o.product_sku &&
|
432
|
+
quantity == o.quantity &&
|
433
|
+
unit_price == o.unit_price &&
|
434
|
+
unit_of_measure == o.unit_of_measure &&
|
435
|
+
total_amount == o.total_amount &&
|
436
|
+
tax_amount == o.tax_amount &&
|
437
|
+
tax_rate == o.tax_rate &&
|
438
|
+
tax_type_code == o.tax_type_code &&
|
439
|
+
amount_includes_tax == o.amount_includes_tax &&
|
440
|
+
commodity_code == o.commodity_code &&
|
441
|
+
discount_amount == o.discount_amount &&
|
442
|
+
discount_applied == o.discount_applied &&
|
443
|
+
discount_rate == o.discount_rate &&
|
444
|
+
invoice_number == o.invoice_number &&
|
445
|
+
tax_details == o.tax_details
|
446
|
+
end
|
447
|
+
|
448
|
+
# @see the `==` method
|
449
|
+
# @param [Object] Object to be compared
|
450
|
+
def eql?(o)
|
451
|
+
self == o
|
452
|
+
end
|
453
|
+
|
454
|
+
# Calculates hash code according to all attributes.
|
455
|
+
# @return [Fixnum] Hash code
|
456
|
+
def hash
|
457
|
+
[product_code, product_name, product_sku, quantity, unit_price, unit_of_measure, total_amount, tax_amount, tax_rate, tax_type_code, amount_includes_tax, commodity_code, discount_amount, discount_applied, discount_rate, invoice_number, tax_details].hash
|
458
|
+
end
|
459
|
+
|
460
|
+
# Builds the object from hash
|
461
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
462
|
+
# @return [Object] Returns the model itself
|
463
|
+
def build_from_hash(attributes)
|
464
|
+
return nil unless attributes.is_a?(Hash)
|
465
|
+
self.class.swagger_types.each_pair do |key, type|
|
466
|
+
if type =~ /\AArray<(.*)>/i
|
467
|
+
# check to ensure the input is an array given that the the attribute
|
468
|
+
# is documented as an array but the input is not
|
469
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
470
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
471
|
+
end
|
472
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
473
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
474
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
475
|
+
end
|
476
|
+
|
477
|
+
self
|
478
|
+
end
|
479
|
+
|
480
|
+
# Deserializes the data based on type
|
481
|
+
# @param string type Data type
|
482
|
+
# @param string value Value to be deserialized
|
483
|
+
# @return [Object] Deserialized data
|
484
|
+
def _deserialize(type, value)
|
485
|
+
case type.to_sym
|
486
|
+
when :DateTime
|
487
|
+
DateTime.parse(value)
|
488
|
+
when :Date
|
489
|
+
Date.parse(value)
|
490
|
+
when :String
|
491
|
+
value.to_s
|
492
|
+
when :Integer
|
493
|
+
value.to_i
|
494
|
+
when :Float
|
495
|
+
value.to_f
|
496
|
+
when :BOOLEAN
|
497
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
498
|
+
true
|
499
|
+
else
|
500
|
+
false
|
501
|
+
end
|
502
|
+
when :Object
|
503
|
+
# generic object (usually a Hash), return directly
|
504
|
+
value
|
505
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
506
|
+
inner_type = Regexp.last_match[:inner_type]
|
507
|
+
value.map { |v| _deserialize(inner_type, v) }
|
508
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
509
|
+
k_type = Regexp.last_match[:k_type]
|
510
|
+
v_type = Regexp.last_match[:v_type]
|
511
|
+
{}.tap do |hash|
|
512
|
+
value.each do |k, v|
|
513
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
514
|
+
end
|
515
|
+
end
|
516
|
+
else # model
|
517
|
+
temp_model = CyberSource.const_get(type).new
|
518
|
+
temp_model.build_from_hash(value)
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
# Returns the string representation of the object
|
523
|
+
# @return [String] String presentation of the object
|
524
|
+
def to_s
|
525
|
+
to_hash.to_s
|
526
|
+
end
|
527
|
+
|
528
|
+
# to_body is an alias to to_hash (backward compatibility)
|
529
|
+
# @return [Hash] Returns the object in the form of hash
|
530
|
+
def to_body
|
531
|
+
to_hash
|
532
|
+
end
|
533
|
+
|
534
|
+
# Returns the object in the form of hash
|
535
|
+
# @return [Hash] Returns the object in the form of hash
|
536
|
+
def to_hash
|
537
|
+
hash = {}
|
538
|
+
self.class.attribute_map.each_pair do |attr, param|
|
539
|
+
value = self.send(attr)
|
540
|
+
next if value.nil?
|
541
|
+
hash[param] = _to_hash(value)
|
542
|
+
end
|
543
|
+
hash
|
544
|
+
end
|
545
|
+
|
546
|
+
# Outputs non-array value in the form of hash
|
547
|
+
# For object, use to_hash. Otherwise, just return the value
|
548
|
+
# @param [Object] value Any valid value
|
549
|
+
# @return [Hash] Returns the value in the form of hash
|
550
|
+
def _to_hash(value)
|
551
|
+
if value.is_a?(Array)
|
552
|
+
value.compact.map { |v| _to_hash(v) }
|
553
|
+
elsif value.is_a?(Hash)
|
554
|
+
{}.tap do |hash|
|
555
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
556
|
+
end
|
557
|
+
elsif value.respond_to? :to_hash
|
558
|
+
value.to_hash
|
559
|
+
else
|
560
|
+
value
|
561
|
+
end
|
562
|
+
end
|
563
|
+
end
|
564
|
+
end
|