first_data_gateway 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +144 -65
- data/Rakefile +2 -0
- data/docs/AVSResponse.md +9 -0
- data/docs/AccessTokenResponse.md +2 -3
- data/docs/AdditionalAmountRate.md +9 -0
- data/docs/AdditionalTransactionDetails.md +10 -0
- data/docs/Address.md +5 -5
- data/docs/Airline.md +14 -14
- data/docs/AirlineAncillaryServiceCategory.md +2 -2
- data/docs/AirlineTravelRoute.md +8 -8
- data/docs/AliPay.md +11 -0
- data/docs/Amount.md +2 -2
- data/docs/AmountComponents.md +8 -8
- data/docs/AuthenticationApi.md +19 -24
- data/docs/AuthenticationRequest.md +9 -0
- data/docs/AuthenticationResponseVerification.md +5 -4
- data/docs/AuthenticationResponseVerificationRequest.md +11 -0
- data/docs/BasicResponse.md +10 -0
- data/docs/BasketItem.md +2 -2
- data/docs/Billing.md +6 -5
- data/docs/BillingAddress.md +17 -0
- data/docs/BillingAddressPhone.md +9 -0
- data/docs/CarRental.md +9 -9
- data/docs/CarRentalExtraCharges.md +2 -2
- data/docs/Card.md +15 -0
- data/docs/CardInfo.md +13 -0
- data/docs/CardInfoLookupApi.md +68 -0
- data/docs/CardInfoLookupRequest.md +9 -0
- data/docs/CardInfoLookupResponse.md +12 -0
- data/docs/CardVerificationApi.md +68 -0
- data/docs/CardVerificationRequest.md +9 -0
- data/docs/CardVerificationsTransaction.md +2 -2
- data/docs/ChinaDomestic.md +15 -0
- data/docs/ClientLocale.md +3 -3
- data/docs/Contact.md +5 -5
- data/docs/CurrencyConversionApi.md +68 -0
- data/docs/Customer.md +19 -0
- data/docs/CustomerAddress.md +14 -0
- data/docs/CustomerAddressPhone.md +9 -0
- data/docs/Dcc.md +9 -0
- data/docs/Device.md +19 -0
- data/docs/DeviceNetworks.md +21 -0
- data/docs/Document.md +9 -0
- data/docs/Error.md +1 -1
- data/docs/ErrorDetails.md +1 -1
- data/docs/ErrorResponse.md +4 -4
- data/docs/ExchangeRateRequest.md +12 -0
- data/docs/ExchangeRateResponse.md +21 -0
- data/docs/Expiration.md +3 -3
- data/docs/FraudDetectApi.md +68 -0
- data/docs/FraudOrder.md +10 -0
- data/docs/FraudOrderItems.md +15 -0
- data/docs/FraudOrderShipToAddress.md +14 -0
- data/docs/Frequency.md +3 -3
- data/docs/IndustrySpecificExtensions.md +1 -1
- data/docs/InstallmentOptions.md +1 -1
- data/docs/Lodging.md +3 -3
- data/docs/LodgingExtraCharges.md +1 -1
- data/docs/Loyalty.md +10 -0
- data/docs/Merchant.md +11 -0
- data/docs/MerchantLocation.md +12 -0
- data/docs/MerchantLocationMerchantAddress.md +13 -0
- data/docs/Order.md +2 -2
- data/docs/OrderApi.md +107 -55
- data/docs/OrderErrorResponse.md +19 -0
- data/docs/OrderResponse.md +18 -0
- data/docs/PayPal.md +1 -1
- data/docs/Payment.md +18 -0
- data/docs/PaymentApi.md +164 -124
- data/docs/PaymentCard.md +10 -6
- data/docs/PaymentCardAuthenticationResult.md +1 -1
- data/docs/PaymentFacilitator.md +12 -0
- data/docs/PaymentIssuerResponse.md +10 -0
- data/docs/PaymentMethod.md +5 -2
- data/docs/PaymentPayMethod.md +13 -0
- data/docs/PaymentSchedulesApi.md +256 -0
- data/docs/PaymentSchedulesErrorResponse.md +14 -0
- data/docs/PaymentSchedulesRequest.md +10 -7
- data/docs/PaymentSchedulesResponse.md +7 -5
- data/docs/PaymentTokenApi.md +134 -0
- data/docs/PaymentTokenization.md +16 -0
- data/docs/PaymentTokenizationErrorResponse.md +19 -0
- data/docs/PaymentTokenizationRequest.md +11 -0
- data/docs/PaymentTokenizationResponse.md +18 -0
- data/docs/PaymentURLApi.md +68 -0
- data/docs/PaymentUrlErrorResponse.md +15 -0
- data/docs/PaymentUrlRequest.md +13 -3
- data/docs/PaymentUrlResponse.md +6 -5
- data/docs/PaymentVerification3ds.md +10 -0
- data/docs/PaymentVerificationAvs.md +10 -0
- data/docs/PaymentVerificationCvv.md +10 -0
- data/docs/PrimaryTransaction.md +7 -3
- data/docs/PrimaryTransactionAdditionalDetails.md +7 -5
- data/docs/ProcessorData.md +8 -4
- data/docs/PurchaseCards.md +9 -0
- data/docs/PurchaseCardsLevel2.md +12 -0
- data/docs/PurchaseCardsLevel3.md +8 -0
- data/docs/PurchaseCardsLevel3LineItems.md +16 -0
- data/docs/RecurringPaymentDetails.md +20 -0
- data/docs/RecurringPaymentDetailsResponse.md +19 -0
- data/docs/ReferencedOrder.md +9 -0
- data/docs/ResponseType.md +1 -1
- data/docs/ScoreOnlyRequest.md +21 -0
- data/docs/ScoreOnlyResponse.md +13 -0
- data/docs/ScoreOnlyResponseFraudScore.md +10 -0
- data/docs/ScoreOnlyResponseFraudScoreExplanations.md +10 -0
- data/docs/SecondaryTransaction.md +4 -1
- data/docs/SecondaryTransactionAdditionalDetails.md +8 -0
- data/docs/Secure3dResponse.md +8 -0
- data/docs/Sepa.md +1 -1
- data/docs/SepaMandate.md +3 -3
- data/docs/Shipping.md +1 -1
- data/docs/SoftDescriptor.md +9 -0
- data/docs/SplitShipment.md +3 -3
- data/docs/StoredCredential.md +4 -4
- data/docs/SubMerchantData.md +13 -0
- data/docs/Transaction.md +19 -0
- data/docs/TransactionErrorResponse.md +13 -11
- data/docs/TransactionOrigin.md +7 -0
- data/docs/TransactionResponse.md +13 -11
- data/docs/TransactionType.md +1 -1
- data/first_data_gateway.gemspec +9 -9
- data/git_push.sh +2 -2
- data/lib/openapi_client/.DS_Store +0 -0
- data/lib/{swagger_client → openapi_client}/api/authentication_api.rb +22 -27
- data/lib/openapi_client/api/card_info_lookup_api.rb +117 -0
- data/lib/openapi_client/api/card_verification_api.rb +117 -0
- data/lib/openapi_client/api/currency_conversion_api.rb +117 -0
- data/lib/openapi_client/api/fraud_detect_api.rb +122 -0
- data/lib/openapi_client/api/order_api.rb +327 -0
- data/lib/{swagger_client → openapi_client}/api/payment_api.rb +212 -111
- data/lib/openapi_client/api/payment_schedules_api.rb +411 -0
- data/lib/openapi_client/api/payment_token_api.rb +218 -0
- data/lib/openapi_client/api/payment_url_api.rb +117 -0
- data/lib/{swagger_client → openapi_client}/api_client.rb +50 -38
- data/lib/{swagger_client → openapi_client}/api_error.rb +6 -6
- data/lib/{swagger_client → openapi_client}/configuration.rb +49 -7
- data/lib/openapi_client/models/.DS_Store +0 -0
- data/lib/{swagger_client → openapi_client}/models/access_token_response.rb +20 -33
- data/lib/{swagger_client/models/secondary_transaction.rb → openapi_client/models/additional_amount_rate.rb} +25 -28
- data/lib/{swagger_client/models/primary_transaction_additional_details.rb → openapi_client/models/additional_transaction_details.rb} +68 -62
- data/lib/{swagger_client → openapi_client}/models/address.rb +33 -44
- data/lib/{swagger_client → openapi_client}/models/airline.rb +48 -47
- data/lib/{swagger_client → openapi_client}/models/airline_ancillary_service_category.rb +18 -21
- data/lib/{swagger_client → openapi_client}/models/airline_travel_route.rb +39 -42
- data/lib/openapi_client/models/ali_pay.rb +326 -0
- data/lib/{swagger_client → openapi_client}/models/amount.rb +18 -21
- data/lib/{swagger_client → openapi_client}/models/amount_components.rb +22 -19
- data/lib/{swagger_client/models/transaction_response_authentication_redirect.rb → openapi_client/models/authentication_request.rb} +33 -38
- data/lib/{swagger_client → openapi_client}/models/authentication_response_verification.rb +43 -30
- data/lib/{swagger_client/models/payment_url_request.rb → openapi_client/models/authentication_response_verification_request.rb} +35 -56
- data/lib/openapi_client/models/avs_response.rb +239 -0
- data/lib/openapi_client/models/basic_response.rb +209 -0
- data/lib/{swagger_client → openapi_client}/models/basket_item.rb +16 -20
- data/lib/{swagger_client → openapi_client}/models/billing.rb +65 -25
- data/lib/openapi_client/models/billing_address.rb +279 -0
- data/lib/{swagger_client/models/transaction_response_authentication_redirect_params.rb → openapi_client/models/billing_address_phone.rb} +31 -42
- data/lib/{swagger_client → openapi_client}/models/car_rental.rb +31 -31
- data/lib/{swagger_client → openapi_client}/models/car_rental_extra_charges.rb +18 -21
- data/lib/openapi_client/models/card.rb +254 -0
- data/lib/{swagger_client/models/payment_card.rb → openapi_client/models/card_info.rb} +68 -81
- data/lib/openapi_client/models/card_info_lookup_request.rb +214 -0
- data/lib/openapi_client/models/card_info_lookup_response.rb +265 -0
- data/lib/openapi_client/models/card_verification_request.rb +198 -0
- data/lib/{swagger_client → openapi_client}/models/card_verifications_transaction.rb +31 -20
- data/lib/openapi_client/models/china_domestic.rb +386 -0
- data/lib/{swagger_client → openapi_client}/models/client_locale.rb +19 -23
- data/lib/{swagger_client → openapi_client}/models/contact.rb +26 -31
- data/lib/openapi_client/models/customer.rb +333 -0
- data/lib/openapi_client/models/customer_address.rb +259 -0
- data/lib/openapi_client/models/customer_address_phone.rb +195 -0
- data/lib/openapi_client/models/dcc.rb +200 -0
- data/lib/openapi_client/models/device.rb +340 -0
- data/lib/openapi_client/models/device_networks.rb +353 -0
- data/lib/{swagger_client/models/payment_card_authentication_request.rb → openapi_client/models/document.rb} +62 -26
- data/lib/{swagger_client → openapi_client}/models/error.rb +14 -18
- data/lib/{swagger_client → openapi_client}/models/error_details.rb +14 -19
- data/lib/{swagger_client → openapi_client}/models/error_response.rb +22 -22
- data/lib/openapi_client/models/exchange_rate_request.rb +307 -0
- data/lib/openapi_client/models/exchange_rate_response.rb +319 -0
- data/lib/{swagger_client → openapi_client}/models/expiration.rb +18 -20
- data/lib/openapi_client/models/fraud_order.rb +206 -0
- data/lib/openapi_client/models/fraud_order_items.rb +253 -0
- data/lib/openapi_client/models/fraud_order_ship_to_address.rb +245 -0
- data/lib/{swagger_client → openapi_client}/models/frequency.rb +27 -30
- data/lib/{swagger_client → openapi_client}/models/industry_specific_extensions.rb +15 -19
- data/lib/{swagger_client → openapi_client}/models/installment_options.rb +22 -28
- data/lib/{swagger_client → openapi_client}/models/lodging.rb +19 -22
- data/lib/{swagger_client → openapi_client}/models/lodging_extra_charges.rb +17 -21
- data/lib/openapi_client/models/loyalty.rb +205 -0
- data/lib/openapi_client/models/merchant.rb +219 -0
- data/lib/openapi_client/models/merchant_location.rb +224 -0
- data/lib/openapi_client/models/merchant_location_merchant_address.rb +250 -0
- data/lib/{swagger_client/models/processor_data.rb → openapi_client/models/order.rb} +49 -47
- data/lib/openapi_client/models/order_error_response.rb +296 -0
- data/lib/openapi_client/models/order_response.rb +287 -0
- data/lib/{swagger_client → openapi_client}/models/pay_pal.rb +19 -23
- data/lib/openapi_client/models/payment.rb +346 -0
- data/lib/openapi_client/models/payment_card.rb +363 -0
- data/lib/{swagger_client → openapi_client}/models/payment_card_authentication_result.rb +32 -37
- data/lib/openapi_client/models/payment_facilitator.rb +292 -0
- data/lib/openapi_client/models/payment_issuer_response.rb +249 -0
- data/lib/openapi_client/models/payment_method.rb +278 -0
- data/lib/openapi_client/models/payment_pay_method.rb +278 -0
- data/lib/openapi_client/models/payment_schedules_error_response.rb +281 -0
- data/lib/{swagger_client → openapi_client}/models/payment_schedules_request.rb +83 -80
- data/lib/openapi_client/models/payment_schedules_response.rb +272 -0
- data/lib/openapi_client/models/payment_tokenization.rb +327 -0
- data/lib/openapi_client/models/payment_tokenization_error_response.rb +329 -0
- data/lib/{swagger_client/models/payment_method.rb → openapi_client/models/payment_tokenization_request.rb} +34 -37
- data/lib/openapi_client/models/payment_tokenization_response.rb +319 -0
- data/lib/openapi_client/models/payment_url_error_response.rb +292 -0
- data/lib/openapi_client/models/payment_url_request.rb +335 -0
- data/lib/{swagger_client → openapi_client}/models/payment_url_response.rb +35 -38
- data/lib/openapi_client/models/payment_verification3ds.rb +215 -0
- data/lib/openapi_client/models/payment_verification_avs.rb +215 -0
- data/lib/openapi_client/models/payment_verification_cvv.rb +215 -0
- data/lib/{swagger_client → openapi_client}/models/primary_transaction.rb +93 -31
- data/lib/openapi_client/models/primary_transaction_additional_details.rb +352 -0
- data/lib/openapi_client/models/processor_data.rb +272 -0
- data/lib/openapi_client/models/purchase_cards.rb +192 -0
- data/lib/openapi_client/models/purchase_cards_level2.rb +267 -0
- data/lib/openapi_client/models/purchase_cards_level3.rb +186 -0
- data/lib/openapi_client/models/purchase_cards_level3_line_items.rb +337 -0
- data/lib/openapi_client/models/recurring_payment_details.rb +399 -0
- data/lib/openapi_client/models/recurring_payment_details_response.rb +296 -0
- data/lib/{swagger_client/models/order.rb → openapi_client/models/referenced_order.rb} +23 -36
- data/lib/openapi_client/models/response_type.rb +37 -0
- data/lib/openapi_client/models/score_only_request.rb +389 -0
- data/lib/{swagger_client/models/payment_schedules_response.rb → openapi_client/models/score_only_response.rb} +56 -56
- data/lib/openapi_client/models/score_only_response_fraud_score.rb +208 -0
- data/lib/openapi_client/models/score_only_response_fraud_score_explanations.rb +201 -0
- data/lib/openapi_client/models/secondary_transaction.rb +220 -0
- data/lib/openapi_client/models/secondary_transaction_additional_details.rb +183 -0
- data/lib/openapi_client/models/secure3d_response.rb +184 -0
- data/lib/{swagger_client → openapi_client}/models/sepa.rb +30 -35
- data/lib/{swagger_client → openapi_client}/models/sepa_mandate.rb +32 -35
- data/lib/{swagger_client → openapi_client}/models/shipping.rb +17 -22
- data/lib/openapi_client/models/soft_descriptor.rb +215 -0
- data/lib/{swagger_client → openapi_client}/models/split_shipment.rb +17 -21
- data/lib/{swagger_client → openapi_client}/models/stored_credential.rb +28 -32
- data/lib/openapi_client/models/sub_merchant_data.rb +302 -0
- data/lib/openapi_client/models/transaction.rb +337 -0
- data/lib/{swagger_client → openapi_client}/models/transaction_error_response.rb +110 -80
- data/lib/openapi_client/models/transaction_origin.rb +32 -0
- data/lib/{swagger_client → openapi_client}/models/transaction_response.rb +112 -82
- data/lib/openapi_client/models/transaction_type.rb +36 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +158 -0
- data/lib/simple/client_context.rb +2 -2
- data/lib/simple/gateway.rb +274 -37
- data/spec/api/authentication_api_spec.rb +12 -12
- data/spec/api/card_info_lookup_api_spec.rb +53 -0
- data/spec/api/card_verification_api_spec.rb +53 -0
- data/spec/api/currency_conversion_api_spec.rb +53 -0
- data/spec/api/fraud_detect_api_spec.rb +53 -0
- data/spec/api/order_api_spec.rb +44 -23
- data/spec/api/payment_api_spec.rb +50 -26
- data/spec/api/payment_schedules_api_spec.rb +111 -0
- data/spec/api/payment_token_api_spec.rb +74 -0
- data/spec/api/payment_url_api_spec.rb +53 -0
- data/spec/api_client_spec.rb +66 -66
- data/spec/configuration_spec.rb +15 -15
- data/spec/models/access_token_response_spec.rb +16 -23
- data/spec/models/additional_amount_rate_spec.rb +47 -0
- data/spec/models/additional_transaction_details_spec.rb +53 -0
- data/spec/models/address_spec.rb +16 -17
- data/spec/models/airline_ancillary_service_category_spec.rb +14 -15
- data/spec/models/airline_spec.rb +27 -28
- data/spec/models/airline_travel_route_spec.rb +22 -23
- data/spec/models/ali_pay_spec.rb +63 -0
- data/spec/models/amount_components_spec.rb +16 -17
- data/spec/models/amount_spec.rb +12 -13
- data/spec/models/authentication_request_spec.rb +51 -0
- data/spec/models/authentication_response_verification_request_spec.rb +59 -0
- data/spec/models/authentication_response_verification_spec.rb +23 -18
- data/spec/models/avs_response_spec.rb +55 -0
- data/spec/models/basic_response_spec.rb +53 -0
- data/spec/models/basket_item_spec.rb +13 -14
- data/spec/models/billing_address_phone_spec.rb +47 -0
- data/spec/models/billing_address_spec.rb +95 -0
- data/spec/models/billing_spec.rb +25 -20
- data/spec/models/car_rental_extra_charges_spec.rb +14 -15
- data/spec/models/car_rental_spec.rb +17 -18
- data/spec/models/card_info_lookup_request_spec.rb +47 -0
- data/spec/models/card_info_lookup_response_spec.rb +69 -0
- data/spec/models/card_info_spec.rb +79 -0
- data/spec/models/card_spec.rb +83 -0
- data/spec/models/card_verification_request_spec.rb +47 -0
- data/spec/models/card_verifications_transaction_spec.rb +11 -12
- data/spec/models/china_domestic_spec.rb +83 -0
- data/spec/models/client_locale_spec.rb +11 -12
- data/spec/models/contact_spec.rb +13 -14
- data/spec/models/customer_address_phone_spec.rb +47 -0
- data/spec/models/customer_address_spec.rb +77 -0
- data/spec/models/customer_spec.rb +111 -0
- data/spec/models/dcc_spec.rb +47 -0
- data/spec/models/device_networks_spec.rb +123 -0
- data/spec/models/device_spec.rb +111 -0
- data/spec/models/document_spec.rb +51 -0
- data/spec/models/error_details_spec.rb +11 -12
- data/spec/models/error_response_spec.rb +13 -14
- data/spec/models/error_spec.rb +12 -13
- data/spec/models/exchange_rate_request_spec.rb +69 -0
- data/spec/models/exchange_rate_response_spec.rb +119 -0
- data/spec/models/expiration_spec.rb +11 -12
- data/spec/models/fraud_order_items_spec.rb +83 -0
- data/spec/models/fraud_order_ship_to_address_spec.rb +77 -0
- data/spec/models/fraud_order_spec.rb +53 -0
- data/spec/models/frequency_spec.rb +15 -16
- data/spec/models/industry_specific_extensions_spec.rb +12 -13
- data/spec/models/installment_options_spec.rb +12 -13
- data/spec/models/lodging_extra_charges_spec.rb +14 -15
- data/spec/models/lodging_spec.rb +14 -15
- data/spec/models/loyalty_spec.rb +53 -0
- data/spec/models/merchant_location_merchant_address_spec.rb +71 -0
- data/spec/models/merchant_location_spec.rb +65 -0
- data/spec/models/merchant_spec.rb +59 -0
- data/spec/models/order_error_response_spec.rb +107 -0
- data/spec/models/order_response_spec.rb +101 -0
- data/spec/models/order_spec.rb +12 -13
- data/spec/models/pay_pal_spec.rb +10 -11
- data/spec/models/payment_card_authentication_result_spec.rb +26 -27
- data/spec/models/payment_card_spec.rb +41 -22
- data/spec/models/payment_facilitator_spec.rb +65 -0
- data/spec/models/payment_issuer_response_spec.rb +57 -0
- data/spec/models/payment_method_spec.rb +35 -18
- data/spec/models/payment_pay_method_spec.rb +75 -0
- data/spec/models/payment_schedules_error_response_spec.rb +81 -0
- data/spec/models/payment_schedules_request_spec.rb +43 -30
- data/spec/models/payment_schedules_response_spec.rb +30 -19
- data/spec/models/payment_spec.rb +109 -0
- data/spec/models/payment_tokenization_error_response_spec.rb +111 -0
- data/spec/models/payment_tokenization_request_spec.rb +63 -0
- data/spec/models/payment_tokenization_response_spec.rb +105 -0
- data/spec/models/payment_tokenization_spec.rb +93 -0
- data/spec/models/payment_url_error_response_spec.rb +87 -0
- data/spec/models/payment_url_request_spec.rb +73 -14
- data/spec/models/payment_url_response_spec.rb +25 -20
- data/spec/models/payment_verification3ds_spec.rb +53 -0
- data/spec/models/payment_verification_avs_spec.rb +53 -0
- data/spec/models/payment_verification_cvv_spec.rb +53 -0
- data/spec/models/primary_transaction_additional_details_spec.rb +28 -17
- data/spec/models/primary_transaction_spec.rb +45 -22
- data/spec/models/processor_data_spec.rb +41 -14
- data/spec/models/purchase_cards_level2_spec.rb +65 -0
- data/spec/models/purchase_cards_level3_line_items_spec.rb +89 -0
- data/spec/models/purchase_cards_level3_spec.rb +41 -0
- data/spec/models/purchase_cards_spec.rb +47 -0
- data/spec/models/recurring_payment_details_response_spec.rb +107 -0
- data/spec/models/recurring_payment_details_spec.rb +117 -0
- data/spec/models/referenced_order_spec.rb +47 -0
- data/spec/models/response_type_spec.rb +9 -10
- data/spec/models/score_only_request_spec.rb +127 -0
- data/spec/models/score_only_response_fraud_score_explanations_spec.rb +53 -0
- data/spec/models/score_only_response_fraud_score_spec.rb +53 -0
- data/spec/models/score_only_response_spec.rb +75 -0
- data/spec/models/secondary_transaction_additional_details_spec.rb +41 -0
- data/spec/models/secondary_transaction_spec.rb +29 -12
- data/spec/models/secure3d_response_spec.rb +41 -0
- data/spec/models/sepa_mandate_spec.rb +17 -18
- data/spec/models/sepa_spec.rb +14 -15
- data/spec/models/shipping_spec.rb +12 -13
- data/spec/models/soft_descriptor_spec.rb +47 -0
- data/spec/models/split_shipment_spec.rb +11 -12
- data/spec/models/stored_credential_spec.rb +21 -22
- data/spec/models/sub_merchant_data_spec.rb +71 -0
- data/spec/models/transaction_error_response_spec.rb +62 -51
- data/spec/models/transaction_origin_spec.rb +35 -0
- data/spec/models/transaction_response_spec.rb +61 -50
- data/spec/models/transaction_spec.rb +115 -0
- data/spec/models/transaction_type_spec.rb +9 -10
- data/spec/spec_helper.rb +6 -6
- metadata +339 -69
- data/docs/PaymentCardAuthenticationRequest.md +0 -8
- data/docs/TransactionResponseAuthenticationRedirect.md +0 -10
- data/docs/TransactionResponseAuthenticationRedirectParams.md +0 -10
- data/lib/swagger_client/api/order_api.rb +0 -229
- data/lib/swagger_client/models/response_type.rb +0 -37
- data/lib/swagger_client/models/transaction_type.rb +0 -36
- data/lib/swagger_client/version.rb +0 -15
- data/lib/swagger_client.rb +0 -91
- data/spec/models/payment_card_authentication_request_spec.rb +0 -46
- data/spec/models/transaction_response_authentication_redirect_params_spec.rb +0 -54
- data/spec/models/transaction_response_authentication_redirect_spec.rb +0 -58
@@ -0,0 +1,340 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
# The device where this transaction originated.
|
17
|
+
class Device
|
18
|
+
# Defines the type of this object.
|
19
|
+
attr_accessor :device_type
|
20
|
+
|
21
|
+
# The unique ID of the device. Must be unique for the entire system (not just within a specific merchant or industry).
|
22
|
+
attr_accessor :device_id
|
23
|
+
|
24
|
+
attr_accessor :networks
|
25
|
+
|
26
|
+
# The GPS decimal latitude, ranging from (-90.0 to 90.0) where positive numbers indicate locations North of the equator.
|
27
|
+
attr_accessor :latitude
|
28
|
+
|
29
|
+
# The GPS decimal longitude, ranging from (-180.0 to 180.0) where positive numbers indicate locations East of the IERS Reference Meridian.
|
30
|
+
attr_accessor :longitude
|
31
|
+
|
32
|
+
# The device's International Mobile Equipment Identity (IMEI) as described in IETFs RFC7254.
|
33
|
+
attr_accessor :imei
|
34
|
+
|
35
|
+
# The device's model name.
|
36
|
+
attr_accessor :model
|
37
|
+
|
38
|
+
# The device's manufacturer.
|
39
|
+
attr_accessor :manufacturer
|
40
|
+
|
41
|
+
# The timezone offset from UTC to the devices timezone configuration, specified in the format +hh:mm.
|
42
|
+
attr_accessor :timezone_offset
|
43
|
+
|
44
|
+
# A flag indicating that the device has been altered to allow privileged access to users. This flag should only be set to false if a test was performed and the result was negative. Leave unset otherwise.
|
45
|
+
attr_accessor :rooted
|
46
|
+
|
47
|
+
# A flag indicating that malware was detected on the mobile phone. This flag should only be set to false if a test was performed and the result was negative. Leave unset otherwise.
|
48
|
+
attr_accessor :malware_detected
|
49
|
+
|
50
|
+
# A JSON object that can carry any additional information about the device that might be helpful for fraud detection.
|
51
|
+
attr_accessor :user_defined
|
52
|
+
|
53
|
+
class EnumAttributeValidator
|
54
|
+
attr_reader :datatype
|
55
|
+
attr_reader :allowable_values
|
56
|
+
|
57
|
+
def initialize(datatype, allowable_values)
|
58
|
+
@allowable_values = allowable_values.map do |value|
|
59
|
+
case datatype.to_s
|
60
|
+
when /Integer/i
|
61
|
+
value.to_i
|
62
|
+
when /Float/i
|
63
|
+
value.to_f
|
64
|
+
else
|
65
|
+
value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def valid?(value)
|
71
|
+
!value || allowable_values.include?(value)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
76
|
+
def self.attribute_map
|
77
|
+
{
|
78
|
+
:'device_type' => :'deviceType',
|
79
|
+
:'device_id' => :'deviceId',
|
80
|
+
:'networks' => :'networks',
|
81
|
+
:'latitude' => :'latitude',
|
82
|
+
:'longitude' => :'longitude',
|
83
|
+
:'imei' => :'imei',
|
84
|
+
:'model' => :'model',
|
85
|
+
:'manufacturer' => :'manufacturer',
|
86
|
+
:'timezone_offset' => :'timezoneOffset',
|
87
|
+
:'rooted' => :'rooted',
|
88
|
+
:'malware_detected' => :'malwareDetected',
|
89
|
+
:'user_defined' => :'userDefined'
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
93
|
+
# Attribute type mapping.
|
94
|
+
def self.openapi_types
|
95
|
+
{
|
96
|
+
:'device_type' => :'String',
|
97
|
+
:'device_id' => :'String',
|
98
|
+
:'networks' => :'Array<DeviceNetworks>',
|
99
|
+
:'latitude' => :'Float',
|
100
|
+
:'longitude' => :'Float',
|
101
|
+
:'imei' => :'String',
|
102
|
+
:'model' => :'String',
|
103
|
+
:'manufacturer' => :'String',
|
104
|
+
:'timezone_offset' => :'String',
|
105
|
+
:'rooted' => :'BOOLEAN',
|
106
|
+
:'malware_detected' => :'BOOLEAN',
|
107
|
+
:'user_defined' => :'Object'
|
108
|
+
}
|
109
|
+
end
|
110
|
+
|
111
|
+
# Initializes the object
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
def initialize(attributes = {})
|
114
|
+
return unless attributes.is_a?(Hash)
|
115
|
+
|
116
|
+
# convert string to symbol for hash key
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
118
|
+
|
119
|
+
if attributes.has_key?(:'deviceType')
|
120
|
+
self.device_type = attributes[:'deviceType']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'deviceId')
|
124
|
+
self.device_id = attributes[:'deviceId']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'networks')
|
128
|
+
if (value = attributes[:'networks']).is_a?(Array)
|
129
|
+
self.networks = value
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'latitude')
|
134
|
+
self.latitude = attributes[:'latitude']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'longitude')
|
138
|
+
self.longitude = attributes[:'longitude']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'imei')
|
142
|
+
self.imei = attributes[:'imei']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'model')
|
146
|
+
self.model = attributes[:'model']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'manufacturer')
|
150
|
+
self.manufacturer = attributes[:'manufacturer']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'timezoneOffset')
|
154
|
+
self.timezone_offset = attributes[:'timezoneOffset']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'rooted')
|
158
|
+
self.rooted = attributes[:'rooted']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'malwareDetected')
|
162
|
+
self.malware_detected = attributes[:'malwareDetected']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'userDefined')
|
166
|
+
self.user_defined = attributes[:'userDefined']
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
171
|
+
# @return Array for valid properties with the reasons
|
172
|
+
def list_invalid_properties
|
173
|
+
invalid_properties = Array.new
|
174
|
+
if @device_type.nil?
|
175
|
+
invalid_properties.push('invalid value for "device_type", device_type cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
if @device_id.nil?
|
179
|
+
invalid_properties.push('invalid value for "device_id", device_id cannot be nil.')
|
180
|
+
end
|
181
|
+
|
182
|
+
invalid_properties
|
183
|
+
end
|
184
|
+
|
185
|
+
# Check to see if the all the properties in the model are valid
|
186
|
+
# @return true if the model is valid
|
187
|
+
def valid?
|
188
|
+
return false if @device_type.nil?
|
189
|
+
device_type_validator = EnumAttributeValidator.new('String', ['device/pos', 'device/mobile'])
|
190
|
+
return false unless device_type_validator.valid?(@device_type)
|
191
|
+
return false if @device_id.nil?
|
192
|
+
true
|
193
|
+
end
|
194
|
+
|
195
|
+
# Custom attribute writer method checking allowed values (enum).
|
196
|
+
# @param [Object] device_type Object to be assigned
|
197
|
+
def device_type=(device_type)
|
198
|
+
validator = EnumAttributeValidator.new('String', ['device/pos', 'device/mobile'])
|
199
|
+
unless validator.valid?(device_type)
|
200
|
+
fail ArgumentError, 'invalid value for "device_type", must be one of #{validator.allowable_values}.'
|
201
|
+
end
|
202
|
+
@device_type = device_type
|
203
|
+
end
|
204
|
+
|
205
|
+
# Checks equality by comparing each attribute.
|
206
|
+
# @param [Object] Object to be compared
|
207
|
+
def ==(o)
|
208
|
+
return true if self.equal?(o)
|
209
|
+
self.class == o.class &&
|
210
|
+
device_type == o.device_type &&
|
211
|
+
device_id == o.device_id &&
|
212
|
+
networks == o.networks &&
|
213
|
+
latitude == o.latitude &&
|
214
|
+
longitude == o.longitude &&
|
215
|
+
imei == o.imei &&
|
216
|
+
model == o.model &&
|
217
|
+
manufacturer == o.manufacturer &&
|
218
|
+
timezone_offset == o.timezone_offset &&
|
219
|
+
rooted == o.rooted &&
|
220
|
+
malware_detected == o.malware_detected &&
|
221
|
+
user_defined == o.user_defined
|
222
|
+
end
|
223
|
+
|
224
|
+
# @see the `==` method
|
225
|
+
# @param [Object] Object to be compared
|
226
|
+
def eql?(o)
|
227
|
+
self == o
|
228
|
+
end
|
229
|
+
|
230
|
+
# Calculates hash code according to all attributes.
|
231
|
+
# @return [Fixnum] Hash code
|
232
|
+
def hash
|
233
|
+
[device_type, device_id, networks, latitude, longitude, imei, model, manufacturer, timezone_offset, rooted, malware_detected, user_defined].hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Builds the object from hash
|
237
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
238
|
+
# @return [Object] Returns the model itself
|
239
|
+
def build_from_hash(attributes)
|
240
|
+
return nil unless attributes.is_a?(Hash)
|
241
|
+
self.class.openapi_types.each_pair do |key, type|
|
242
|
+
if type =~ /\AArray<(.*)>/i
|
243
|
+
# check to ensure the input is an array given that the the attribute
|
244
|
+
# is documented as an array but the input is not
|
245
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
246
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
247
|
+
end
|
248
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
249
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
250
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
251
|
+
end
|
252
|
+
|
253
|
+
self
|
254
|
+
end
|
255
|
+
|
256
|
+
# Deserializes the data based on type
|
257
|
+
# @param string type Data type
|
258
|
+
# @param string value Value to be deserialized
|
259
|
+
# @return [Object] Deserialized data
|
260
|
+
def _deserialize(type, value)
|
261
|
+
case type.to_sym
|
262
|
+
when :DateTime
|
263
|
+
DateTime.parse(value)
|
264
|
+
when :Date
|
265
|
+
Date.parse(value)
|
266
|
+
when :String
|
267
|
+
value.to_s
|
268
|
+
when :Integer
|
269
|
+
value.to_i
|
270
|
+
when :Float
|
271
|
+
value.to_f
|
272
|
+
when :BOOLEAN
|
273
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
274
|
+
true
|
275
|
+
else
|
276
|
+
false
|
277
|
+
end
|
278
|
+
when :Object
|
279
|
+
# generic object (usually a Hash), return directly
|
280
|
+
value
|
281
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
282
|
+
inner_type = Regexp.last_match[:inner_type]
|
283
|
+
value.map { |v| _deserialize(inner_type, v) }
|
284
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
285
|
+
k_type = Regexp.last_match[:k_type]
|
286
|
+
v_type = Regexp.last_match[:v_type]
|
287
|
+
{}.tap do |hash|
|
288
|
+
value.each do |k, v|
|
289
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
else # model
|
293
|
+
temp_model = OpenapiClient.const_get(type).new
|
294
|
+
temp_model.build_from_hash(value)
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
# Returns the string representation of the object
|
299
|
+
# @return [String] String presentation of the object
|
300
|
+
def to_s
|
301
|
+
to_hash.to_s
|
302
|
+
end
|
303
|
+
|
304
|
+
# to_body is an alias to to_hash (backward compatibility)
|
305
|
+
# @return [Hash] Returns the object in the form of hash
|
306
|
+
def to_body
|
307
|
+
to_hash
|
308
|
+
end
|
309
|
+
|
310
|
+
# Returns the object in the form of hash
|
311
|
+
# @return [Hash] Returns the object in the form of hash
|
312
|
+
def to_hash
|
313
|
+
hash = {}
|
314
|
+
self.class.attribute_map.each_pair do |attr, param|
|
315
|
+
value = self.send(attr)
|
316
|
+
next if value.nil?
|
317
|
+
hash[param] = _to_hash(value)
|
318
|
+
end
|
319
|
+
hash
|
320
|
+
end
|
321
|
+
|
322
|
+
# Outputs non-array value in the form of hash
|
323
|
+
# For object, use to_hash. Otherwise, just return the value
|
324
|
+
# @param [Object] value Any valid value
|
325
|
+
# @return [Hash] Returns the value in the form of hash
|
326
|
+
def _to_hash(value)
|
327
|
+
if value.is_a?(Array)
|
328
|
+
value.compact.map { |v| _to_hash(v) }
|
329
|
+
elsif value.is_a?(Hash)
|
330
|
+
{}.tap do |hash|
|
331
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
332
|
+
end
|
333
|
+
elsif value.respond_to? :to_hash
|
334
|
+
value.to_hash
|
335
|
+
else
|
336
|
+
value
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
end
|
@@ -0,0 +1,353 @@
|
|
1
|
+
=begin
|
2
|
+
#Payment Gateway API Specification.
|
3
|
+
|
4
|
+
#Payment Gateway API for payment processing. Version 6.4.0.20181018.001
|
5
|
+
|
6
|
+
OpenAPI spec version: 6.4.0.20181018.001
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: unset
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
class DeviceNetworks
|
17
|
+
# Defines the type of network associated with the device.
|
18
|
+
attr_accessor :network_type
|
19
|
+
|
20
|
+
# The IPv4 or IPv6 address of the device if the network assigned one.
|
21
|
+
attr_accessor :ip
|
22
|
+
|
23
|
+
# The devices primary phone number. This value should be supplied directly without any transformation (e.g. removal of spaces, hyphens or parentheses). If this data is available in segregated fields, it should be concatenated using a blank space (\" \") as a separator.
|
24
|
+
attr_accessor :phone_number
|
25
|
+
|
26
|
+
# The network carrier name.
|
27
|
+
attr_accessor :carrier_name
|
28
|
+
|
29
|
+
# The Mobile Country Code (MCC) as described in the ITUs E.212 specification.
|
30
|
+
attr_accessor :mobile_country_code
|
31
|
+
|
32
|
+
# The Mobile Network Code (MNC) as described in the ITUs E.212 specification.
|
33
|
+
attr_accessor :mobile_network_code
|
34
|
+
|
35
|
+
# The Mobile Subscription Identification Number code (MSIN) as described in the ITUs E.212 specification.
|
36
|
+
attr_accessor :subscription_identification_number
|
37
|
+
|
38
|
+
# The Location Area Code (LAC) is a16-bit identifier for a region that is covered by a set of network antennas.
|
39
|
+
attr_accessor :location_area_code
|
40
|
+
|
41
|
+
# The Cell ID (CID) is identifier for a specific Base Transceiver Station (BTS) within a specific Location Area Code (LAC).
|
42
|
+
attr_accessor :cell_id
|
43
|
+
|
44
|
+
# An identifier of the network standard used.
|
45
|
+
attr_accessor :standard
|
46
|
+
|
47
|
+
# The MAC address of the device that is connected to the Wi-Fi network.
|
48
|
+
attr_accessor :mac
|
49
|
+
|
50
|
+
# The Wi-Fi networks Service Set Identifier (SSID).
|
51
|
+
attr_accessor :ssid
|
52
|
+
|
53
|
+
# The Wi-Fi networks Basic Service Set Identifier (BSSID).
|
54
|
+
attr_accessor :bssid
|
55
|
+
|
56
|
+
# A JSON object that can carry any additional information about the network that might be helpful for fraud detection.
|
57
|
+
attr_accessor :user_defined
|
58
|
+
|
59
|
+
class EnumAttributeValidator
|
60
|
+
attr_reader :datatype
|
61
|
+
attr_reader :allowable_values
|
62
|
+
|
63
|
+
def initialize(datatype, allowable_values)
|
64
|
+
@allowable_values = allowable_values.map do |value|
|
65
|
+
case datatype.to_s
|
66
|
+
when /Integer/i
|
67
|
+
value.to_i
|
68
|
+
when /Float/i
|
69
|
+
value.to_f
|
70
|
+
else
|
71
|
+
value
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def valid?(value)
|
77
|
+
!value || allowable_values.include?(value)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
82
|
+
def self.attribute_map
|
83
|
+
{
|
84
|
+
:'network_type' => :'networkType',
|
85
|
+
:'ip' => :'ip',
|
86
|
+
:'phone_number' => :'phoneNumber',
|
87
|
+
:'carrier_name' => :'carrierName',
|
88
|
+
:'mobile_country_code' => :'mobileCountryCode',
|
89
|
+
:'mobile_network_code' => :'mobileNetworkCode',
|
90
|
+
:'subscription_identification_number' => :'subscriptionIdentificationNumber',
|
91
|
+
:'location_area_code' => :'locationAreaCode',
|
92
|
+
:'cell_id' => :'cellId',
|
93
|
+
:'standard' => :'standard',
|
94
|
+
:'mac' => :'mac',
|
95
|
+
:'ssid' => :'ssid',
|
96
|
+
:'bssid' => :'bssid',
|
97
|
+
:'user_defined' => :'userDefined'
|
98
|
+
}
|
99
|
+
end
|
100
|
+
|
101
|
+
# Attribute type mapping.
|
102
|
+
def self.openapi_types
|
103
|
+
{
|
104
|
+
:'network_type' => :'String',
|
105
|
+
:'ip' => :'String',
|
106
|
+
:'phone_number' => :'String',
|
107
|
+
:'carrier_name' => :'String',
|
108
|
+
:'mobile_country_code' => :'String',
|
109
|
+
:'mobile_network_code' => :'String',
|
110
|
+
:'subscription_identification_number' => :'String',
|
111
|
+
:'location_area_code' => :'String',
|
112
|
+
:'cell_id' => :'String',
|
113
|
+
:'standard' => :'String',
|
114
|
+
:'mac' => :'String',
|
115
|
+
:'ssid' => :'String',
|
116
|
+
:'bssid' => :'String',
|
117
|
+
:'user_defined' => :'Object'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# Initializes the object
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
def initialize(attributes = {})
|
124
|
+
return unless attributes.is_a?(Hash)
|
125
|
+
|
126
|
+
# convert string to symbol for hash key
|
127
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
128
|
+
|
129
|
+
if attributes.has_key?(:'networkType')
|
130
|
+
self.network_type = attributes[:'networkType']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'ip')
|
134
|
+
self.ip = attributes[:'ip']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'phoneNumber')
|
138
|
+
self.phone_number = attributes[:'phoneNumber']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'carrierName')
|
142
|
+
self.carrier_name = attributes[:'carrierName']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'mobileCountryCode')
|
146
|
+
self.mobile_country_code = attributes[:'mobileCountryCode']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'mobileNetworkCode')
|
150
|
+
self.mobile_network_code = attributes[:'mobileNetworkCode']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'subscriptionIdentificationNumber')
|
154
|
+
self.subscription_identification_number = attributes[:'subscriptionIdentificationNumber']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'locationAreaCode')
|
158
|
+
self.location_area_code = attributes[:'locationAreaCode']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'cellId')
|
162
|
+
self.cell_id = attributes[:'cellId']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'standard')
|
166
|
+
self.standard = attributes[:'standard']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.has_key?(:'mac')
|
170
|
+
self.mac = attributes[:'mac']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.has_key?(:'ssid')
|
174
|
+
self.ssid = attributes[:'ssid']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.has_key?(:'bssid')
|
178
|
+
self.bssid = attributes[:'bssid']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.has_key?(:'userDefined')
|
182
|
+
self.user_defined = attributes[:'userDefined']
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
187
|
+
# @return Array for valid properties with the reasons
|
188
|
+
def list_invalid_properties
|
189
|
+
invalid_properties = Array.new
|
190
|
+
if @network_type.nil?
|
191
|
+
invalid_properties.push('invalid value for "network_type", network_type cannot be nil.')
|
192
|
+
end
|
193
|
+
|
194
|
+
invalid_properties
|
195
|
+
end
|
196
|
+
|
197
|
+
# Check to see if the all the properties in the model are valid
|
198
|
+
# @return true if the model is valid
|
199
|
+
def valid?
|
200
|
+
return false if @network_type.nil?
|
201
|
+
network_type_validator = EnumAttributeValidator.new('String', ['network/mobile', 'network/wifi'])
|
202
|
+
return false unless network_type_validator.valid?(@network_type)
|
203
|
+
true
|
204
|
+
end
|
205
|
+
|
206
|
+
# Custom attribute writer method checking allowed values (enum).
|
207
|
+
# @param [Object] network_type Object to be assigned
|
208
|
+
def network_type=(network_type)
|
209
|
+
validator = EnumAttributeValidator.new('String', ['network/mobile', 'network/wifi'])
|
210
|
+
unless validator.valid?(network_type)
|
211
|
+
fail ArgumentError, 'invalid value for "network_type", must be one of #{validator.allowable_values}.'
|
212
|
+
end
|
213
|
+
@network_type = network_type
|
214
|
+
end
|
215
|
+
|
216
|
+
# Checks equality by comparing each attribute.
|
217
|
+
# @param [Object] Object to be compared
|
218
|
+
def ==(o)
|
219
|
+
return true if self.equal?(o)
|
220
|
+
self.class == o.class &&
|
221
|
+
network_type == o.network_type &&
|
222
|
+
ip == o.ip &&
|
223
|
+
phone_number == o.phone_number &&
|
224
|
+
carrier_name == o.carrier_name &&
|
225
|
+
mobile_country_code == o.mobile_country_code &&
|
226
|
+
mobile_network_code == o.mobile_network_code &&
|
227
|
+
subscription_identification_number == o.subscription_identification_number &&
|
228
|
+
location_area_code == o.location_area_code &&
|
229
|
+
cell_id == o.cell_id &&
|
230
|
+
standard == o.standard &&
|
231
|
+
mac == o.mac &&
|
232
|
+
ssid == o.ssid &&
|
233
|
+
bssid == o.bssid &&
|
234
|
+
user_defined == o.user_defined
|
235
|
+
end
|
236
|
+
|
237
|
+
# @see the `==` method
|
238
|
+
# @param [Object] Object to be compared
|
239
|
+
def eql?(o)
|
240
|
+
self == o
|
241
|
+
end
|
242
|
+
|
243
|
+
# Calculates hash code according to all attributes.
|
244
|
+
# @return [Fixnum] Hash code
|
245
|
+
def hash
|
246
|
+
[network_type, ip, phone_number, carrier_name, mobile_country_code, mobile_network_code, subscription_identification_number, location_area_code, cell_id, standard, mac, ssid, bssid, user_defined].hash
|
247
|
+
end
|
248
|
+
|
249
|
+
# Builds the object from hash
|
250
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
251
|
+
# @return [Object] Returns the model itself
|
252
|
+
def build_from_hash(attributes)
|
253
|
+
return nil unless attributes.is_a?(Hash)
|
254
|
+
self.class.openapi_types.each_pair do |key, type|
|
255
|
+
if type =~ /\AArray<(.*)>/i
|
256
|
+
# check to ensure the input is an array given that the the attribute
|
257
|
+
# is documented as an array but the input is not
|
258
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
259
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
260
|
+
end
|
261
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
262
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
263
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
264
|
+
end
|
265
|
+
|
266
|
+
self
|
267
|
+
end
|
268
|
+
|
269
|
+
# Deserializes the data based on type
|
270
|
+
# @param string type Data type
|
271
|
+
# @param string value Value to be deserialized
|
272
|
+
# @return [Object] Deserialized data
|
273
|
+
def _deserialize(type, value)
|
274
|
+
case type.to_sym
|
275
|
+
when :DateTime
|
276
|
+
DateTime.parse(value)
|
277
|
+
when :Date
|
278
|
+
Date.parse(value)
|
279
|
+
when :String
|
280
|
+
value.to_s
|
281
|
+
when :Integer
|
282
|
+
value.to_i
|
283
|
+
when :Float
|
284
|
+
value.to_f
|
285
|
+
when :BOOLEAN
|
286
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
287
|
+
true
|
288
|
+
else
|
289
|
+
false
|
290
|
+
end
|
291
|
+
when :Object
|
292
|
+
# generic object (usually a Hash), return directly
|
293
|
+
value
|
294
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
295
|
+
inner_type = Regexp.last_match[:inner_type]
|
296
|
+
value.map { |v| _deserialize(inner_type, v) }
|
297
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
298
|
+
k_type = Regexp.last_match[:k_type]
|
299
|
+
v_type = Regexp.last_match[:v_type]
|
300
|
+
{}.tap do |hash|
|
301
|
+
value.each do |k, v|
|
302
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
else # model
|
306
|
+
temp_model = OpenapiClient.const_get(type).new
|
307
|
+
temp_model.build_from_hash(value)
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
# Returns the string representation of the object
|
312
|
+
# @return [String] String presentation of the object
|
313
|
+
def to_s
|
314
|
+
to_hash.to_s
|
315
|
+
end
|
316
|
+
|
317
|
+
# to_body is an alias to to_hash (backward compatibility)
|
318
|
+
# @return [Hash] Returns the object in the form of hash
|
319
|
+
def to_body
|
320
|
+
to_hash
|
321
|
+
end
|
322
|
+
|
323
|
+
# Returns the object in the form of hash
|
324
|
+
# @return [Hash] Returns the object in the form of hash
|
325
|
+
def to_hash
|
326
|
+
hash = {}
|
327
|
+
self.class.attribute_map.each_pair do |attr, param|
|
328
|
+
value = self.send(attr)
|
329
|
+
next if value.nil?
|
330
|
+
hash[param] = _to_hash(value)
|
331
|
+
end
|
332
|
+
hash
|
333
|
+
end
|
334
|
+
|
335
|
+
# Outputs non-array value in the form of hash
|
336
|
+
# For object, use to_hash. Otherwise, just return the value
|
337
|
+
# @param [Object] value Any valid value
|
338
|
+
# @return [Hash] Returns the value in the form of hash
|
339
|
+
def _to_hash(value)
|
340
|
+
if value.is_a?(Array)
|
341
|
+
value.compact.map { |v| _to_hash(v) }
|
342
|
+
elsif value.is_a?(Hash)
|
343
|
+
{}.tap do |hash|
|
344
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
345
|
+
end
|
346
|
+
elsif value.respond_to? :to_hash
|
347
|
+
value.to_hash
|
348
|
+
else
|
349
|
+
value
|
350
|
+
end
|
351
|
+
end
|
352
|
+
end
|
353
|
+
end
|