cybersource_rest_client 0.0.83 → 0.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +46 -27
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +82 -48
- data/lib/AuthenticationSDK/util/Cache.rb +7 -4
- data/lib/AuthenticationSDK/util/Constants.rb +6 -0
- data/lib/AuthenticationSDK/util/MLEUtility.rb +9 -0
- data/lib/cybersource_rest_client/api/batches_api.rb +1 -1
- data/lib/cybersource_rest_client/api/create_new_webhooks_api.rb +14 -22
- data/lib/cybersource_rest_client/api/credentials_api.rb +104 -0
- data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +3 -3
- data/lib/cybersource_rest_client/api/enrollment_api.rb +2 -2
- data/lib/cybersource_rest_client/api/instructions_api.rb +10 -10
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +3 -3
- data/lib/cybersource_rest_client/api/manage_webhooks_api.rb +20 -28
- data/lib/cybersource_rest_client/api/network_tokens_api.rb +654 -0
- data/lib/cybersource_rest_client/api/plans_api.rb +1 -1
- data/lib/cybersource_rest_client/api/subscriptions_api.rb +183 -1
- data/lib/cybersource_rest_client/api/subscriptions_follow_ons_api.rb +1 -1
- data/lib/cybersource_rest_client/api_client.rb +4 -0
- data/lib/cybersource_rest_client/models/account_validations_request.rb +15 -5
- data/lib/cybersource_rest_client/models/acpv1instructions_decline_threshold.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructions_mandates.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructions_recurring_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idconfirmations_processor_information_payment_instrument.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_order_information_amount_detail.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge.rb +369 -0
- data/lib/cybersource_rest_client/models/acpv1mppcredentials_challenge_encryption_jwk.rb +336 -0
- data/lib/cybersource_rest_client/models/acpv1tokens_assurance_data.rb +7 -7
- data/lib/cybersource_rest_client/models/acpv1tokens_authenticated_identities.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_authentication_context.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_bill_to.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_buyer_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_consumer_identity.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_device_information.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_enrollment_reference_data.rb +1 -1
- data/lib/cybersource_rest_client/models/acpv1tokens_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/auth_reversal_request.rb +11 -1
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information.rb +32 -6
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank.rb +1 -1
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_bank_account.rb +1 -1
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_customer.rb +196 -0
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_instrument_identifier.rb +196 -0
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_payment_information_payment_instrument.rb +196 -0
- data/lib/cybersource_rest_client/models/bavsv1accountvalidations_token_information.rb +208 -0
- data/lib/cybersource_rest_client/models/card_processing_config_common_processors.rb +105 -1
- data/lib/cybersource_rest_client/models/commerce_solutions_products.rb +15 -5
- data/lib/cybersource_rest_client/models/create_credit_request.rb +15 -5
- data/lib/cybersource_rest_client/models/get_all_subscriptions_response_order_information_amount_details_surcharge.rb +22 -5
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response.rb +247 -0
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_1.rb +224 -0
- data/lib/cybersource_rest_client/models/{pbl_payment_links_post201_response__links.rb → get_subscriptions_payments_response_1__links.rb} +1 -1
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response__links.rb +209 -0
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_cycles_completed_count.rb +191 -0
- data/lib/cybersource_rest_client/models/get_subscriptions_payments_response_subscription_payment.rb +356 -0
- data/lib/cybersource_rest_client/models/inline_response_201_1_tokenized_card.rb +26 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_commerce_solutions.rb +15 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_payments.rb +25 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_risk.rb +15 -5
- data/lib/cybersource_rest_client/models/inline_response_201_4_setups_value_added_services.rb +25 -5
- data/lib/cybersource_rest_client/models/inline_response_400_10.rb +30 -75
- data/lib/cybersource_rest_client/models/{inline_response_400_8_details.rb → inline_response_400_10_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_11.rb +235 -0
- data/lib/cybersource_rest_client/models/{inline_response_400_7_details.rb → inline_response_400_11_details.rb} +3 -3
- data/lib/cybersource_rest_client/models/inline_response_400_12.rb +281 -0
- data/lib/cybersource_rest_client/models/inline_response_400_6.rb +37 -60
- data/lib/cybersource_rest_client/models/inline_response_400_7.rb +6 -6
- data/lib/cybersource_rest_client/models/inline_response_400_8.rb +58 -36
- data/lib/cybersource_rest_client/models/{inline_response_400_6_fields.rb → inline_response_400_8_fields.rb} +1 -1
- data/lib/cybersource_rest_client/models/inline_response_400_9.rb +16 -16
- data/lib/cybersource_rest_client/models/inline_response_400_9_details.rb +2 -2
- data/lib/cybersource_rest_client/models/inline_response_404_3.rb +1 -1
- data/lib/cybersource_rest_client/models/inline_response_422_1.rb +1 -1
- data/lib/cybersource_rest_client/models/iplv2paymentlinks_order_information_line_items.rb +73 -5
- data/lib/cybersource_rest_client/models/mit_reversal_request.rb +11 -1
- data/lib/cybersource_rest_client/models/mpp_credentials_request.rb +221 -0
- data/lib/cybersource_rest_client/models/mpp_credentials_response200.rb +338 -0
- data/lib/cybersource_rest_client/models/patch_customer_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/patch_customer_request.rb +1 -1
- data/lib/cybersource_rest_client/models/patch_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/payment_instrument_list_1__embedded.rb +1 -1
- data/lib/cybersource_rest_client/models/payment_instrument_list__embedded.rb +1 -1
- data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded__embedded.rb → payment_instrument_list__embedded__embedded.rb} +1 -1
- data/lib/cybersource_rest_client/models/{payment_instrument_list_1__embedded_payment_instruments.rb → payment_instrument_list__embedded_payment_instruments.rb} +2 -2
- data/lib/cybersource_rest_client/models/payments_products.rb +25 -5
- data/lib/cybersource_rest_client/models/payments_products_currency_conversion_configuration_information_configurations_processors.rb +14 -2
- data/lib/cybersource_rest_client/models/payments_products_microform.rb +199 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information.rb +199 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations.rb +189 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features.rb +189 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_configuration_information_configurations_features_gateway_agnostic.rb +189 -0
- data/lib/cybersource_rest_client/models/payments_products_microform_subscription_information.rb +227 -0
- data/lib/cybersource_rest_client/models/pbl_payment_links_get200_response.rb +1 -1
- data/lib/cybersource_rest_client/models/pbl_payment_links_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/post_customer_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/post_customer_request.rb +1 -1
- data/lib/cybersource_rest_client/models/post_payment_instrument_request.rb +1 -1
- data/lib/cybersource_rest_client/models/post_tokenized_card_request.rb +15 -5
- data/lib/cybersource_rest_client/models/pts_v2_create_billing_agreement_post201_response_agreement_information.rb +80 -1
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response.rb +41 -1
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_merchant_information.rb +196 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_account_information.rb +189 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information.rb +15 -5
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_payment_information_account_features.rb +196 -0
- data/lib/cybersource_rest_client/models/pts_v2_credits_post201_response_token_information.rb +189 -0
- data/lib/cybersource_rest_client/models/pts_v2_modify_billing_agreement_post201_response_agreement_information.rb +35 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_point_of_sale_information.rb +22 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_processor_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_order_post201_response_order_information_shipping_details.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +106 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_strong_authentication.rb +22 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_account_information.rb +15 -5
- data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_payment_information_tokenized_card.rb → pts_v2_payments_post201_response_payment_account_information_tokenized_card.rb} +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +23 -6
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information.rb +15 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_token_information_third_party_token.rb +213 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_error_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_order_information_amount_details.rb +18 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +19 -2
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response_processor_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_voids_post201_response_processor_information.rb +7 -1
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information.rb +45 -5
- data/lib/cybersource_rest_client/models/{pull_funds201_response_processor_information_avs.rb → pts_v2_payouts_post201_response_processor_information_avs.rb} +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_customer.rb +196 -0
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_processor_information_electronic_verification_results.rb +281 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_buyer_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv1pullfundstransfer_processing_information.rb +18 -5
- data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +19 -6
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_agreement_information.rb +84 -5
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information.rb +12 -2
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_order_information_amount_details.rb +230 -0
- data/lib/cybersource_rest_client/models/{ptsv2intents_order_information_invoice_details.rb → ptsv2billingagreements_order_information_invoice_details.rb} +1 -1
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_payment_information_bank_account_alias.rb +207 -0
- data/lib/cybersource_rest_client/models/ptsv2billingagreements_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_agreement_information.rb +56 -5
- data/lib/cybersource_rest_client/models/ptsv2billingagreementsid_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +35 -5
- data/lib/cybersource_rest_client/models/ptsv2credits_token_information.rb +228 -0
- data/lib/cybersource_rest_client/models/ptsv2intents_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2intentsid_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_aggregator_information_sub_merchant.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information.rb +16 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information.rb +28 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_digital_currency.rb +231 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_shipping_details.rb +23 -6
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +32 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank_account_alias.rb +207 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_third_party_token.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +72 -6
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_program_indicators.rb +202 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +56 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +16 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_sender_information.rb +16 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_token_information.rb +32 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information.rb +193 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_token_information_token_authentication_information_authenticated_identities.rb +252 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_aggregator_information_sub_merchant.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_shipping_details.rb +100 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_point_of_sale_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processing_information.rb +18 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_processor_information.rb +39 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_shipping_details.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +32 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_device_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_payment_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +18 -5
- data/lib/cybersource_rest_client/models/pull_funds201_response_processor_information.rb +36 -6
- data/lib/cybersource_rest_client/models/pull_funds_request.rb +11 -1
- data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +45 -5
- data/lib/cybersource_rest_client/models/risk_products.rb +15 -5
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_ship_to.rb +39 -5
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_shipping_details.rb +1 -1
- data/lib/cybersource_rest_client/models/tms_card_art.rb +23 -1
- data/lib/cybersource_rest_client/models/tms_embedded_instrument_identifier_bill_to.rb +22 -5
- data/lib/cybersource_rest_client/models/tms_tokenized_card_delete_request.rb +189 -0
- data/lib/cybersource_rest_client/models/tmsv1paymentinstruments__embedded.rb +190 -0
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card.rb +22 -1
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_card.rb +1 -1
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata.rb +16 -5
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer.rb +41 -8
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_bank_applications.rb +201 -0
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_issuer_capabilities.rb +257 -0
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_verification_results.rb +202 -0
- data/lib/cybersource_rest_client/models/tmsv2customers__embedded.rb +200 -0
- data/lib/cybersource_rest_client/models/{tmsv3tokenstoken_idpaymentcredentials_order_information_bill_to.rb → tmsv2tokenizedcards_bill_to.rb} +1 -1
- data/lib/cybersource_rest_client/models/tmsv2tokenizedcardstokenized_card_iddelete_reason.rb +208 -0
- data/lib/cybersource_rest_client/models/tmsv3tokenstoken_idpaymentcredentials_order_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_shipping_details.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_sender_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data.rb +44 -14
- data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information.rb +325 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_aggregator_information_sub_merchant.rb +366 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_consumer_authentication_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ucv1sessions_data_installment_information.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information.rb +22 -5
- data/lib/cybersource_rest_client/models/ucv1sessions_data_merchant_information_merchant_descriptor.rb +18 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information.rb +16 -6
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_amount_details.rb +86 -12
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details.rb +242 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_invoice_details_transaction_advice_addendum.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_line_items.rb +702 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_order_information_shipping_details.rb +213 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information.rb +38 -1
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_bank_transfer_options.rb +196 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_processing_information_recurring_options.rb +192 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_recipient_information.rb +107 -53
- data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information.rb +376 -0
- data/lib/cybersource_rest_client/models/ucv1sessions_data_sender_information_account.rb +213 -0
- data/lib/cybersource_rest_client/models/update_payments.rb +192 -0
- data/lib/cybersource_rest_client/models/value_added_services_products.rb +25 -5
- data/lib/cybersource_rest_client.rb +71 -12
- metadata +78 -19
- data/lib/cybersource_rest_client/api/token_api.rb +0 -306
- data/lib/cybersource_rest_client/api/tokenized_card_api.rb +0 -371
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#CyberSource Merged Spec
|
|
3
|
+
|
|
4
|
+
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
|
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.4.38
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module CyberSource
|
|
15
|
+
class Ucv1sessionsDataOrderInformationLineItems
|
|
16
|
+
# Code identifying the product.
|
|
17
|
+
attr_accessor :product_code
|
|
18
|
+
|
|
19
|
+
# Name of the product.
|
|
20
|
+
attr_accessor :product_name
|
|
21
|
+
|
|
22
|
+
# Stock Keeping Unit identifier
|
|
23
|
+
attr_accessor :product_sku
|
|
24
|
+
|
|
25
|
+
# Quantity of the product
|
|
26
|
+
attr_accessor :quantity
|
|
27
|
+
|
|
28
|
+
# Price per unit
|
|
29
|
+
attr_accessor :unit_price
|
|
30
|
+
|
|
31
|
+
# Unit of measure (e.g. EA, KG, LB)
|
|
32
|
+
attr_accessor :unit_of_measure
|
|
33
|
+
|
|
34
|
+
# Total amount for the line item
|
|
35
|
+
attr_accessor :total_amount
|
|
36
|
+
|
|
37
|
+
# The tax rate of an item. Maximum of 2 decimal places. Valid range is 0 or 0.01 to 99.99.
|
|
38
|
+
attr_accessor :tax_rate
|
|
39
|
+
|
|
40
|
+
# Country where item will be shipped
|
|
41
|
+
attr_accessor :shipping_country_code
|
|
42
|
+
|
|
43
|
+
# Tax amount applied
|
|
44
|
+
attr_accessor :tax_amount
|
|
45
|
+
|
|
46
|
+
# Indicates if tax applied after discount
|
|
47
|
+
attr_accessor :tax_applied_after_discount
|
|
48
|
+
|
|
49
|
+
# Tax status indicator
|
|
50
|
+
attr_accessor :tax_status_indicator
|
|
51
|
+
|
|
52
|
+
# Tax type code
|
|
53
|
+
attr_accessor :tax_type_code
|
|
54
|
+
|
|
55
|
+
# Indicates if amount includes tax
|
|
56
|
+
attr_accessor :amount_includes_tax
|
|
57
|
+
|
|
58
|
+
# Type of supply
|
|
59
|
+
attr_accessor :type_of_supply
|
|
60
|
+
|
|
61
|
+
# Commodity code
|
|
62
|
+
attr_accessor :commodity_code
|
|
63
|
+
|
|
64
|
+
# Discount amount applied
|
|
65
|
+
attr_accessor :discount_amount
|
|
66
|
+
|
|
67
|
+
# Indicates if discount applied
|
|
68
|
+
attr_accessor :discount_applied
|
|
69
|
+
|
|
70
|
+
# Discount rate applied
|
|
71
|
+
attr_accessor :discount_rate
|
|
72
|
+
|
|
73
|
+
# Invoice number for the line item
|
|
74
|
+
attr_accessor :invoice_number
|
|
75
|
+
|
|
76
|
+
attr_accessor :tax_details
|
|
77
|
+
|
|
78
|
+
# Fulfillment type
|
|
79
|
+
attr_accessor :fulfillment_type
|
|
80
|
+
|
|
81
|
+
# Weight of the product
|
|
82
|
+
attr_accessor :weight
|
|
83
|
+
|
|
84
|
+
# Weight identifier
|
|
85
|
+
attr_accessor :weight_identifier
|
|
86
|
+
|
|
87
|
+
# Unit of weight of the product
|
|
88
|
+
attr_accessor :weight_unit
|
|
89
|
+
|
|
90
|
+
# Reference data code
|
|
91
|
+
attr_accessor :reference_data_code
|
|
92
|
+
|
|
93
|
+
# Reference data number
|
|
94
|
+
attr_accessor :reference_data_number
|
|
95
|
+
|
|
96
|
+
# Unit tax amount
|
|
97
|
+
attr_accessor :unit_tax_amount
|
|
98
|
+
|
|
99
|
+
# Description of the product
|
|
100
|
+
attr_accessor :product_description
|
|
101
|
+
|
|
102
|
+
# Gift card currency
|
|
103
|
+
attr_accessor :gift_card_currency
|
|
104
|
+
|
|
105
|
+
# Shipping destination types
|
|
106
|
+
attr_accessor :shipping_destination_types
|
|
107
|
+
|
|
108
|
+
# Indicates if item is a gift
|
|
109
|
+
attr_accessor :gift
|
|
110
|
+
|
|
111
|
+
attr_accessor :passenger
|
|
112
|
+
|
|
113
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
114
|
+
def self.attribute_map
|
|
115
|
+
{
|
|
116
|
+
:'product_code' => :'productCode',
|
|
117
|
+
:'product_name' => :'productName',
|
|
118
|
+
:'product_sku' => :'productSku',
|
|
119
|
+
:'quantity' => :'quantity',
|
|
120
|
+
:'unit_price' => :'unitPrice',
|
|
121
|
+
:'unit_of_measure' => :'unitOfMeasure',
|
|
122
|
+
:'total_amount' => :'totalAmount',
|
|
123
|
+
:'tax_rate' => :'taxRate',
|
|
124
|
+
:'shipping_country_code' => :'shippingCountryCode',
|
|
125
|
+
:'tax_amount' => :'taxAmount',
|
|
126
|
+
:'tax_applied_after_discount' => :'taxAppliedAfterDiscount',
|
|
127
|
+
:'tax_status_indicator' => :'taxStatusIndicator',
|
|
128
|
+
:'tax_type_code' => :'taxTypeCode',
|
|
129
|
+
:'amount_includes_tax' => :'amountIncludesTax',
|
|
130
|
+
:'type_of_supply' => :'typeOfSupply',
|
|
131
|
+
:'commodity_code' => :'commodityCode',
|
|
132
|
+
:'discount_amount' => :'discountAmount',
|
|
133
|
+
:'discount_applied' => :'discountApplied',
|
|
134
|
+
:'discount_rate' => :'discountRate',
|
|
135
|
+
:'invoice_number' => :'invoiceNumber',
|
|
136
|
+
:'tax_details' => :'taxDetails',
|
|
137
|
+
:'fulfillment_type' => :'fulfillmentType',
|
|
138
|
+
:'weight' => :'weight',
|
|
139
|
+
:'weight_identifier' => :'weightIdentifier',
|
|
140
|
+
:'weight_unit' => :'weightUnit',
|
|
141
|
+
:'reference_data_code' => :'referenceDataCode',
|
|
142
|
+
:'reference_data_number' => :'referenceDataNumber',
|
|
143
|
+
:'unit_tax_amount' => :'unitTaxAmount',
|
|
144
|
+
:'product_description' => :'productDescription',
|
|
145
|
+
:'gift_card_currency' => :'giftCardCurrency',
|
|
146
|
+
:'shipping_destination_types' => :'shippingDestinationTypes',
|
|
147
|
+
:'gift' => :'gift',
|
|
148
|
+
:'passenger' => :'passenger'
|
|
149
|
+
}
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
|
153
|
+
def self.json_map
|
|
154
|
+
{
|
|
155
|
+
:'product_code' => :'product_code',
|
|
156
|
+
:'product_name' => :'product_name',
|
|
157
|
+
:'product_sku' => :'product_sku',
|
|
158
|
+
:'quantity' => :'quantity',
|
|
159
|
+
:'unit_price' => :'unit_price',
|
|
160
|
+
:'unit_of_measure' => :'unit_of_measure',
|
|
161
|
+
:'total_amount' => :'total_amount',
|
|
162
|
+
:'tax_rate' => :'tax_rate',
|
|
163
|
+
:'shipping_country_code' => :'shipping_country_code',
|
|
164
|
+
:'tax_amount' => :'tax_amount',
|
|
165
|
+
:'tax_applied_after_discount' => :'tax_applied_after_discount',
|
|
166
|
+
:'tax_status_indicator' => :'tax_status_indicator',
|
|
167
|
+
:'tax_type_code' => :'tax_type_code',
|
|
168
|
+
:'amount_includes_tax' => :'amount_includes_tax',
|
|
169
|
+
:'type_of_supply' => :'type_of_supply',
|
|
170
|
+
:'commodity_code' => :'commodity_code',
|
|
171
|
+
:'discount_amount' => :'discount_amount',
|
|
172
|
+
:'discount_applied' => :'discount_applied',
|
|
173
|
+
:'discount_rate' => :'discount_rate',
|
|
174
|
+
:'invoice_number' => :'invoice_number',
|
|
175
|
+
:'tax_details' => :'tax_details',
|
|
176
|
+
:'fulfillment_type' => :'fulfillment_type',
|
|
177
|
+
:'weight' => :'weight',
|
|
178
|
+
:'weight_identifier' => :'weight_identifier',
|
|
179
|
+
:'weight_unit' => :'weight_unit',
|
|
180
|
+
:'reference_data_code' => :'reference_data_code',
|
|
181
|
+
:'reference_data_number' => :'reference_data_number',
|
|
182
|
+
:'unit_tax_amount' => :'unit_tax_amount',
|
|
183
|
+
:'product_description' => :'product_description',
|
|
184
|
+
:'gift_card_currency' => :'gift_card_currency',
|
|
185
|
+
:'shipping_destination_types' => :'shipping_destination_types',
|
|
186
|
+
:'gift' => :'gift',
|
|
187
|
+
:'passenger' => :'passenger'
|
|
188
|
+
}
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Attribute type mapping.
|
|
192
|
+
def self.swagger_types
|
|
193
|
+
{
|
|
194
|
+
:'product_code' => :'String',
|
|
195
|
+
:'product_name' => :'String',
|
|
196
|
+
:'product_sku' => :'String',
|
|
197
|
+
:'quantity' => :'Integer',
|
|
198
|
+
:'unit_price' => :'String',
|
|
199
|
+
:'unit_of_measure' => :'String',
|
|
200
|
+
:'total_amount' => :'String',
|
|
201
|
+
:'tax_rate' => :'String',
|
|
202
|
+
:'shipping_country_code' => :'String',
|
|
203
|
+
:'tax_amount' => :'String',
|
|
204
|
+
:'tax_applied_after_discount' => :'String',
|
|
205
|
+
:'tax_status_indicator' => :'String',
|
|
206
|
+
:'tax_type_code' => :'String',
|
|
207
|
+
:'amount_includes_tax' => :'BOOLEAN',
|
|
208
|
+
:'type_of_supply' => :'String',
|
|
209
|
+
:'commodity_code' => :'String',
|
|
210
|
+
:'discount_amount' => :'String',
|
|
211
|
+
:'discount_applied' => :'BOOLEAN',
|
|
212
|
+
:'discount_rate' => :'String',
|
|
213
|
+
:'invoice_number' => :'String',
|
|
214
|
+
:'tax_details' => :'Upv1capturecontextsDataOrderInformationLineItemsTaxDetails',
|
|
215
|
+
:'fulfillment_type' => :'String',
|
|
216
|
+
:'weight' => :'String',
|
|
217
|
+
:'weight_identifier' => :'String',
|
|
218
|
+
:'weight_unit' => :'String',
|
|
219
|
+
:'reference_data_code' => :'String',
|
|
220
|
+
:'reference_data_number' => :'String',
|
|
221
|
+
:'unit_tax_amount' => :'String',
|
|
222
|
+
:'product_description' => :'String',
|
|
223
|
+
:'gift_card_currency' => :'String',
|
|
224
|
+
:'shipping_destination_types' => :'String',
|
|
225
|
+
:'gift' => :'BOOLEAN',
|
|
226
|
+
:'passenger' => :'Upv1capturecontextsDataOrderInformationLineItemsPassenger'
|
|
227
|
+
}
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Initializes the object
|
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
232
|
+
def initialize(attributes = {})
|
|
233
|
+
return unless attributes.is_a?(Hash)
|
|
234
|
+
|
|
235
|
+
# convert string to symbol for hash key
|
|
236
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
237
|
+
|
|
238
|
+
if attributes.has_key?(:'productCode')
|
|
239
|
+
self.product_code = attributes[:'productCode']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.has_key?(:'productName')
|
|
243
|
+
self.product_name = attributes[:'productName']
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if attributes.has_key?(:'productSku')
|
|
247
|
+
self.product_sku = attributes[:'productSku']
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if attributes.has_key?(:'quantity')
|
|
251
|
+
self.quantity = attributes[:'quantity']
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if attributes.has_key?(:'unitPrice')
|
|
255
|
+
self.unit_price = attributes[:'unitPrice']
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if attributes.has_key?(:'unitOfMeasure')
|
|
259
|
+
self.unit_of_measure = attributes[:'unitOfMeasure']
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if attributes.has_key?(:'totalAmount')
|
|
263
|
+
self.total_amount = attributes[:'totalAmount']
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if attributes.has_key?(:'taxRate')
|
|
267
|
+
self.tax_rate = attributes[:'taxRate']
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if attributes.has_key?(:'shippingCountryCode')
|
|
271
|
+
self.shipping_country_code = attributes[:'shippingCountryCode']
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if attributes.has_key?(:'taxAmount')
|
|
275
|
+
self.tax_amount = attributes[:'taxAmount']
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if attributes.has_key?(:'taxAppliedAfterDiscount')
|
|
279
|
+
self.tax_applied_after_discount = attributes[:'taxAppliedAfterDiscount']
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if attributes.has_key?(:'taxStatusIndicator')
|
|
283
|
+
self.tax_status_indicator = attributes[:'taxStatusIndicator']
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if attributes.has_key?(:'taxTypeCode')
|
|
287
|
+
self.tax_type_code = attributes[:'taxTypeCode']
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if attributes.has_key?(:'amountIncludesTax')
|
|
291
|
+
self.amount_includes_tax = attributes[:'amountIncludesTax']
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
if attributes.has_key?(:'typeOfSupply')
|
|
295
|
+
self.type_of_supply = attributes[:'typeOfSupply']
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
if attributes.has_key?(:'commodityCode')
|
|
299
|
+
self.commodity_code = attributes[:'commodityCode']
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
if attributes.has_key?(:'discountAmount')
|
|
303
|
+
self.discount_amount = attributes[:'discountAmount']
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
if attributes.has_key?(:'discountApplied')
|
|
307
|
+
self.discount_applied = attributes[:'discountApplied']
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
if attributes.has_key?(:'discountRate')
|
|
311
|
+
self.discount_rate = attributes[:'discountRate']
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
if attributes.has_key?(:'invoiceNumber')
|
|
315
|
+
self.invoice_number = attributes[:'invoiceNumber']
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
if attributes.has_key?(:'taxDetails')
|
|
319
|
+
self.tax_details = attributes[:'taxDetails']
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
if attributes.has_key?(:'fulfillmentType')
|
|
323
|
+
self.fulfillment_type = attributes[:'fulfillmentType']
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if attributes.has_key?(:'weight')
|
|
327
|
+
self.weight = attributes[:'weight']
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if attributes.has_key?(:'weightIdentifier')
|
|
331
|
+
self.weight_identifier = attributes[:'weightIdentifier']
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
if attributes.has_key?(:'weightUnit')
|
|
335
|
+
self.weight_unit = attributes[:'weightUnit']
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
if attributes.has_key?(:'referenceDataCode')
|
|
339
|
+
self.reference_data_code = attributes[:'referenceDataCode']
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if attributes.has_key?(:'referenceDataNumber')
|
|
343
|
+
self.reference_data_number = attributes[:'referenceDataNumber']
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if attributes.has_key?(:'unitTaxAmount')
|
|
347
|
+
self.unit_tax_amount = attributes[:'unitTaxAmount']
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
if attributes.has_key?(:'productDescription')
|
|
351
|
+
self.product_description = attributes[:'productDescription']
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
if attributes.has_key?(:'giftCardCurrency')
|
|
355
|
+
self.gift_card_currency = attributes[:'giftCardCurrency']
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if attributes.has_key?(:'shippingDestinationTypes')
|
|
359
|
+
self.shipping_destination_types = attributes[:'shippingDestinationTypes']
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if attributes.has_key?(:'gift')
|
|
363
|
+
self.gift = attributes[:'gift']
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
if attributes.has_key?(:'passenger')
|
|
367
|
+
self.passenger = attributes[:'passenger']
|
|
368
|
+
end
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
372
|
+
# @return Array for valid properties with the reasons
|
|
373
|
+
def list_invalid_properties
|
|
374
|
+
invalid_properties = Array.new
|
|
375
|
+
invalid_properties
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Check to see if the all the properties in the model are valid
|
|
379
|
+
# @return true if the model is valid
|
|
380
|
+
def valid?
|
|
381
|
+
true
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Custom attribute writer method with validation
|
|
385
|
+
# @param [Object] product_code Value to be assigned
|
|
386
|
+
def product_code=(product_code)
|
|
387
|
+
@product_code = product_code
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Custom attribute writer method with validation
|
|
391
|
+
# @param [Object] product_name Value to be assigned
|
|
392
|
+
def product_name=(product_name)
|
|
393
|
+
@product_name = product_name
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Custom attribute writer method with validation
|
|
397
|
+
# @param [Object] product_sku Value to be assigned
|
|
398
|
+
def product_sku=(product_sku)
|
|
399
|
+
@product_sku = product_sku
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# Custom attribute writer method with validation
|
|
403
|
+
# @param [Object] quantity Value to be assigned
|
|
404
|
+
def quantity=(quantity)
|
|
405
|
+
@quantity = quantity
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
# Custom attribute writer method with validation
|
|
409
|
+
# @param [Object] unit_price Value to be assigned
|
|
410
|
+
def unit_price=(unit_price)
|
|
411
|
+
@unit_price = unit_price
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Custom attribute writer method with validation
|
|
415
|
+
# @param [Object] unit_of_measure Value to be assigned
|
|
416
|
+
def unit_of_measure=(unit_of_measure)
|
|
417
|
+
@unit_of_measure = unit_of_measure
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
# Custom attribute writer method with validation
|
|
421
|
+
# @param [Object] total_amount Value to be assigned
|
|
422
|
+
def total_amount=(total_amount)
|
|
423
|
+
@total_amount = total_amount
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Custom attribute writer method with validation
|
|
427
|
+
# @param [Object] tax_rate Value to be assigned
|
|
428
|
+
def tax_rate=(tax_rate)
|
|
429
|
+
@tax_rate = tax_rate
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Custom attribute writer method with validation
|
|
433
|
+
# @param [Object] shipping_country_code Value to be assigned
|
|
434
|
+
def shipping_country_code=(shipping_country_code)
|
|
435
|
+
@shipping_country_code = shipping_country_code
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
# Custom attribute writer method with validation
|
|
439
|
+
# @param [Object] tax_amount Value to be assigned
|
|
440
|
+
def tax_amount=(tax_amount)
|
|
441
|
+
@tax_amount = tax_amount
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Custom attribute writer method with validation
|
|
445
|
+
# @param [Object] tax_applied_after_discount Value to be assigned
|
|
446
|
+
def tax_applied_after_discount=(tax_applied_after_discount)
|
|
447
|
+
@tax_applied_after_discount = tax_applied_after_discount
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Custom attribute writer method with validation
|
|
451
|
+
# @param [Object] tax_status_indicator Value to be assigned
|
|
452
|
+
def tax_status_indicator=(tax_status_indicator)
|
|
453
|
+
@tax_status_indicator = tax_status_indicator
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Custom attribute writer method with validation
|
|
457
|
+
# @param [Object] tax_type_code Value to be assigned
|
|
458
|
+
def tax_type_code=(tax_type_code)
|
|
459
|
+
@tax_type_code = tax_type_code
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
# Custom attribute writer method with validation
|
|
463
|
+
# @param [Object] type_of_supply Value to be assigned
|
|
464
|
+
def type_of_supply=(type_of_supply)
|
|
465
|
+
@type_of_supply = type_of_supply
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# Custom attribute writer method with validation
|
|
469
|
+
# @param [Object] commodity_code Value to be assigned
|
|
470
|
+
def commodity_code=(commodity_code)
|
|
471
|
+
@commodity_code = commodity_code
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
# Custom attribute writer method with validation
|
|
475
|
+
# @param [Object] discount_amount Value to be assigned
|
|
476
|
+
def discount_amount=(discount_amount)
|
|
477
|
+
@discount_amount = discount_amount
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Custom attribute writer method with validation
|
|
481
|
+
# @param [Object] discount_rate Value to be assigned
|
|
482
|
+
def discount_rate=(discount_rate)
|
|
483
|
+
@discount_rate = discount_rate
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Custom attribute writer method with validation
|
|
487
|
+
# @param [Object] invoice_number Value to be assigned
|
|
488
|
+
def invoice_number=(invoice_number)
|
|
489
|
+
@invoice_number = invoice_number
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# Custom attribute writer method with validation
|
|
493
|
+
# @param [Object] weight Value to be assigned
|
|
494
|
+
def weight=(weight)
|
|
495
|
+
@weight = weight
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Custom attribute writer method with validation
|
|
499
|
+
# @param [Object] weight_identifier Value to be assigned
|
|
500
|
+
def weight_identifier=(weight_identifier)
|
|
501
|
+
@weight_identifier = weight_identifier
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# Custom attribute writer method with validation
|
|
505
|
+
# @param [Object] weight_unit Value to be assigned
|
|
506
|
+
def weight_unit=(weight_unit)
|
|
507
|
+
@weight_unit = weight_unit
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# Custom attribute writer method with validation
|
|
511
|
+
# @param [Object] reference_data_code Value to be assigned
|
|
512
|
+
def reference_data_code=(reference_data_code)
|
|
513
|
+
@reference_data_code = reference_data_code
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Custom attribute writer method with validation
|
|
517
|
+
# @param [Object] reference_data_number Value to be assigned
|
|
518
|
+
def reference_data_number=(reference_data_number)
|
|
519
|
+
@reference_data_number = reference_data_number
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
# Custom attribute writer method with validation
|
|
523
|
+
# @param [Object] unit_tax_amount Value to be assigned
|
|
524
|
+
def unit_tax_amount=(unit_tax_amount)
|
|
525
|
+
@unit_tax_amount = unit_tax_amount
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
# Custom attribute writer method with validation
|
|
529
|
+
# @param [Object] product_description Value to be assigned
|
|
530
|
+
def product_description=(product_description)
|
|
531
|
+
@product_description = product_description
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
# Custom attribute writer method with validation
|
|
535
|
+
# @param [Object] gift_card_currency Value to be assigned
|
|
536
|
+
def gift_card_currency=(gift_card_currency)
|
|
537
|
+
@gift_card_currency = gift_card_currency
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
# Custom attribute writer method with validation
|
|
541
|
+
# @param [Object] shipping_destination_types Value to be assigned
|
|
542
|
+
def shipping_destination_types=(shipping_destination_types)
|
|
543
|
+
@shipping_destination_types = shipping_destination_types
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# Checks equality by comparing each attribute.
|
|
547
|
+
# @param [Object] Object to be compared
|
|
548
|
+
def ==(o)
|
|
549
|
+
return true if self.equal?(o)
|
|
550
|
+
self.class == o.class &&
|
|
551
|
+
product_code == o.product_code &&
|
|
552
|
+
product_name == o.product_name &&
|
|
553
|
+
product_sku == o.product_sku &&
|
|
554
|
+
quantity == o.quantity &&
|
|
555
|
+
unit_price == o.unit_price &&
|
|
556
|
+
unit_of_measure == o.unit_of_measure &&
|
|
557
|
+
total_amount == o.total_amount &&
|
|
558
|
+
tax_rate == o.tax_rate &&
|
|
559
|
+
shipping_country_code == o.shipping_country_code &&
|
|
560
|
+
tax_amount == o.tax_amount &&
|
|
561
|
+
tax_applied_after_discount == o.tax_applied_after_discount &&
|
|
562
|
+
tax_status_indicator == o.tax_status_indicator &&
|
|
563
|
+
tax_type_code == o.tax_type_code &&
|
|
564
|
+
amount_includes_tax == o.amount_includes_tax &&
|
|
565
|
+
type_of_supply == o.type_of_supply &&
|
|
566
|
+
commodity_code == o.commodity_code &&
|
|
567
|
+
discount_amount == o.discount_amount &&
|
|
568
|
+
discount_applied == o.discount_applied &&
|
|
569
|
+
discount_rate == o.discount_rate &&
|
|
570
|
+
invoice_number == o.invoice_number &&
|
|
571
|
+
tax_details == o.tax_details &&
|
|
572
|
+
fulfillment_type == o.fulfillment_type &&
|
|
573
|
+
weight == o.weight &&
|
|
574
|
+
weight_identifier == o.weight_identifier &&
|
|
575
|
+
weight_unit == o.weight_unit &&
|
|
576
|
+
reference_data_code == o.reference_data_code &&
|
|
577
|
+
reference_data_number == o.reference_data_number &&
|
|
578
|
+
unit_tax_amount == o.unit_tax_amount &&
|
|
579
|
+
product_description == o.product_description &&
|
|
580
|
+
gift_card_currency == o.gift_card_currency &&
|
|
581
|
+
shipping_destination_types == o.shipping_destination_types &&
|
|
582
|
+
gift == o.gift &&
|
|
583
|
+
passenger == o.passenger
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
# @see the `==` method
|
|
587
|
+
# @param [Object] Object to be compared
|
|
588
|
+
def eql?(o)
|
|
589
|
+
self == o
|
|
590
|
+
end
|
|
591
|
+
|
|
592
|
+
# Calculates hash code according to all attributes.
|
|
593
|
+
# @return [Fixnum] Hash code
|
|
594
|
+
def hash
|
|
595
|
+
[product_code, product_name, product_sku, quantity, unit_price, unit_of_measure, total_amount, tax_rate, shipping_country_code, tax_amount, tax_applied_after_discount, tax_status_indicator, tax_type_code, amount_includes_tax, type_of_supply, commodity_code, discount_amount, discount_applied, discount_rate, invoice_number, tax_details, fulfillment_type, weight, weight_identifier, weight_unit, reference_data_code, reference_data_number, unit_tax_amount, product_description, gift_card_currency, shipping_destination_types, gift, passenger].hash
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# Builds the object from hash
|
|
599
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
600
|
+
# @return [Object] Returns the model itself
|
|
601
|
+
def build_from_hash(attributes)
|
|
602
|
+
return nil unless attributes.is_a?(Hash)
|
|
603
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
604
|
+
if type =~ /\AArray<(.*)>/i
|
|
605
|
+
# check to ensure the input is an array given that the the attribute
|
|
606
|
+
# is documented as an array but the input is not
|
|
607
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
608
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
609
|
+
end
|
|
610
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
611
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
612
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
self
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
# Deserializes the data based on type
|
|
619
|
+
# @param string type Data type
|
|
620
|
+
# @param string value Value to be deserialized
|
|
621
|
+
# @return [Object] Deserialized data
|
|
622
|
+
def _deserialize(type, value)
|
|
623
|
+
case type.to_sym
|
|
624
|
+
when :DateTime
|
|
625
|
+
DateTime.parse(value)
|
|
626
|
+
when :Date
|
|
627
|
+
Date.parse(value)
|
|
628
|
+
when :String
|
|
629
|
+
value.to_s
|
|
630
|
+
when :Integer
|
|
631
|
+
value.to_i
|
|
632
|
+
when :Float
|
|
633
|
+
value.to_f
|
|
634
|
+
when :BOOLEAN
|
|
635
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
636
|
+
true
|
|
637
|
+
else
|
|
638
|
+
false
|
|
639
|
+
end
|
|
640
|
+
when :Object
|
|
641
|
+
# generic object (usually a Hash), return directly
|
|
642
|
+
value
|
|
643
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
644
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
645
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
646
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
647
|
+
k_type = Regexp.last_match[:k_type]
|
|
648
|
+
v_type = Regexp.last_match[:v_type]
|
|
649
|
+
{}.tap do |hash|
|
|
650
|
+
value.each do |k, v|
|
|
651
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
652
|
+
end
|
|
653
|
+
end
|
|
654
|
+
else # model
|
|
655
|
+
temp_model = CyberSource.const_get(type).new
|
|
656
|
+
temp_model.build_from_hash(value)
|
|
657
|
+
end
|
|
658
|
+
end
|
|
659
|
+
|
|
660
|
+
# Returns the string representation of the object
|
|
661
|
+
# @return [String] String presentation of the object
|
|
662
|
+
def to_s
|
|
663
|
+
to_hash.to_s
|
|
664
|
+
end
|
|
665
|
+
|
|
666
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
667
|
+
# @return [Hash] Returns the object in the form of hash
|
|
668
|
+
def to_body
|
|
669
|
+
to_hash
|
|
670
|
+
end
|
|
671
|
+
|
|
672
|
+
# Returns the object in the form of hash
|
|
673
|
+
# @return [Hash] Returns the object in the form of hash
|
|
674
|
+
def to_hash
|
|
675
|
+
hash = {}
|
|
676
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
677
|
+
value = self.send(attr)
|
|
678
|
+
next if value.nil?
|
|
679
|
+
hash[param] = _to_hash(value)
|
|
680
|
+
end
|
|
681
|
+
hash
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
# Outputs non-array value in the form of hash
|
|
685
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
686
|
+
# @param [Object] value Any valid value
|
|
687
|
+
# @return [Hash] Returns the value in the form of hash
|
|
688
|
+
def _to_hash(value)
|
|
689
|
+
if value.is_a?(Array)
|
|
690
|
+
value.compact.map { |v| _to_hash(v) }
|
|
691
|
+
elsif value.is_a?(Hash)
|
|
692
|
+
{}.tap do |hash|
|
|
693
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
694
|
+
end
|
|
695
|
+
elsif value.respond_to? :to_hash
|
|
696
|
+
value.to_hash
|
|
697
|
+
else
|
|
698
|
+
value
|
|
699
|
+
end
|
|
700
|
+
end
|
|
701
|
+
end
|
|
702
|
+
end
|