first_data_gateway 1.0.3 → 1.1.0
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/Gemfile +1 -0
- data/README.md +144 -65
- data/Rakefile +2 -0
- data/docs/AVSResponse.md +9 -0
- data/docs/AccessTokenResponse.md +2 -3
- data/docs/AdditionalAmountRate.md +9 -0
- data/docs/AdditionalTransactionDetails.md +10 -0
- data/docs/Address.md +5 -5
- data/docs/Airline.md +14 -14
- data/docs/AirlineAncillaryServiceCategory.md +2 -2
- data/docs/AirlineTravelRoute.md +8 -8
- data/docs/AliPay.md +11 -0
- data/docs/Amount.md +2 -2
- data/docs/AmountComponents.md +8 -8
- data/docs/AuthenticationApi.md +19 -24
- data/docs/AuthenticationRequest.md +9 -0
- data/docs/AuthenticationResponseVerification.md +5 -4
- data/docs/AuthenticationResponseVerificationRequest.md +11 -0
- data/docs/BasicResponse.md +10 -0
- data/docs/BasketItem.md +2 -2
- data/docs/Billing.md +6 -5
- data/docs/BillingAddress.md +17 -0
- data/docs/BillingAddressPhone.md +9 -0
- data/docs/CarRental.md +9 -9
- data/docs/CarRentalExtraCharges.md +2 -2
- data/docs/Card.md +15 -0
- data/docs/CardInfo.md +13 -0
- data/docs/CardInfoLookupApi.md +68 -0
- data/docs/CardInfoLookupRequest.md +9 -0
- data/docs/CardInfoLookupResponse.md +12 -0
- data/docs/CardVerificationApi.md +68 -0
- data/docs/CardVerificationRequest.md +9 -0
- data/docs/CardVerificationsTransaction.md +2 -2
- data/docs/ChinaDomestic.md +15 -0
- data/docs/ClientLocale.md +3 -3
- data/docs/Contact.md +5 -5
- data/docs/CurrencyConversionApi.md +68 -0
- data/docs/Customer.md +19 -0
- data/docs/CustomerAddress.md +14 -0
- data/docs/CustomerAddressPhone.md +9 -0
- data/docs/Dcc.md +9 -0
- data/docs/Device.md +19 -0
- data/docs/DeviceNetworks.md +21 -0
- data/docs/Document.md +9 -0
- data/docs/Error.md +1 -1
- data/docs/ErrorDetails.md +1 -1
- data/docs/ErrorResponse.md +4 -4
- data/docs/ExchangeRateRequest.md +12 -0
- data/docs/ExchangeRateResponse.md +21 -0
- data/docs/Expiration.md +3 -3
- data/docs/FraudDetectApi.md +68 -0
- data/docs/FraudOrder.md +10 -0
- data/docs/FraudOrderItems.md +15 -0
- data/docs/FraudOrderShipToAddress.md +14 -0
- data/docs/Frequency.md +3 -3
- data/docs/IndustrySpecificExtensions.md +1 -1
- data/docs/InstallmentOptions.md +1 -1
- data/docs/Lodging.md +3 -3
- data/docs/LodgingExtraCharges.md +1 -1
- data/docs/Loyalty.md +10 -0
- data/docs/Merchant.md +11 -0
- data/docs/MerchantLocation.md +12 -0
- data/docs/MerchantLocationMerchantAddress.md +13 -0
- data/docs/Order.md +2 -2
- data/docs/OrderApi.md +107 -55
- data/docs/OrderErrorResponse.md +19 -0
- data/docs/OrderResponse.md +18 -0
- data/docs/PayPal.md +1 -1
- data/docs/Payment.md +18 -0
- data/docs/PaymentApi.md +164 -124
- data/docs/PaymentCard.md +10 -6
- data/docs/PaymentCardAuthenticationResult.md +1 -1
- data/docs/PaymentFacilitator.md +12 -0
- data/docs/PaymentIssuerResponse.md +10 -0
- data/docs/PaymentMethod.md +5 -2
- data/docs/PaymentPayMethod.md +13 -0
- data/docs/PaymentSchedulesApi.md +256 -0
- data/docs/PaymentSchedulesErrorResponse.md +14 -0
- data/docs/PaymentSchedulesRequest.md +10 -7
- data/docs/PaymentSchedulesResponse.md +7 -5
- data/docs/PaymentTokenApi.md +134 -0
- data/docs/PaymentTokenization.md +16 -0
- data/docs/PaymentTokenizationErrorResponse.md +19 -0
- data/docs/PaymentTokenizationRequest.md +11 -0
- data/docs/PaymentTokenizationResponse.md +18 -0
- data/docs/PaymentURLApi.md +68 -0
- data/docs/PaymentUrlErrorResponse.md +15 -0
- data/docs/PaymentUrlRequest.md +13 -3
- data/docs/PaymentUrlResponse.md +6 -5
- data/docs/PaymentVerification3ds.md +10 -0
- data/docs/PaymentVerificationAvs.md +10 -0
- data/docs/PaymentVerificationCvv.md +10 -0
- data/docs/PrimaryTransaction.md +7 -3
- data/docs/PrimaryTransactionAdditionalDetails.md +7 -5
- data/docs/ProcessorData.md +8 -4
- data/docs/PurchaseCards.md +9 -0
- data/docs/PurchaseCardsLevel2.md +12 -0
- data/docs/PurchaseCardsLevel3.md +8 -0
- data/docs/PurchaseCardsLevel3LineItems.md +16 -0
- data/docs/RecurringPaymentDetails.md +20 -0
- data/docs/RecurringPaymentDetailsResponse.md +19 -0
- data/docs/ReferencedOrder.md +9 -0
- data/docs/ResponseType.md +1 -1
- data/docs/ScoreOnlyRequest.md +21 -0
- data/docs/ScoreOnlyResponse.md +13 -0
- data/docs/ScoreOnlyResponseFraudScore.md +10 -0
- data/docs/ScoreOnlyResponseFraudScoreExplanations.md +10 -0
- data/docs/SecondaryTransaction.md +4 -1
- data/docs/SecondaryTransactionAdditionalDetails.md +8 -0
- data/docs/Secure3dResponse.md +8 -0
- data/docs/Sepa.md +1 -1
- data/docs/SepaMandate.md +3 -3
- data/docs/Shipping.md +1 -1
- data/docs/SoftDescriptor.md +9 -0
- data/docs/SplitShipment.md +3 -3
- data/docs/StoredCredential.md +4 -4
- data/docs/SubMerchantData.md +13 -0
- data/docs/Transaction.md +19 -0
- data/docs/TransactionErrorResponse.md +13 -11
- data/docs/TransactionOrigin.md +7 -0
- data/docs/TransactionResponse.md +13 -11
- data/docs/TransactionType.md +1 -1
- data/first_data_gateway.gemspec +9 -9
- data/git_push.sh +2 -2
- data/lib/openapi_client/.DS_Store +0 -0
- data/lib/{swagger_client → openapi_client}/api/authentication_api.rb +22 -27
- data/lib/openapi_client/api/card_info_lookup_api.rb +117 -0
- data/lib/openapi_client/api/card_verification_api.rb +117 -0
- data/lib/openapi_client/api/currency_conversion_api.rb +117 -0
- data/lib/openapi_client/api/fraud_detect_api.rb +122 -0
- data/lib/openapi_client/api/order_api.rb +327 -0
- data/lib/{swagger_client → openapi_client}/api/payment_api.rb +212 -111
- data/lib/openapi_client/api/payment_schedules_api.rb +411 -0
- data/lib/openapi_client/api/payment_token_api.rb +218 -0
- data/lib/openapi_client/api/payment_url_api.rb +117 -0
- data/lib/{swagger_client → openapi_client}/api_client.rb +50 -38
- data/lib/{swagger_client → openapi_client}/api_error.rb +6 -6
- data/lib/{swagger_client → openapi_client}/configuration.rb +49 -7
- data/lib/openapi_client/models/.DS_Store +0 -0
- data/lib/{swagger_client → openapi_client}/models/access_token_response.rb +20 -33
- data/lib/{swagger_client/models/secondary_transaction.rb → openapi_client/models/additional_amount_rate.rb} +25 -28
- data/lib/{swagger_client/models/primary_transaction_additional_details.rb → openapi_client/models/additional_transaction_details.rb} +68 -62
- data/lib/{swagger_client → openapi_client}/models/address.rb +33 -44
- data/lib/{swagger_client → openapi_client}/models/airline.rb +48 -47
- data/lib/{swagger_client → openapi_client}/models/airline_ancillary_service_category.rb +18 -21
- data/lib/{swagger_client → openapi_client}/models/airline_travel_route.rb +39 -42
- data/lib/openapi_client/models/ali_pay.rb +326 -0
- data/lib/{swagger_client → openapi_client}/models/amount.rb +18 -21
- data/lib/{swagger_client → openapi_client}/models/amount_components.rb +22 -19
- data/lib/{swagger_client/models/transaction_response_authentication_redirect.rb → openapi_client/models/authentication_request.rb} +33 -38
- data/lib/{swagger_client → openapi_client}/models/authentication_response_verification.rb +43 -30
- data/lib/{swagger_client/models/payment_url_request.rb → openapi_client/models/authentication_response_verification_request.rb} +35 -56
- data/lib/openapi_client/models/avs_response.rb +239 -0
- data/lib/openapi_client/models/basic_response.rb +209 -0
- data/lib/{swagger_client → openapi_client}/models/basket_item.rb +16 -20
- data/lib/{swagger_client → openapi_client}/models/billing.rb +65 -25
- data/lib/openapi_client/models/billing_address.rb +279 -0
- data/lib/{swagger_client/models/transaction_response_authentication_redirect_params.rb → openapi_client/models/billing_address_phone.rb} +31 -42
- data/lib/{swagger_client → openapi_client}/models/car_rental.rb +31 -31
- data/lib/{swagger_client → openapi_client}/models/car_rental_extra_charges.rb +18 -21
- data/lib/openapi_client/models/card.rb +254 -0
- data/lib/{swagger_client/models/payment_card.rb → openapi_client/models/card_info.rb} +68 -81
- data/lib/openapi_client/models/card_info_lookup_request.rb +214 -0
- data/lib/openapi_client/models/card_info_lookup_response.rb +265 -0
- data/lib/openapi_client/models/card_verification_request.rb +198 -0
- data/lib/{swagger_client → openapi_client}/models/card_verifications_transaction.rb +31 -20
- data/lib/openapi_client/models/china_domestic.rb +386 -0
- data/lib/{swagger_client → openapi_client}/models/client_locale.rb +19 -23
- data/lib/{swagger_client → openapi_client}/models/contact.rb +26 -31
- data/lib/openapi_client/models/customer.rb +333 -0
- data/lib/openapi_client/models/customer_address.rb +259 -0
- data/lib/openapi_client/models/customer_address_phone.rb +195 -0
- data/lib/openapi_client/models/dcc.rb +200 -0
- data/lib/openapi_client/models/device.rb +340 -0
- data/lib/openapi_client/models/device_networks.rb +353 -0
- data/lib/{swagger_client/models/payment_card_authentication_request.rb → openapi_client/models/document.rb} +62 -26
- data/lib/{swagger_client → openapi_client}/models/error.rb +14 -18
- data/lib/{swagger_client → openapi_client}/models/error_details.rb +14 -19
- data/lib/{swagger_client → openapi_client}/models/error_response.rb +22 -22
- data/lib/openapi_client/models/exchange_rate_request.rb +307 -0
- data/lib/openapi_client/models/exchange_rate_response.rb +319 -0
- data/lib/{swagger_client → openapi_client}/models/expiration.rb +18 -20
- data/lib/openapi_client/models/fraud_order.rb +206 -0
- data/lib/openapi_client/models/fraud_order_items.rb +253 -0
- data/lib/openapi_client/models/fraud_order_ship_to_address.rb +245 -0
- data/lib/{swagger_client → openapi_client}/models/frequency.rb +27 -30
- data/lib/{swagger_client → openapi_client}/models/industry_specific_extensions.rb +15 -19
- data/lib/{swagger_client → openapi_client}/models/installment_options.rb +22 -28
- data/lib/{swagger_client → openapi_client}/models/lodging.rb +19 -22
- data/lib/{swagger_client → openapi_client}/models/lodging_extra_charges.rb +17 -21
- data/lib/openapi_client/models/loyalty.rb +205 -0
- data/lib/openapi_client/models/merchant.rb +219 -0
- data/lib/openapi_client/models/merchant_location.rb +224 -0
- data/lib/openapi_client/models/merchant_location_merchant_address.rb +250 -0
- data/lib/{swagger_client/models/processor_data.rb → openapi_client/models/order.rb} +49 -47
- data/lib/openapi_client/models/order_error_response.rb +296 -0
- data/lib/openapi_client/models/order_response.rb +287 -0
- data/lib/{swagger_client → openapi_client}/models/pay_pal.rb +19 -23
- data/lib/openapi_client/models/payment.rb +346 -0
- data/lib/openapi_client/models/payment_card.rb +363 -0
- data/lib/{swagger_client → openapi_client}/models/payment_card_authentication_result.rb +32 -37
- data/lib/openapi_client/models/payment_facilitator.rb +292 -0
- data/lib/openapi_client/models/payment_issuer_response.rb +249 -0
- data/lib/openapi_client/models/payment_method.rb +278 -0
- data/lib/openapi_client/models/payment_pay_method.rb +278 -0
- data/lib/openapi_client/models/payment_schedules_error_response.rb +281 -0
- data/lib/{swagger_client → openapi_client}/models/payment_schedules_request.rb +83 -80
- data/lib/openapi_client/models/payment_schedules_response.rb +272 -0
- data/lib/openapi_client/models/payment_tokenization.rb +327 -0
- data/lib/openapi_client/models/payment_tokenization_error_response.rb +329 -0
- data/lib/{swagger_client/models/payment_method.rb → openapi_client/models/payment_tokenization_request.rb} +34 -37
- data/lib/openapi_client/models/payment_tokenization_response.rb +319 -0
- data/lib/openapi_client/models/payment_url_error_response.rb +292 -0
- data/lib/openapi_client/models/payment_url_request.rb +335 -0
- data/lib/{swagger_client → openapi_client}/models/payment_url_response.rb +35 -38
- data/lib/openapi_client/models/payment_verification3ds.rb +215 -0
- data/lib/openapi_client/models/payment_verification_avs.rb +215 -0
- data/lib/openapi_client/models/payment_verification_cvv.rb +215 -0
- data/lib/{swagger_client → openapi_client}/models/primary_transaction.rb +93 -31
- data/lib/openapi_client/models/primary_transaction_additional_details.rb +352 -0
- data/lib/openapi_client/models/processor_data.rb +272 -0
- data/lib/openapi_client/models/purchase_cards.rb +192 -0
- data/lib/openapi_client/models/purchase_cards_level2.rb +267 -0
- data/lib/openapi_client/models/purchase_cards_level3.rb +186 -0
- data/lib/openapi_client/models/purchase_cards_level3_line_items.rb +337 -0
- data/lib/openapi_client/models/recurring_payment_details.rb +399 -0
- data/lib/openapi_client/models/recurring_payment_details_response.rb +296 -0
- data/lib/{swagger_client/models/order.rb → openapi_client/models/referenced_order.rb} +23 -36
- data/lib/openapi_client/models/response_type.rb +37 -0
- data/lib/openapi_client/models/score_only_request.rb +389 -0
- data/lib/{swagger_client/models/payment_schedules_response.rb → openapi_client/models/score_only_response.rb} +56 -56
- data/lib/openapi_client/models/score_only_response_fraud_score.rb +208 -0
- data/lib/openapi_client/models/score_only_response_fraud_score_explanations.rb +201 -0
- data/lib/openapi_client/models/secondary_transaction.rb +220 -0
- data/lib/openapi_client/models/secondary_transaction_additional_details.rb +183 -0
- data/lib/openapi_client/models/secure3d_response.rb +184 -0
- data/lib/{swagger_client → openapi_client}/models/sepa.rb +30 -35
- data/lib/{swagger_client → openapi_client}/models/sepa_mandate.rb +32 -35
- data/lib/{swagger_client → openapi_client}/models/shipping.rb +17 -22
- data/lib/openapi_client/models/soft_descriptor.rb +215 -0
- data/lib/{swagger_client → openapi_client}/models/split_shipment.rb +17 -21
- data/lib/{swagger_client → openapi_client}/models/stored_credential.rb +28 -32
- data/lib/openapi_client/models/sub_merchant_data.rb +302 -0
- data/lib/openapi_client/models/transaction.rb +337 -0
- data/lib/{swagger_client → openapi_client}/models/transaction_error_response.rb +110 -80
- data/lib/openapi_client/models/transaction_origin.rb +32 -0
- data/lib/{swagger_client → openapi_client}/models/transaction_response.rb +112 -82
- data/lib/openapi_client/models/transaction_type.rb +36 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +158 -0
- data/lib/simple/client_context.rb +2 -2
- data/lib/simple/gateway.rb +274 -37
- data/spec/api/authentication_api_spec.rb +12 -12
- data/spec/api/card_info_lookup_api_spec.rb +53 -0
- data/spec/api/card_verification_api_spec.rb +53 -0
- data/spec/api/currency_conversion_api_spec.rb +53 -0
- data/spec/api/fraud_detect_api_spec.rb +53 -0
- data/spec/api/order_api_spec.rb +44 -23
- data/spec/api/payment_api_spec.rb +50 -26
- data/spec/api/payment_schedules_api_spec.rb +111 -0
- data/spec/api/payment_token_api_spec.rb +74 -0
- data/spec/api/payment_url_api_spec.rb +53 -0
- data/spec/api_client_spec.rb +66 -66
- data/spec/configuration_spec.rb +15 -15
- data/spec/models/access_token_response_spec.rb +16 -23
- data/spec/models/additional_amount_rate_spec.rb +47 -0
- data/spec/models/additional_transaction_details_spec.rb +53 -0
- data/spec/models/address_spec.rb +16 -17
- data/spec/models/airline_ancillary_service_category_spec.rb +14 -15
- data/spec/models/airline_spec.rb +27 -28
- data/spec/models/airline_travel_route_spec.rb +22 -23
- data/spec/models/ali_pay_spec.rb +63 -0
- data/spec/models/amount_components_spec.rb +16 -17
- data/spec/models/amount_spec.rb +12 -13
- data/spec/models/authentication_request_spec.rb +51 -0
- data/spec/models/authentication_response_verification_request_spec.rb +59 -0
- data/spec/models/authentication_response_verification_spec.rb +23 -18
- data/spec/models/avs_response_spec.rb +55 -0
- data/spec/models/basic_response_spec.rb +53 -0
- data/spec/models/basket_item_spec.rb +13 -14
- data/spec/models/billing_address_phone_spec.rb +47 -0
- data/spec/models/billing_address_spec.rb +95 -0
- data/spec/models/billing_spec.rb +25 -20
- data/spec/models/car_rental_extra_charges_spec.rb +14 -15
- data/spec/models/car_rental_spec.rb +17 -18
- data/spec/models/card_info_lookup_request_spec.rb +47 -0
- data/spec/models/card_info_lookup_response_spec.rb +69 -0
- data/spec/models/card_info_spec.rb +79 -0
- data/spec/models/card_spec.rb +83 -0
- data/spec/models/card_verification_request_spec.rb +47 -0
- data/spec/models/card_verifications_transaction_spec.rb +11 -12
- data/spec/models/china_domestic_spec.rb +83 -0
- data/spec/models/client_locale_spec.rb +11 -12
- data/spec/models/contact_spec.rb +13 -14
- data/spec/models/customer_address_phone_spec.rb +47 -0
- data/spec/models/customer_address_spec.rb +77 -0
- data/spec/models/customer_spec.rb +111 -0
- data/spec/models/dcc_spec.rb +47 -0
- data/spec/models/device_networks_spec.rb +123 -0
- data/spec/models/device_spec.rb +111 -0
- data/spec/models/document_spec.rb +51 -0
- data/spec/models/error_details_spec.rb +11 -12
- data/spec/models/error_response_spec.rb +13 -14
- data/spec/models/error_spec.rb +12 -13
- data/spec/models/exchange_rate_request_spec.rb +69 -0
- data/spec/models/exchange_rate_response_spec.rb +119 -0
- data/spec/models/expiration_spec.rb +11 -12
- data/spec/models/fraud_order_items_spec.rb +83 -0
- data/spec/models/fraud_order_ship_to_address_spec.rb +77 -0
- data/spec/models/fraud_order_spec.rb +53 -0
- data/spec/models/frequency_spec.rb +15 -16
- data/spec/models/industry_specific_extensions_spec.rb +12 -13
- data/spec/models/installment_options_spec.rb +12 -13
- data/spec/models/lodging_extra_charges_spec.rb +14 -15
- data/spec/models/lodging_spec.rb +14 -15
- data/spec/models/loyalty_spec.rb +53 -0
- data/spec/models/merchant_location_merchant_address_spec.rb +71 -0
- data/spec/models/merchant_location_spec.rb +65 -0
- data/spec/models/merchant_spec.rb +59 -0
- data/spec/models/order_error_response_spec.rb +107 -0
- data/spec/models/order_response_spec.rb +101 -0
- data/spec/models/order_spec.rb +12 -13
- data/spec/models/pay_pal_spec.rb +10 -11
- data/spec/models/payment_card_authentication_result_spec.rb +26 -27
- data/spec/models/payment_card_spec.rb +41 -22
- data/spec/models/payment_facilitator_spec.rb +65 -0
- data/spec/models/payment_issuer_response_spec.rb +57 -0
- data/spec/models/payment_method_spec.rb +35 -18
- data/spec/models/payment_pay_method_spec.rb +75 -0
- data/spec/models/payment_schedules_error_response_spec.rb +81 -0
- data/spec/models/payment_schedules_request_spec.rb +43 -30
- data/spec/models/payment_schedules_response_spec.rb +30 -19
- data/spec/models/payment_spec.rb +109 -0
- data/spec/models/payment_tokenization_error_response_spec.rb +111 -0
- data/spec/models/payment_tokenization_request_spec.rb +63 -0
- data/spec/models/payment_tokenization_response_spec.rb +105 -0
- data/spec/models/payment_tokenization_spec.rb +93 -0
- data/spec/models/payment_url_error_response_spec.rb +87 -0
- data/spec/models/payment_url_request_spec.rb +73 -14
- data/spec/models/payment_url_response_spec.rb +25 -20
- data/spec/models/payment_verification3ds_spec.rb +53 -0
- data/spec/models/payment_verification_avs_spec.rb +53 -0
- data/spec/models/payment_verification_cvv_spec.rb +53 -0
- data/spec/models/primary_transaction_additional_details_spec.rb +28 -17
- data/spec/models/primary_transaction_spec.rb +45 -22
- data/spec/models/processor_data_spec.rb +41 -14
- data/spec/models/purchase_cards_level2_spec.rb +65 -0
- data/spec/models/purchase_cards_level3_line_items_spec.rb +89 -0
- data/spec/models/purchase_cards_level3_spec.rb +41 -0
- data/spec/models/purchase_cards_spec.rb +47 -0
- data/spec/models/recurring_payment_details_response_spec.rb +107 -0
- data/spec/models/recurring_payment_details_spec.rb +117 -0
- data/spec/models/referenced_order_spec.rb +47 -0
- data/spec/models/response_type_spec.rb +9 -10
- data/spec/models/score_only_request_spec.rb +127 -0
- data/spec/models/score_only_response_fraud_score_explanations_spec.rb +53 -0
- data/spec/models/score_only_response_fraud_score_spec.rb +53 -0
- data/spec/models/score_only_response_spec.rb +75 -0
- data/spec/models/secondary_transaction_additional_details_spec.rb +41 -0
- data/spec/models/secondary_transaction_spec.rb +29 -12
- data/spec/models/secure3d_response_spec.rb +41 -0
- data/spec/models/sepa_mandate_spec.rb +17 -18
- data/spec/models/sepa_spec.rb +14 -15
- data/spec/models/shipping_spec.rb +12 -13
- data/spec/models/soft_descriptor_spec.rb +47 -0
- data/spec/models/split_shipment_spec.rb +11 -12
- data/spec/models/stored_credential_spec.rb +21 -22
- data/spec/models/sub_merchant_data_spec.rb +71 -0
- data/spec/models/transaction_error_response_spec.rb +62 -51
- data/spec/models/transaction_origin_spec.rb +35 -0
- data/spec/models/transaction_response_spec.rb +61 -50
- data/spec/models/transaction_spec.rb +115 -0
- data/spec/models/transaction_type_spec.rb +9 -10
- data/spec/spec_helper.rb +6 -6
- metadata +339 -69
- data/docs/PaymentCardAuthenticationRequest.md +0 -8
- data/docs/TransactionResponseAuthenticationRedirect.md +0 -10
- data/docs/TransactionResponseAuthenticationRedirectParams.md +0 -10
- data/lib/swagger_client/api/order_api.rb +0 -229
- data/lib/swagger_client/models/response_type.rb +0 -37
- data/lib/swagger_client/models/transaction_type.rb +0 -36
- data/lib/swagger_client/version.rb +0 -15
- data/lib/swagger_client.rb +0 -91
- data/spec/models/payment_card_authentication_request_spec.rb +0 -46
- data/spec/models/transaction_response_authentication_redirect_params_spec.rb +0 -54
- data/spec/models/transaction_response_authentication_redirect_spec.rb +0 -58
@@ -0,0 +1,281 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
# Payment schedules response with error field included.
|
17
|
+
class PaymentSchedulesErrorResponse
|
18
|
+
# Echoes back the value in the request header for tracking.
|
19
|
+
attr_accessor :client_request_id
|
20
|
+
|
21
|
+
# Request identifier in API, can be used to request logs from the support team.
|
22
|
+
attr_accessor :api_trace_id
|
23
|
+
|
24
|
+
attr_accessor :response_type
|
25
|
+
|
26
|
+
# Result of requested operation. If it's anything other than 'SUCCESS', please refer to 400s HTTP error codes or decline. See Error object for details.
|
27
|
+
attr_accessor :request_status
|
28
|
+
|
29
|
+
# Client order ID if supplied by client, otherwise the order ID.
|
30
|
+
attr_accessor :order_id
|
31
|
+
|
32
|
+
attr_accessor :transaction_response
|
33
|
+
|
34
|
+
attr_accessor :error
|
35
|
+
|
36
|
+
class EnumAttributeValidator
|
37
|
+
attr_reader :datatype
|
38
|
+
attr_reader :allowable_values
|
39
|
+
|
40
|
+
def initialize(datatype, allowable_values)
|
41
|
+
@allowable_values = allowable_values.map do |value|
|
42
|
+
case datatype.to_s
|
43
|
+
when /Integer/i
|
44
|
+
value.to_i
|
45
|
+
when /Float/i
|
46
|
+
value.to_f
|
47
|
+
else
|
48
|
+
value
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def valid?(value)
|
54
|
+
!value || allowable_values.include?(value)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
59
|
+
def self.attribute_map
|
60
|
+
{
|
61
|
+
:'client_request_id' => :'clientRequestId',
|
62
|
+
:'api_trace_id' => :'apiTraceId',
|
63
|
+
:'response_type' => :'responseType',
|
64
|
+
:'request_status' => :'requestStatus',
|
65
|
+
:'order_id' => :'orderId',
|
66
|
+
:'transaction_response' => :'transactionResponse',
|
67
|
+
:'error' => :'error'
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# Attribute type mapping.
|
72
|
+
def self.openapi_types
|
73
|
+
{
|
74
|
+
:'client_request_id' => :'String',
|
75
|
+
:'api_trace_id' => :'String',
|
76
|
+
:'response_type' => :'ResponseType',
|
77
|
+
:'request_status' => :'String',
|
78
|
+
:'order_id' => :'String',
|
79
|
+
:'transaction_response' => :'TransactionResponse',
|
80
|
+
:'error' => :'Error'
|
81
|
+
}
|
82
|
+
end
|
83
|
+
|
84
|
+
# Initializes the object
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
86
|
+
def initialize(attributes = {})
|
87
|
+
return unless attributes.is_a?(Hash)
|
88
|
+
|
89
|
+
# convert string to symbol for hash key
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
91
|
+
|
92
|
+
if attributes.has_key?(:'clientRequestId')
|
93
|
+
self.client_request_id = attributes[:'clientRequestId']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.has_key?(:'apiTraceId')
|
97
|
+
self.api_trace_id = attributes[:'apiTraceId']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.has_key?(:'responseType')
|
101
|
+
self.response_type = attributes[:'responseType']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.has_key?(:'requestStatus')
|
105
|
+
self.request_status = attributes[:'requestStatus']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.has_key?(:'orderId')
|
109
|
+
self.order_id = attributes[:'orderId']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.has_key?(:'transactionResponse')
|
113
|
+
self.transaction_response = attributes[:'transactionResponse']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.has_key?(:'error')
|
117
|
+
self.error = attributes[:'error']
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
122
|
+
# @return Array for valid properties with the reasons
|
123
|
+
def list_invalid_properties
|
124
|
+
invalid_properties = Array.new
|
125
|
+
if @response_type.nil?
|
126
|
+
invalid_properties.push('invalid value for "response_type", response_type cannot be nil.')
|
127
|
+
end
|
128
|
+
|
129
|
+
invalid_properties
|
130
|
+
end
|
131
|
+
|
132
|
+
# Check to see if the all the properties in the model are valid
|
133
|
+
# @return true if the model is valid
|
134
|
+
def valid?
|
135
|
+
return false if @response_type.nil?
|
136
|
+
request_status_validator = EnumAttributeValidator.new('String', ['SUCCESS', 'VALIDATION_FAILED', 'PROCESSING_FAILED', 'FAILURE', 'DECLINED'])
|
137
|
+
return false unless request_status_validator.valid?(@request_status)
|
138
|
+
true
|
139
|
+
end
|
140
|
+
|
141
|
+
# Custom attribute writer method checking allowed values (enum).
|
142
|
+
# @param [Object] request_status Object to be assigned
|
143
|
+
def request_status=(request_status)
|
144
|
+
validator = EnumAttributeValidator.new('String', ['SUCCESS', 'VALIDATION_FAILED', 'PROCESSING_FAILED', 'FAILURE', 'DECLINED'])
|
145
|
+
unless validator.valid?(request_status)
|
146
|
+
fail ArgumentError, 'invalid value for "request_status", must be one of #{validator.allowable_values}.'
|
147
|
+
end
|
148
|
+
@request_status = request_status
|
149
|
+
end
|
150
|
+
|
151
|
+
# Checks equality by comparing each attribute.
|
152
|
+
# @param [Object] Object to be compared
|
153
|
+
def ==(o)
|
154
|
+
return true if self.equal?(o)
|
155
|
+
self.class == o.class &&
|
156
|
+
client_request_id == o.client_request_id &&
|
157
|
+
api_trace_id == o.api_trace_id &&
|
158
|
+
response_type == o.response_type &&
|
159
|
+
request_status == o.request_status &&
|
160
|
+
order_id == o.order_id &&
|
161
|
+
transaction_response == o.transaction_response &&
|
162
|
+
error == o.error
|
163
|
+
end
|
164
|
+
|
165
|
+
# @see the `==` method
|
166
|
+
# @param [Object] Object to be compared
|
167
|
+
def eql?(o)
|
168
|
+
self == o
|
169
|
+
end
|
170
|
+
|
171
|
+
# Calculates hash code according to all attributes.
|
172
|
+
# @return [Fixnum] Hash code
|
173
|
+
def hash
|
174
|
+
[client_request_id, api_trace_id, response_type, request_status, order_id, transaction_response, error].hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Builds the object from hash
|
178
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
179
|
+
# @return [Object] Returns the model itself
|
180
|
+
def build_from_hash(attributes)
|
181
|
+
return nil unless attributes.is_a?(Hash)
|
182
|
+
self.class.openapi_types.each_pair do |key, type|
|
183
|
+
if type =~ /\AArray<(.*)>/i
|
184
|
+
# check to ensure the input is an array given that the the attribute
|
185
|
+
# is documented as an array but the input is not
|
186
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
187
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
188
|
+
end
|
189
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
190
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
191
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
192
|
+
end
|
193
|
+
|
194
|
+
self
|
195
|
+
end
|
196
|
+
|
197
|
+
# Deserializes the data based on type
|
198
|
+
# @param string type Data type
|
199
|
+
# @param string value Value to be deserialized
|
200
|
+
# @return [Object] Deserialized data
|
201
|
+
def _deserialize(type, value)
|
202
|
+
case type.to_sym
|
203
|
+
when :DateTime
|
204
|
+
DateTime.parse(value)
|
205
|
+
when :Date
|
206
|
+
Date.parse(value)
|
207
|
+
when :String
|
208
|
+
value.to_s
|
209
|
+
when :Integer
|
210
|
+
value.to_i
|
211
|
+
when :Float
|
212
|
+
value.to_f
|
213
|
+
when :BOOLEAN
|
214
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
215
|
+
true
|
216
|
+
else
|
217
|
+
false
|
218
|
+
end
|
219
|
+
when :Object
|
220
|
+
# generic object (usually a Hash), return directly
|
221
|
+
value
|
222
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
223
|
+
inner_type = Regexp.last_match[:inner_type]
|
224
|
+
value.map { |v| _deserialize(inner_type, v) }
|
225
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
226
|
+
k_type = Regexp.last_match[:k_type]
|
227
|
+
v_type = Regexp.last_match[:v_type]
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each do |k, v|
|
230
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
else # model
|
234
|
+
temp_model = OpenapiClient.const_get(type).new
|
235
|
+
temp_model.build_from_hash(value)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
# Returns the string representation of the object
|
240
|
+
# @return [String] String presentation of the object
|
241
|
+
def to_s
|
242
|
+
to_hash.to_s
|
243
|
+
end
|
244
|
+
|
245
|
+
# to_body is an alias to to_hash (backward compatibility)
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
247
|
+
def to_body
|
248
|
+
to_hash
|
249
|
+
end
|
250
|
+
|
251
|
+
# Returns the object in the form of hash
|
252
|
+
# @return [Hash] Returns the object in the form of hash
|
253
|
+
def to_hash
|
254
|
+
hash = {}
|
255
|
+
self.class.attribute_map.each_pair do |attr, param|
|
256
|
+
value = self.send(attr)
|
257
|
+
next if value.nil?
|
258
|
+
hash[param] = _to_hash(value)
|
259
|
+
end
|
260
|
+
hash
|
261
|
+
end
|
262
|
+
|
263
|
+
# Outputs non-array value in the form of hash
|
264
|
+
# For object, use to_hash. Otherwise, just return the value
|
265
|
+
# @param [Object] value Any valid value
|
266
|
+
# @return [Hash] Returns the value in the form of hash
|
267
|
+
def _to_hash(value)
|
268
|
+
if value.is_a?(Array)
|
269
|
+
value.compact.map { |v| _to_hash(v) }
|
270
|
+
elsif value.is_a?(Hash)
|
271
|
+
{}.tap do |hash|
|
272
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
273
|
+
end
|
274
|
+
elsif value.respond_to? :to_hash
|
275
|
+
value.to_hash
|
276
|
+
else
|
277
|
+
value
|
278
|
+
end
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
@@ -1,30 +1,30 @@
|
|
1
1
|
=begin
|
2
|
-
#Payment Gateway API Specification
|
2
|
+
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#Payment Gateway API for payment processing.
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
|
-
module
|
16
|
-
# Request to create a gateway
|
15
|
+
module OpenapiClient
|
16
|
+
# Request to create a gateway schedule.
|
17
17
|
class PaymentSchedulesRequest
|
18
18
|
# Store ID number.
|
19
19
|
attr_accessor :store_id
|
20
20
|
|
21
21
|
# Order ID used to create recurring payment from existing transaction.
|
22
|
-
attr_accessor :
|
22
|
+
attr_accessor :referenced_order_id
|
23
23
|
|
24
24
|
# Date of mandate signature.
|
25
25
|
attr_accessor :start_date
|
26
26
|
|
27
|
-
# Number of times the recurring
|
27
|
+
# Number of times the recurring pament will process.
|
28
28
|
attr_accessor :number_of_payments
|
29
29
|
|
30
30
|
# Number of failures that can be encountered before re-tries cease.
|
@@ -34,12 +34,11 @@ module SwaggerClient
|
|
34
34
|
attr_accessor :invoice_number
|
35
35
|
|
36
36
|
# Purchase order number.
|
37
|
-
attr_accessor :
|
37
|
+
attr_accessor :purchase_order_number
|
38
38
|
|
39
|
-
# The source of the transaction. The possible values are ECI (if the order was received via email or Internet), MOTO (mail order / telephone order) and RETAIL (face to face).
|
40
39
|
attr_accessor :transaction_origin
|
41
40
|
|
42
|
-
# Dynamic merchant name for the cardholder
|
41
|
+
# Dynamic merchant name for the cardholder's statement.
|
43
42
|
attr_accessor :dynamic_merchant_name
|
44
43
|
|
45
44
|
attr_accessor :frequency
|
@@ -50,68 +49,59 @@ module SwaggerClient
|
|
50
49
|
|
51
50
|
attr_accessor :client_locale
|
52
51
|
|
53
|
-
# Client
|
52
|
+
# Client order ID if supplied by client.
|
54
53
|
attr_accessor :order_id
|
55
54
|
|
56
|
-
|
57
|
-
attr_reader :datatype
|
58
|
-
attr_reader :allowable_values
|
59
|
-
|
60
|
-
def initialize(datatype, allowable_values)
|
61
|
-
@allowable_values = allowable_values.map do |value|
|
62
|
-
case datatype.to_s
|
63
|
-
when /Integer/i
|
64
|
-
value.to_i
|
65
|
-
when /Float/i
|
66
|
-
value.to_f
|
67
|
-
else
|
68
|
-
value
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
55
|
+
attr_accessor :billing
|
72
56
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
57
|
+
attr_accessor :shipping
|
58
|
+
|
59
|
+
# User supplied comments.
|
60
|
+
attr_accessor :comments
|
77
61
|
|
78
62
|
# Attribute mapping from ruby-style variable name to JSON key.
|
79
63
|
def self.attribute_map
|
80
64
|
{
|
81
65
|
:'store_id' => :'storeId',
|
82
|
-
:'
|
66
|
+
:'referenced_order_id' => :'referencedOrderId',
|
83
67
|
:'start_date' => :'startDate',
|
84
68
|
:'number_of_payments' => :'numberOfPayments',
|
85
69
|
:'maximum_failures' => :'maximumFailures',
|
86
70
|
:'invoice_number' => :'invoiceNumber',
|
87
|
-
:'
|
71
|
+
:'purchase_order_number' => :'purchaseOrderNumber',
|
88
72
|
:'transaction_origin' => :'transactionOrigin',
|
89
73
|
:'dynamic_merchant_name' => :'dynamicMerchantName',
|
90
74
|
:'frequency' => :'frequency',
|
91
75
|
:'payment_method' => :'paymentMethod',
|
92
76
|
:'amount' => :'amount',
|
93
77
|
:'client_locale' => :'clientLocale',
|
94
|
-
:'order_id' => :'orderId'
|
78
|
+
:'order_id' => :'orderId',
|
79
|
+
:'billing' => :'billing',
|
80
|
+
:'shipping' => :'shipping',
|
81
|
+
:'comments' => :'comments'
|
95
82
|
}
|
96
83
|
end
|
97
84
|
|
98
85
|
# Attribute type mapping.
|
99
|
-
def self.
|
86
|
+
def self.openapi_types
|
100
87
|
{
|
101
88
|
:'store_id' => :'String',
|
102
|
-
:'
|
89
|
+
:'referenced_order_id' => :'String',
|
103
90
|
:'start_date' => :'Date',
|
104
91
|
:'number_of_payments' => :'Integer',
|
105
92
|
:'maximum_failures' => :'Integer',
|
106
93
|
:'invoice_number' => :'String',
|
107
|
-
:'
|
108
|
-
:'transaction_origin' => :'
|
94
|
+
:'purchase_order_number' => :'String',
|
95
|
+
:'transaction_origin' => :'TransactionOrigin',
|
109
96
|
:'dynamic_merchant_name' => :'String',
|
110
97
|
:'frequency' => :'Frequency',
|
111
98
|
:'payment_method' => :'PaymentMethod',
|
112
99
|
:'amount' => :'Amount',
|
113
100
|
:'client_locale' => :'ClientLocale',
|
114
|
-
:'order_id' => :'String'
|
101
|
+
:'order_id' => :'String',
|
102
|
+
:'billing' => :'Billing',
|
103
|
+
:'shipping' => :'Shipping',
|
104
|
+
:'comments' => :'String'
|
115
105
|
}
|
116
106
|
end
|
117
107
|
|
@@ -121,14 +111,14 @@ module SwaggerClient
|
|
121
111
|
return unless attributes.is_a?(Hash)
|
122
112
|
|
123
113
|
# convert string to symbol for hash key
|
124
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
114
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
125
115
|
|
126
116
|
if attributes.has_key?(:'storeId')
|
127
117
|
self.store_id = attributes[:'storeId']
|
128
118
|
end
|
129
119
|
|
130
|
-
if attributes.has_key?(:'
|
131
|
-
self.
|
120
|
+
if attributes.has_key?(:'referencedOrderId')
|
121
|
+
self.referenced_order_id = attributes[:'referencedOrderId']
|
132
122
|
end
|
133
123
|
|
134
124
|
if attributes.has_key?(:'startDate')
|
@@ -147,8 +137,8 @@ module SwaggerClient
|
|
147
137
|
self.invoice_number = attributes[:'invoiceNumber']
|
148
138
|
end
|
149
139
|
|
150
|
-
if attributes.has_key?(:'
|
151
|
-
self.
|
140
|
+
if attributes.has_key?(:'purchaseOrderNumber')
|
141
|
+
self.purchase_order_number = attributes[:'purchaseOrderNumber']
|
152
142
|
end
|
153
143
|
|
154
144
|
if attributes.has_key?(:'transactionOrigin')
|
@@ -179,53 +169,76 @@ module SwaggerClient
|
|
179
169
|
self.order_id = attributes[:'orderId']
|
180
170
|
end
|
181
171
|
|
172
|
+
if attributes.has_key?(:'billing')
|
173
|
+
self.billing = attributes[:'billing']
|
174
|
+
end
|
175
|
+
|
176
|
+
if attributes.has_key?(:'shipping')
|
177
|
+
self.shipping = attributes[:'shipping']
|
178
|
+
end
|
179
|
+
|
180
|
+
if attributes.has_key?(:'comments')
|
181
|
+
self.comments = attributes[:'comments']
|
182
|
+
end
|
182
183
|
end
|
183
184
|
|
184
185
|
# Show invalid properties with the reasons. Usually used together with valid?
|
185
186
|
# @return Array for valid properties with the reasons
|
186
187
|
def list_invalid_properties
|
187
188
|
invalid_properties = Array.new
|
189
|
+
if !@store_id.nil? && @store_id.to_s.length > 20
|
190
|
+
invalid_properties.push('invalid value for "store_id", the character length must be smaller than or equal to 20.')
|
191
|
+
end
|
192
|
+
|
188
193
|
if !@number_of_payments.nil? && @number_of_payments > 999
|
189
|
-
invalid_properties.push(
|
194
|
+
invalid_properties.push('invalid value for "number_of_payments", must be smaller than or equal to 999.')
|
190
195
|
end
|
191
196
|
|
192
197
|
if !@number_of_payments.nil? && @number_of_payments < 1
|
193
|
-
invalid_properties.push(
|
198
|
+
invalid_properties.push('invalid value for "number_of_payments", must be greater than or equal to 1.')
|
194
199
|
end
|
195
200
|
|
196
201
|
if !@maximum_failures.nil? && @maximum_failures > 999
|
197
|
-
invalid_properties.push(
|
202
|
+
invalid_properties.push('invalid value for "maximum_failures", must be smaller than or equal to 999.')
|
198
203
|
end
|
199
204
|
|
200
205
|
if !@maximum_failures.nil? && @maximum_failures < 1
|
201
|
-
invalid_properties.push(
|
206
|
+
invalid_properties.push('invalid value for "maximum_failures", must be greater than or equal to 1.')
|
202
207
|
end
|
203
208
|
|
204
|
-
|
209
|
+
invalid_properties
|
205
210
|
end
|
206
211
|
|
207
212
|
# Check to see if the all the properties in the model are valid
|
208
213
|
# @return true if the model is valid
|
209
214
|
def valid?
|
215
|
+
return false if !@store_id.nil? && @store_id.to_s.length > 20
|
210
216
|
return false if !@number_of_payments.nil? && @number_of_payments > 999
|
211
217
|
return false if !@number_of_payments.nil? && @number_of_payments < 1
|
212
218
|
return false if !@maximum_failures.nil? && @maximum_failures > 999
|
213
219
|
return false if !@maximum_failures.nil? && @maximum_failures < 1
|
214
|
-
|
215
|
-
|
216
|
-
|
220
|
+
true
|
221
|
+
end
|
222
|
+
|
223
|
+
# Custom attribute writer method with validation
|
224
|
+
# @param [Object] store_id Value to be assigned
|
225
|
+
def store_id=(store_id)
|
226
|
+
if !store_id.nil? && store_id.to_s.length > 20
|
227
|
+
fail ArgumentError, 'invalid value for "store_id", the character length must be smaller than or equal to 20.'
|
228
|
+
end
|
229
|
+
|
230
|
+
@store_id = store_id
|
217
231
|
end
|
218
232
|
|
219
233
|
# Custom attribute writer method with validation
|
220
234
|
# @param [Object] number_of_payments Value to be assigned
|
221
235
|
def number_of_payments=(number_of_payments)
|
222
|
-
|
223
236
|
if !number_of_payments.nil? && number_of_payments > 999
|
224
|
-
fail ArgumentError,
|
237
|
+
fail ArgumentError, 'invalid value for "number_of_payments", must be smaller than or equal to 999.'
|
225
238
|
end
|
226
239
|
|
227
240
|
if !number_of_payments.nil? && number_of_payments < 1
|
228
|
-
fail ArgumentError,
|
241
|
+
fail ArgumentError, 'invalid value for "number_of_payments", must be greater than or equal to 1.'
|
229
242
|
end
|
230
243
|
|
231
244
|
@number_of_payments = number_of_payments
|
@@ -234,47 +247,39 @@ module SwaggerClient
|
|
234
247
|
# Custom attribute writer method with validation
|
235
248
|
# @param [Object] maximum_failures Value to be assigned
|
236
249
|
def maximum_failures=(maximum_failures)
|
237
|
-
|
238
250
|
if !maximum_failures.nil? && maximum_failures > 999
|
239
|
-
fail ArgumentError,
|
251
|
+
fail ArgumentError, 'invalid value for "maximum_failures", must be smaller than or equal to 999.'
|
240
252
|
end
|
241
253
|
|
242
254
|
if !maximum_failures.nil? && maximum_failures < 1
|
243
|
-
fail ArgumentError,
|
255
|
+
fail ArgumentError, 'invalid value for "maximum_failures", must be greater than or equal to 1.'
|
244
256
|
end
|
245
257
|
|
246
258
|
@maximum_failures = maximum_failures
|
247
259
|
end
|
248
260
|
|
249
|
-
# Custom attribute writer method checking allowed values (enum).
|
250
|
-
# @param [Object] transaction_origin Object to be assigned
|
251
|
-
def transaction_origin=(transaction_origin)
|
252
|
-
validator = EnumAttributeValidator.new('String', ["ECI", "MOTO", "RETAIL"])
|
253
|
-
unless validator.valid?(transaction_origin)
|
254
|
-
fail ArgumentError, "invalid value for 'transaction_origin', must be one of #{validator.allowable_values}."
|
255
|
-
end
|
256
|
-
@transaction_origin = transaction_origin
|
257
|
-
end
|
258
|
-
|
259
261
|
# Checks equality by comparing each attribute.
|
260
262
|
# @param [Object] Object to be compared
|
261
263
|
def ==(o)
|
262
264
|
return true if self.equal?(o)
|
263
265
|
self.class == o.class &&
|
264
266
|
store_id == o.store_id &&
|
265
|
-
|
267
|
+
referenced_order_id == o.referenced_order_id &&
|
266
268
|
start_date == o.start_date &&
|
267
269
|
number_of_payments == o.number_of_payments &&
|
268
270
|
maximum_failures == o.maximum_failures &&
|
269
271
|
invoice_number == o.invoice_number &&
|
270
|
-
|
272
|
+
purchase_order_number == o.purchase_order_number &&
|
271
273
|
transaction_origin == o.transaction_origin &&
|
272
274
|
dynamic_merchant_name == o.dynamic_merchant_name &&
|
273
275
|
frequency == o.frequency &&
|
274
276
|
payment_method == o.payment_method &&
|
275
277
|
amount == o.amount &&
|
276
278
|
client_locale == o.client_locale &&
|
277
|
-
order_id == o.order_id
|
279
|
+
order_id == o.order_id &&
|
280
|
+
billing == o.billing &&
|
281
|
+
shipping == o.shipping &&
|
282
|
+
comments == o.comments
|
278
283
|
end
|
279
284
|
|
280
285
|
# @see the `==` method
|
@@ -286,7 +291,7 @@ module SwaggerClient
|
|
286
291
|
# Calculates hash code according to all attributes.
|
287
292
|
# @return [Fixnum] Hash code
|
288
293
|
def hash
|
289
|
-
[store_id,
|
294
|
+
[store_id, referenced_order_id, start_date, number_of_payments, maximum_failures, invoice_number, purchase_order_number, transaction_origin, dynamic_merchant_name, frequency, payment_method, amount, client_locale, order_id, billing, shipping, comments].hash
|
290
295
|
end
|
291
296
|
|
292
297
|
# Builds the object from hash
|
@@ -294,12 +299,12 @@ module SwaggerClient
|
|
294
299
|
# @return [Object] Returns the model itself
|
295
300
|
def build_from_hash(attributes)
|
296
301
|
return nil unless attributes.is_a?(Hash)
|
297
|
-
self.class.
|
302
|
+
self.class.openapi_types.each_pair do |key, type|
|
298
303
|
if type =~ /\AArray<(.*)>/i
|
299
304
|
# check to ensure the input is an array given that the the attribute
|
300
305
|
# is documented as an array but the input is not
|
301
306
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
302
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
307
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
303
308
|
end
|
304
309
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
305
310
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -346,7 +351,7 @@ module SwaggerClient
|
|
346
351
|
end
|
347
352
|
end
|
348
353
|
else # model
|
349
|
-
temp_model =
|
354
|
+
temp_model = OpenapiClient.const_get(type).new
|
350
355
|
temp_model.build_from_hash(value)
|
351
356
|
end
|
352
357
|
end
|
@@ -381,7 +386,7 @@ module SwaggerClient
|
|
381
386
|
# @return [Hash] Returns the value in the form of hash
|
382
387
|
def _to_hash(value)
|
383
388
|
if value.is_a?(Array)
|
384
|
-
value.compact.map{ |v| _to_hash(v) }
|
389
|
+
value.compact.map { |v| _to_hash(v) }
|
385
390
|
elsif value.is_a?(Hash)
|
386
391
|
{}.tap do |hash|
|
387
392
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -392,7 +397,5 @@ module SwaggerClient
|
|
392
397
|
value
|
393
398
|
end
|
394
399
|
end
|
395
|
-
|
396
400
|
end
|
397
|
-
|
398
401
|
end
|