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
data/lib/simple/gateway.rb
CHANGED
@@ -11,11 +11,19 @@ module SimpleClient
|
|
11
11
|
|
12
12
|
def initialize(context)
|
13
13
|
@context = context
|
14
|
-
@authentication_api =
|
15
|
-
@
|
16
|
-
@
|
14
|
+
@authentication_api = OpenapiClient::AuthenticationApi.new(@context.client)
|
15
|
+
@card_info_api = OpenapiClient::CardInfoLookupApi.new(@context.client)
|
16
|
+
@card_verification_api = OpenapiClient::CardVerificationApi.new(@context.client)
|
17
|
+
@currency_conversion_api = OpenapiClient::CurrencyConversionApi.new(@context.client)
|
18
|
+
@fraud_detect_api = OpenapiClient::FraudDetectApi.new(@context.client)
|
19
|
+
@order_api = OpenapiClient::OrderApi.new(@context.client)
|
20
|
+
@payment_api = OpenapiClient::PaymentApi.new(@context.client)
|
21
|
+
@payment_schedules_api = OpenapiClient::PaymentSchedulesApi.new(@context.client)
|
22
|
+
@payment_token_api = OpenapiClient::PaymentTokenApi.new(@context.client)
|
23
|
+
@payment_url_api = OpenapiClient::PaymentURLApi.new(@context.client)
|
17
24
|
end
|
18
25
|
|
26
|
+
# Authentication API
|
19
27
|
def request_access_token
|
20
28
|
signature_service = get_signature_service
|
21
29
|
message_signature = signature_service.sign
|
@@ -24,117 +32,346 @@ module SimpleClient
|
|
24
32
|
signature_service.client_request_id,
|
25
33
|
get_api_key,
|
26
34
|
signature_service.timestamp,
|
27
|
-
message_signature
|
35
|
+
{message_signature: message_signature}
|
28
36
|
)
|
29
37
|
end
|
30
38
|
|
31
|
-
|
39
|
+
# Payment API
|
40
|
+
def primary_payment_transaction(payload:, region: nil)
|
41
|
+
opts = {}
|
42
|
+
opts[:region] = region if region
|
32
43
|
signature_service = get_signature_service
|
33
|
-
message_signature = signature_service.sign(payload)
|
44
|
+
opts[:message_signature] = signature_service.sign(payload)
|
34
45
|
return @payment_api.primary_payment_transaction(
|
35
46
|
CONTENT_TYPE,
|
36
47
|
signature_service.client_request_id,
|
37
48
|
get_api_key,
|
38
49
|
signature_service.timestamp,
|
39
|
-
|
40
|
-
|
50
|
+
payload,
|
51
|
+
opts
|
41
52
|
)
|
42
53
|
end
|
43
54
|
|
44
|
-
def
|
45
|
-
opts = {
|
55
|
+
def perform_payment_authorization_by_transaction(transaction_id:, payload:, store_id: nil, region: nil)
|
56
|
+
opts = {}
|
57
|
+
opts[:store_id] = store_id if store_id
|
58
|
+
opts[:region] = region if region
|
46
59
|
signature_service = get_signature_service
|
47
|
-
message_signature = signature_service.sign(payload)
|
60
|
+
opts[:message_signature] = signature_service.sign(payload)
|
61
|
+
return @payment_api.perform_payment_post_authorisation(
|
62
|
+
CONTENT_TYPE,
|
63
|
+
signature_service.client_request_id,
|
64
|
+
get_api_key,
|
65
|
+
signature_service.timestamp,
|
66
|
+
transaction_id,
|
67
|
+
payload,
|
68
|
+
opts
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
def return_transaction(transaction_id:, payload:, store_id: nil, region: nil)
|
73
|
+
opts = {}
|
74
|
+
opts[:store_id] = store_id if store_id
|
75
|
+
opts[:region] = region if region
|
76
|
+
signature_service = get_signature_service
|
77
|
+
opts[:message_signature] = signature_service.sign(payload)
|
48
78
|
return @payment_api.return_transaction(
|
49
79
|
CONTENT_TYPE,
|
50
80
|
signature_service.client_request_id,
|
51
81
|
get_api_key,
|
52
82
|
signature_service.timestamp,
|
53
|
-
message_signature,
|
54
83
|
transaction_id,
|
55
84
|
payload,
|
56
85
|
opts
|
57
86
|
)
|
58
87
|
end
|
59
88
|
|
60
|
-
def transaction_inquiry(transaction_id
|
61
|
-
opts = {
|
89
|
+
def transaction_inquiry(transaction_id:, store_id: nil, region: nil)
|
90
|
+
opts = {}
|
91
|
+
opts[:store_id] = store_id if store_id
|
92
|
+
opts[:region] = region if region
|
62
93
|
signature_service = get_signature_service
|
63
|
-
message_signature = signature_service.sign
|
94
|
+
opts[:message_signature] = signature_service.sign
|
64
95
|
return @payment_api.transaction_inquiry(
|
65
96
|
CONTENT_TYPE,
|
66
97
|
signature_service.client_request_id,
|
67
98
|
get_api_key,
|
68
99
|
signature_service.timestamp,
|
69
|
-
message_signature,
|
70
100
|
transaction_id,
|
71
101
|
opts
|
72
102
|
)
|
73
103
|
end
|
74
104
|
|
75
|
-
def void_transaction(transaction_id
|
76
|
-
opts = {
|
105
|
+
def void_transaction(transaction_id:, store_id: nil, region: nil)
|
106
|
+
opts = {}
|
107
|
+
opts[:store_id] = store_id if store_id
|
108
|
+
opts[:region] = region if region
|
77
109
|
signature_service = get_signature_service
|
78
|
-
message_signature = signature_service.sign
|
110
|
+
opts[:message_signature] = signature_service.sign
|
79
111
|
return @payment_api.void_transaction(
|
80
112
|
CONTENT_TYPE,
|
81
113
|
signature_service.client_request_id,
|
82
114
|
get_api_key,
|
83
115
|
signature_service.timestamp,
|
84
|
-
message_signature,
|
85
116
|
transaction_id,
|
86
117
|
opts
|
87
118
|
)
|
88
119
|
end
|
89
120
|
|
90
|
-
def
|
91
|
-
opts = {
|
121
|
+
def update_transaction(transaction_id:, payload:, region: nil)
|
122
|
+
opts = {}
|
123
|
+
opts[:region] = region if region
|
92
124
|
signature_service = get_signature_service
|
93
|
-
message_signature = signature_service.sign(payload)
|
94
|
-
return @
|
125
|
+
opts[:message_signature] = signature_service.sign(payload)
|
126
|
+
return @payment_api.finalize_secure_transaction(
|
95
127
|
CONTENT_TYPE,
|
96
128
|
signature_service.client_request_id,
|
97
129
|
get_api_key,
|
98
130
|
signature_service.timestamp,
|
99
|
-
|
100
|
-
order_id,
|
131
|
+
transaction_id,
|
101
132
|
payload,
|
102
133
|
opts
|
134
|
+
)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Order API
|
138
|
+
def order_inquiry(order_id:, store_id: nil, region: nil)
|
139
|
+
opts = {}
|
140
|
+
opts[:store_id] = store_id if store_id
|
141
|
+
opts[:region] = region if region
|
142
|
+
signature_service = get_signature_service
|
143
|
+
message_signature = signature_service.sign
|
144
|
+
opts[:message_signature] = message_signature
|
145
|
+
return @order_api.order_inquiry(
|
146
|
+
CONTENT_TYPE,
|
147
|
+
signature_service.client_request_id,
|
148
|
+
get_api_key,
|
149
|
+
signature_service.timestamp,
|
150
|
+
order_id,
|
151
|
+
opts
|
103
152
|
)
|
104
153
|
end
|
105
154
|
|
106
|
-
def
|
107
|
-
opts = {
|
155
|
+
def perform_payment_post_authorization_by_order(order_id:, payload:, store_id: nil, region: nil)
|
156
|
+
opts = {}
|
157
|
+
opts[:store_id] = store_id if store_id
|
158
|
+
opts[:region] = region if region
|
108
159
|
signature_service = get_signature_service
|
109
|
-
message_signature = signature_service.sign(payload)
|
110
|
-
return @
|
160
|
+
opts[:message_signature] = signature_service.sign(payload)
|
161
|
+
return @order_api.order_post_auth(
|
111
162
|
CONTENT_TYPE,
|
112
163
|
signature_service.client_request_id,
|
113
164
|
get_api_key,
|
114
165
|
signature_service.timestamp,
|
115
|
-
|
116
|
-
transaction_id,
|
166
|
+
order_id,
|
117
167
|
payload,
|
118
168
|
opts
|
119
169
|
)
|
120
170
|
end
|
121
171
|
|
122
|
-
def return_transaction_by_order(order_id
|
123
|
-
opts = {
|
172
|
+
def return_transaction_by_order(order_id:, payload:, store_id: nil, region: nil)
|
173
|
+
opts = {}
|
174
|
+
opts[:store_id] = store_id if store_id
|
175
|
+
opts[:region] = region if region
|
124
176
|
signature_service = get_signature_service
|
125
|
-
message_signature = signature_service.sign(payload)
|
126
|
-
return @order_api.
|
177
|
+
opts[:message_signature] = signature_service.sign(payload)
|
178
|
+
return @order_api.order_return_transaction(
|
127
179
|
CONTENT_TYPE,
|
128
180
|
signature_service.client_request_id,
|
129
181
|
get_api_key,
|
130
182
|
signature_service.timestamp,
|
131
|
-
message_signature,
|
132
183
|
order_id,
|
133
184
|
payload,
|
134
185
|
opts
|
135
186
|
)
|
136
187
|
end
|
137
188
|
|
189
|
+
# Card Verification API
|
190
|
+
def verify_card(payload:, region: nil)
|
191
|
+
opts = {}
|
192
|
+
opts[:region] = region if region
|
193
|
+
signature_service = get_signature_service
|
194
|
+
opts[:message_signature] = signature_service.sign(payload)
|
195
|
+
return @card_verification_api.verify_card(
|
196
|
+
CONTENT_TYPE,
|
197
|
+
signature_service.client_request_id,
|
198
|
+
get_api_key,
|
199
|
+
signature_service.timestamp,
|
200
|
+
payload,
|
201
|
+
opts
|
202
|
+
)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Currency Conversaion API
|
206
|
+
def get_exchange_rate(payload:, region: nil)
|
207
|
+
opts = {}
|
208
|
+
opts[:region] = region if region
|
209
|
+
signature_service = get_signature_service
|
210
|
+
opts[:message_signature] = signature_service.sign(payload)
|
211
|
+
return @currency_conversion_api.get_exchange_rate(
|
212
|
+
CONTENT_TYPE,
|
213
|
+
signature_service.client_request_id,
|
214
|
+
get_api_key,
|
215
|
+
signature_service.timestamp,
|
216
|
+
payload,
|
217
|
+
opts
|
218
|
+
)
|
219
|
+
end
|
220
|
+
|
221
|
+
# Fraud Detect API
|
222
|
+
def get_transaction_fraud_score(payload:, region: nil)
|
223
|
+
opts = {}
|
224
|
+
opts[:region] = region if region
|
225
|
+
signature_service = get_signature_service
|
226
|
+
opts[:message_signature] = signature_service.sign(payload)
|
227
|
+
return @fraud_detect_api.score_only(
|
228
|
+
CONTENT_TYPE,
|
229
|
+
signature_service.client_request_id,
|
230
|
+
get_api_key,
|
231
|
+
signature_service.timestamp,
|
232
|
+
payload,
|
233
|
+
opts
|
234
|
+
)
|
235
|
+
end
|
236
|
+
|
237
|
+
# Payment Schedules API
|
238
|
+
def cancel_payment_schedule(order_id:, store_id: nil, region: nil)
|
239
|
+
opts = {}
|
240
|
+
opts[:store_id] = store_id if store_id
|
241
|
+
opts[:region] = region if region
|
242
|
+
signature_service = get_signature_service
|
243
|
+
opts[:message_signature] = signature_service.sign
|
244
|
+
return @payment_schedules_api.cancel_payment_schedule(
|
245
|
+
CONTENT_TYPE,
|
246
|
+
signature_service.client_request_id,
|
247
|
+
get_api_key,
|
248
|
+
signature_service.timestamp,
|
249
|
+
order_id,
|
250
|
+
opts
|
251
|
+
)
|
252
|
+
end
|
253
|
+
|
254
|
+
def create_payment_schedule(payload:, region: nil)
|
255
|
+
opts = {}
|
256
|
+
opts[:region] = region if region
|
257
|
+
signature_service = get_signature_service
|
258
|
+
opts[:message_signature] = signature_service.sign(payload)
|
259
|
+
return @payment_schedules_api.create_payment_schedule(
|
260
|
+
CONTENT_TYPE,
|
261
|
+
signature_service.client_request_id,
|
262
|
+
get_api_key,
|
263
|
+
signature_service.timestamp,
|
264
|
+
payload,
|
265
|
+
opts
|
266
|
+
)
|
267
|
+
end
|
268
|
+
|
269
|
+
def payment_schedule_inquiry(order_id:, store_id: nil, region: nil)
|
270
|
+
opts = {}
|
271
|
+
opts[:store_id] = store_id if store_id
|
272
|
+
opts[:region] = region if region
|
273
|
+
signature_service = get_signature_service
|
274
|
+
opts[:message_signature] = signature_service.sign
|
275
|
+
return @payment_schedules_api.inquiry_payment_schedule(
|
276
|
+
CONTENT_TYPE,
|
277
|
+
signature_service.client_request_id,
|
278
|
+
get_api_key,
|
279
|
+
signature_service.timestamp,
|
280
|
+
order_id,
|
281
|
+
opts
|
282
|
+
)
|
283
|
+
end
|
284
|
+
|
285
|
+
def update_payment_schedule(payload:, order_id:, store_id: nil, region: nil)
|
286
|
+
opts = {}
|
287
|
+
opts[:store_id] = store_id if store_id
|
288
|
+
opts[:region] = region if region
|
289
|
+
signature_service = get_signature_service
|
290
|
+
opts[:message_signature] = signature_service.sign(payload)
|
291
|
+
return @payment_schedules_api.update_payment_schedule(
|
292
|
+
CONTENT_TYPE,
|
293
|
+
signature_service.client_request_id,
|
294
|
+
get_api_key,
|
295
|
+
signature_service.timestamp,
|
296
|
+
order_id,
|
297
|
+
payload,
|
298
|
+
opts
|
299
|
+
)
|
300
|
+
end
|
301
|
+
|
302
|
+
|
303
|
+
# Payment Token API
|
304
|
+
def create_payment_token(payload:, authorization: nil, region: nil)
|
305
|
+
opts = {}
|
306
|
+
opts[:region] = region if region
|
307
|
+
opts[:authorization] = authorization if authorization
|
308
|
+
signature_service = get_signature_service
|
309
|
+
message_signature = signature_service.sign(payload)
|
310
|
+
opts [:message_signature] = message_signature
|
311
|
+
return @payment_token_api.create_payment_token(
|
312
|
+
CONTENT_TYPE,
|
313
|
+
signature_service.client_request_id,
|
314
|
+
get_api_key,
|
315
|
+
signature_service.timestamp,
|
316
|
+
payload,
|
317
|
+
opts
|
318
|
+
)
|
319
|
+
end
|
320
|
+
|
321
|
+
def delete_payment_token(token_id:, authorization: nil, store_id: nil, region: nil)
|
322
|
+
opts = {}
|
323
|
+
opts[:region] = region if region
|
324
|
+
opts[:store_id] = store_id if store_id
|
325
|
+
opts[:authorization] = authorization if authorization
|
326
|
+
signature_service = get_signature_service
|
327
|
+
message_signature = signature_service.sign
|
328
|
+
opts [:message_signature] = message_signature
|
329
|
+
return @payment_token_api.delete_payment_token(
|
330
|
+
CONTENT_TYPE,
|
331
|
+
signature_service.client_request_id,
|
332
|
+
get_api_key,
|
333
|
+
signature_service.timestamp,
|
334
|
+
token_id,
|
335
|
+
opts
|
336
|
+
)
|
337
|
+
end
|
338
|
+
|
339
|
+
|
340
|
+
# Payment URL API
|
341
|
+
def create_payment_url(payload:, region: nil)
|
342
|
+
opts = {}
|
343
|
+
opts[:region] = region if region
|
344
|
+
signature_service = get_signature_service
|
345
|
+
message_signature = signature_service.sign(payload)
|
346
|
+
opts[:message_signature] = message_signature
|
347
|
+
return @payment_url_api.create_payment_url(
|
348
|
+
CONTENT_TYPE,
|
349
|
+
signature_service.client_request_id,
|
350
|
+
get_api_key,
|
351
|
+
signature_service.timestamp,
|
352
|
+
payload,
|
353
|
+
opts
|
354
|
+
)
|
355
|
+
end
|
356
|
+
|
357
|
+
|
358
|
+
# Card Info API
|
359
|
+
def card_info_lookup(payload:, region: nil)
|
360
|
+
opts = {}
|
361
|
+
opts[:region] = region if region
|
362
|
+
signature_service = get_signature_service
|
363
|
+
message_signature = signature_service.sign(payload)
|
364
|
+
opts[:message_signature] = message_signature
|
365
|
+
return @card_info_api.card_info_lookup(
|
366
|
+
CONTENT_TYPE,
|
367
|
+
signature_service.client_request_id,
|
368
|
+
get_api_key,
|
369
|
+
signature_service.timestamp,
|
370
|
+
payload,
|
371
|
+
opts
|
372
|
+
)
|
373
|
+
end
|
374
|
+
|
138
375
|
private
|
139
376
|
|
140
377
|
def get_signature_service
|
@@ -1,25 +1,25 @@
|
|
1
1
|
=begin
|
2
|
-
#Payment Gateway API Specification
|
2
|
+
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#Payment Gateway API for payment processing.
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
7
|
|
8
|
-
Generated by: https://
|
9
|
-
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
|
16
|
-
# Unit tests for
|
17
|
-
# Automatically generated by
|
16
|
+
# Unit tests for OpenapiClient::AuthenticationApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
18
|
# Please update as you see appropriate
|
19
19
|
describe 'AuthenticationApi' do
|
20
20
|
before do
|
21
21
|
# run before each test
|
22
|
-
@instance =
|
22
|
+
@instance = OpenapiClient::AuthenticationApi.new
|
23
23
|
end
|
24
24
|
|
25
25
|
after do
|
@@ -28,13 +28,13 @@ describe 'AuthenticationApi' do
|
|
28
28
|
|
29
29
|
describe 'test an instance of AuthenticationApi' do
|
30
30
|
it 'should create an instance of AuthenticationApi' do
|
31
|
-
expect(@instance).to be_instance_of(
|
31
|
+
expect(@instance).to be_instance_of(OpenapiClient::AuthenticationApi)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for v1_authentication_access_tokens_post
|
36
|
-
# Generate an access token for user authentication
|
37
|
-
# This is the access token generation call for authorizing subsequent financial transactions. A valid access token is required for web client requests.
|
36
|
+
# Generate an access token for user authentication.
|
37
|
+
# This is the access token generation call for authorizing subsequent financial transactions. A valid access token is required for web client requests.
|
38
38
|
# @param content_type content type
|
39
39
|
# @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.
|
40
40
|
# @param api_key
|
@@ -43,7 +43,7 @@ describe 'AuthenticationApi' do
|
|
43
43
|
# @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.
|
44
44
|
# @return [AccessTokenResponse]
|
45
45
|
describe 'v1_authentication_access_tokens_post test' do
|
46
|
-
it
|
46
|
+
it 'should work' do
|
47
47
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
48
48
|
end
|
49
49
|
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OpenapiClient::CardInfoLookupApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'CardInfoLookupApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = OpenapiClient::CardInfoLookupApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of CardInfoLookupApi' do
|
30
|
+
it 'should create an instance of CardInfoLookupApi' do
|
31
|
+
expect(@instance).to be_instance_of(OpenapiClient::CardInfoLookupApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for card_info_lookup
|
36
|
+
# Card information lookUp
|
37
|
+
# Use this to look up card related information such as issuer country, card function and card brand.
|
38
|
+
# @param content_type content type
|
39
|
+
# @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.
|
40
|
+
# @param api_key
|
41
|
+
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
42
|
+
# @param card_info_lookup_request Card information lookup payload.
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @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.
|
45
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
46
|
+
# @return [CardInfoLookupResponse]
|
47
|
+
describe 'card_info_lookup test' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OpenapiClient::CardVerificationApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'CardVerificationApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = OpenapiClient::CardVerificationApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of CardVerificationApi' do
|
30
|
+
it 'should create an instance of CardVerificationApi' do
|
31
|
+
expect(@instance).to be_instance_of(OpenapiClient::CardVerificationApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for verify_card
|
36
|
+
# Verify a payment card.
|
37
|
+
# Use this to perform card verification for a payment card.
|
38
|
+
# @param content_type content type
|
39
|
+
# @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.
|
40
|
+
# @param api_key
|
41
|
+
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
42
|
+
# @param card_verification_request
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @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.
|
45
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
46
|
+
# @return [TransactionResponse]
|
47
|
+
describe 'verify_card test' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OpenapiClient::CurrencyConversionApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'CurrencyConversionApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = OpenapiClient::CurrencyConversionApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of CurrencyConversionApi' do
|
30
|
+
it 'should create an instance of CurrencyConversionApi' do
|
31
|
+
expect(@instance).to be_instance_of(OpenapiClient::CurrencyConversionApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for get_exchange_rate
|
36
|
+
# Generate dynamic currency conversion transactions
|
37
|
+
# Sale, return and lookup exchange rate with dynamic currency conversion option
|
38
|
+
# @param content_type content type
|
39
|
+
# @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.
|
40
|
+
# @param api_key
|
41
|
+
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
42
|
+
# @param exchange_rate_request
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @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.
|
45
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
46
|
+
# @return [ExchangeRateResponse]
|
47
|
+
describe 'get_exchange_rate test' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for OpenapiClient::FraudDetectApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'FraudDetectApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = OpenapiClient::FraudDetectApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of FraudDetectApi' do
|
30
|
+
it 'should create an instance of FraudDetectApi' do
|
31
|
+
expect(@instance).to be_instance_of(OpenapiClient::FraudDetectApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for score_only
|
36
|
+
# Score a transaction for fraud.
|
37
|
+
# Use this to obtain a fraud score for a transaction.
|
38
|
+
# @param content_type content type
|
39
|
+
# @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.
|
40
|
+
# @param api_key
|
41
|
+
# @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins).
|
42
|
+
# @param score_only_request
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @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.
|
45
|
+
# @option opts [String] :region The region where client wants to process the transaction
|
46
|
+
# @return [ScoreOnlyResponse]
|
47
|
+
describe 'score_only test' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|