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
@@ -1,57 +1,159 @@
|
|
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
|
-
require
|
13
|
+
require 'uri'
|
14
14
|
|
15
|
-
module
|
15
|
+
module OpenapiClient
|
16
16
|
class PaymentApi
|
17
17
|
attr_accessor :api_client
|
18
18
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Update a 3DSecure or UnionPay payment and continue processing.
|
23
|
+
# Use this to handle a 3DSecure redirect response or UnionPay authentication, updating the transaction and continuing processing.
|
24
|
+
# @param content_type content type
|
25
|
+
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
26
|
+
# @param api_key
|
27
|
+
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
28
|
+
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
29
|
+
# @param authentication_response_verification_request
|
30
|
+
# @param [Hash] opts the optional parameters
|
31
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
32
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
33
|
+
# @return [TransactionResponse]
|
34
|
+
def finalize_secure_transaction(content_type, client_request_id, api_key, timestamp, transaction_id, authentication_response_verification_request, opts = {})
|
35
|
+
data, _status_code, _headers = finalize_secure_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, authentication_response_verification_request, opts)
|
36
|
+
data
|
37
|
+
end
|
38
|
+
|
39
|
+
# Update a 3DSecure or UnionPay payment and continue processing.
|
40
|
+
# Use this to handle a 3DSecure redirect response or UnionPay authentication, updating the transaction and continuing processing.
|
41
|
+
# @param content_type content type
|
42
|
+
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
43
|
+
# @param api_key
|
44
|
+
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
45
|
+
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
46
|
+
# @param authentication_response_verification_request
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
49
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
50
|
+
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
51
|
+
def finalize_secure_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, authentication_response_verification_request, opts = {})
|
52
|
+
if @api_client.config.debugging
|
53
|
+
@api_client.config.logger.debug 'Calling API: PaymentApi.finalize_secure_transaction ...'
|
54
|
+
end
|
55
|
+
# verify the required parameter 'content_type' is set
|
56
|
+
if @api_client.config.client_side_validation && content_type.nil?
|
57
|
+
fail ArgumentError, "Missing the required parameter 'content_type' when calling PaymentApi.finalize_secure_transaction"
|
58
|
+
end
|
59
|
+
# verify enum value
|
60
|
+
if @api_client.config.client_side_validation && !['application/json'].include?(content_type)
|
61
|
+
fail ArgumentError, "invalid value for 'content_type', must be one of application/json"
|
62
|
+
end
|
63
|
+
# verify the required parameter 'client_request_id' is set
|
64
|
+
if @api_client.config.client_side_validation && client_request_id.nil?
|
65
|
+
fail ArgumentError, "Missing the required parameter 'client_request_id' when calling PaymentApi.finalize_secure_transaction"
|
66
|
+
end
|
67
|
+
# verify the required parameter 'api_key' is set
|
68
|
+
if @api_client.config.client_side_validation && api_key.nil?
|
69
|
+
fail ArgumentError, "Missing the required parameter 'api_key' when calling PaymentApi.finalize_secure_transaction"
|
70
|
+
end
|
71
|
+
# verify the required parameter 'timestamp' is set
|
72
|
+
if @api_client.config.client_side_validation && timestamp.nil?
|
73
|
+
fail ArgumentError, "Missing the required parameter 'timestamp' when calling PaymentApi.finalize_secure_transaction"
|
74
|
+
end
|
75
|
+
# verify the required parameter 'transaction_id' is set
|
76
|
+
if @api_client.config.client_side_validation && transaction_id.nil?
|
77
|
+
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PaymentApi.finalize_secure_transaction"
|
78
|
+
end
|
79
|
+
# verify the required parameter 'authentication_response_verification_request' is set
|
80
|
+
if @api_client.config.client_side_validation && authentication_response_verification_request.nil?
|
81
|
+
fail ArgumentError, "Missing the required parameter 'authentication_response_verification_request' when calling PaymentApi.finalize_secure_transaction"
|
82
|
+
end
|
83
|
+
# resource path
|
84
|
+
local_var_path = '/v1/payments/{transaction-id}'.sub('{' + 'transaction-id' + '}', transaction_id.to_s)
|
22
85
|
|
23
|
-
|
24
|
-
|
86
|
+
# query parameters
|
87
|
+
query_params = {}
|
88
|
+
|
89
|
+
# header parameters
|
90
|
+
header_params = {}
|
91
|
+
# HTTP header 'Accept' (if needed)
|
92
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
93
|
+
# HTTP header 'Content-Type'
|
94
|
+
# header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
95
|
+
# header_params[:'Content-Type'] = content_type
|
96
|
+
header_params[:'Client-Request-Id'] = client_request_id
|
97
|
+
header_params[:'Api-Key'] = api_key
|
98
|
+
header_params[:'Timestamp'] = timestamp
|
99
|
+
header_params[:'Message-Signature'] = opts[:'message_signature'] if !opts[:'message_signature'].nil?
|
100
|
+
header_params[:'Region'] = opts[:'region'] if !opts[:'region'].nil?
|
101
|
+
|
102
|
+
# form parameters
|
103
|
+
form_params = {}
|
104
|
+
|
105
|
+
# http body (model)
|
106
|
+
post_body = @api_client.object_to_http_body(authentication_response_verification_request)
|
107
|
+
auth_names = []
|
108
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
109
|
+
:header_params => header_params,
|
110
|
+
:query_params => query_params,
|
111
|
+
:form_params => form_params,
|
112
|
+
:body => post_body,
|
113
|
+
:auth_names => auth_names,
|
114
|
+
:return_type => 'TransactionResponse',
|
115
|
+
:default_error_type => 'ErrorResponse',
|
116
|
+
:error_type => 'TransactionErrorResponse')
|
117
|
+
if @api_client.config.debugging
|
118
|
+
@api_client.config.logger.debug "API called: PaymentApi#finalize_secure_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
119
|
+
end
|
120
|
+
return data, status_code, headers
|
121
|
+
end
|
122
|
+
|
123
|
+
# Capture/complete a transaction.
|
124
|
+
# Used to capture/complete an existing transaction. Partial postauths are allowed.
|
25
125
|
# @param content_type content type
|
26
126
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
27
127
|
# @param api_key
|
28
128
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
29
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
30
129
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
31
|
-
# @param
|
130
|
+
# @param secondary_transaction
|
32
131
|
# @param [Hash] opts the optional parameters
|
33
|
-
# @option opts [String] :
|
132
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
133
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
134
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
34
135
|
# @return [TransactionResponse]
|
35
|
-
def perform_payment_post_authorisation(content_type, client_request_id, api_key, timestamp,
|
36
|
-
data, _status_code, _headers = perform_payment_post_authorisation_with_http_info(content_type, client_request_id, api_key, timestamp,
|
37
|
-
|
136
|
+
def perform_payment_post_authorisation(content_type, client_request_id, api_key, timestamp, transaction_id, secondary_transaction, opts = {})
|
137
|
+
data, _status_code, _headers = perform_payment_post_authorisation_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, secondary_transaction, opts)
|
138
|
+
data
|
38
139
|
end
|
39
140
|
|
40
|
-
#
|
41
|
-
#
|
141
|
+
# Capture/complete a transaction.
|
142
|
+
# Used to capture/complete an existing transaction. Partial postauths are allowed.
|
42
143
|
# @param content_type content type
|
43
144
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
44
145
|
# @param api_key
|
45
146
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
46
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
47
147
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
48
|
-
# @param
|
148
|
+
# @param secondary_transaction
|
49
149
|
# @param [Hash] opts the optional parameters
|
50
|
-
# @option opts [String] :
|
150
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
151
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
152
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
51
153
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
52
|
-
def perform_payment_post_authorisation_with_http_info(content_type, client_request_id, api_key, timestamp,
|
154
|
+
def perform_payment_post_authorisation_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, secondary_transaction, opts = {})
|
53
155
|
if @api_client.config.debugging
|
54
|
-
@api_client.config.logger.debug
|
156
|
+
@api_client.config.logger.debug 'Calling API: PaymentApi.perform_payment_post_authorisation ...'
|
55
157
|
end
|
56
158
|
# verify the required parameter 'content_type' is set
|
57
159
|
if @api_client.config.client_side_validation && content_type.nil?
|
@@ -73,20 +175,16 @@ module SwaggerClient
|
|
73
175
|
if @api_client.config.client_side_validation && timestamp.nil?
|
74
176
|
fail ArgumentError, "Missing the required parameter 'timestamp' when calling PaymentApi.perform_payment_post_authorisation"
|
75
177
|
end
|
76
|
-
# verify the required parameter 'message_signature' is set
|
77
|
-
if @api_client.config.client_side_validation && message_signature.nil?
|
78
|
-
fail ArgumentError, "Missing the required parameter 'message_signature' when calling PaymentApi.perform_payment_post_authorisation"
|
79
|
-
end
|
80
178
|
# verify the required parameter 'transaction_id' is set
|
81
179
|
if @api_client.config.client_side_validation && transaction_id.nil?
|
82
180
|
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PaymentApi.perform_payment_post_authorisation"
|
83
181
|
end
|
84
|
-
# verify the required parameter '
|
85
|
-
if @api_client.config.client_side_validation &&
|
86
|
-
fail ArgumentError, "Missing the required parameter '
|
182
|
+
# verify the required parameter 'secondary_transaction' is set
|
183
|
+
if @api_client.config.client_side_validation && secondary_transaction.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'secondary_transaction' when calling PaymentApi.perform_payment_post_authorisation"
|
87
185
|
end
|
88
186
|
# resource path
|
89
|
-
local_var_path =
|
187
|
+
local_var_path = '/v1/payments/{transaction-id}/postauth'.sub('{' + 'transaction-id' + '}', transaction_id.to_s)
|
90
188
|
|
91
189
|
# query parameters
|
92
190
|
query_params = {}
|
@@ -97,17 +195,19 @@ module SwaggerClient
|
|
97
195
|
# HTTP header 'Accept' (if needed)
|
98
196
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
99
197
|
# HTTP header 'Content-Type'
|
198
|
+
# header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
100
199
|
# header_params[:'Content-Type'] = content_type
|
101
200
|
header_params[:'Client-Request-Id'] = client_request_id
|
102
201
|
header_params[:'Api-Key'] = api_key
|
103
202
|
header_params[:'Timestamp'] = timestamp
|
104
|
-
header_params[:'Message-Signature'] = message_signature
|
203
|
+
header_params[:'Message-Signature'] = opts[:'message_signature'] if !opts[:'message_signature'].nil?
|
204
|
+
header_params[:'Region'] = opts[:'region'] if !opts[:'region'].nil?
|
105
205
|
|
106
206
|
# form parameters
|
107
207
|
form_params = {}
|
108
208
|
|
109
209
|
# http body (model)
|
110
|
-
post_body = @api_client.object_to_http_body(
|
210
|
+
post_body = @api_client.object_to_http_body(secondary_transaction)
|
111
211
|
auth_names = []
|
112
212
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
113
213
|
:header_params => header_params,
|
@@ -116,41 +216,43 @@ module SwaggerClient
|
|
116
216
|
:body => post_body,
|
117
217
|
:auth_names => auth_names,
|
118
218
|
:return_type => 'TransactionResponse',
|
119
|
-
:
|
219
|
+
:default_error_type => 'ErrorResponse')
|
120
220
|
if @api_client.config.debugging
|
121
221
|
@api_client.config.logger.debug "API called: PaymentApi#perform_payment_post_authorisation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
122
222
|
end
|
123
223
|
return data, status_code, headers
|
124
224
|
end
|
125
225
|
|
126
|
-
# Generate a primary transaction
|
226
|
+
# Generate a primary transaction.
|
127
227
|
# Use this to originate a financial transaction, like a sale, preauthorization, or credit.
|
128
228
|
# @param content_type content type
|
129
229
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
130
230
|
# @param api_key
|
131
231
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
132
|
-
# @param
|
133
|
-
# @param payload Primary Transaction request
|
232
|
+
# @param primary_transaction Primary Transaction request
|
134
233
|
# @param [Hash] opts the optional parameters
|
234
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
235
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
135
236
|
# @return [TransactionResponse]
|
136
|
-
def primary_payment_transaction(content_type, client_request_id, api_key, timestamp,
|
137
|
-
data, _status_code, _headers = primary_payment_transaction_with_http_info(content_type, client_request_id, api_key, timestamp,
|
138
|
-
|
237
|
+
def primary_payment_transaction(content_type, client_request_id, api_key, timestamp, primary_transaction, opts = {})
|
238
|
+
data, _status_code, _headers = primary_payment_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, primary_transaction, opts)
|
239
|
+
data
|
139
240
|
end
|
140
241
|
|
141
|
-
# Generate a primary transaction
|
242
|
+
# Generate a primary transaction.
|
142
243
|
# Use this to originate a financial transaction, like a sale, preauthorization, or credit.
|
143
244
|
# @param content_type content type
|
144
245
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
145
246
|
# @param api_key
|
146
247
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
147
|
-
# @param
|
148
|
-
# @param payload Primary Transaction request
|
248
|
+
# @param primary_transaction Primary Transaction request
|
149
249
|
# @param [Hash] opts the optional parameters
|
250
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
251
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
150
252
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
151
|
-
def primary_payment_transaction_with_http_info(content_type, client_request_id, api_key, timestamp,
|
253
|
+
def primary_payment_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, primary_transaction, opts = {})
|
152
254
|
if @api_client.config.debugging
|
153
|
-
@api_client.config.logger.debug
|
255
|
+
@api_client.config.logger.debug 'Calling API: PaymentApi.primary_payment_transaction ...'
|
154
256
|
end
|
155
257
|
# verify the required parameter 'content_type' is set
|
156
258
|
if @api_client.config.client_side_validation && content_type.nil?
|
@@ -172,16 +274,12 @@ module SwaggerClient
|
|
172
274
|
if @api_client.config.client_side_validation && timestamp.nil?
|
173
275
|
fail ArgumentError, "Missing the required parameter 'timestamp' when calling PaymentApi.primary_payment_transaction"
|
174
276
|
end
|
175
|
-
# verify the required parameter '
|
176
|
-
if @api_client.config.client_side_validation &&
|
177
|
-
fail ArgumentError, "Missing the required parameter '
|
178
|
-
end
|
179
|
-
# verify the required parameter 'payload' is set
|
180
|
-
if @api_client.config.client_side_validation && payload.nil?
|
181
|
-
fail ArgumentError, "Missing the required parameter 'payload' when calling PaymentApi.primary_payment_transaction"
|
277
|
+
# verify the required parameter 'primary_transaction' is set
|
278
|
+
if @api_client.config.client_side_validation && primary_transaction.nil?
|
279
|
+
fail ArgumentError, "Missing the required parameter 'primary_transaction' when calling PaymentApi.primary_payment_transaction"
|
182
280
|
end
|
183
281
|
# resource path
|
184
|
-
local_var_path =
|
282
|
+
local_var_path = '/v1/payments'
|
185
283
|
|
186
284
|
# query parameters
|
187
285
|
query_params = {}
|
@@ -191,17 +289,19 @@ module SwaggerClient
|
|
191
289
|
# HTTP header 'Accept' (if needed)
|
192
290
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
193
291
|
# HTTP header 'Content-Type'
|
292
|
+
# header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
194
293
|
# header_params[:'Content-Type'] = content_type
|
195
294
|
header_params[:'Client-Request-Id'] = client_request_id
|
196
295
|
header_params[:'Api-Key'] = api_key
|
197
296
|
header_params[:'Timestamp'] = timestamp
|
198
|
-
header_params[:'Message-Signature'] = message_signature
|
297
|
+
header_params[:'Message-Signature'] = opts[:'message_signature'] if !opts[:'message_signature'].nil?
|
298
|
+
header_params[:'Region'] = opts[:'region'] if !opts[:'region'].nil?
|
199
299
|
|
200
300
|
# form parameters
|
201
301
|
form_params = {}
|
202
302
|
|
203
303
|
# http body (model)
|
204
|
-
post_body = @api_client.object_to_http_body(
|
304
|
+
post_body = @api_client.object_to_http_body(primary_transaction)
|
205
305
|
auth_names = []
|
206
306
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
207
307
|
:header_params => header_params,
|
@@ -210,6 +310,7 @@ module SwaggerClient
|
|
210
310
|
:body => post_body,
|
211
311
|
:auth_names => auth_names,
|
212
312
|
:return_type => 'TransactionResponse',
|
313
|
+
:default_error_type => 'ErrorResponse',
|
213
314
|
:error_type => 'TransactionErrorResponse')
|
214
315
|
if @api_client.config.debugging
|
215
316
|
@api_client.config.logger.debug "API called: PaymentApi#primary_payment_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
@@ -223,15 +324,16 @@ module SwaggerClient
|
|
223
324
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
224
325
|
# @param api_key
|
225
326
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
226
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
227
327
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
228
|
-
# @param
|
328
|
+
# @param secondary_transaction
|
229
329
|
# @param [Hash] opts the optional parameters
|
230
|
-
# @option opts [String] :
|
330
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
331
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
332
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
231
333
|
# @return [TransactionResponse]
|
232
|
-
def return_transaction(content_type, client_request_id, api_key, timestamp,
|
233
|
-
data, _status_code, _headers = return_transaction_with_http_info(content_type, client_request_id, api_key, timestamp,
|
234
|
-
|
334
|
+
def return_transaction(content_type, client_request_id, api_key, timestamp, transaction_id, secondary_transaction, opts = {})
|
335
|
+
data, _status_code, _headers = return_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, secondary_transaction, opts)
|
336
|
+
data
|
235
337
|
end
|
236
338
|
|
237
339
|
# Return/refund a transaction.
|
@@ -240,15 +342,16 @@ module SwaggerClient
|
|
240
342
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
241
343
|
# @param api_key
|
242
344
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
243
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
244
345
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
245
|
-
# @param
|
346
|
+
# @param secondary_transaction
|
246
347
|
# @param [Hash] opts the optional parameters
|
247
|
-
# @option opts [String] :
|
348
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
349
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
350
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
248
351
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
249
|
-
def return_transaction_with_http_info(content_type, client_request_id, api_key, timestamp,
|
352
|
+
def return_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, secondary_transaction, opts = {})
|
250
353
|
if @api_client.config.debugging
|
251
|
-
@api_client.config.logger.debug
|
354
|
+
@api_client.config.logger.debug 'Calling API: PaymentApi.return_transaction ...'
|
252
355
|
end
|
253
356
|
# verify the required parameter 'content_type' is set
|
254
357
|
if @api_client.config.client_side_validation && content_type.nil?
|
@@ -270,20 +373,16 @@ module SwaggerClient
|
|
270
373
|
if @api_client.config.client_side_validation && timestamp.nil?
|
271
374
|
fail ArgumentError, "Missing the required parameter 'timestamp' when calling PaymentApi.return_transaction"
|
272
375
|
end
|
273
|
-
# verify the required parameter 'message_signature' is set
|
274
|
-
if @api_client.config.client_side_validation && message_signature.nil?
|
275
|
-
fail ArgumentError, "Missing the required parameter 'message_signature' when calling PaymentApi.return_transaction"
|
276
|
-
end
|
277
376
|
# verify the required parameter 'transaction_id' is set
|
278
377
|
if @api_client.config.client_side_validation && transaction_id.nil?
|
279
378
|
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PaymentApi.return_transaction"
|
280
379
|
end
|
281
|
-
# verify the required parameter '
|
282
|
-
if @api_client.config.client_side_validation &&
|
283
|
-
fail ArgumentError, "Missing the required parameter '
|
380
|
+
# verify the required parameter 'secondary_transaction' is set
|
381
|
+
if @api_client.config.client_side_validation && secondary_transaction.nil?
|
382
|
+
fail ArgumentError, "Missing the required parameter 'secondary_transaction' when calling PaymentApi.return_transaction"
|
284
383
|
end
|
285
384
|
# resource path
|
286
|
-
local_var_path =
|
385
|
+
local_var_path = '/v1/payments/{transaction-id}/return'.sub('{' + 'transaction-id' + '}', transaction_id.to_s)
|
287
386
|
|
288
387
|
# query parameters
|
289
388
|
query_params = {}
|
@@ -294,17 +393,19 @@ module SwaggerClient
|
|
294
393
|
# HTTP header 'Accept' (if needed)
|
295
394
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
296
395
|
# HTTP header 'Content-Type'
|
396
|
+
# header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
297
397
|
# header_params[:'Content-Type'] = content_type
|
298
398
|
header_params[:'Client-Request-Id'] = client_request_id
|
299
399
|
header_params[:'Api-Key'] = api_key
|
300
400
|
header_params[:'Timestamp'] = timestamp
|
301
|
-
header_params[:'Message-Signature'] = message_signature
|
401
|
+
header_params[:'Message-Signature'] = opts[:'message_signature'] if !opts[:'message_signature'].nil?
|
402
|
+
header_params[:'Region'] = opts[:'region'] if !opts[:'region'].nil?
|
302
403
|
|
303
404
|
# form parameters
|
304
405
|
form_params = {}
|
305
406
|
|
306
407
|
# http body (model)
|
307
|
-
post_body = @api_client.object_to_http_body(
|
408
|
+
post_body = @api_client.object_to_http_body(secondary_transaction)
|
308
409
|
auth_names = []
|
309
410
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
310
411
|
:header_params => header_params,
|
@@ -313,6 +414,7 @@ module SwaggerClient
|
|
313
414
|
:body => post_body,
|
314
415
|
:auth_names => auth_names,
|
315
416
|
:return_type => 'TransactionResponse',
|
417
|
+
:default_error_type => 'ErrorResponse',
|
316
418
|
:error_type => 'TransactionErrorResponse')
|
317
419
|
if @api_client.config.debugging
|
318
420
|
@api_client.config.logger.debug "API called: PaymentApi#return_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
@@ -320,36 +422,38 @@ module SwaggerClient
|
|
320
422
|
return data, status_code, headers
|
321
423
|
end
|
322
424
|
|
323
|
-
# Retrieve the state of a transaction
|
425
|
+
# Retrieve the state of a transaction.
|
324
426
|
# Use this query to get the current state of an existing transaction.
|
325
427
|
# @param content_type content type
|
326
428
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
327
429
|
# @param api_key
|
328
430
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
329
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
330
431
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
331
432
|
# @param [Hash] opts the optional parameters
|
332
|
-
# @option opts [String] :
|
433
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
434
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
435
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
333
436
|
# @return [TransactionResponse]
|
334
|
-
def transaction_inquiry(content_type, client_request_id, api_key, timestamp,
|
335
|
-
data, _status_code, _headers = transaction_inquiry_with_http_info(content_type, client_request_id, api_key, timestamp,
|
336
|
-
|
437
|
+
def transaction_inquiry(content_type, client_request_id, api_key, timestamp, transaction_id, opts = {})
|
438
|
+
data, _status_code, _headers = transaction_inquiry_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, opts)
|
439
|
+
data
|
337
440
|
end
|
338
441
|
|
339
|
-
# Retrieve the state of a transaction
|
442
|
+
# Retrieve the state of a transaction.
|
340
443
|
# Use this query to get the current state of an existing transaction.
|
341
444
|
# @param content_type content type
|
342
445
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
343
446
|
# @param api_key
|
344
447
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
345
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
346
448
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
347
449
|
# @param [Hash] opts the optional parameters
|
348
|
-
# @option opts [String] :
|
450
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
451
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
452
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
349
453
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
350
|
-
def transaction_inquiry_with_http_info(content_type, client_request_id, api_key, timestamp,
|
454
|
+
def transaction_inquiry_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, opts = {})
|
351
455
|
if @api_client.config.debugging
|
352
|
-
@api_client.config.logger.debug
|
456
|
+
@api_client.config.logger.debug 'Calling API: PaymentApi.transaction_inquiry ...'
|
353
457
|
end
|
354
458
|
# verify the required parameter 'content_type' is set
|
355
459
|
if @api_client.config.client_side_validation && content_type.nil?
|
@@ -371,16 +475,12 @@ module SwaggerClient
|
|
371
475
|
if @api_client.config.client_side_validation && timestamp.nil?
|
372
476
|
fail ArgumentError, "Missing the required parameter 'timestamp' when calling PaymentApi.transaction_inquiry"
|
373
477
|
end
|
374
|
-
# verify the required parameter 'message_signature' is set
|
375
|
-
if @api_client.config.client_side_validation && message_signature.nil?
|
376
|
-
fail ArgumentError, "Missing the required parameter 'message_signature' when calling PaymentApi.transaction_inquiry"
|
377
|
-
end
|
378
478
|
# verify the required parameter 'transaction_id' is set
|
379
479
|
if @api_client.config.client_side_validation && transaction_id.nil?
|
380
480
|
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PaymentApi.transaction_inquiry"
|
381
481
|
end
|
382
482
|
# resource path
|
383
|
-
local_var_path =
|
483
|
+
local_var_path = '/v1/payments/{transaction-id}'.sub('{' + 'transaction-id' + '}', transaction_id.to_s)
|
384
484
|
|
385
485
|
# query parameters
|
386
486
|
query_params = {}
|
@@ -390,12 +490,12 @@ module SwaggerClient
|
|
390
490
|
header_params = {}
|
391
491
|
# HTTP header 'Accept' (if needed)
|
392
492
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
393
|
-
# HTTP header 'Content-Type'
|
394
493
|
# header_params[:'Content-Type'] = content_type
|
395
494
|
header_params[:'Client-Request-Id'] = client_request_id
|
396
495
|
header_params[:'Api-Key'] = api_key
|
397
496
|
header_params[:'Timestamp'] = timestamp
|
398
|
-
header_params[:'Message-Signature'] = message_signature
|
497
|
+
header_params[:'Message-Signature'] = opts[:'message_signature'] if !opts[:'message_signature'].nil?
|
498
|
+
header_params[:'Region'] = opts[:'region'] if !opts[:'region'].nil?
|
399
499
|
|
400
500
|
# form parameters
|
401
501
|
form_params = {}
|
@@ -410,6 +510,7 @@ module SwaggerClient
|
|
410
510
|
:body => post_body,
|
411
511
|
:auth_names => auth_names,
|
412
512
|
:return_type => 'TransactionResponse',
|
513
|
+
:default_error_type => 'ErrorResponse',
|
413
514
|
:error_type => 'TransactionErrorResponse')
|
414
515
|
if @api_client.config.debugging
|
415
516
|
@api_client.config.logger.debug "API called: PaymentApi#transaction_inquiry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
@@ -417,36 +518,38 @@ module SwaggerClient
|
|
417
518
|
return data, status_code, headers
|
418
519
|
end
|
419
520
|
|
420
|
-
# Reverse a previous action on an existing transaction
|
521
|
+
# Reverse a previous action on an existing transaction.
|
421
522
|
# Use this to reverse a postauth/completion, credit, preauth, or sale.
|
422
523
|
# @param content_type content type
|
423
524
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
424
525
|
# @param api_key
|
425
526
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
426
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
427
527
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
428
528
|
# @param [Hash] opts the optional parameters
|
429
|
-
# @option opts [String] :
|
529
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
530
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
531
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
430
532
|
# @return [TransactionResponse]
|
431
|
-
def void_transaction(content_type, client_request_id, api_key, timestamp,
|
432
|
-
data, _status_code, _headers = void_transaction_with_http_info(content_type, client_request_id, api_key, timestamp,
|
433
|
-
|
533
|
+
def void_transaction(content_type, client_request_id, api_key, timestamp, transaction_id, opts = {})
|
534
|
+
data, _status_code, _headers = void_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, opts)
|
535
|
+
data
|
434
536
|
end
|
435
537
|
|
436
|
-
# Reverse a previous action on an existing transaction
|
538
|
+
# Reverse a previous action on an existing transaction.
|
437
539
|
# Use this to reverse a postauth/completion, credit, preauth, or sale.
|
438
540
|
# @param content_type content type
|
439
541
|
# @param client_request_id A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format.
|
440
542
|
# @param api_key
|
441
543
|
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
442
|
-
# @param message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
443
544
|
# @param transaction_id Gateway transaction identifier as returned in the parameter ipgTransactionId
|
444
545
|
# @param [Hash] opts the optional parameters
|
445
|
-
# @option opts [String] :
|
546
|
+
# @option opts [String] :message_signature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal.
|
547
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
548
|
+
# @option opts [String] :store_id An optional outlet ID for clients that support multiple stores in the same developer app
|
446
549
|
# @return [Array<(TransactionResponse, Fixnum, Hash)>] TransactionResponse data, response status code and response headers
|
447
|
-
def void_transaction_with_http_info(content_type, client_request_id, api_key, timestamp,
|
550
|
+
def void_transaction_with_http_info(content_type, client_request_id, api_key, timestamp, transaction_id, opts = {})
|
448
551
|
if @api_client.config.debugging
|
449
|
-
@api_client.config.logger.debug
|
552
|
+
@api_client.config.logger.debug 'Calling API: PaymentApi.void_transaction ...'
|
450
553
|
end
|
451
554
|
# verify the required parameter 'content_type' is set
|
452
555
|
if @api_client.config.client_side_validation && content_type.nil?
|
@@ -468,16 +571,12 @@ module SwaggerClient
|
|
468
571
|
if @api_client.config.client_side_validation && timestamp.nil?
|
469
572
|
fail ArgumentError, "Missing the required parameter 'timestamp' when calling PaymentApi.void_transaction"
|
470
573
|
end
|
471
|
-
# verify the required parameter 'message_signature' is set
|
472
|
-
if @api_client.config.client_side_validation && message_signature.nil?
|
473
|
-
fail ArgumentError, "Missing the required parameter 'message_signature' when calling PaymentApi.void_transaction"
|
474
|
-
end
|
475
574
|
# verify the required parameter 'transaction_id' is set
|
476
575
|
if @api_client.config.client_side_validation && transaction_id.nil?
|
477
576
|
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PaymentApi.void_transaction"
|
478
577
|
end
|
479
578
|
# resource path
|
480
|
-
local_var_path =
|
579
|
+
local_var_path = '/v1/payments/{transaction-id}/void'.sub('{' + 'transaction-id' + '}', transaction_id.to_s)
|
481
580
|
|
482
581
|
# query parameters
|
483
582
|
query_params = {}
|
@@ -487,12 +586,12 @@ module SwaggerClient
|
|
487
586
|
header_params = {}
|
488
587
|
# HTTP header 'Accept' (if needed)
|
489
588
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
490
|
-
# HTTP header 'Content-Type'
|
491
589
|
# header_params[:'Content-Type'] = content_type
|
492
590
|
header_params[:'Client-Request-Id'] = client_request_id
|
493
591
|
header_params[:'Api-Key'] = api_key
|
494
592
|
header_params[:'Timestamp'] = timestamp
|
495
|
-
header_params[:'Message-Signature'] = message_signature
|
593
|
+
header_params[:'Message-Signature'] = opts[:'message_signature'] if !opts[:'message_signature'].nil?
|
594
|
+
header_params[:'Region'] = opts[:'region'] if !opts[:'region'].nil?
|
496
595
|
|
497
596
|
# form parameters
|
498
597
|
form_params = {}
|
@@ -507,11 +606,13 @@ module SwaggerClient
|
|
507
606
|
:body => post_body,
|
508
607
|
:auth_names => auth_names,
|
509
608
|
:return_type => 'TransactionResponse',
|
609
|
+
:default_error_type => 'ErrorResponse',
|
510
610
|
:error_type => 'TransactionErrorResponse')
|
511
611
|
if @api_client.config.debugging
|
512
612
|
@api_client.config.logger.debug "API called: PaymentApi#void_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
513
613
|
end
|
514
614
|
return data, status_code, headers
|
515
615
|
end
|
616
|
+
|
516
617
|
end
|
517
618
|
end
|