first_data_gateway 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +79 -0
- data/README.md +69 -39
- data/docs/AVSResponse.md +2 -2
- data/docs/AccessTokenResponse.md +2 -2
- data/docs/AccountUpdaterResponse.md +12 -0
- data/docs/AdditionalAmountRate.md +2 -2
- data/docs/AdditionalDetails.md +10 -0
- data/docs/AdditionalTransactionDetails.md +3 -3
- data/docs/Address.md +7 -7
- data/docs/Airline.md +12 -12
- data/docs/AirlineAncillaryServiceCategory.md +1 -1
- data/docs/AirlineTravelRoute.md +4 -4
- data/docs/AliPay.md +2 -2
- data/docs/{SecondaryTransactionAdditionalDetails.md → AliPayPaymentMethod.md} +2 -2
- data/docs/AliPaySaleTransaction.md +14 -0
- data/docs/Amount.md +2 -2
- data/docs/AmountComponents.md +6 -7
- data/docs/Authentication.md +8 -0
- data/docs/AuthenticationApi.md +12 -12
- data/docs/AuthenticationRedirect.md +10 -0
- data/docs/AuthenticationRedirectParams.md +10 -0
- data/docs/AuthenticationVerificationRequest.md +11 -0
- data/docs/BasicResponse.md +1 -1
- data/docs/Billing.md +3 -5
- data/docs/BillingAddress.md +4 -4
- data/docs/BillingAddressPhone.md +1 -1
- data/docs/CarRental.md +6 -6
- data/docs/CarRentalExtraCharges.md +1 -1
- data/docs/Card.md +6 -6
- data/docs/CardFunction.md +7 -0
- data/docs/CardInfo.md +2 -2
- data/docs/CardInfoLookupApi.md +14 -14
- data/docs/CardInfoLookupResponse.md +1 -1
- data/docs/CardVerificationApi.md +12 -12
- data/docs/CardVerificationRequest.md +1 -0
- data/docs/ChinaDomesticPaymentMethod.md +9 -0
- data/docs/ChinaPnRSaleTransaction.md +14 -0
- data/docs/ClientLocale.md +2 -2
- data/docs/Contact.md +4 -4
- data/docs/CreatePaymentToken.md +10 -0
- data/docs/CurrencyConversion.md +9 -0
- data/docs/CurrencyConversionApi.md +15 -15
- data/docs/Customer.md +6 -6
- data/docs/CustomerAddress.md +3 -3
- data/docs/CustomerAddressPhone.md +1 -1
- data/docs/DCCExchangeRateRequest.md +11 -0
- data/docs/Dcc.md +2 -1
- data/docs/Device.md +2 -2
- data/docs/DeviceNetworks.md +1 -1
- data/docs/Document.md +2 -2
- data/docs/DynamicPricing.md +11 -0
- data/docs/DynamicPricingExchangeRateRequest.md +11 -0
- data/docs/ErrorResponse.md +1 -1
- data/docs/ExchangeRateRequest.md +2 -4
- data/docs/ExchangeRateResponse.md +11 -11
- data/docs/Expiration.md +2 -2
- data/docs/FraudDetectApi.md +12 -12
- data/docs/FraudOrderItems.md +1 -1
- data/docs/FraudOrderShipToAddress.md +6 -6
- data/docs/Frequency.md +2 -2
- data/docs/InstallmentOptions.md +5 -3
- data/docs/Lodging.md +5 -5
- data/docs/MerchantLocationMerchantAddress.md +6 -6
- data/docs/Order.md +5 -0
- data/docs/OrderApi.md +36 -102
- data/docs/OrderErrorResponse.md +4 -5
- data/docs/OrderResponse.md +4 -5
- data/docs/PayPal.md +1 -1
- data/docs/PayPalPaymentMethod.md +8 -0
- data/docs/PaymentApi.md +67 -193
- data/docs/PaymentCard.md +8 -11
- data/docs/PaymentCardCreditTransaction.md +15 -0
- data/docs/PaymentCardForcedTicketTransaction.md +15 -0
- data/docs/PaymentCardPayerAuthTransaction.md +15 -0
- data/docs/PaymentCardPaymentMethod.md +9 -0
- data/docs/PaymentCardPaymentTokenizationRequest.md +13 -0
- data/docs/PaymentCardPreAuthTransaction.md +18 -0
- data/docs/PaymentCardSaleTransaction.md +18 -0
- data/docs/PaymentFacilitator.md +4 -4
- data/docs/PaymentMethod.md +0 -7
- data/docs/PaymentMethodDetails.md +9 -0
- data/docs/PaymentMethodPaymentSchedulesRequest.md +24 -0
- data/docs/PaymentMethodType.md +7 -0
- data/docs/PaymentPayMethod.md +1 -1
- data/docs/PaymentSchedulesApi.md +58 -58
- data/docs/PaymentSchedulesErrorResponse.md +1 -1
- data/docs/PaymentSchedulesRequest.md +5 -6
- data/docs/PaymentSchedulesResponse.md +1 -1
- data/docs/PaymentTokenApi.md +23 -23
- data/docs/PaymentTokenCreditTransaction.md +15 -0
- data/docs/PaymentTokenDetails.md +14 -0
- data/docs/PaymentTokenPaymentMethod.md +9 -0
- data/docs/PaymentTokenPreAuthTransaction.md +17 -0
- data/docs/PaymentTokenSaleTransaction.md +17 -0
- data/docs/PaymentTokenizationErrorResponse.md +8 -8
- data/docs/PaymentTokenizationRequest.md +4 -3
- data/docs/PaymentTokenizationResponse.md +8 -8
- data/docs/PaymentURLApi.md +12 -12
- data/docs/PaymentUrlErrorResponse.md +3 -3
- data/docs/PaymentUrlRequest.md +3 -3
- data/docs/PaymentUrlResponse.md +3 -3
- data/docs/PaymentVerification3ds.md +3 -3
- data/docs/PaymentVerificationAvs.md +3 -3
- data/docs/PaymentVerificationCvv.md +3 -3
- data/docs/PaypalCreditTransaction.md +14 -0
- data/docs/PostAuthTransaction.md +14 -0
- data/docs/PrimaryTransaction.md +3 -12
- data/docs/ProcessorData.md +8 -6
- data/docs/PurchaseCardsLevel2.md +3 -3
- data/docs/PurchaseCardsLevel3.md +1 -1
- data/docs/PurchaseCardsLevel3LineItems.md +8 -8
- data/docs/RecurringPaymentDetails.md +2 -2
- data/docs/RecurringPaymentDetailsResponse.md +4 -5
- data/docs/ReferencedOrderPaymentSchedulesRequest.md +24 -0
- data/docs/ReferencedOrderPaymentTokenizationRequest.md +13 -0
- data/docs/ResponseAmountComponents.md +14 -0
- data/docs/ReturnTransaction.md +13 -0
- data/docs/ScoreOnlyRequest.md +1 -1
- data/docs/ScoreOnlyResponse.md +3 -3
- data/docs/ScoreOnlyResponseFraudScore.md +1 -1
- data/docs/ScoreOnlyResponseFraudScoreExplanations.md +3 -3
- data/docs/SecondaryTransaction.md +3 -5
- data/docs/Secure3dAuthenticationRequest.md +8 -0
- data/docs/Secure3dAuthenticationResult.md +12 -0
- data/docs/Secure3dAuthenticationVerificationRequest.md +13 -0
- data/docs/Secure3dResponse.md +1 -1
- data/docs/Sepa.md +4 -4
- data/docs/SepaMandate.md +2 -2
- data/docs/SepaPaymentMethod.md +8 -0
- data/docs/SepaSaleTransaction.md +14 -0
- data/docs/Shipping.md +1 -1
- data/docs/SoftDescriptor.md +2 -2
- data/docs/SplitShipment.md +1 -1
- data/docs/StoredCredential.md +4 -4
- data/docs/SubMerchantData.md +4 -4
- data/docs/SubMerchantSplit.md +9 -0
- data/docs/Transaction.md +4 -4
- data/docs/TransactionErrorResponse.md +11 -10
- data/docs/TransactionResponse.md +11 -10
- data/docs/UnionPayAuthenticationRequest.md +9 -0
- data/docs/UnionPayAuthenticationVerificationRequest.md +12 -0
- data/docs/UsePaymentToken.md +10 -0
- data/docs/VoidTransaction.md +10 -0
- data/first_data_gateway.gemspec +3 -2
- data/lib/openapi_client/api/authentication_api.rb +18 -18
- data/lib/openapi_client/api/card_info_lookup_api.rb +15 -15
- data/lib/openapi_client/api/card_verification_api.rb +13 -13
- data/lib/openapi_client/api/currency_conversion_api.rb +17 -17
- data/lib/openapi_client/api/fraud_detect_api.rb +13 -17
- data/lib/openapi_client/api/order_api.rb +45 -153
- data/lib/openapi_client/api/payment_api.rb +88 -287
- data/lib/openapi_client/api/payment_schedules_api.rb +61 -63
- data/lib/openapi_client/api/payment_token_api.rb +24 -24
- data/lib/openapi_client/api/payment_url_api.rb +13 -13
- data/lib/openapi_client/api_client.rb +2 -2
- data/lib/openapi_client/api_error.rb +2 -2
- data/lib/openapi_client/configuration.rb +4 -4
- data/lib/openapi_client/models/access_token_response.rb +5 -5
- data/lib/openapi_client/models/account_updater_response.rb +225 -0
- data/lib/openapi_client/models/additional_amount_rate.rb +15 -4
- data/lib/openapi_client/models/{primary_transaction_additional_details.rb → additional_details.rb} +11 -113
- data/lib/openapi_client/models/additional_transaction_details.rb +6 -6
- data/lib/openapi_client/models/address.rb +9 -9
- data/lib/openapi_client/models/airline.rb +15 -15
- data/lib/openapi_client/models/airline_ancillary_service_category.rb +7 -2
- data/lib/openapi_client/models/airline_travel_route.rb +7 -6
- data/lib/openapi_client/models/ali_pay.rb +4 -4
- data/lib/openapi_client/models/{referenced_order.rb → ali_pay_payment_method.rb} +16 -20
- data/lib/openapi_client/models/ali_pay_sale_transaction.rb +286 -0
- data/lib/openapi_client/models/amount.rb +5 -5
- data/lib/openapi_client/models/amount_components.rb +13 -23
- data/lib/openapi_client/models/authentication.rb +190 -0
- data/lib/openapi_client/models/{authentication_request.rb → authentication_redirect.rb} +24 -20
- data/lib/openapi_client/models/authentication_redirect_params.rb +205 -0
- data/lib/openapi_client/models/authentication_verification_request.rb +234 -0
- data/lib/openapi_client/models/avs_response.rb +4 -2
- data/lib/openapi_client/models/basic_response.rb +2 -7
- data/lib/openapi_client/models/billing.rb +7 -76
- data/lib/openapi_client/models/billing_address.rb +7 -7
- data/lib/openapi_client/models/billing_address_phone.rb +4 -4
- data/lib/openapi_client/models/car_rental.rb +9 -9
- data/lib/openapi_client/models/car_rental_extra_charges.rb +3 -3
- data/lib/openapi_client/models/card.rb +9 -8
- data/lib/openapi_client/models/card_function.rb +33 -0
- data/lib/openapi_client/models/card_info.rb +4 -17
- data/lib/openapi_client/models/card_info_lookup_request.rb +3 -3
- data/lib/openapi_client/models/card_info_lookup_response.rb +2 -7
- data/lib/openapi_client/models/card_verification_request.rb +32 -7
- data/lib/openapi_client/models/china_domestic.rb +2 -2
- data/lib/openapi_client/models/{authentication_response_verification.rb → china_domestic_payment_method.rb} +33 -48
- data/lib/openapi_client/models/china_pn_r_sale_transaction.rb +286 -0
- data/lib/openapi_client/models/client_locale.rb +5 -5
- data/lib/openapi_client/models/contact.rb +7 -6
- data/lib/openapi_client/models/create_payment_token.rb +209 -0
- data/lib/openapi_client/models/{authentication_response_verification_request.rb → currency_conversion.rb} +29 -35
- data/lib/openapi_client/models/customer.rb +9 -9
- data/lib/openapi_client/models/customer_address.rb +6 -6
- data/lib/openapi_client/models/customer_address_phone.rb +4 -4
- data/lib/openapi_client/models/dcc.rb +24 -4
- data/lib/openapi_client/models/dcc_exchange_rate_request.rb +273 -0
- data/lib/openapi_client/models/device.rb +4 -3
- data/lib/openapi_client/models/device_networks.rb +4 -3
- data/lib/openapi_client/models/document.rb +4 -4
- data/lib/openapi_client/models/dynamic_pricing.rb +235 -0
- data/lib/openapi_client/models/dynamic_pricing_exchange_rate_request.rb +273 -0
- data/lib/openapi_client/models/error.rb +2 -2
- data/lib/openapi_client/models/error_details.rb +2 -2
- data/lib/openapi_client/models/error_response.rb +2 -7
- data/lib/openapi_client/models/exchange_rate_request.rb +26 -103
- data/lib/openapi_client/models/exchange_rate_response.rb +20 -25
- data/lib/openapi_client/models/expiration.rb +5 -5
- data/lib/openapi_client/models/fraud_order.rb +2 -2
- data/lib/openapi_client/models/fraud_order_items.rb +4 -2
- data/lib/openapi_client/models/fraud_order_ship_to_address.rb +8 -8
- data/lib/openapi_client/models/frequency.rb +5 -5
- data/lib/openapi_client/models/industry_specific_extensions.rb +3 -3
- data/lib/openapi_client/models/installment_options.rb +63 -9
- data/lib/openapi_client/models/lodging.rb +8 -8
- data/lib/openapi_client/models/lodging_extra_charges.rb +2 -2
- data/lib/openapi_client/models/loyalty.rb +2 -2
- data/lib/openapi_client/models/merchant.rb +2 -2
- data/lib/openapi_client/models/merchant_location.rb +2 -2
- data/lib/openapi_client/models/merchant_location_merchant_address.rb +9 -9
- data/lib/openapi_client/models/order.rb +52 -7
- data/lib/openapi_client/models/order_error_response.rb +6 -21
- data/lib/openapi_client/models/order_response.rb +7 -22
- data/lib/openapi_client/models/pay_pal.rb +3 -3
- data/lib/openapi_client/models/pay_pal_payment_method.rb +189 -0
- data/lib/openapi_client/models/payment.rb +2 -2
- data/lib/openapi_client/models/payment_card.rb +38 -58
- data/lib/openapi_client/models/payment_card_credit_transaction.rb +295 -0
- data/lib/openapi_client/models/payment_card_forced_ticket_transaction.rb +320 -0
- data/lib/openapi_client/models/payment_card_payer_auth_transaction.rb +295 -0
- data/lib/openapi_client/models/payment_card_payment_method.rb +198 -0
- data/lib/openapi_client/models/payment_card_payment_tokenization_request.rb +264 -0
- data/lib/openapi_client/models/payment_card_pre_auth_transaction.rb +325 -0
- data/lib/openapi_client/models/payment_card_sale_transaction.rb +325 -0
- data/lib/openapi_client/models/payment_facilitator.rb +7 -7
- data/lib/openapi_client/models/payment_issuer_response.rb +2 -2
- data/lib/openapi_client/models/payment_method.rb +5 -108
- data/lib/openapi_client/models/{basket_item.rb → payment_method_details.rb} +17 -38
- data/lib/openapi_client/models/payment_method_payment_schedules_request.rb +426 -0
- data/lib/openapi_client/models/payment_method_type.rb +47 -0
- data/lib/openapi_client/models/payment_pay_method.rb +4 -4
- data/lib/openapi_client/models/payment_schedules_error_response.rb +2 -7
- data/lib/openapi_client/models/payment_schedules_request.rb +41 -30
- data/lib/openapi_client/models/payment_schedules_response.rb +2 -7
- data/lib/openapi_client/models/payment_token_credit_transaction.rb +295 -0
- data/lib/openapi_client/models/{payment_tokenization.rb → payment_token_details.rb} +18 -96
- data/lib/openapi_client/models/payment_token_payment_method.rb +198 -0
- data/lib/openapi_client/models/payment_token_pre_auth_transaction.rb +316 -0
- data/lib/openapi_client/models/payment_token_sale_transaction.rb +316 -0
- data/lib/openapi_client/models/payment_tokenization_error_response.rb +10 -15
- data/lib/openapi_client/models/payment_tokenization_request.rb +60 -61
- data/lib/openapi_client/models/payment_tokenization_response.rb +10 -15
- data/lib/openapi_client/models/payment_url_error_response.rb +4 -9
- data/lib/openapi_client/models/payment_url_request.rb +11 -16
- data/lib/openapi_client/models/payment_url_response.rb +4 -9
- data/lib/openapi_client/models/payment_verification3ds.rb +5 -5
- data/lib/openapi_client/models/payment_verification_avs.rb +5 -5
- data/lib/openapi_client/models/payment_verification_cvv.rb +5 -5
- data/lib/openapi_client/models/paypal_credit_transaction.rb +286 -0
- data/lib/openapi_client/models/post_auth_transaction.rb +266 -0
- data/lib/openapi_client/models/primary_transaction.rb +30 -118
- data/lib/openapi_client/models/processor_data.rb +48 -7
- data/lib/openapi_client/models/purchase_cards.rb +3 -2
- data/lib/openapi_client/models/purchase_cards_level2.rb +6 -5
- data/lib/openapi_client/models/purchase_cards_level3.rb +9 -3
- data/lib/openapi_client/models/purchase_cards_level3_line_items.rb +16 -16
- data/lib/openapi_client/models/recurring_payment_details.rb +15 -15
- data/lib/openapi_client/models/recurring_payment_details_response.rb +6 -21
- data/lib/openapi_client/models/referenced_order_payment_schedules_request.rb +427 -0
- data/lib/openapi_client/models/referenced_order_payment_tokenization_request.rb +265 -0
- data/lib/openapi_client/models/response_amount_components.rb +245 -0
- data/lib/openapi_client/models/response_type.rb +2 -2
- data/lib/openapi_client/models/return_transaction.rb +257 -0
- data/lib/openapi_client/models/score_only_request.rb +4 -4
- data/lib/openapi_client/models/score_only_response.rb +6 -5
- data/lib/openapi_client/models/score_only_response_fraud_score.rb +4 -3
- data/lib/openapi_client/models/score_only_response_fraud_score_explanations.rb +5 -2
- data/lib/openapi_client/models/secondary_transaction.rb +45 -40
- data/lib/openapi_client/models/secure3d_authentication_request.rb +190 -0
- data/lib/openapi_client/models/{payment_card_authentication_result.rb → secure3d_authentication_result.rb} +34 -41
- data/lib/openapi_client/models/secure3d_authentication_verification_request.rb +264 -0
- data/lib/openapi_client/models/secure3d_response.rb +4 -3
- data/lib/openapi_client/models/sepa.rb +6 -6
- data/lib/openapi_client/models/sepa_mandate.rb +5 -5
- data/lib/openapi_client/models/{secondary_transaction_additional_details.rb → sepa_payment_method.rb} +16 -10
- data/lib/openapi_client/models/sepa_sale_transaction.rb +286 -0
- data/lib/openapi_client/models/shipping.rb +4 -3
- data/lib/openapi_client/models/soft_descriptor.rb +15 -15
- data/lib/openapi_client/models/split_shipment.rb +4 -4
- data/lib/openapi_client/models/stored_credential.rb +7 -7
- data/lib/openapi_client/models/sub_merchant_data.rb +7 -7
- data/lib/openapi_client/models/sub_merchant_split.rb +233 -0
- data/lib/openapi_client/models/transaction.rb +18 -18
- data/lib/openapi_client/models/transaction_error_response.rb +28 -24
- data/lib/openapi_client/models/transaction_origin.rb +2 -2
- data/lib/openapi_client/models/transaction_response.rb +32 -28
- data/lib/openapi_client/models/transaction_type.rb +2 -2
- data/lib/openapi_client/models/union_pay_authentication_request.rb +224 -0
- data/lib/openapi_client/models/union_pay_authentication_verification_request.rb +249 -0
- data/lib/openapi_client/models/use_payment_token.rb +233 -0
- data/lib/openapi_client/models/{card_verifications_transaction.rb → void_transaction.rb} +28 -17
- data/lib/openapi_client/version.rb +3 -3
- data/lib/openapi_client.rb +50 -12
- data/lib/simple/gateway.rb +8 -59
- data/lib/simple_client.rb +4 -4
- data/spec/api/authentication_api_spec.rb +7 -7
- data/spec/api/card_info_lookup_api_spec.rb +8 -8
- data/spec/api/card_verification_api_spec.rb +7 -7
- data/spec/api/currency_conversion_api_spec.rb +9 -9
- data/spec/api/fraud_detect_api_spec.rb +7 -7
- data/spec/api/order_api_spec.rb +19 -40
- data/spec/api/payment_api_spec.rb +33 -72
- data/spec/api/payment_schedules_api_spec.rb +29 -29
- data/spec/api/payment_token_api_spec.rb +12 -12
- data/spec/api/payment_url_api_spec.rb +7 -7
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/access_token_response_spec.rb +2 -2
- data/spec/models/account_updater_response_spec.rb +65 -0
- data/spec/models/additional_amount_rate_spec.rb +2 -2
- data/spec/models/additional_details_spec.rb +53 -0
- data/spec/models/additional_transaction_details_spec.rb +2 -2
- data/spec/models/address_spec.rb +2 -2
- data/spec/models/airline_ancillary_service_category_spec.rb +2 -2
- data/spec/models/airline_spec.rb +2 -2
- data/spec/models/airline_travel_route_spec.rb +2 -2
- data/spec/models/ali_pay_payment_method_spec.rb +41 -0
- data/spec/models/ali_pay_sale_transaction_spec.rb +77 -0
- data/spec/models/ali_pay_spec.rb +2 -2
- data/spec/models/amount_components_spec.rb +2 -8
- data/spec/models/amount_spec.rb +2 -2
- data/spec/models/authentication_redirect_params_spec.rb +53 -0
- data/spec/models/{authentication_response_verification_spec.rb → authentication_redirect_spec.rb} +11 -17
- data/spec/models/authentication_spec.rb +41 -0
- data/spec/models/{authentication_response_verification_request_spec.rb → authentication_verification_request_spec.rb} +11 -11
- data/spec/models/avs_response_spec.rb +2 -2
- data/spec/models/basic_response_spec.rb +2 -2
- data/spec/models/billing_address_phone_spec.rb +2 -2
- data/spec/models/billing_address_spec.rb +2 -2
- data/spec/models/billing_spec.rb +2 -18
- data/spec/models/car_rental_extra_charges_spec.rb +2 -2
- data/spec/models/car_rental_spec.rb +2 -2
- data/spec/models/card_function_spec.rb +35 -0
- data/spec/models/card_info_lookup_request_spec.rb +2 -2
- data/spec/models/card_info_lookup_response_spec.rb +2 -2
- data/spec/models/card_info_spec.rb +2 -6
- data/spec/models/card_spec.rb +2 -2
- data/spec/models/card_verification_request_spec.rb +8 -2
- data/spec/models/china_domestic_payment_method_spec.rb +51 -0
- data/spec/models/china_domestic_spec.rb +2 -2
- data/spec/models/china_pn_r_sale_transaction_spec.rb +77 -0
- data/spec/models/client_locale_spec.rb +2 -2
- data/spec/models/contact_spec.rb +2 -2
- data/spec/models/create_payment_token_spec.rb +53 -0
- data/spec/models/currency_conversion_spec.rb +47 -0
- data/spec/models/customer_address_phone_spec.rb +2 -2
- data/spec/models/customer_address_spec.rb +2 -2
- data/spec/models/customer_spec.rb +2 -2
- data/spec/models/dcc_exchange_rate_request_spec.rb +59 -0
- data/spec/models/dcc_spec.rb +8 -2
- data/spec/models/device_networks_spec.rb +2 -2
- data/spec/models/device_spec.rb +2 -2
- data/spec/models/document_spec.rb +2 -2
- data/spec/models/dynamic_pricing_exchange_rate_request_spec.rb +59 -0
- data/spec/models/{basket_item_spec.rb → dynamic_pricing_spec.rb} +12 -12
- data/spec/models/error_details_spec.rb +2 -2
- data/spec/models/error_response_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/exchange_rate_request_spec.rb +4 -20
- data/spec/models/exchange_rate_response_spec.rb +3 -3
- data/spec/models/expiration_spec.rb +2 -2
- data/spec/models/fraud_order_items_spec.rb +2 -2
- data/spec/models/fraud_order_ship_to_address_spec.rb +2 -2
- data/spec/models/fraud_order_spec.rb +2 -2
- data/spec/models/frequency_spec.rb +2 -2
- data/spec/models/industry_specific_extensions_spec.rb +2 -2
- data/spec/models/installment_options_spec.rb +18 -2
- data/spec/models/lodging_extra_charges_spec.rb +2 -2
- data/spec/models/lodging_spec.rb +2 -2
- data/spec/models/loyalty_spec.rb +2 -2
- data/spec/models/merchant_location_merchant_address_spec.rb +2 -2
- data/spec/models/merchant_location_spec.rb +2 -2
- data/spec/models/merchant_spec.rb +2 -2
- data/spec/models/order_error_response_spec.rb +2 -8
- data/spec/models/order_response_spec.rb +2 -8
- data/spec/models/order_spec.rb +32 -2
- data/spec/models/pay_pal_payment_method_spec.rb +41 -0
- data/spec/models/pay_pal_spec.rb +2 -2
- data/spec/models/payment_card_credit_transaction_spec.rb +83 -0
- data/spec/models/{primary_transaction_additional_details_spec.rb → payment_card_forced_ticket_transaction_spec.rb} +16 -22
- data/spec/models/payment_card_payer_auth_transaction_spec.rb +83 -0
- data/spec/models/payment_card_payment_method_spec.rb +47 -0
- data/spec/models/payment_card_payment_tokenization_request_spec.rb +71 -0
- data/spec/models/payment_card_pre_auth_transaction_spec.rb +101 -0
- data/spec/models/payment_card_sale_transaction_spec.rb +101 -0
- data/spec/models/payment_card_spec.rb +3 -21
- data/spec/models/payment_facilitator_spec.rb +2 -2
- data/spec/models/payment_issuer_response_spec.rb +2 -2
- data/spec/models/payment_method_details_spec.rb +47 -0
- data/spec/models/payment_method_payment_schedules_request_spec.rb +137 -0
- data/spec/models/payment_method_spec.rb +2 -48
- data/spec/models/payment_method_type_spec.rb +35 -0
- data/spec/models/payment_pay_method_spec.rb +2 -2
- data/spec/models/payment_schedules_error_response_spec.rb +2 -2
- data/spec/models/payment_schedules_request_spec.rb +5 -11
- data/spec/models/payment_schedules_response_spec.rb +2 -2
- data/spec/models/payment_spec.rb +2 -2
- data/spec/models/payment_token_credit_transaction_spec.rb +83 -0
- data/spec/models/{payment_tokenization_spec.rb → payment_token_details_spec.rb} +9 -25
- data/spec/models/payment_token_payment_method_spec.rb +47 -0
- data/spec/models/payment_token_pre_auth_transaction_spec.rb +95 -0
- data/spec/models/payment_token_sale_transaction_spec.rb +95 -0
- data/spec/models/payment_tokenization_error_response_spec.rb +2 -2
- data/spec/models/payment_tokenization_request_spec.rb +12 -10
- data/spec/models/payment_tokenization_response_spec.rb +2 -2
- data/spec/models/payment_url_error_response_spec.rb +2 -2
- data/spec/models/payment_url_request_spec.rb +3 -3
- data/spec/models/payment_url_response_spec.rb +2 -2
- data/spec/models/payment_verification3ds_spec.rb +2 -2
- data/spec/models/payment_verification_avs_spec.rb +2 -2
- data/spec/models/payment_verification_cvv_spec.rb +2 -2
- data/spec/models/paypal_credit_transaction_spec.rb +77 -0
- data/spec/models/post_auth_transaction_spec.rb +77 -0
- data/spec/models/primary_transaction_spec.rb +5 -59
- data/spec/models/processor_data_spec.rb +14 -2
- data/spec/models/purchase_cards_level2_spec.rb +2 -2
- data/spec/models/purchase_cards_level3_line_items_spec.rb +3 -3
- data/spec/models/purchase_cards_level3_spec.rb +2 -2
- data/spec/models/purchase_cards_spec.rb +2 -2
- data/spec/models/recurring_payment_details_response_spec.rb +2 -8
- data/spec/models/recurring_payment_details_spec.rb +4 -4
- data/spec/models/referenced_order_payment_schedules_request_spec.rb +137 -0
- data/spec/models/referenced_order_payment_tokenization_request_spec.rb +71 -0
- data/spec/models/response_amount_components_spec.rb +77 -0
- data/spec/models/response_type_spec.rb +2 -2
- data/spec/models/return_transaction_spec.rb +71 -0
- data/spec/models/score_only_request_spec.rb +2 -2
- data/spec/models/score_only_response_fraud_score_explanations_spec.rb +2 -2
- data/spec/models/score_only_response_fraud_score_spec.rb +2 -2
- data/spec/models/score_only_response_spec.rb +2 -2
- data/spec/models/secondary_transaction_spec.rb +5 -17
- data/spec/models/secure3d_authentication_request_spec.rb +41 -0
- data/spec/models/{payment_card_authentication_result_spec.rb → secure3d_authentication_result_spec.rb} +11 -15
- data/spec/models/secure3d_authentication_verification_request_spec.rb +71 -0
- data/spec/models/secure3d_response_spec.rb +2 -2
- data/spec/models/sepa_mandate_spec.rb +2 -2
- data/spec/models/sepa_payment_method_spec.rb +41 -0
- data/spec/models/sepa_sale_transaction_spec.rb +77 -0
- data/spec/models/sepa_spec.rb +2 -2
- data/spec/models/shipping_spec.rb +2 -2
- data/spec/models/soft_descriptor_spec.rb +3 -3
- data/spec/models/split_shipment_spec.rb +2 -2
- data/spec/models/stored_credential_spec.rb +2 -2
- data/spec/models/sub_merchant_data_spec.rb +2 -2
- data/spec/models/{card_verifications_transaction_spec.rb → sub_merchant_split_spec.rb} +10 -10
- data/spec/models/transaction_error_response_spec.rb +10 -4
- data/spec/models/transaction_origin_spec.rb +2 -2
- data/spec/models/transaction_response_spec.rb +10 -4
- data/spec/models/transaction_spec.rb +4 -4
- data/spec/models/transaction_type_spec.rb +2 -2
- data/spec/models/{authentication_request_spec.rb → union_pay_authentication_request_spec.rb} +9 -13
- data/spec/models/union_pay_authentication_verification_request_spec.rb +65 -0
- data/spec/models/use_payment_token_spec.rb +53 -0
- data/spec/models/void_transaction_spec.rb +53 -0
- data/spec/spec_helper.rb +2 -2
- metadata +195 -42
- data/docs/AuthenticationRequest.md +0 -9
- data/docs/AuthenticationResponseVerification.md +0 -11
- data/docs/AuthenticationResponseVerificationRequest.md +0 -11
- data/docs/BasketItem.md +0 -11
- data/docs/CardVerificationsTransaction.md +0 -9
- data/docs/PaymentCardAuthenticationResult.md +0 -12
- data/docs/PaymentTokenization.md +0 -16
- data/docs/PrimaryTransactionAdditionalDetails.md +0 -16
- data/docs/ReferencedOrder.md +0 -9
- data/spec/models/referenced_order_spec.rb +0 -47
- data/spec/models/secondary_transaction_additional_details_spec.rb +0 -41
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: unset
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OpenapiClient
|
16
|
-
#
|
16
|
+
# Common object for primary and secondary payment request responses.
|
17
17
|
class OrderResponse
|
18
18
|
# Echoes back the value in the request header for tracking.
|
19
19
|
attr_accessor :client_request_id
|
@@ -23,13 +23,10 @@ module OpenapiClient
|
|
23
23
|
|
24
24
|
attr_accessor :response_type
|
25
25
|
|
26
|
-
#
|
27
|
-
attr_accessor :ipg_transaction_id
|
28
|
-
|
29
|
-
# Client order ID if supplied by client, otherwise the order ID
|
26
|
+
# Client order ID if supplied by client, otherwise the order ID.
|
30
27
|
attr_accessor :order_id
|
31
28
|
|
32
|
-
# The transaction time in seconds since
|
29
|
+
# The transaction time in seconds since epoch.
|
33
30
|
attr_accessor :transaction_time
|
34
31
|
|
35
32
|
attr_accessor :billing
|
@@ -38,7 +35,7 @@ module OpenapiClient
|
|
38
35
|
|
39
36
|
attr_accessor :mandate
|
40
37
|
|
41
|
-
# Required for some payment methods (for example, Klarna)
|
38
|
+
# Required for some payment methods (for example, Klarna).
|
42
39
|
attr_accessor :transactions
|
43
40
|
|
44
41
|
attr_accessor :processor
|
@@ -49,7 +46,6 @@ module OpenapiClient
|
|
49
46
|
:'client_request_id' => :'clientRequestId',
|
50
47
|
:'api_trace_id' => :'apiTraceId',
|
51
48
|
:'response_type' => :'responseType',
|
52
|
-
:'ipg_transaction_id' => :'ipgTransactionId',
|
53
49
|
:'order_id' => :'orderId',
|
54
50
|
:'transaction_time' => :'transactionTime',
|
55
51
|
:'billing' => :'billing',
|
@@ -66,7 +62,6 @@ module OpenapiClient
|
|
66
62
|
:'client_request_id' => :'String',
|
67
63
|
:'api_trace_id' => :'String',
|
68
64
|
:'response_type' => :'ResponseType',
|
69
|
-
:'ipg_transaction_id' => :'String',
|
70
65
|
:'order_id' => :'String',
|
71
66
|
:'transaction_time' => :'Integer',
|
72
67
|
:'billing' => :'Billing',
|
@@ -97,10 +92,6 @@ module OpenapiClient
|
|
97
92
|
self.response_type = attributes[:'responseType']
|
98
93
|
end
|
99
94
|
|
100
|
-
if attributes.has_key?(:'ipgTransactionId')
|
101
|
-
self.ipg_transaction_id = attributes[:'ipgTransactionId']
|
102
|
-
end
|
103
|
-
|
104
95
|
if attributes.has_key?(:'orderId')
|
105
96
|
self.order_id = attributes[:'orderId']
|
106
97
|
end
|
@@ -136,17 +127,12 @@ module OpenapiClient
|
|
136
127
|
# @return Array for valid properties with the reasons
|
137
128
|
def list_invalid_properties
|
138
129
|
invalid_properties = Array.new
|
139
|
-
if @response_type.nil?
|
140
|
-
invalid_properties.push('invalid value for "response_type", response_type cannot be nil.')
|
141
|
-
end
|
142
|
-
|
143
130
|
invalid_properties
|
144
131
|
end
|
145
132
|
|
146
133
|
# Check to see if the all the properties in the model are valid
|
147
134
|
# @return true if the model is valid
|
148
135
|
def valid?
|
149
|
-
return false if @response_type.nil?
|
150
136
|
true
|
151
137
|
end
|
152
138
|
|
@@ -158,7 +144,6 @@ module OpenapiClient
|
|
158
144
|
client_request_id == o.client_request_id &&
|
159
145
|
api_trace_id == o.api_trace_id &&
|
160
146
|
response_type == o.response_type &&
|
161
|
-
ipg_transaction_id == o.ipg_transaction_id &&
|
162
147
|
order_id == o.order_id &&
|
163
148
|
transaction_time == o.transaction_time &&
|
164
149
|
billing == o.billing &&
|
@@ -177,7 +162,7 @@ module OpenapiClient
|
|
177
162
|
# Calculates hash code according to all attributes.
|
178
163
|
# @return [Fixnum] Hash code
|
179
164
|
def hash
|
180
|
-
[client_request_id, api_trace_id, response_type,
|
165
|
+
[client_request_id, api_trace_id, response_type, order_id, transaction_time, billing, shipping, mandate, transactions, processor].hash
|
181
166
|
end
|
182
167
|
|
183
168
|
# Builds the object from hash
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -15,7 +15,7 @@ require 'date'
|
|
15
15
|
module OpenapiClient
|
16
16
|
# The payment object for PayPal transactions.
|
17
17
|
class PayPal
|
18
|
-
# Email address of the recipient
|
18
|
+
# Email address of the recipient.
|
19
19
|
attr_accessor :recipient_email
|
20
20
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -0,0 +1,189 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
# Payment method containing PayPal information.
|
17
|
+
class PayPalPaymentMethod
|
18
|
+
attr_accessor :pay_pal
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'pay_pal' => :'payPal'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.openapi_types
|
29
|
+
{
|
30
|
+
:'pay_pal' => :'PayPal'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
41
|
+
|
42
|
+
if attributes.has_key?(:'payPal')
|
43
|
+
self.pay_pal = attributes[:'payPal']
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properties with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
if @pay_pal.nil?
|
52
|
+
invalid_properties.push('invalid value for "pay_pal", pay_pal cannot be nil.')
|
53
|
+
end
|
54
|
+
|
55
|
+
invalid_properties
|
56
|
+
end
|
57
|
+
|
58
|
+
# Check to see if the all the properties in the model are valid
|
59
|
+
# @return true if the model is valid
|
60
|
+
def valid?
|
61
|
+
return false if @pay_pal.nil?
|
62
|
+
true
|
63
|
+
end
|
64
|
+
|
65
|
+
# Checks equality by comparing each attribute.
|
66
|
+
# @param [Object] Object to be compared
|
67
|
+
def ==(o)
|
68
|
+
return true if self.equal?(o)
|
69
|
+
self.class == o.class &&
|
70
|
+
pay_pal == o.pay_pal
|
71
|
+
end
|
72
|
+
|
73
|
+
# @see the `==` method
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def eql?(o)
|
76
|
+
self == o
|
77
|
+
end
|
78
|
+
|
79
|
+
# Calculates hash code according to all attributes.
|
80
|
+
# @return [Fixnum] Hash code
|
81
|
+
def hash
|
82
|
+
[pay_pal].hash
|
83
|
+
end
|
84
|
+
|
85
|
+
# Builds the object from hash
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
# @return [Object] Returns the model itself
|
88
|
+
def build_from_hash(attributes)
|
89
|
+
return nil unless attributes.is_a?(Hash)
|
90
|
+
self.class.openapi_types.each_pair do |key, type|
|
91
|
+
if type =~ /\AArray<(.*)>/i
|
92
|
+
# check to ensure the input is an array given that the the attribute
|
93
|
+
# is documented as an array but the input is not
|
94
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
95
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
96
|
+
end
|
97
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
98
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
99
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
100
|
+
end
|
101
|
+
|
102
|
+
self
|
103
|
+
end
|
104
|
+
|
105
|
+
# Deserializes the data based on type
|
106
|
+
# @param string type Data type
|
107
|
+
# @param string value Value to be deserialized
|
108
|
+
# @return [Object] Deserialized data
|
109
|
+
def _deserialize(type, value)
|
110
|
+
case type.to_sym
|
111
|
+
when :DateTime
|
112
|
+
DateTime.parse(value)
|
113
|
+
when :Date
|
114
|
+
Date.parse(value)
|
115
|
+
when :String
|
116
|
+
value.to_s
|
117
|
+
when :Integer
|
118
|
+
value.to_i
|
119
|
+
when :Float
|
120
|
+
value.to_f
|
121
|
+
when :BOOLEAN
|
122
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
123
|
+
true
|
124
|
+
else
|
125
|
+
false
|
126
|
+
end
|
127
|
+
when :Object
|
128
|
+
# generic object (usually a Hash), return directly
|
129
|
+
value
|
130
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
131
|
+
inner_type = Regexp.last_match[:inner_type]
|
132
|
+
value.map { |v| _deserialize(inner_type, v) }
|
133
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
134
|
+
k_type = Regexp.last_match[:k_type]
|
135
|
+
v_type = Regexp.last_match[:v_type]
|
136
|
+
{}.tap do |hash|
|
137
|
+
value.each do |k, v|
|
138
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
else # model
|
142
|
+
temp_model = OpenapiClient.const_get(type).new
|
143
|
+
temp_model.build_from_hash(value)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Returns the string representation of the object
|
148
|
+
# @return [String] String presentation of the object
|
149
|
+
def to_s
|
150
|
+
to_hash.to_s
|
151
|
+
end
|
152
|
+
|
153
|
+
# to_body is an alias to to_hash (backward compatibility)
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
155
|
+
def to_body
|
156
|
+
to_hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the object in the form of hash
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_hash
|
162
|
+
hash = {}
|
163
|
+
self.class.attribute_map.each_pair do |attr, param|
|
164
|
+
value = self.send(attr)
|
165
|
+
next if value.nil?
|
166
|
+
hash[param] = _to_hash(value)
|
167
|
+
end
|
168
|
+
hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Outputs non-array value in the form of hash
|
172
|
+
# For object, use to_hash. Otherwise, just return the value
|
173
|
+
# @param [Object] value Any valid value
|
174
|
+
# @return [Hash] Returns the value in the form of hash
|
175
|
+
def _to_hash(value)
|
176
|
+
if value.is_a?(Array)
|
177
|
+
value.compact.map { |v| _to_hash(v) }
|
178
|
+
elsif value.is_a?(Hash)
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
181
|
+
end
|
182
|
+
elsif value.respond_to? :to_hash
|
183
|
+
value.to_hash
|
184
|
+
else
|
185
|
+
value
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Payment Gateway API Specification.
|
3
3
|
|
4
|
-
#
|
4
|
+
#The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
|
5
5
|
|
6
|
-
OpenAPI spec version: 6.
|
6
|
+
OpenAPI spec version: 6.6.0.20190329.001
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: unset
|
@@ -13,55 +13,44 @@ OpenAPI Generator version: unset
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OpenapiClient
|
16
|
-
# Payment card model
|
16
|
+
# Payment card model.
|
17
17
|
class PaymentCard
|
18
|
-
# Payment card number
|
18
|
+
# Payment card number.
|
19
19
|
attr_accessor :number
|
20
20
|
|
21
21
|
attr_accessor :expiry_date
|
22
22
|
|
23
|
-
# Card
|
23
|
+
# Card verification value/number.
|
24
24
|
attr_accessor :security_code
|
25
25
|
|
26
|
-
attr_accessor :payment_tokenization
|
27
|
-
|
28
|
-
# Card function. Optional, valid values are CREDIT or DEBIT.
|
29
26
|
attr_accessor :card_function
|
30
27
|
|
31
|
-
# Name of the cardholder
|
28
|
+
# Name of the cardholder.
|
32
29
|
attr_accessor :cardholder_name
|
33
30
|
|
34
|
-
attr_accessor :
|
35
|
-
|
36
|
-
attr_accessor :authentication_result
|
31
|
+
attr_accessor :authentication
|
37
32
|
|
38
|
-
# The payment card BIN
|
33
|
+
# The payment card BIN.
|
39
34
|
attr_accessor :bin
|
40
35
|
|
41
|
-
# The last 4 payment card
|
36
|
+
# The last 4 numbers of a payment card.
|
42
37
|
attr_accessor :last4
|
43
38
|
|
44
|
-
#
|
39
|
+
# Required only if using dual branded card.
|
45
40
|
attr_accessor :brand
|
46
41
|
|
47
|
-
# The issuing country
|
48
|
-
attr_accessor :issuing_country
|
49
|
-
|
50
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
43
|
def self.attribute_map
|
52
44
|
{
|
53
45
|
:'number' => :'number',
|
54
46
|
:'expiry_date' => :'expiryDate',
|
55
47
|
:'security_code' => :'securityCode',
|
56
|
-
:'payment_tokenization' => :'paymentTokenization',
|
57
48
|
:'card_function' => :'cardFunction',
|
58
49
|
:'cardholder_name' => :'cardholderName',
|
59
|
-
:'
|
60
|
-
:'authentication_result' => :'authenticationResult',
|
50
|
+
:'authentication' => :'authentication',
|
61
51
|
:'bin' => :'bin',
|
62
52
|
:'last4' => :'last4',
|
63
|
-
:'brand' => :'brand'
|
64
|
-
:'issuing_country' => :'issuingCountry'
|
53
|
+
:'brand' => :'brand'
|
65
54
|
}
|
66
55
|
end
|
67
56
|
|
@@ -71,15 +60,12 @@ module OpenapiClient
|
|
71
60
|
:'number' => :'String',
|
72
61
|
:'expiry_date' => :'Expiration',
|
73
62
|
:'security_code' => :'String',
|
74
|
-
:'
|
75
|
-
:'card_function' => :'String',
|
63
|
+
:'card_function' => :'CardFunction',
|
76
64
|
:'cardholder_name' => :'String',
|
77
|
-
:'
|
78
|
-
:'authentication_result' => :'PaymentCardAuthenticationResult',
|
65
|
+
:'authentication' => :'Authentication',
|
79
66
|
:'bin' => :'String',
|
80
67
|
:'last4' => :'String',
|
81
|
-
:'brand' => :'String'
|
82
|
-
:'issuing_country' => :'String'
|
68
|
+
:'brand' => :'String'
|
83
69
|
}
|
84
70
|
end
|
85
71
|
|
@@ -103,10 +89,6 @@ module OpenapiClient
|
|
103
89
|
self.security_code = attributes[:'securityCode']
|
104
90
|
end
|
105
91
|
|
106
|
-
if attributes.has_key?(:'paymentTokenization')
|
107
|
-
self.payment_tokenization = attributes[:'paymentTokenization']
|
108
|
-
end
|
109
|
-
|
110
92
|
if attributes.has_key?(:'cardFunction')
|
111
93
|
self.card_function = attributes[:'cardFunction']
|
112
94
|
end
|
@@ -115,12 +97,8 @@ module OpenapiClient
|
|
115
97
|
self.cardholder_name = attributes[:'cardholderName']
|
116
98
|
end
|
117
99
|
|
118
|
-
if attributes.has_key?(:'
|
119
|
-
self.
|
120
|
-
end
|
121
|
-
|
122
|
-
if attributes.has_key?(:'authenticationResult')
|
123
|
-
self.authentication_result = attributes[:'authenticationResult']
|
100
|
+
if attributes.has_key?(:'authentication')
|
101
|
+
self.authentication = attributes[:'authentication']
|
124
102
|
end
|
125
103
|
|
126
104
|
if attributes.has_key?(:'bin')
|
@@ -134,25 +112,25 @@ module OpenapiClient
|
|
134
112
|
if attributes.has_key?(:'brand')
|
135
113
|
self.brand = attributes[:'brand']
|
136
114
|
end
|
137
|
-
|
138
|
-
if attributes.has_key?(:'issuingCountry')
|
139
|
-
self.issuing_country = attributes[:'issuingCountry']
|
140
|
-
end
|
141
115
|
end
|
142
116
|
|
143
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
144
118
|
# @return Array for valid properties with the reasons
|
145
119
|
def list_invalid_properties
|
146
120
|
invalid_properties = Array.new
|
147
|
-
if
|
121
|
+
if @number.nil?
|
122
|
+
invalid_properties.push('invalid value for "number", number cannot be nil.')
|
123
|
+
end
|
124
|
+
|
125
|
+
if @number.to_s.length > 19
|
148
126
|
invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 19.')
|
149
127
|
end
|
150
128
|
|
151
|
-
if
|
129
|
+
if @number.to_s.length < 13
|
152
130
|
invalid_properties.push('invalid value for "number", the character length must be great than or equal to 13.')
|
153
131
|
end
|
154
132
|
|
155
|
-
if
|
133
|
+
if @number !~ Regexp.new(/[0-9]{13,19}/)
|
156
134
|
invalid_properties.push('invalid value for "number", must conform to the pattern /[0-9]{13,19}/.')
|
157
135
|
end
|
158
136
|
|
@@ -174,9 +152,10 @@ module OpenapiClient
|
|
174
152
|
# Check to see if the all the properties in the model are valid
|
175
153
|
# @return true if the model is valid
|
176
154
|
def valid?
|
177
|
-
return false if
|
178
|
-
return false if
|
179
|
-
return false if
|
155
|
+
return false if @number.nil?
|
156
|
+
return false if @number.to_s.length > 19
|
157
|
+
return false if @number.to_s.length < 13
|
158
|
+
return false if @number !~ Regexp.new(/[0-9]{13,19}/)
|
180
159
|
return false if !@security_code.nil? && @security_code.to_s.length > 4
|
181
160
|
return false if !@security_code.nil? && @security_code.to_s.length < 3
|
182
161
|
return false if !@cardholder_name.nil? && @cardholder_name.to_s.length > 96
|
@@ -186,15 +165,19 @@ module OpenapiClient
|
|
186
165
|
# Custom attribute writer method with validation
|
187
166
|
# @param [Object] number Value to be assigned
|
188
167
|
def number=(number)
|
189
|
-
if
|
168
|
+
if number.nil?
|
169
|
+
fail ArgumentError, 'number cannot be nil'
|
170
|
+
end
|
171
|
+
|
172
|
+
if number.to_s.length > 19
|
190
173
|
fail ArgumentError, 'invalid value for "number", the character length must be smaller than or equal to 19.'
|
191
174
|
end
|
192
175
|
|
193
|
-
if
|
176
|
+
if number.to_s.length < 13
|
194
177
|
fail ArgumentError, 'invalid value for "number", the character length must be great than or equal to 13.'
|
195
178
|
end
|
196
179
|
|
197
|
-
if
|
180
|
+
if number !~ Regexp.new(/[0-9]{13,19}/)
|
198
181
|
fail ArgumentError, 'invalid value for "number", must conform to the pattern /[0-9]{13,19}/.'
|
199
182
|
end
|
200
183
|
|
@@ -233,15 +216,12 @@ module OpenapiClient
|
|
233
216
|
number == o.number &&
|
234
217
|
expiry_date == o.expiry_date &&
|
235
218
|
security_code == o.security_code &&
|
236
|
-
payment_tokenization == o.payment_tokenization &&
|
237
219
|
card_function == o.card_function &&
|
238
220
|
cardholder_name == o.cardholder_name &&
|
239
|
-
|
240
|
-
authentication_result == o.authentication_result &&
|
221
|
+
authentication == o.authentication &&
|
241
222
|
bin == o.bin &&
|
242
223
|
last4 == o.last4 &&
|
243
|
-
brand == o.brand
|
244
|
-
issuing_country == o.issuing_country
|
224
|
+
brand == o.brand
|
245
225
|
end
|
246
226
|
|
247
227
|
# @see the `==` method
|
@@ -253,7 +233,7 @@ module OpenapiClient
|
|
253
233
|
# Calculates hash code according to all attributes.
|
254
234
|
# @return [Fixnum] Hash code
|
255
235
|
def hash
|
256
|
-
[number, expiry_date, security_code,
|
236
|
+
[number, expiry_date, security_code, card_function, cardholder_name, authentication, bin, last4, brand].hash
|
257
237
|
end
|
258
238
|
|
259
239
|
# Builds the object from hash
|