first_data_gateway 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +79 -0
- data/README.md +69 -39
- data/docs/AVSResponse.md +2 -2
- data/docs/AccessTokenResponse.md +2 -2
- data/docs/AccountUpdaterResponse.md +12 -0
- data/docs/AdditionalAmountRate.md +2 -2
- data/docs/AdditionalDetails.md +10 -0
- data/docs/AdditionalTransactionDetails.md +3 -3
- data/docs/Address.md +7 -7
- data/docs/Airline.md +12 -12
- data/docs/AirlineAncillaryServiceCategory.md +1 -1
- data/docs/AirlineTravelRoute.md +4 -4
- data/docs/AliPay.md +2 -2
- data/docs/{SecondaryTransactionAdditionalDetails.md → AliPayPaymentMethod.md} +2 -2
- data/docs/AliPaySaleTransaction.md +14 -0
- data/docs/Amount.md +2 -2
- data/docs/AmountComponents.md +6 -7
- data/docs/Authentication.md +8 -0
- data/docs/AuthenticationApi.md +12 -12
- data/docs/AuthenticationRedirect.md +10 -0
- data/docs/AuthenticationRedirectParams.md +10 -0
- data/docs/AuthenticationVerificationRequest.md +11 -0
- data/docs/BasicResponse.md +1 -1
- data/docs/Billing.md +3 -5
- data/docs/BillingAddress.md +4 -4
- data/docs/BillingAddressPhone.md +1 -1
- data/docs/CarRental.md +6 -6
- data/docs/CarRentalExtraCharges.md +1 -1
- data/docs/Card.md +6 -6
- data/docs/CardFunction.md +7 -0
- data/docs/CardInfo.md +2 -2
- data/docs/CardInfoLookupApi.md +14 -14
- data/docs/CardInfoLookupResponse.md +1 -1
- data/docs/CardVerificationApi.md +12 -12
- data/docs/CardVerificationRequest.md +1 -0
- data/docs/ChinaDomesticPaymentMethod.md +9 -0
- data/docs/ChinaPnRSaleTransaction.md +14 -0
- data/docs/ClientLocale.md +2 -2
- data/docs/Contact.md +4 -4
- data/docs/CreatePaymentToken.md +10 -0
- data/docs/CurrencyConversion.md +9 -0
- data/docs/CurrencyConversionApi.md +15 -15
- data/docs/Customer.md +6 -6
- data/docs/CustomerAddress.md +3 -3
- data/docs/CustomerAddressPhone.md +1 -1
- data/docs/DCCExchangeRateRequest.md +11 -0
- data/docs/Dcc.md +2 -1
- data/docs/Device.md +2 -2
- data/docs/DeviceNetworks.md +1 -1
- data/docs/Document.md +2 -2
- data/docs/DynamicPricing.md +11 -0
- data/docs/DynamicPricingExchangeRateRequest.md +11 -0
- data/docs/ErrorResponse.md +1 -1
- data/docs/ExchangeRateRequest.md +2 -4
- data/docs/ExchangeRateResponse.md +11 -11
- data/docs/Expiration.md +2 -2
- data/docs/FraudDetectApi.md +12 -12
- data/docs/FraudOrderItems.md +1 -1
- data/docs/FraudOrderShipToAddress.md +6 -6
- data/docs/Frequency.md +2 -2
- data/docs/InstallmentOptions.md +5 -3
- data/docs/Lodging.md +5 -5
- data/docs/MerchantLocationMerchantAddress.md +6 -6
- data/docs/Order.md +5 -0
- data/docs/OrderApi.md +36 -102
- data/docs/OrderErrorResponse.md +4 -5
- data/docs/OrderResponse.md +4 -5
- data/docs/PayPal.md +1 -1
- data/docs/PayPalPaymentMethod.md +8 -0
- data/docs/PaymentApi.md +67 -193
- data/docs/PaymentCard.md +8 -11
- data/docs/PaymentCardCreditTransaction.md +15 -0
- data/docs/PaymentCardForcedTicketTransaction.md +15 -0
- data/docs/PaymentCardPayerAuthTransaction.md +15 -0
- data/docs/PaymentCardPaymentMethod.md +9 -0
- data/docs/PaymentCardPaymentTokenizationRequest.md +13 -0
- data/docs/PaymentCardPreAuthTransaction.md +18 -0
- data/docs/PaymentCardSaleTransaction.md +18 -0
- data/docs/PaymentFacilitator.md +4 -4
- data/docs/PaymentMethod.md +0 -7
- data/docs/PaymentMethodDetails.md +9 -0
- data/docs/PaymentMethodPaymentSchedulesRequest.md +24 -0
- data/docs/PaymentMethodType.md +7 -0
- data/docs/PaymentPayMethod.md +1 -1
- data/docs/PaymentSchedulesApi.md +58 -58
- data/docs/PaymentSchedulesErrorResponse.md +1 -1
- data/docs/PaymentSchedulesRequest.md +5 -6
- data/docs/PaymentSchedulesResponse.md +1 -1
- data/docs/PaymentTokenApi.md +23 -23
- data/docs/PaymentTokenCreditTransaction.md +15 -0
- data/docs/PaymentTokenDetails.md +14 -0
- data/docs/PaymentTokenPaymentMethod.md +9 -0
- data/docs/PaymentTokenPreAuthTransaction.md +17 -0
- data/docs/PaymentTokenSaleTransaction.md +17 -0
- data/docs/PaymentTokenizationErrorResponse.md +8 -8
- data/docs/PaymentTokenizationRequest.md +4 -3
- data/docs/PaymentTokenizationResponse.md +8 -8
- data/docs/PaymentURLApi.md +12 -12
- data/docs/PaymentUrlErrorResponse.md +3 -3
- data/docs/PaymentUrlRequest.md +3 -3
- data/docs/PaymentUrlResponse.md +3 -3
- data/docs/PaymentVerification3ds.md +3 -3
- data/docs/PaymentVerificationAvs.md +3 -3
- data/docs/PaymentVerificationCvv.md +3 -3
- data/docs/PaypalCreditTransaction.md +14 -0
- data/docs/PostAuthTransaction.md +14 -0
- data/docs/PrimaryTransaction.md +3 -12
- data/docs/ProcessorData.md +8 -6
- data/docs/PurchaseCardsLevel2.md +3 -3
- data/docs/PurchaseCardsLevel3.md +1 -1
- data/docs/PurchaseCardsLevel3LineItems.md +8 -8
- data/docs/RecurringPaymentDetails.md +2 -2
- data/docs/RecurringPaymentDetailsResponse.md +4 -5
- data/docs/ReferencedOrderPaymentSchedulesRequest.md +24 -0
- data/docs/ReferencedOrderPaymentTokenizationRequest.md +13 -0
- data/docs/ResponseAmountComponents.md +14 -0
- data/docs/ReturnTransaction.md +13 -0
- data/docs/ScoreOnlyRequest.md +1 -1
- data/docs/ScoreOnlyResponse.md +3 -3
- data/docs/ScoreOnlyResponseFraudScore.md +1 -1
- data/docs/ScoreOnlyResponseFraudScoreExplanations.md +3 -3
- data/docs/SecondaryTransaction.md +3 -5
- data/docs/Secure3dAuthenticationRequest.md +8 -0
- data/docs/Secure3dAuthenticationResult.md +12 -0
- data/docs/Secure3dAuthenticationVerificationRequest.md +13 -0
- data/docs/Secure3dResponse.md +1 -1
- data/docs/Sepa.md +4 -4
- data/docs/SepaMandate.md +2 -2
- data/docs/SepaPaymentMethod.md +8 -0
- data/docs/SepaSaleTransaction.md +14 -0
- data/docs/Shipping.md +1 -1
- data/docs/SoftDescriptor.md +2 -2
- data/docs/SplitShipment.md +1 -1
- data/docs/StoredCredential.md +4 -4
- data/docs/SubMerchantData.md +4 -4
- data/docs/SubMerchantSplit.md +9 -0
- data/docs/Transaction.md +4 -4
- data/docs/TransactionErrorResponse.md +11 -10
- data/docs/TransactionResponse.md +11 -10
- data/docs/UnionPayAuthenticationRequest.md +9 -0
- data/docs/UnionPayAuthenticationVerificationRequest.md +12 -0
- data/docs/UsePaymentToken.md +10 -0
- data/docs/VoidTransaction.md +10 -0
- data/first_data_gateway.gemspec +3 -2
- data/lib/openapi_client/api/authentication_api.rb +18 -18
- data/lib/openapi_client/api/card_info_lookup_api.rb +15 -15
- data/lib/openapi_client/api/card_verification_api.rb +13 -13
- data/lib/openapi_client/api/currency_conversion_api.rb +17 -17
- data/lib/openapi_client/api/fraud_detect_api.rb +13 -17
- data/lib/openapi_client/api/order_api.rb +45 -153
- data/lib/openapi_client/api/payment_api.rb +88 -287
- data/lib/openapi_client/api/payment_schedules_api.rb +61 -63
- data/lib/openapi_client/api/payment_token_api.rb +24 -24
- data/lib/openapi_client/api/payment_url_api.rb +13 -13
- data/lib/openapi_client/api_client.rb +2 -2
- data/lib/openapi_client/api_error.rb +2 -2
- data/lib/openapi_client/configuration.rb +4 -4
- data/lib/openapi_client/models/access_token_response.rb +5 -5
- data/lib/openapi_client/models/account_updater_response.rb +225 -0
- data/lib/openapi_client/models/additional_amount_rate.rb +15 -4
- data/lib/openapi_client/models/{primary_transaction_additional_details.rb → additional_details.rb} +11 -113
- data/lib/openapi_client/models/additional_transaction_details.rb +6 -6
- data/lib/openapi_client/models/address.rb +9 -9
- data/lib/openapi_client/models/airline.rb +15 -15
- data/lib/openapi_client/models/airline_ancillary_service_category.rb +7 -2
- data/lib/openapi_client/models/airline_travel_route.rb +7 -6
- data/lib/openapi_client/models/ali_pay.rb +4 -4
- data/lib/openapi_client/models/{referenced_order.rb → ali_pay_payment_method.rb} +16 -20
- data/lib/openapi_client/models/ali_pay_sale_transaction.rb +286 -0
- data/lib/openapi_client/models/amount.rb +5 -5
- data/lib/openapi_client/models/amount_components.rb +13 -23
- data/lib/openapi_client/models/authentication.rb +190 -0
- data/lib/openapi_client/models/{authentication_request.rb → authentication_redirect.rb} +24 -20
- data/lib/openapi_client/models/authentication_redirect_params.rb +205 -0
- data/lib/openapi_client/models/authentication_verification_request.rb +234 -0
- data/lib/openapi_client/models/avs_response.rb +4 -2
- data/lib/openapi_client/models/basic_response.rb +2 -7
- data/lib/openapi_client/models/billing.rb +7 -76
- data/lib/openapi_client/models/billing_address.rb +7 -7
- data/lib/openapi_client/models/billing_address_phone.rb +4 -4
- data/lib/openapi_client/models/car_rental.rb +9 -9
- data/lib/openapi_client/models/car_rental_extra_charges.rb +3 -3
- data/lib/openapi_client/models/card.rb +9 -8
- data/lib/openapi_client/models/card_function.rb +33 -0
- data/lib/openapi_client/models/card_info.rb +4 -17
- data/lib/openapi_client/models/card_info_lookup_request.rb +3 -3
- data/lib/openapi_client/models/card_info_lookup_response.rb +2 -7
- data/lib/openapi_client/models/card_verification_request.rb +32 -7
- data/lib/openapi_client/models/china_domestic.rb +2 -2
- data/lib/openapi_client/models/{authentication_response_verification.rb → china_domestic_payment_method.rb} +33 -48
- data/lib/openapi_client/models/china_pn_r_sale_transaction.rb +286 -0
- data/lib/openapi_client/models/client_locale.rb +5 -5
- data/lib/openapi_client/models/contact.rb +7 -6
- data/lib/openapi_client/models/create_payment_token.rb +209 -0
- data/lib/openapi_client/models/{authentication_response_verification_request.rb → currency_conversion.rb} +29 -35
- data/lib/openapi_client/models/customer.rb +9 -9
- data/lib/openapi_client/models/customer_address.rb +6 -6
- data/lib/openapi_client/models/customer_address_phone.rb +4 -4
- data/lib/openapi_client/models/dcc.rb +24 -4
- data/lib/openapi_client/models/dcc_exchange_rate_request.rb +273 -0
- data/lib/openapi_client/models/device.rb +4 -3
- data/lib/openapi_client/models/device_networks.rb +4 -3
- data/lib/openapi_client/models/document.rb +4 -4
- data/lib/openapi_client/models/dynamic_pricing.rb +235 -0
- data/lib/openapi_client/models/dynamic_pricing_exchange_rate_request.rb +273 -0
- data/lib/openapi_client/models/error.rb +2 -2
- data/lib/openapi_client/models/error_details.rb +2 -2
- data/lib/openapi_client/models/error_response.rb +2 -7
- data/lib/openapi_client/models/exchange_rate_request.rb +26 -103
- data/lib/openapi_client/models/exchange_rate_response.rb +20 -25
- data/lib/openapi_client/models/expiration.rb +5 -5
- data/lib/openapi_client/models/fraud_order.rb +2 -2
- data/lib/openapi_client/models/fraud_order_items.rb +4 -2
- data/lib/openapi_client/models/fraud_order_ship_to_address.rb +8 -8
- data/lib/openapi_client/models/frequency.rb +5 -5
- data/lib/openapi_client/models/industry_specific_extensions.rb +3 -3
- data/lib/openapi_client/models/installment_options.rb +63 -9
- data/lib/openapi_client/models/lodging.rb +8 -8
- data/lib/openapi_client/models/lodging_extra_charges.rb +2 -2
- data/lib/openapi_client/models/loyalty.rb +2 -2
- data/lib/openapi_client/models/merchant.rb +2 -2
- data/lib/openapi_client/models/merchant_location.rb +2 -2
- data/lib/openapi_client/models/merchant_location_merchant_address.rb +9 -9
- data/lib/openapi_client/models/order.rb +52 -7
- data/lib/openapi_client/models/order_error_response.rb +6 -21
- data/lib/openapi_client/models/order_response.rb +7 -22
- data/lib/openapi_client/models/pay_pal.rb +3 -3
- data/lib/openapi_client/models/pay_pal_payment_method.rb +189 -0
- data/lib/openapi_client/models/payment.rb +2 -2
- data/lib/openapi_client/models/payment_card.rb +38 -58
- data/lib/openapi_client/models/payment_card_credit_transaction.rb +295 -0
- data/lib/openapi_client/models/payment_card_forced_ticket_transaction.rb +320 -0
- data/lib/openapi_client/models/payment_card_payer_auth_transaction.rb +295 -0
- data/lib/openapi_client/models/payment_card_payment_method.rb +198 -0
- data/lib/openapi_client/models/payment_card_payment_tokenization_request.rb +264 -0
- data/lib/openapi_client/models/payment_card_pre_auth_transaction.rb +325 -0
- data/lib/openapi_client/models/payment_card_sale_transaction.rb +325 -0
- data/lib/openapi_client/models/payment_facilitator.rb +7 -7
- data/lib/openapi_client/models/payment_issuer_response.rb +2 -2
- data/lib/openapi_client/models/payment_method.rb +5 -108
- data/lib/openapi_client/models/{basket_item.rb → payment_method_details.rb} +17 -38
- data/lib/openapi_client/models/payment_method_payment_schedules_request.rb +426 -0
- data/lib/openapi_client/models/payment_method_type.rb +47 -0
- data/lib/openapi_client/models/payment_pay_method.rb +4 -4
- data/lib/openapi_client/models/payment_schedules_error_response.rb +2 -7
- data/lib/openapi_client/models/payment_schedules_request.rb +41 -30
- data/lib/openapi_client/models/payment_schedules_response.rb +2 -7
- data/lib/openapi_client/models/payment_token_credit_transaction.rb +295 -0
- data/lib/openapi_client/models/{payment_tokenization.rb → payment_token_details.rb} +18 -96
- data/lib/openapi_client/models/payment_token_payment_method.rb +198 -0
- data/lib/openapi_client/models/payment_token_pre_auth_transaction.rb +316 -0
- data/lib/openapi_client/models/payment_token_sale_transaction.rb +316 -0
- data/lib/openapi_client/models/payment_tokenization_error_response.rb +10 -15
- data/lib/openapi_client/models/payment_tokenization_request.rb +60 -61
- data/lib/openapi_client/models/payment_tokenization_response.rb +10 -15
- data/lib/openapi_client/models/payment_url_error_response.rb +4 -9
- data/lib/openapi_client/models/payment_url_request.rb +11 -16
- data/lib/openapi_client/models/payment_url_response.rb +4 -9
- data/lib/openapi_client/models/payment_verification3ds.rb +5 -5
- data/lib/openapi_client/models/payment_verification_avs.rb +5 -5
- data/lib/openapi_client/models/payment_verification_cvv.rb +5 -5
- data/lib/openapi_client/models/paypal_credit_transaction.rb +286 -0
- data/lib/openapi_client/models/post_auth_transaction.rb +266 -0
- data/lib/openapi_client/models/primary_transaction.rb +30 -118
- data/lib/openapi_client/models/processor_data.rb +48 -7
- data/lib/openapi_client/models/purchase_cards.rb +3 -2
- data/lib/openapi_client/models/purchase_cards_level2.rb +6 -5
- data/lib/openapi_client/models/purchase_cards_level3.rb +9 -3
- data/lib/openapi_client/models/purchase_cards_level3_line_items.rb +16 -16
- data/lib/openapi_client/models/recurring_payment_details.rb +15 -15
- data/lib/openapi_client/models/recurring_payment_details_response.rb +6 -21
- data/lib/openapi_client/models/referenced_order_payment_schedules_request.rb +427 -0
- data/lib/openapi_client/models/referenced_order_payment_tokenization_request.rb +265 -0
- data/lib/openapi_client/models/response_amount_components.rb +245 -0
- data/lib/openapi_client/models/response_type.rb +2 -2
- data/lib/openapi_client/models/return_transaction.rb +257 -0
- data/lib/openapi_client/models/score_only_request.rb +4 -4
- data/lib/openapi_client/models/score_only_response.rb +6 -5
- data/lib/openapi_client/models/score_only_response_fraud_score.rb +4 -3
- data/lib/openapi_client/models/score_only_response_fraud_score_explanations.rb +5 -2
- data/lib/openapi_client/models/secondary_transaction.rb +45 -40
- data/lib/openapi_client/models/secure3d_authentication_request.rb +190 -0
- data/lib/openapi_client/models/{payment_card_authentication_result.rb → secure3d_authentication_result.rb} +34 -41
- data/lib/openapi_client/models/secure3d_authentication_verification_request.rb +264 -0
- data/lib/openapi_client/models/secure3d_response.rb +4 -3
- data/lib/openapi_client/models/sepa.rb +6 -6
- data/lib/openapi_client/models/sepa_mandate.rb +5 -5
- data/lib/openapi_client/models/{secondary_transaction_additional_details.rb → sepa_payment_method.rb} +16 -10
- data/lib/openapi_client/models/sepa_sale_transaction.rb +286 -0
- data/lib/openapi_client/models/shipping.rb +4 -3
- data/lib/openapi_client/models/soft_descriptor.rb +15 -15
- data/lib/openapi_client/models/split_shipment.rb +4 -4
- data/lib/openapi_client/models/stored_credential.rb +7 -7
- data/lib/openapi_client/models/sub_merchant_data.rb +7 -7
- data/lib/openapi_client/models/sub_merchant_split.rb +233 -0
- data/lib/openapi_client/models/transaction.rb +18 -18
- data/lib/openapi_client/models/transaction_error_response.rb +28 -24
- data/lib/openapi_client/models/transaction_origin.rb +2 -2
- data/lib/openapi_client/models/transaction_response.rb +32 -28
- data/lib/openapi_client/models/transaction_type.rb +2 -2
- data/lib/openapi_client/models/union_pay_authentication_request.rb +224 -0
- data/lib/openapi_client/models/union_pay_authentication_verification_request.rb +249 -0
- data/lib/openapi_client/models/use_payment_token.rb +233 -0
- data/lib/openapi_client/models/{card_verifications_transaction.rb → void_transaction.rb} +28 -17
- data/lib/openapi_client/version.rb +3 -3
- data/lib/openapi_client.rb +50 -12
- data/lib/simple/gateway.rb +8 -59
- data/lib/simple_client.rb +4 -4
- data/spec/api/authentication_api_spec.rb +7 -7
- data/spec/api/card_info_lookup_api_spec.rb +8 -8
- data/spec/api/card_verification_api_spec.rb +7 -7
- data/spec/api/currency_conversion_api_spec.rb +9 -9
- data/spec/api/fraud_detect_api_spec.rb +7 -7
- data/spec/api/order_api_spec.rb +19 -40
- data/spec/api/payment_api_spec.rb +33 -72
- data/spec/api/payment_schedules_api_spec.rb +29 -29
- data/spec/api/payment_token_api_spec.rb +12 -12
- data/spec/api/payment_url_api_spec.rb +7 -7
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/access_token_response_spec.rb +2 -2
- data/spec/models/account_updater_response_spec.rb +65 -0
- data/spec/models/additional_amount_rate_spec.rb +2 -2
- data/spec/models/additional_details_spec.rb +53 -0
- data/spec/models/additional_transaction_details_spec.rb +2 -2
- data/spec/models/address_spec.rb +2 -2
- data/spec/models/airline_ancillary_service_category_spec.rb +2 -2
- data/spec/models/airline_spec.rb +2 -2
- data/spec/models/airline_travel_route_spec.rb +2 -2
- data/spec/models/ali_pay_payment_method_spec.rb +41 -0
- data/spec/models/ali_pay_sale_transaction_spec.rb +77 -0
- data/spec/models/ali_pay_spec.rb +2 -2
- data/spec/models/amount_components_spec.rb +2 -8
- data/spec/models/amount_spec.rb +2 -2
- data/spec/models/authentication_redirect_params_spec.rb +53 -0
- data/spec/models/{authentication_response_verification_spec.rb → authentication_redirect_spec.rb} +11 -17
- data/spec/models/authentication_spec.rb +41 -0
- data/spec/models/{authentication_response_verification_request_spec.rb → authentication_verification_request_spec.rb} +11 -11
- data/spec/models/avs_response_spec.rb +2 -2
- data/spec/models/basic_response_spec.rb +2 -2
- data/spec/models/billing_address_phone_spec.rb +2 -2
- data/spec/models/billing_address_spec.rb +2 -2
- data/spec/models/billing_spec.rb +2 -18
- data/spec/models/car_rental_extra_charges_spec.rb +2 -2
- data/spec/models/car_rental_spec.rb +2 -2
- data/spec/models/card_function_spec.rb +35 -0
- data/spec/models/card_info_lookup_request_spec.rb +2 -2
- data/spec/models/card_info_lookup_response_spec.rb +2 -2
- data/spec/models/card_info_spec.rb +2 -6
- data/spec/models/card_spec.rb +2 -2
- data/spec/models/card_verification_request_spec.rb +8 -2
- data/spec/models/china_domestic_payment_method_spec.rb +51 -0
- data/spec/models/china_domestic_spec.rb +2 -2
- data/spec/models/china_pn_r_sale_transaction_spec.rb +77 -0
- data/spec/models/client_locale_spec.rb +2 -2
- data/spec/models/contact_spec.rb +2 -2
- data/spec/models/create_payment_token_spec.rb +53 -0
- data/spec/models/currency_conversion_spec.rb +47 -0
- data/spec/models/customer_address_phone_spec.rb +2 -2
- data/spec/models/customer_address_spec.rb +2 -2
- data/spec/models/customer_spec.rb +2 -2
- data/spec/models/dcc_exchange_rate_request_spec.rb +59 -0
- data/spec/models/dcc_spec.rb +8 -2
- data/spec/models/device_networks_spec.rb +2 -2
- data/spec/models/device_spec.rb +2 -2
- data/spec/models/document_spec.rb +2 -2
- data/spec/models/dynamic_pricing_exchange_rate_request_spec.rb +59 -0
- data/spec/models/{basket_item_spec.rb → dynamic_pricing_spec.rb} +12 -12
- data/spec/models/error_details_spec.rb +2 -2
- data/spec/models/error_response_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/exchange_rate_request_spec.rb +4 -20
- data/spec/models/exchange_rate_response_spec.rb +3 -3
- data/spec/models/expiration_spec.rb +2 -2
- data/spec/models/fraud_order_items_spec.rb +2 -2
- data/spec/models/fraud_order_ship_to_address_spec.rb +2 -2
- data/spec/models/fraud_order_spec.rb +2 -2
- data/spec/models/frequency_spec.rb +2 -2
- data/spec/models/industry_specific_extensions_spec.rb +2 -2
- data/spec/models/installment_options_spec.rb +18 -2
- data/spec/models/lodging_extra_charges_spec.rb +2 -2
- data/spec/models/lodging_spec.rb +2 -2
- data/spec/models/loyalty_spec.rb +2 -2
- data/spec/models/merchant_location_merchant_address_spec.rb +2 -2
- data/spec/models/merchant_location_spec.rb +2 -2
- data/spec/models/merchant_spec.rb +2 -2
- data/spec/models/order_error_response_spec.rb +2 -8
- data/spec/models/order_response_spec.rb +2 -8
- data/spec/models/order_spec.rb +32 -2
- data/spec/models/pay_pal_payment_method_spec.rb +41 -0
- data/spec/models/pay_pal_spec.rb +2 -2
- data/spec/models/payment_card_credit_transaction_spec.rb +83 -0
- data/spec/models/{primary_transaction_additional_details_spec.rb → payment_card_forced_ticket_transaction_spec.rb} +16 -22
- data/spec/models/payment_card_payer_auth_transaction_spec.rb +83 -0
- data/spec/models/payment_card_payment_method_spec.rb +47 -0
- data/spec/models/payment_card_payment_tokenization_request_spec.rb +71 -0
- data/spec/models/payment_card_pre_auth_transaction_spec.rb +101 -0
- data/spec/models/payment_card_sale_transaction_spec.rb +101 -0
- data/spec/models/payment_card_spec.rb +3 -21
- data/spec/models/payment_facilitator_spec.rb +2 -2
- data/spec/models/payment_issuer_response_spec.rb +2 -2
- data/spec/models/payment_method_details_spec.rb +47 -0
- data/spec/models/payment_method_payment_schedules_request_spec.rb +137 -0
- data/spec/models/payment_method_spec.rb +2 -48
- data/spec/models/payment_method_type_spec.rb +35 -0
- data/spec/models/payment_pay_method_spec.rb +2 -2
- data/spec/models/payment_schedules_error_response_spec.rb +2 -2
- data/spec/models/payment_schedules_request_spec.rb +5 -11
- data/spec/models/payment_schedules_response_spec.rb +2 -2
- data/spec/models/payment_spec.rb +2 -2
- data/spec/models/payment_token_credit_transaction_spec.rb +83 -0
- data/spec/models/{payment_tokenization_spec.rb → payment_token_details_spec.rb} +9 -25
- data/spec/models/payment_token_payment_method_spec.rb +47 -0
- data/spec/models/payment_token_pre_auth_transaction_spec.rb +95 -0
- data/spec/models/payment_token_sale_transaction_spec.rb +95 -0
- data/spec/models/payment_tokenization_error_response_spec.rb +2 -2
- data/spec/models/payment_tokenization_request_spec.rb +12 -10
- data/spec/models/payment_tokenization_response_spec.rb +2 -2
- data/spec/models/payment_url_error_response_spec.rb +2 -2
- data/spec/models/payment_url_request_spec.rb +3 -3
- data/spec/models/payment_url_response_spec.rb +2 -2
- data/spec/models/payment_verification3ds_spec.rb +2 -2
- data/spec/models/payment_verification_avs_spec.rb +2 -2
- data/spec/models/payment_verification_cvv_spec.rb +2 -2
- data/spec/models/paypal_credit_transaction_spec.rb +77 -0
- data/spec/models/post_auth_transaction_spec.rb +77 -0
- data/spec/models/primary_transaction_spec.rb +5 -59
- data/spec/models/processor_data_spec.rb +14 -2
- data/spec/models/purchase_cards_level2_spec.rb +2 -2
- data/spec/models/purchase_cards_level3_line_items_spec.rb +3 -3
- data/spec/models/purchase_cards_level3_spec.rb +2 -2
- data/spec/models/purchase_cards_spec.rb +2 -2
- data/spec/models/recurring_payment_details_response_spec.rb +2 -8
- data/spec/models/recurring_payment_details_spec.rb +4 -4
- data/spec/models/referenced_order_payment_schedules_request_spec.rb +137 -0
- data/spec/models/referenced_order_payment_tokenization_request_spec.rb +71 -0
- data/spec/models/response_amount_components_spec.rb +77 -0
- data/spec/models/response_type_spec.rb +2 -2
- data/spec/models/return_transaction_spec.rb +71 -0
- data/spec/models/score_only_request_spec.rb +2 -2
- data/spec/models/score_only_response_fraud_score_explanations_spec.rb +2 -2
- data/spec/models/score_only_response_fraud_score_spec.rb +2 -2
- data/spec/models/score_only_response_spec.rb +2 -2
- data/spec/models/secondary_transaction_spec.rb +5 -17
- data/spec/models/secure3d_authentication_request_spec.rb +41 -0
- data/spec/models/{payment_card_authentication_result_spec.rb → secure3d_authentication_result_spec.rb} +11 -15
- data/spec/models/secure3d_authentication_verification_request_spec.rb +71 -0
- data/spec/models/secure3d_response_spec.rb +2 -2
- data/spec/models/sepa_mandate_spec.rb +2 -2
- data/spec/models/sepa_payment_method_spec.rb +41 -0
- data/spec/models/sepa_sale_transaction_spec.rb +77 -0
- data/spec/models/sepa_spec.rb +2 -2
- data/spec/models/shipping_spec.rb +2 -2
- data/spec/models/soft_descriptor_spec.rb +3 -3
- data/spec/models/split_shipment_spec.rb +2 -2
- data/spec/models/stored_credential_spec.rb +2 -2
- data/spec/models/sub_merchant_data_spec.rb +2 -2
- data/spec/models/{card_verifications_transaction_spec.rb → sub_merchant_split_spec.rb} +10 -10
- data/spec/models/transaction_error_response_spec.rb +10 -4
- data/spec/models/transaction_origin_spec.rb +2 -2
- data/spec/models/transaction_response_spec.rb +10 -4
- data/spec/models/transaction_spec.rb +4 -4
- data/spec/models/transaction_type_spec.rb +2 -2
- data/spec/models/{authentication_request_spec.rb → union_pay_authentication_request_spec.rb} +9 -13
- data/spec/models/union_pay_authentication_verification_request_spec.rb +65 -0
- data/spec/models/use_payment_token_spec.rb +53 -0
- data/spec/models/void_transaction_spec.rb +53 -0
- data/spec/spec_helper.rb +2 -2
- metadata +195 -42
- data/docs/AuthenticationRequest.md +0 -9
- data/docs/AuthenticationResponseVerification.md +0 -11
- data/docs/AuthenticationResponseVerificationRequest.md +0 -11
- data/docs/BasketItem.md +0 -11
- data/docs/CardVerificationsTransaction.md +0 -9
- data/docs/PaymentCardAuthenticationResult.md +0 -12
- data/docs/PaymentTokenization.md +0 -16
- data/docs/PrimaryTransactionAdditionalDetails.md +0 -16
- data/docs/ReferencedOrder.md +0 -9
- data/spec/models/referenced_order_spec.rb +0 -47
- data/spec/models/secondary_transaction_additional_details_spec.rb +0 -41
@@ -0,0 +1,325 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.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
|
+
# Request to create sale transaction using payment card.
|
17
|
+
class PaymentCardSaleTransaction
|
18
|
+
# Object name of the primary transaction request.
|
19
|
+
attr_accessor :request_type
|
20
|
+
|
21
|
+
# An optional outlet ID for clients that support multiple stores in the same app.
|
22
|
+
attr_accessor :store_id
|
23
|
+
|
24
|
+
# The unique merchant transaction ID from the request header, if supplied.
|
25
|
+
attr_accessor :merchant_transaction_id
|
26
|
+
|
27
|
+
attr_accessor :transaction_amount
|
28
|
+
|
29
|
+
attr_accessor :transaction_origin
|
30
|
+
|
31
|
+
attr_accessor :order
|
32
|
+
|
33
|
+
attr_accessor :payment_method
|
34
|
+
|
35
|
+
attr_accessor :stored_credentials
|
36
|
+
|
37
|
+
# Settle with multiple sub-merchants, sale and preAuth only.
|
38
|
+
attr_accessor :settlement_split
|
39
|
+
|
40
|
+
attr_accessor :create_token
|
41
|
+
|
42
|
+
attr_accessor :currency_conversion
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'request_type' => :'requestType',
|
48
|
+
:'store_id' => :'storeId',
|
49
|
+
:'merchant_transaction_id' => :'merchantTransactionId',
|
50
|
+
:'transaction_amount' => :'transactionAmount',
|
51
|
+
:'transaction_origin' => :'transactionOrigin',
|
52
|
+
:'order' => :'order',
|
53
|
+
:'payment_method' => :'paymentMethod',
|
54
|
+
:'stored_credentials' => :'storedCredentials',
|
55
|
+
:'settlement_split' => :'settlementSplit',
|
56
|
+
:'create_token' => :'createToken',
|
57
|
+
:'currency_conversion' => :'currencyConversion'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute type mapping.
|
62
|
+
def self.openapi_types
|
63
|
+
{
|
64
|
+
:'request_type' => :'String',
|
65
|
+
:'store_id' => :'String',
|
66
|
+
:'merchant_transaction_id' => :'String',
|
67
|
+
:'transaction_amount' => :'Amount',
|
68
|
+
:'transaction_origin' => :'TransactionOrigin',
|
69
|
+
:'order' => :'Order',
|
70
|
+
:'payment_method' => :'PaymentCardPaymentMethod',
|
71
|
+
:'stored_credentials' => :'StoredCredential',
|
72
|
+
:'settlement_split' => :'Array<SubMerchantSplit>',
|
73
|
+
:'create_token' => :'CreatePaymentToken',
|
74
|
+
:'currency_conversion' => :'CurrencyConversion'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Initializes the object
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
80
|
+
def initialize(attributes = {})
|
81
|
+
return unless attributes.is_a?(Hash)
|
82
|
+
|
83
|
+
# convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
85
|
+
|
86
|
+
if attributes.has_key?(:'requestType')
|
87
|
+
self.request_type = attributes[:'requestType']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.has_key?(:'storeId')
|
91
|
+
self.store_id = attributes[:'storeId']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.has_key?(:'merchantTransactionId')
|
95
|
+
self.merchant_transaction_id = attributes[:'merchantTransactionId']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'transactionAmount')
|
99
|
+
self.transaction_amount = attributes[:'transactionAmount']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'transactionOrigin')
|
103
|
+
self.transaction_origin = attributes[:'transactionOrigin']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'order')
|
107
|
+
self.order = attributes[:'order']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'paymentMethod')
|
111
|
+
self.payment_method = attributes[:'paymentMethod']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'storedCredentials')
|
115
|
+
self.stored_credentials = attributes[:'storedCredentials']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'settlementSplit')
|
119
|
+
if (value = attributes[:'settlementSplit']).is_a?(Array)
|
120
|
+
self.settlement_split = value
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'createToken')
|
125
|
+
self.create_token = attributes[:'createToken']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.has_key?(:'currencyConversion')
|
129
|
+
self.currency_conversion = attributes[:'currencyConversion']
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
134
|
+
# @return Array for valid properties with the reasons
|
135
|
+
def list_invalid_properties
|
136
|
+
invalid_properties = Array.new
|
137
|
+
if @request_type.nil?
|
138
|
+
invalid_properties.push('invalid value for "request_type", request_type cannot be nil.')
|
139
|
+
end
|
140
|
+
|
141
|
+
if !@store_id.nil? && @store_id.to_s.length > 20
|
142
|
+
invalid_properties.push('invalid value for "store_id", the character length must be smaller than or equal to 20.')
|
143
|
+
end
|
144
|
+
|
145
|
+
if !@merchant_transaction_id.nil? && @merchant_transaction_id.to_s.length > 40
|
146
|
+
invalid_properties.push('invalid value for "merchant_transaction_id", the character length must be smaller than or equal to 40.')
|
147
|
+
end
|
148
|
+
|
149
|
+
if @transaction_amount.nil?
|
150
|
+
invalid_properties.push('invalid value for "transaction_amount", transaction_amount cannot be nil.')
|
151
|
+
end
|
152
|
+
|
153
|
+
if @payment_method.nil?
|
154
|
+
invalid_properties.push('invalid value for "payment_method", payment_method cannot be nil.')
|
155
|
+
end
|
156
|
+
|
157
|
+
invalid_properties
|
158
|
+
end
|
159
|
+
|
160
|
+
# Check to see if the all the properties in the model are valid
|
161
|
+
# @return true if the model is valid
|
162
|
+
def valid?
|
163
|
+
return false if @request_type.nil?
|
164
|
+
return false if !@store_id.nil? && @store_id.to_s.length > 20
|
165
|
+
return false if !@merchant_transaction_id.nil? && @merchant_transaction_id.to_s.length > 40
|
166
|
+
return false if @transaction_amount.nil?
|
167
|
+
return false if @payment_method.nil?
|
168
|
+
true
|
169
|
+
end
|
170
|
+
|
171
|
+
# Custom attribute writer method with validation
|
172
|
+
# @param [Object] store_id Value to be assigned
|
173
|
+
def store_id=(store_id)
|
174
|
+
if !store_id.nil? && store_id.to_s.length > 20
|
175
|
+
fail ArgumentError, 'invalid value for "store_id", the character length must be smaller than or equal to 20.'
|
176
|
+
end
|
177
|
+
|
178
|
+
@store_id = store_id
|
179
|
+
end
|
180
|
+
|
181
|
+
# Custom attribute writer method with validation
|
182
|
+
# @param [Object] merchant_transaction_id Value to be assigned
|
183
|
+
def merchant_transaction_id=(merchant_transaction_id)
|
184
|
+
if !merchant_transaction_id.nil? && merchant_transaction_id.to_s.length > 40
|
185
|
+
fail ArgumentError, 'invalid value for "merchant_transaction_id", the character length must be smaller than or equal to 40.'
|
186
|
+
end
|
187
|
+
|
188
|
+
@merchant_transaction_id = merchant_transaction_id
|
189
|
+
end
|
190
|
+
|
191
|
+
# Checks equality by comparing each attribute.
|
192
|
+
# @param [Object] Object to be compared
|
193
|
+
def ==(o)
|
194
|
+
return true if self.equal?(o)
|
195
|
+
self.class == o.class &&
|
196
|
+
request_type == o.request_type &&
|
197
|
+
store_id == o.store_id &&
|
198
|
+
merchant_transaction_id == o.merchant_transaction_id &&
|
199
|
+
transaction_amount == o.transaction_amount &&
|
200
|
+
transaction_origin == o.transaction_origin &&
|
201
|
+
order == o.order &&
|
202
|
+
payment_method == o.payment_method &&
|
203
|
+
stored_credentials == o.stored_credentials &&
|
204
|
+
settlement_split == o.settlement_split &&
|
205
|
+
create_token == o.create_token &&
|
206
|
+
currency_conversion == o.currency_conversion
|
207
|
+
end
|
208
|
+
|
209
|
+
# @see the `==` method
|
210
|
+
# @param [Object] Object to be compared
|
211
|
+
def eql?(o)
|
212
|
+
self == o
|
213
|
+
end
|
214
|
+
|
215
|
+
# Calculates hash code according to all attributes.
|
216
|
+
# @return [Fixnum] Hash code
|
217
|
+
def hash
|
218
|
+
[request_type, store_id, merchant_transaction_id, transaction_amount, transaction_origin, order, payment_method, stored_credentials, settlement_split, create_token, currency_conversion].hash
|
219
|
+
end
|
220
|
+
|
221
|
+
# Builds the object from hash
|
222
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
223
|
+
# @return [Object] Returns the model itself
|
224
|
+
def build_from_hash(attributes)
|
225
|
+
return nil unless attributes.is_a?(Hash)
|
226
|
+
self.class.openapi_types.each_pair do |key, type|
|
227
|
+
if type =~ /\AArray<(.*)>/i
|
228
|
+
# check to ensure the input is an array given that the the attribute
|
229
|
+
# is documented as an array but the input is not
|
230
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
231
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
232
|
+
end
|
233
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
234
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
235
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
236
|
+
end
|
237
|
+
|
238
|
+
self
|
239
|
+
end
|
240
|
+
|
241
|
+
# Deserializes the data based on type
|
242
|
+
# @param string type Data type
|
243
|
+
# @param string value Value to be deserialized
|
244
|
+
# @return [Object] Deserialized data
|
245
|
+
def _deserialize(type, value)
|
246
|
+
case type.to_sym
|
247
|
+
when :DateTime
|
248
|
+
DateTime.parse(value)
|
249
|
+
when :Date
|
250
|
+
Date.parse(value)
|
251
|
+
when :String
|
252
|
+
value.to_s
|
253
|
+
when :Integer
|
254
|
+
value.to_i
|
255
|
+
when :Float
|
256
|
+
value.to_f
|
257
|
+
when :BOOLEAN
|
258
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
259
|
+
true
|
260
|
+
else
|
261
|
+
false
|
262
|
+
end
|
263
|
+
when :Object
|
264
|
+
# generic object (usually a Hash), return directly
|
265
|
+
value
|
266
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
267
|
+
inner_type = Regexp.last_match[:inner_type]
|
268
|
+
value.map { |v| _deserialize(inner_type, v) }
|
269
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
270
|
+
k_type = Regexp.last_match[:k_type]
|
271
|
+
v_type = Regexp.last_match[:v_type]
|
272
|
+
{}.tap do |hash|
|
273
|
+
value.each do |k, v|
|
274
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
275
|
+
end
|
276
|
+
end
|
277
|
+
else # model
|
278
|
+
temp_model = OpenapiClient.const_get(type).new
|
279
|
+
temp_model.build_from_hash(value)
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
# Returns the string representation of the object
|
284
|
+
# @return [String] String presentation of the object
|
285
|
+
def to_s
|
286
|
+
to_hash.to_s
|
287
|
+
end
|
288
|
+
|
289
|
+
# to_body is an alias to to_hash (backward compatibility)
|
290
|
+
# @return [Hash] Returns the object in the form of hash
|
291
|
+
def to_body
|
292
|
+
to_hash
|
293
|
+
end
|
294
|
+
|
295
|
+
# Returns the object in the form of hash
|
296
|
+
# @return [Hash] Returns the object in the form of hash
|
297
|
+
def to_hash
|
298
|
+
hash = {}
|
299
|
+
self.class.attribute_map.each_pair do |attr, param|
|
300
|
+
value = self.send(attr)
|
301
|
+
next if value.nil?
|
302
|
+
hash[param] = _to_hash(value)
|
303
|
+
end
|
304
|
+
hash
|
305
|
+
end
|
306
|
+
|
307
|
+
# Outputs non-array value in the form of hash
|
308
|
+
# For object, use to_hash. Otherwise, just return the value
|
309
|
+
# @param [Object] value Any valid value
|
310
|
+
# @return [Hash] Returns the value in the form of hash
|
311
|
+
def _to_hash(value)
|
312
|
+
if value.is_a?(Array)
|
313
|
+
value.compact.map { |v| _to_hash(v) }
|
314
|
+
elsif value.is_a?(Hash)
|
315
|
+
{}.tap do |hash|
|
316
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
317
|
+
end
|
318
|
+
elsif value.respond_to? :to_hash
|
319
|
+
value.to_hash
|
320
|
+
else
|
321
|
+
value
|
322
|
+
end
|
323
|
+
end
|
324
|
+
end
|
325
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -13,18 +13,18 @@ OpenAPI Generator version: unset
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OpenapiClient
|
16
|
-
# Payment
|
16
|
+
# Payment facilitator details provided by the merchant.
|
17
17
|
class PaymentFacilitator
|
18
|
-
# External
|
18
|
+
# External merchant ID of the payment facilitator.
|
19
19
|
attr_accessor :external_merchant_id
|
20
20
|
|
21
|
-
# Payment
|
21
|
+
# Payment facilitator ID supplied during boarding.
|
22
22
|
attr_accessor :payment_facilitator_id
|
23
23
|
|
24
|
-
# Independent
|
24
|
+
# Independent sales organization (ISO) ID provided by Mastercard.
|
25
25
|
attr_accessor :sale_organization_id
|
26
26
|
|
27
|
-
# Payment facilitator
|
27
|
+
# Payment facilitator name.
|
28
28
|
attr_accessor :name
|
29
29
|
|
30
30
|
attr_accessor :sub_merchant_data
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -13,68 +13,17 @@ OpenAPI Generator version: unset
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OpenapiClient
|
16
|
-
# Various payment methods the Gateway supports
|
16
|
+
# Various payment methods the Gateway supports. Abstract class, do not use this class directly, use one of its children.
|
17
17
|
class PaymentMethod
|
18
|
-
# The type of payment method. Note that PayPal can only process a 'CREDIT' transaction. Note that for requests we are now supporting only PAYMENT_CARD, SEPA, PAYPAL, ALIPAY. All this types are supported for response.
|
19
|
-
attr_accessor :type
|
20
|
-
|
21
|
-
attr_accessor :payment_card
|
22
|
-
|
23
|
-
attr_accessor :payment_token
|
24
|
-
|
25
|
-
attr_accessor :sepa
|
26
|
-
|
27
|
-
attr_accessor :pay_pal
|
28
|
-
|
29
|
-
attr_accessor :ali_pay
|
30
|
-
|
31
|
-
attr_accessor :china_domestic
|
32
|
-
|
33
|
-
class EnumAttributeValidator
|
34
|
-
attr_reader :datatype
|
35
|
-
attr_reader :allowable_values
|
36
|
-
|
37
|
-
def initialize(datatype, allowable_values)
|
38
|
-
@allowable_values = allowable_values.map do |value|
|
39
|
-
case datatype.to_s
|
40
|
-
when /Integer/i
|
41
|
-
value.to_i
|
42
|
-
when /Float/i
|
43
|
-
value.to_f
|
44
|
-
else
|
45
|
-
value
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def valid?(value)
|
51
|
-
!value || allowable_values.include?(value)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
56
19
|
def self.attribute_map
|
57
20
|
{
|
58
|
-
:'type' => :'type',
|
59
|
-
:'payment_card' => :'paymentCard',
|
60
|
-
:'payment_token' => :'paymentToken',
|
61
|
-
:'sepa' => :'sepa',
|
62
|
-
:'pay_pal' => :'payPal',
|
63
|
-
:'ali_pay' => :'aliPay',
|
64
|
-
:'china_domestic' => :'chinaDomestic'
|
65
21
|
}
|
66
22
|
end
|
67
23
|
|
68
24
|
# Attribute type mapping.
|
69
25
|
def self.openapi_types
|
70
26
|
{
|
71
|
-
:'type' => :'String',
|
72
|
-
:'payment_card' => :'PaymentCard',
|
73
|
-
:'payment_token' => :'PaymentTokenization',
|
74
|
-
:'sepa' => :'Sepa',
|
75
|
-
:'pay_pal' => :'PayPal',
|
76
|
-
:'ali_pay' => :'AliPay',
|
77
|
-
:'china_domestic' => :'ChinaDomestic'
|
78
27
|
}
|
79
28
|
end
|
80
29
|
|
@@ -85,78 +34,26 @@ module OpenapiClient
|
|
85
34
|
|
86
35
|
# convert string to symbol for hash key
|
87
36
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
88
|
-
|
89
|
-
if attributes.has_key?(:'type')
|
90
|
-
self.type = attributes[:'type']
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes.has_key?(:'paymentCard')
|
94
|
-
self.payment_card = attributes[:'paymentCard']
|
95
|
-
end
|
96
|
-
|
97
|
-
if attributes.has_key?(:'paymentToken')
|
98
|
-
self.payment_token = attributes[:'paymentToken']
|
99
|
-
end
|
100
|
-
|
101
|
-
if attributes.has_key?(:'sepa')
|
102
|
-
self.sepa = attributes[:'sepa']
|
103
|
-
end
|
104
|
-
|
105
|
-
if attributes.has_key?(:'payPal')
|
106
|
-
self.pay_pal = attributes[:'payPal']
|
107
|
-
end
|
108
|
-
|
109
|
-
if attributes.has_key?(:'aliPay')
|
110
|
-
self.ali_pay = attributes[:'aliPay']
|
111
|
-
end
|
112
|
-
|
113
|
-
if attributes.has_key?(:'chinaDomestic')
|
114
|
-
self.china_domestic = attributes[:'chinaDomestic']
|
115
|
-
end
|
116
37
|
end
|
117
38
|
|
118
39
|
# Show invalid properties with the reasons. Usually used together with valid?
|
119
40
|
# @return Array for valid properties with the reasons
|
120
41
|
def list_invalid_properties
|
121
42
|
invalid_properties = Array.new
|
122
|
-
if @type.nil?
|
123
|
-
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
124
|
-
end
|
125
|
-
|
126
43
|
invalid_properties
|
127
44
|
end
|
128
45
|
|
129
46
|
# Check to see if the all the properties in the model are valid
|
130
47
|
# @return true if the model is valid
|
131
48
|
def valid?
|
132
|
-
return false if @type.nil?
|
133
|
-
type_validator = EnumAttributeValidator.new('String', ['ALIPAY', 'ALIPAY_PAYSECURE_US', 'ALIPAY_DOMESTIC', 'APM', 'CUP_DOMESTIC', 'DEBITDE', 'EMI', 'GIROPAY', 'IDEAL', 'INDIAWALLET', 'KLARNA', 'NETBANKING', 'PAYMENT_CARD', 'PAYMENT_TOKEN', 'PAYPAL', 'SEPA', 'SOFORT', 'WALLET', 'WECHAT_DOMESTIC'])
|
134
|
-
return false unless type_validator.valid?(@type)
|
135
49
|
true
|
136
50
|
end
|
137
51
|
|
138
|
-
# Custom attribute writer method checking allowed values (enum).
|
139
|
-
# @param [Object] type Object to be assigned
|
140
|
-
def type=(type)
|
141
|
-
validator = EnumAttributeValidator.new('String', ['ALIPAY', 'ALIPAY_PAYSECURE_US', 'ALIPAY_DOMESTIC', 'APM', 'CUP_DOMESTIC', 'DEBITDE', 'EMI', 'GIROPAY', 'IDEAL', 'INDIAWALLET', 'KLARNA', 'NETBANKING', 'PAYMENT_CARD', 'PAYMENT_TOKEN', 'PAYPAL', 'SEPA', 'SOFORT', 'WALLET', 'WECHAT_DOMESTIC'])
|
142
|
-
unless validator.valid?(type)
|
143
|
-
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
144
|
-
end
|
145
|
-
@type = type
|
146
|
-
end
|
147
|
-
|
148
52
|
# Checks equality by comparing each attribute.
|
149
53
|
# @param [Object] Object to be compared
|
150
54
|
def ==(o)
|
151
55
|
return true if self.equal?(o)
|
152
|
-
self.class == o.class
|
153
|
-
type == o.type &&
|
154
|
-
payment_card == o.payment_card &&
|
155
|
-
payment_token == o.payment_token &&
|
156
|
-
sepa == o.sepa &&
|
157
|
-
pay_pal == o.pay_pal &&
|
158
|
-
ali_pay == o.ali_pay &&
|
159
|
-
china_domestic == o.china_domestic
|
56
|
+
self.class == o.class
|
160
57
|
end
|
161
58
|
|
162
59
|
# @see the `==` method
|
@@ -168,7 +65,7 @@ module OpenapiClient
|
|
168
65
|
# Calculates hash code according to all attributes.
|
169
66
|
# @return [Fixnum] Hash code
|
170
67
|
def hash
|
171
|
-
[
|
68
|
+
[].hash
|
172
69
|
end
|
173
70
|
|
174
71
|
# Builds the object from hash
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -13,36 +13,25 @@ OpenAPI Generator version: unset
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OpenapiClient
|
16
|
-
#
|
17
|
-
class
|
18
|
-
|
19
|
-
attr_accessor :id
|
16
|
+
# Provides details of the payment method used.
|
17
|
+
class PaymentMethodDetails
|
18
|
+
attr_accessor :payment_card
|
20
19
|
|
21
|
-
|
22
|
-
attr_accessor :description
|
23
|
-
|
24
|
-
attr_accessor :unit_price
|
25
|
-
|
26
|
-
# Total quantity of items
|
27
|
-
attr_accessor :count
|
20
|
+
attr_accessor :payment_method_type
|
28
21
|
|
29
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
23
|
def self.attribute_map
|
31
24
|
{
|
32
|
-
:'
|
33
|
-
:'
|
34
|
-
:'unit_price' => :'unitPrice',
|
35
|
-
:'count' => :'count'
|
25
|
+
:'payment_card' => :'paymentCard',
|
26
|
+
:'payment_method_type' => :'paymentMethodType'
|
36
27
|
}
|
37
28
|
end
|
38
29
|
|
39
30
|
# Attribute type mapping.
|
40
31
|
def self.openapi_types
|
41
32
|
{
|
42
|
-
:'
|
43
|
-
:'
|
44
|
-
:'unit_price' => :'Amount',
|
45
|
-
:'count' => :'Integer'
|
33
|
+
:'payment_card' => :'PaymentCard',
|
34
|
+
:'payment_method_type' => :'PaymentMethodType'
|
46
35
|
}
|
47
36
|
end
|
48
37
|
|
@@ -54,20 +43,12 @@ module OpenapiClient
|
|
54
43
|
# convert string to symbol for hash key
|
55
44
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
45
|
|
57
|
-
if attributes.has_key?(:'
|
58
|
-
self.
|
59
|
-
end
|
60
|
-
|
61
|
-
if attributes.has_key?(:'description')
|
62
|
-
self.description = attributes[:'description']
|
63
|
-
end
|
64
|
-
|
65
|
-
if attributes.has_key?(:'unitPrice')
|
66
|
-
self.unit_price = attributes[:'unitPrice']
|
46
|
+
if attributes.has_key?(:'paymentCard')
|
47
|
+
self.payment_card = attributes[:'paymentCard']
|
67
48
|
end
|
68
49
|
|
69
|
-
if attributes.has_key?(:'
|
70
|
-
self.
|
50
|
+
if attributes.has_key?(:'paymentMethodType')
|
51
|
+
self.payment_method_type = attributes[:'paymentMethodType']
|
71
52
|
end
|
72
53
|
end
|
73
54
|
|
@@ -89,10 +70,8 @@ module OpenapiClient
|
|
89
70
|
def ==(o)
|
90
71
|
return true if self.equal?(o)
|
91
72
|
self.class == o.class &&
|
92
|
-
|
93
|
-
|
94
|
-
unit_price == o.unit_price &&
|
95
|
-
count == o.count
|
73
|
+
payment_card == o.payment_card &&
|
74
|
+
payment_method_type == o.payment_method_type
|
96
75
|
end
|
97
76
|
|
98
77
|
# @see the `==` method
|
@@ -104,7 +83,7 @@ module OpenapiClient
|
|
104
83
|
# Calculates hash code according to all attributes.
|
105
84
|
# @return [Fixnum] Hash code
|
106
85
|
def hash
|
107
|
-
[
|
86
|
+
[payment_card, payment_method_type].hash
|
108
87
|
end
|
109
88
|
|
110
89
|
# Builds the object from hash
|