onlinepayments-sdk-ruby 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +140 -0
- data/Rakefile +34 -0
- data/lib/onlinepayments/sdk/api_exception.rb +42 -0
- data/lib/onlinepayments/sdk/api_resource.rb +115 -0
- data/lib/onlinepayments/sdk/authenticator.rb +16 -0
- data/lib/onlinepayments/sdk/authorization_exception.rb +13 -0
- data/lib/onlinepayments/sdk/call_context.rb +26 -0
- data/lib/onlinepayments/sdk/client.rb +82 -0
- data/lib/onlinepayments/sdk/communication_exception.rb +16 -0
- data/lib/onlinepayments/sdk/communicator.rb +300 -0
- data/lib/onlinepayments/sdk/communicator_configuration.rb +59 -0
- data/lib/onlinepayments/sdk/connection.rb +41 -0
- data/lib/onlinepayments/sdk/data_object.rb +31 -0
- data/lib/onlinepayments/sdk/declined_payment_exception.rb +30 -0
- data/lib/onlinepayments/sdk/declined_payout_exception.rb +32 -0
- data/lib/onlinepayments/sdk/declined_refund_exception.rb +32 -0
- data/lib/onlinepayments/sdk/declined_transaction_exception.rb +16 -0
- data/lib/onlinepayments/sdk/defaultimpl/authorization_type.rb +24 -0
- data/lib/onlinepayments/sdk/defaultimpl/default_authenticator.rb +108 -0
- data/lib/onlinepayments/sdk/defaultimpl/default_connection.rb +295 -0
- data/lib/onlinepayments/sdk/defaultimpl/default_marshaller.rb +32 -0
- data/lib/onlinepayments/sdk/defaultimpl.rb +6 -0
- data/lib/onlinepayments/sdk/domain/account_on_file.rb +49 -0
- data/lib/onlinepayments/sdk/domain/account_on_file_attribute.rb +38 -0
- data/lib/onlinepayments/sdk/domain/account_on_file_display_hints.rb +37 -0
- data/lib/onlinepayments/sdk/domain/additional_order_input.rb +54 -0
- data/lib/onlinepayments/sdk/domain/address.rb +50 -0
- data/lib/onlinepayments/sdk/domain/address_personal.rb +58 -0
- data/lib/onlinepayments/sdk/domain/airline_data.rb +128 -0
- data/lib/onlinepayments/sdk/domain/airline_flight_leg.rb +102 -0
- data/lib/onlinepayments/sdk/domain/airline_passenger.rb +38 -0
- data/lib/onlinepayments/sdk/domain/amount_breakdown.rb +30 -0
- data/lib/onlinepayments/sdk/domain/amount_of_money.rb +30 -0
- data/lib/onlinepayments/sdk/domain/api_error.rb +46 -0
- data/lib/onlinepayments/sdk/domain/bank_account_iban.rb +26 -0
- data/lib/onlinepayments/sdk/domain/browser_data.rb +42 -0
- data/lib/onlinepayments/sdk/domain/cancel_payment_response.rb +30 -0
- data/lib/onlinepayments/sdk/domain/capture.rb +46 -0
- data/lib/onlinepayments/sdk/domain/capture_output.rb +82 -0
- data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +38 -0
- data/lib/onlinepayments/sdk/domain/capture_response.rb +46 -0
- data/lib/onlinepayments/sdk/domain/capture_status_output.rb +26 -0
- data/lib/onlinepayments/sdk/domain/captures_response.rb +33 -0
- data/lib/onlinepayments/sdk/domain/card.rb +38 -0
- data/lib/onlinepayments/sdk/domain/card_essentials.rb +34 -0
- data/lib/onlinepayments/sdk/domain/card_fraud_results.rb +34 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +98 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +86 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +26 -0
- data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +78 -0
- data/lib/onlinepayments/sdk/domain/card_payout_method_specific_input.rb +38 -0
- data/lib/onlinepayments/sdk/domain/card_recurrence_details.rb +26 -0
- data/lib/onlinepayments/sdk/domain/card_without_cvv.rb +34 -0
- data/lib/onlinepayments/sdk/domain/company_information.rb +26 -0
- data/lib/onlinepayments/sdk/domain/complete_payment_card_payment_method_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/complete_payment_request.rb +38 -0
- data/lib/onlinepayments/sdk/domain/complete_payment_response.rb +46 -0
- data/lib/onlinepayments/sdk/domain/contact_details.rb +42 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_checkout_request.rb +78 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_checkout_response.rb +48 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb +38 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_response.rb +50 -0
- data/lib/onlinepayments/sdk/domain/create_mandate_request.rb +58 -0
- data/lib/onlinepayments/sdk/domain/create_mandate_response.rb +38 -0
- data/lib/onlinepayments/sdk/domain/create_mandate_with_return_url.rb +58 -0
- data/lib/onlinepayments/sdk/domain/create_payment_request.rb +74 -0
- data/lib/onlinepayments/sdk/domain/create_payment_response.rb +46 -0
- data/lib/onlinepayments/sdk/domain/create_payout_request.rb +46 -0
- data/lib/onlinepayments/sdk/domain/create_token_request.rb +34 -0
- data/lib/onlinepayments/sdk/domain/created_payment_output.rb +34 -0
- data/lib/onlinepayments/sdk/domain/created_token_response.rb +50 -0
- data/lib/onlinepayments/sdk/domain/customer.rb +86 -0
- data/lib/onlinepayments/sdk/domain/customer_account.rb +70 -0
- data/lib/onlinepayments/sdk/domain/customer_account_authentication.rb +30 -0
- data/lib/onlinepayments/sdk/domain/customer_device.rb +50 -0
- data/lib/onlinepayments/sdk/domain/customer_payment_activity.rb +34 -0
- data/lib/onlinepayments/sdk/domain/customer_token.rb +46 -0
- data/lib/onlinepayments/sdk/domain/decrypted_payment_data.rb +42 -0
- data/lib/onlinepayments/sdk/domain/directory_entry.rb +34 -0
- data/lib/onlinepayments/sdk/domain/empty_validator.rb +12 -0
- data/lib/onlinepayments/sdk/domain/error_response.rb +37 -0
- data/lib/onlinepayments/sdk/domain/external_cardholder_authentication_data.rb +58 -0
- data/lib/onlinepayments/sdk/domain/external_token_linked.rb +34 -0
- data/lib/onlinepayments/sdk/domain/fixed_list_validator.rb +32 -0
- data/lib/onlinepayments/sdk/domain/fraud_fields.rb +30 -0
- data/lib/onlinepayments/sdk/domain/fraud_results.rb +26 -0
- data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +46 -0
- data/lib/onlinepayments/sdk/domain/get_hosted_checkout_response.rb +34 -0
- data/lib/onlinepayments/sdk/domain/get_hosted_tokenization_response.rb +34 -0
- data/lib/onlinepayments/sdk/domain/get_iin_details_request.rb +34 -0
- data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +45 -0
- data/lib/onlinepayments/sdk/domain/get_mandate_response.rb +30 -0
- data/lib/onlinepayments/sdk/domain/get_payment_product_groups_response.rb +33 -0
- data/lib/onlinepayments/sdk/domain/get_payment_products_response.rb +33 -0
- data/lib/onlinepayments/sdk/domain/gift_card_purchase.rb +34 -0
- data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +66 -0
- data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_output.rb +30 -0
- data/lib/onlinepayments/sdk/domain/iin_detail.rb +30 -0
- data/lib/onlinepayments/sdk/domain/label_template_element.rb +30 -0
- data/lib/onlinepayments/sdk/domain/length_validator.rb +30 -0
- data/lib/onlinepayments/sdk/domain/line_item.rb +46 -0
- data/lib/onlinepayments/sdk/domain/line_item_invoice_data.rb +26 -0
- data/lib/onlinepayments/sdk/domain/loan_recipient.rb +42 -0
- data/lib/onlinepayments/sdk/domain/lodging_data.rb +26 -0
- data/lib/onlinepayments/sdk/domain/mandate_address.rb +42 -0
- data/lib/onlinepayments/sdk/domain/mandate_contact_details.rb +26 -0
- data/lib/onlinepayments/sdk/domain/mandate_customer.rb +58 -0
- data/lib/onlinepayments/sdk/domain/mandate_merchant_action.rb +34 -0
- data/lib/onlinepayments/sdk/domain/mandate_personal_information.rb +34 -0
- data/lib/onlinepayments/sdk/domain/mandate_personal_name.rb +30 -0
- data/lib/onlinepayments/sdk/domain/mandate_redirect_data.rb +30 -0
- data/lib/onlinepayments/sdk/domain/mandate_response.rb +50 -0
- data/lib/onlinepayments/sdk/domain/merchant_action.rb +34 -0
- data/lib/onlinepayments/sdk/domain/mobile_payment_data.rb +30 -0
- data/lib/onlinepayments/sdk/domain/mobile_payment_method_hosted_checkout_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_input.rb +62 -0
- data/lib/onlinepayments/sdk/domain/mobile_payment_method_specific_output.rb +58 -0
- data/lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/operation_output.rb +58 -0
- data/lib/onlinepayments/sdk/domain/order.rb +70 -0
- data/lib/onlinepayments/sdk/domain/order_line_details.rb +54 -0
- data/lib/onlinepayments/sdk/domain/order_references.rb +34 -0
- data/lib/onlinepayments/sdk/domain/order_status_output.rb +49 -0
- data/lib/onlinepayments/sdk/domain/order_type_information.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payment_account_on_file.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payment_context.rb +38 -0
- data/lib/onlinepayments/sdk/domain/payment_creation_output.rb +38 -0
- data/lib/onlinepayments/sdk/domain/payment_details_response.rb +65 -0
- data/lib/onlinepayments/sdk/domain/payment_error_response.rb +45 -0
- data/lib/onlinepayments/sdk/domain/payment_output.rb +82 -0
- data/lib/onlinepayments/sdk/domain/payment_product.rb +102 -0
- data/lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb +38 -0
- data/lib/onlinepayments/sdk/domain/payment_product302_specific_data.rb +32 -0
- data/lib/onlinepayments/sdk/domain/payment_product320_specific_data.rb +36 -0
- data/lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/payment_product5402_specific_output.rb +26 -0
- data/lib/onlinepayments/sdk/domain/payment_product5500_specific_output.rb +34 -0
- data/lib/onlinepayments/sdk/domain/payment_product771_specific_output.rb +26 -0
- data/lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb +54 -0
- data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +53 -0
- data/lib/onlinepayments/sdk/domain/payment_product_display_hints.rb +34 -0
- data/lib/onlinepayments/sdk/domain/payment_product_field.rb +46 -0
- data/lib/onlinepayments/sdk/domain/payment_product_field_data_restrictions.rb +34 -0
- data/lib/onlinepayments/sdk/domain/payment_product_field_display_element.rb +38 -0
- data/lib/onlinepayments/sdk/domain/payment_product_field_display_hints.rb +70 -0
- data/lib/onlinepayments/sdk/domain/payment_product_field_form_element.rb +37 -0
- data/lib/onlinepayments/sdk/domain/payment_product_field_tooltip.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payment_product_field_validators.rb +90 -0
- data/lib/onlinepayments/sdk/domain/payment_product_filter.rb +42 -0
- data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_checkout.rb +37 -0
- data/lib/onlinepayments/sdk/domain/payment_product_group.rb +52 -0
- data/lib/onlinepayments/sdk/domain/payment_product_networks_response.rb +32 -0
- data/lib/onlinepayments/sdk/domain/payment_references.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payment_response.rb +54 -0
- data/lib/onlinepayments/sdk/domain/payment_status_output.rb +57 -0
- data/lib/onlinepayments/sdk/domain/payout_error_response.rb +45 -0
- data/lib/onlinepayments/sdk/domain/payout_output.rb +30 -0
- data/lib/onlinepayments/sdk/domain/payout_response.rb +46 -0
- data/lib/onlinepayments/sdk/domain/payout_result.rb +46 -0
- data/lib/onlinepayments/sdk/domain/payout_status_output.rb +34 -0
- data/lib/onlinepayments/sdk/domain/personal_information.rb +38 -0
- data/lib/onlinepayments/sdk/domain/personal_information_token.rb +30 -0
- data/lib/onlinepayments/sdk/domain/personal_name.rb +34 -0
- data/lib/onlinepayments/sdk/domain/personal_name_token.rb +30 -0
- data/lib/onlinepayments/sdk/domain/product_directory.rb +33 -0
- data/lib/onlinepayments/sdk/domain/protection_eligibility.rb +30 -0
- data/lib/onlinepayments/sdk/domain/range_validator.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_data.rb +30 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +66 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb +66 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb +26 -0
- data/lib/onlinepayments/sdk/domain/redirection_data.rb +26 -0
- data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +30 -0
- data/lib/onlinepayments/sdk/domain/refund_e_wallet_method_specific_output.rb +38 -0
- data/lib/onlinepayments/sdk/domain/refund_error_response.rb +45 -0
- data/lib/onlinepayments/sdk/domain/refund_mobile_method_specific_output.rb +34 -0
- data/lib/onlinepayments/sdk/domain/refund_output.rb +82 -0
- data/lib/onlinepayments/sdk/domain/refund_payment_product840_customer_account.rb +34 -0
- data/lib/onlinepayments/sdk/domain/refund_payment_product840_specific_output.rb +30 -0
- data/lib/onlinepayments/sdk/domain/refund_redirect_method_specific_output.rb +30 -0
- data/lib/onlinepayments/sdk/domain/refund_request.rb +38 -0
- data/lib/onlinepayments/sdk/domain/refund_response.rb +46 -0
- data/lib/onlinepayments/sdk/domain/refunds_response.rb +33 -0
- data/lib/onlinepayments/sdk/domain/regular_expression_validator.rb +26 -0
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input.rb +34 -0
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input_base.rb +34 -0
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb +42 -0
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input.rb +34 -0
- data/lib/onlinepayments/sdk/domain/sepa_direct_debit_payment_product771_specific_input_base.rb +34 -0
- data/lib/onlinepayments/sdk/domain/session_request.rb +32 -0
- data/lib/onlinepayments/sdk/domain/session_response.rb +48 -0
- data/lib/onlinepayments/sdk/domain/shipping.rb +58 -0
- data/lib/onlinepayments/sdk/domain/shopping_cart.rb +64 -0
- data/lib/onlinepayments/sdk/domain/shopping_cart_extension.rb +52 -0
- data/lib/onlinepayments/sdk/domain/test_connection.rb +26 -0
- data/lib/onlinepayments/sdk/domain/three_d_secure.rb +78 -0
- data/lib/onlinepayments/sdk/domain/three_d_secure_base.rb +58 -0
- data/lib/onlinepayments/sdk/domain/three_d_secure_data.rb +34 -0
- data/lib/onlinepayments/sdk/domain/three_d_secure_results.rb +30 -0
- data/lib/onlinepayments/sdk/domain/token_card.rb +34 -0
- data/lib/onlinepayments/sdk/domain/token_card_data.rb +30 -0
- data/lib/onlinepayments/sdk/domain/token_card_specific_input.rb +30 -0
- data/lib/onlinepayments/sdk/domain/token_data.rb +30 -0
- data/lib/onlinepayments/sdk/domain/token_e_wallet.rb +34 -0
- data/lib/onlinepayments/sdk/domain/token_response.rb +58 -0
- data/lib/onlinepayments/sdk/domain/value_mapping_element.rb +37 -0
- data/lib/onlinepayments/sdk/endpoint_configuration.rb +127 -0
- data/lib/onlinepayments/sdk/exceptions.rb +8 -0
- data/lib/onlinepayments/sdk/factory.rb +136 -0
- data/lib/onlinepayments/sdk/idempotence_exception.rb +24 -0
- data/lib/onlinepayments/sdk/logging/communicator_logger.rb +22 -0
- data/lib/onlinepayments/sdk/logging/log_message_builder.rb +56 -0
- data/lib/onlinepayments/sdk/logging/logging_capable.rb +17 -0
- data/lib/onlinepayments/sdk/logging/logging_util.rb +286 -0
- data/lib/onlinepayments/sdk/logging/request_log_message_builder.rb +39 -0
- data/lib/onlinepayments/sdk/logging/response_log_message_builder.rb +34 -0
- data/lib/onlinepayments/sdk/logging/ruby_communicator_logger.rb +57 -0
- data/lib/onlinepayments/sdk/logging/stdout_communicator_logger.rb +34 -0
- data/lib/onlinepayments/sdk/logging.rb +10 -0
- data/lib/onlinepayments/sdk/marshaller.rb +24 -0
- data/lib/onlinepayments/sdk/marshaller_syntax_exception.rb +6 -0
- data/lib/onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client.rb +86 -0
- data/lib/onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb +86 -0
- data/lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb +182 -0
- data/lib/onlinepayments/sdk/merchant/merchant_client.rb +89 -0
- data/lib/onlinepayments/sdk/merchant/payments/payments_client.rb +322 -0
- data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +86 -0
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +57 -0
- data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +57 -0
- data/lib/onlinepayments/sdk/merchant/productgroups/product_groups_client.rb +87 -0
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +38 -0
- data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +57 -0
- data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +57 -0
- data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +30 -0
- data/lib/onlinepayments/sdk/merchant/products/products_client.rb +155 -0
- data/lib/onlinepayments/sdk/merchant/services/services_client.rb +82 -0
- data/lib/onlinepayments/sdk/merchant/sessions/sessions_client.rb +54 -0
- data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +116 -0
- data/lib/onlinepayments/sdk/meta_data_provider.rb +150 -0
- data/lib/onlinepayments/sdk/modules.rb +62 -0
- data/lib/onlinepayments/sdk/not_found_exception.rb +16 -0
- data/lib/onlinepayments/sdk/param_request.rb +11 -0
- data/lib/onlinepayments/sdk/payment_platform_exception.rb +15 -0
- data/lib/onlinepayments/sdk/pooled_connection.rb +21 -0
- data/lib/onlinepayments/sdk/proxy_configuration.rb +74 -0
- data/lib/onlinepayments/sdk/reference_exception.rb +14 -0
- data/lib/onlinepayments/sdk/request_header.rb +50 -0
- data/lib/onlinepayments/sdk/request_param.rb +23 -0
- data/lib/onlinepayments/sdk/response_exception.rb +47 -0
- data/lib/onlinepayments/sdk/response_header.rb +42 -0
- data/lib/onlinepayments/sdk/validation_exception.rb +14 -0
- data/lib/onlinepayments/sdk/webhooks/api_version_mismatch_exception.rb +20 -0
- data/lib/onlinepayments/sdk/webhooks/in_memory_secret_key_store.rb +56 -0
- data/lib/onlinepayments/sdk/webhooks/secret_key_not_available_exception.rb +17 -0
- data/lib/onlinepayments/sdk/webhooks/secret_key_store.rb +16 -0
- data/lib/onlinepayments/sdk/webhooks/signature_validation_exception.rb +19 -0
- data/lib/onlinepayments/sdk/webhooks/webhooks.rb +22 -0
- data/lib/onlinepayments/sdk/webhooks/webhooks_event.rb +58 -0
- data/lib/onlinepayments/sdk/webhooks/webhooks_helper.rb +100 -0
- data/lib/onlinepayments/sdk/webhooks/webhooks_helper_builder.rb +25 -0
- data/lib/onlinepayments/sdk/webhooks.rb +11 -0
- data/lib/onlinepayments/sdk.rb +26 -0
- data/onlinepayments-sdk-ruby.gemspec +28 -0
- metadata +416 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [Integer] max_length
|
10
|
+
# @attr [Integer] min_length
|
11
|
+
class LengthValidator < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :max_length
|
13
|
+
attr_accessor :min_length
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['maxLength'] = @max_length unless @max_length.nil?
|
19
|
+
hash['minLength'] = @min_length unless @min_length.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@max_length = hash['maxLength'] if hash.key? 'maxLength'
|
26
|
+
@min_length = hash['minLength'] if hash.key? 'minLength'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/amount_of_money'
|
6
|
+
require 'onlinepayments/sdk/domain/line_item_invoice_data'
|
7
|
+
require 'onlinepayments/sdk/domain/order_line_details'
|
8
|
+
|
9
|
+
module OnlinePayments::SDK
|
10
|
+
module Domain
|
11
|
+
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
|
13
|
+
# @attr [OnlinePayments::SDK::Domain::LineItemInvoiceData] invoice_data
|
14
|
+
# @attr [OnlinePayments::SDK::Domain::OrderLineDetails] order_line_details
|
15
|
+
class LineItem < OnlinePayments::SDK::DataObject
|
16
|
+
attr_accessor :amount_of_money
|
17
|
+
attr_accessor :invoice_data
|
18
|
+
attr_accessor :order_line_details
|
19
|
+
|
20
|
+
# @return (Hash)
|
21
|
+
def to_h
|
22
|
+
hash = super
|
23
|
+
hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
|
24
|
+
hash['invoiceData'] = @invoice_data.to_h if @invoice_data
|
25
|
+
hash['orderLineDetails'] = @order_line_details.to_h if @order_line_details
|
26
|
+
hash
|
27
|
+
end
|
28
|
+
|
29
|
+
def from_hash(hash)
|
30
|
+
super
|
31
|
+
if hash.key? 'amountOfMoney'
|
32
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
|
33
|
+
@amount_of_money = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
|
34
|
+
end
|
35
|
+
if hash.key? 'invoiceData'
|
36
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['invoiceData']] unless hash['invoiceData'].is_a? Hash
|
37
|
+
@invoice_data = OnlinePayments::SDK::Domain::LineItemInvoiceData.new_from_hash(hash['invoiceData'])
|
38
|
+
end
|
39
|
+
if hash.key? 'orderLineDetails'
|
40
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['orderLineDetails']] unless hash['orderLineDetails'].is_a? Hash
|
41
|
+
@order_line_details = OnlinePayments::SDK::Domain::OrderLineDetails.new_from_hash(hash['orderLineDetails'])
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] description
|
10
|
+
class LineItemInvoiceData < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :description
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['description'] = @description unless @description.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@description = hash['description'] if hash.key? 'description'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] account_number
|
10
|
+
# @attr [String] date_of_birth
|
11
|
+
# @attr [String] partial_pan
|
12
|
+
# @attr [String] surname
|
13
|
+
# @attr [String] zip
|
14
|
+
class LoanRecipient < OnlinePayments::SDK::DataObject
|
15
|
+
attr_accessor :account_number
|
16
|
+
attr_accessor :date_of_birth
|
17
|
+
attr_accessor :partial_pan
|
18
|
+
attr_accessor :surname
|
19
|
+
attr_accessor :zip
|
20
|
+
|
21
|
+
# @return (Hash)
|
22
|
+
def to_h
|
23
|
+
hash = super
|
24
|
+
hash['accountNumber'] = @account_number unless @account_number.nil?
|
25
|
+
hash['dateOfBirth'] = @date_of_birth unless @date_of_birth.nil?
|
26
|
+
hash['partialPan'] = @partial_pan unless @partial_pan.nil?
|
27
|
+
hash['surname'] = @surname unless @surname.nil?
|
28
|
+
hash['zip'] = @zip unless @zip.nil?
|
29
|
+
hash
|
30
|
+
end
|
31
|
+
|
32
|
+
def from_hash(hash)
|
33
|
+
super
|
34
|
+
@account_number = hash['accountNumber'] if hash.key? 'accountNumber'
|
35
|
+
@date_of_birth = hash['dateOfBirth'] if hash.key? 'dateOfBirth'
|
36
|
+
@partial_pan = hash['partialPan'] if hash.key? 'partialPan'
|
37
|
+
@surname = hash['surname'] if hash.key? 'surname'
|
38
|
+
@zip = hash['zip'] if hash.key? 'zip'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] check_in_date
|
10
|
+
class LodgingData < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :check_in_date
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['checkInDate'] = @check_in_date unless @check_in_date.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@check_in_date = hash['checkInDate'] if hash.key? 'checkInDate'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] city
|
10
|
+
# @attr [String] country_code
|
11
|
+
# @attr [String] house_number
|
12
|
+
# @attr [String] street
|
13
|
+
# @attr [String] zip
|
14
|
+
class MandateAddress < OnlinePayments::SDK::DataObject
|
15
|
+
attr_accessor :city
|
16
|
+
attr_accessor :country_code
|
17
|
+
attr_accessor :house_number
|
18
|
+
attr_accessor :street
|
19
|
+
attr_accessor :zip
|
20
|
+
|
21
|
+
# @return (Hash)
|
22
|
+
def to_h
|
23
|
+
hash = super
|
24
|
+
hash['city'] = @city unless @city.nil?
|
25
|
+
hash['countryCode'] = @country_code unless @country_code.nil?
|
26
|
+
hash['houseNumber'] = @house_number unless @house_number.nil?
|
27
|
+
hash['street'] = @street unless @street.nil?
|
28
|
+
hash['zip'] = @zip unless @zip.nil?
|
29
|
+
hash
|
30
|
+
end
|
31
|
+
|
32
|
+
def from_hash(hash)
|
33
|
+
super
|
34
|
+
@city = hash['city'] if hash.key? 'city'
|
35
|
+
@country_code = hash['countryCode'] if hash.key? 'countryCode'
|
36
|
+
@house_number = hash['houseNumber'] if hash.key? 'houseNumber'
|
37
|
+
@street = hash['street'] if hash.key? 'street'
|
38
|
+
@zip = hash['zip'] if hash.key? 'zip'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] email_address
|
10
|
+
class MandateContactDetails < OnlinePayments::SDK::DataObject
|
11
|
+
attr_accessor :email_address
|
12
|
+
|
13
|
+
# @return (Hash)
|
14
|
+
def to_h
|
15
|
+
hash = super
|
16
|
+
hash['emailAddress'] = @email_address unless @email_address.nil?
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
|
20
|
+
def from_hash(hash)
|
21
|
+
super
|
22
|
+
@email_address = hash['emailAddress'] if hash.key? 'emailAddress'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/bank_account_iban'
|
6
|
+
require 'onlinepayments/sdk/domain/mandate_address'
|
7
|
+
require 'onlinepayments/sdk/domain/mandate_contact_details'
|
8
|
+
require 'onlinepayments/sdk/domain/mandate_personal_information'
|
9
|
+
|
10
|
+
module OnlinePayments::SDK
|
11
|
+
module Domain
|
12
|
+
|
13
|
+
# @attr [OnlinePayments::SDK::Domain::BankAccountIban] bank_account_iban
|
14
|
+
# @attr [String] company_name
|
15
|
+
# @attr [OnlinePayments::SDK::Domain::MandateContactDetails] contact_details
|
16
|
+
# @attr [OnlinePayments::SDK::Domain::MandateAddress] mandate_address
|
17
|
+
# @attr [OnlinePayments::SDK::Domain::MandatePersonalInformation] personal_information
|
18
|
+
class MandateCustomer < OnlinePayments::SDK::DataObject
|
19
|
+
attr_accessor :bank_account_iban
|
20
|
+
attr_accessor :company_name
|
21
|
+
attr_accessor :contact_details
|
22
|
+
attr_accessor :mandate_address
|
23
|
+
attr_accessor :personal_information
|
24
|
+
|
25
|
+
# @return (Hash)
|
26
|
+
def to_h
|
27
|
+
hash = super
|
28
|
+
hash['bankAccountIban'] = @bank_account_iban.to_h if @bank_account_iban
|
29
|
+
hash['companyName'] = @company_name unless @company_name.nil?
|
30
|
+
hash['contactDetails'] = @contact_details.to_h if @contact_details
|
31
|
+
hash['mandateAddress'] = @mandate_address.to_h if @mandate_address
|
32
|
+
hash['personalInformation'] = @personal_information.to_h if @personal_information
|
33
|
+
hash
|
34
|
+
end
|
35
|
+
|
36
|
+
def from_hash(hash)
|
37
|
+
super
|
38
|
+
if hash.key? 'bankAccountIban'
|
39
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash
|
40
|
+
@bank_account_iban = OnlinePayments::SDK::Domain::BankAccountIban.new_from_hash(hash['bankAccountIban'])
|
41
|
+
end
|
42
|
+
@company_name = hash['companyName'] if hash.key? 'companyName'
|
43
|
+
if hash.key? 'contactDetails'
|
44
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] unless hash['contactDetails'].is_a? Hash
|
45
|
+
@contact_details = OnlinePayments::SDK::Domain::MandateContactDetails.new_from_hash(hash['contactDetails'])
|
46
|
+
end
|
47
|
+
if hash.key? 'mandateAddress'
|
48
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['mandateAddress']] unless hash['mandateAddress'].is_a? Hash
|
49
|
+
@mandate_address = OnlinePayments::SDK::Domain::MandateAddress.new_from_hash(hash['mandateAddress'])
|
50
|
+
end
|
51
|
+
if hash.key? 'personalInformation'
|
52
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']] unless hash['personalInformation'].is_a? Hash
|
53
|
+
@personal_information = OnlinePayments::SDK::Domain::MandatePersonalInformation.new_from_hash(hash['personalInformation'])
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/mandate_redirect_data'
|
6
|
+
|
7
|
+
module OnlinePayments::SDK
|
8
|
+
module Domain
|
9
|
+
|
10
|
+
# @attr [String] action_type
|
11
|
+
# @attr [OnlinePayments::SDK::Domain::MandateRedirectData] redirect_data
|
12
|
+
class MandateMerchantAction < OnlinePayments::SDK::DataObject
|
13
|
+
attr_accessor :action_type
|
14
|
+
attr_accessor :redirect_data
|
15
|
+
|
16
|
+
# @return (Hash)
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
hash['actionType'] = @action_type unless @action_type.nil?
|
20
|
+
hash['redirectData'] = @redirect_data.to_h if @redirect_data
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
@action_type = hash['actionType'] if hash.key? 'actionType'
|
27
|
+
if hash.key? 'redirectData'
|
28
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['redirectData']] unless hash['redirectData'].is_a? Hash
|
29
|
+
@redirect_data = OnlinePayments::SDK::Domain::MandateRedirectData.new_from_hash(hash['redirectData'])
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/mandate_personal_name'
|
6
|
+
|
7
|
+
module OnlinePayments::SDK
|
8
|
+
module Domain
|
9
|
+
|
10
|
+
# @attr [OnlinePayments::SDK::Domain::MandatePersonalName] name
|
11
|
+
# @attr [String] title
|
12
|
+
class MandatePersonalInformation < OnlinePayments::SDK::DataObject
|
13
|
+
attr_accessor :name
|
14
|
+
attr_accessor :title
|
15
|
+
|
16
|
+
# @return (Hash)
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
hash['name'] = @name.to_h if @name
|
20
|
+
hash['title'] = @title unless @title.nil?
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
if hash.key? 'name'
|
27
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash
|
28
|
+
@name = OnlinePayments::SDK::Domain::MandatePersonalName.new_from_hash(hash['name'])
|
29
|
+
end
|
30
|
+
@title = hash['title'] if hash.key? 'title'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] first_name
|
10
|
+
# @attr [String] surname
|
11
|
+
class MandatePersonalName < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :first_name
|
13
|
+
attr_accessor :surname
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['firstName'] = @first_name unless @first_name.nil?
|
19
|
+
hash['surname'] = @surname unless @surname.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@first_name = hash['firstName'] if hash.key? 'firstName'
|
26
|
+
@surname = hash['surname'] if hash.key? 'surname'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] returnmac
|
10
|
+
# @attr [String] redirect_url
|
11
|
+
class MandateRedirectData < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :returnmac
|
13
|
+
attr_accessor :redirect_url
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['RETURNMAC'] = @returnmac unless @returnmac.nil?
|
19
|
+
hash['redirectURL'] = @redirect_url unless @redirect_url.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@returnmac = hash['RETURNMAC'] if hash.key? 'RETURNMAC'
|
26
|
+
@redirect_url = hash['redirectURL'] if hash.key? 'redirectURL'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/mandate_customer'
|
6
|
+
|
7
|
+
module OnlinePayments::SDK
|
8
|
+
module Domain
|
9
|
+
|
10
|
+
# @attr [String] alias
|
11
|
+
# @attr [OnlinePayments::SDK::Domain::MandateCustomer] customer
|
12
|
+
# @attr [String] customer_reference
|
13
|
+
# @attr [String] recurrence_type
|
14
|
+
# @attr [String] status
|
15
|
+
# @attr [String] unique_mandate_reference
|
16
|
+
class MandateResponse < OnlinePayments::SDK::DataObject
|
17
|
+
attr_accessor :alias
|
18
|
+
attr_accessor :customer
|
19
|
+
attr_accessor :customer_reference
|
20
|
+
attr_accessor :recurrence_type
|
21
|
+
attr_accessor :status
|
22
|
+
attr_accessor :unique_mandate_reference
|
23
|
+
|
24
|
+
# @return (Hash)
|
25
|
+
def to_h
|
26
|
+
hash = super
|
27
|
+
hash['alias'] = @alias unless @alias.nil?
|
28
|
+
hash['customer'] = @customer.to_h if @customer
|
29
|
+
hash['customerReference'] = @customer_reference unless @customer_reference.nil?
|
30
|
+
hash['recurrenceType'] = @recurrence_type unless @recurrence_type.nil?
|
31
|
+
hash['status'] = @status unless @status.nil?
|
32
|
+
hash['uniqueMandateReference'] = @unique_mandate_reference unless @unique_mandate_reference.nil?
|
33
|
+
hash
|
34
|
+
end
|
35
|
+
|
36
|
+
def from_hash(hash)
|
37
|
+
super
|
38
|
+
@alias = hash['alias'] if hash.key? 'alias'
|
39
|
+
if hash.key? 'customer'
|
40
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash
|
41
|
+
@customer = OnlinePayments::SDK::Domain::MandateCustomer.new_from_hash(hash['customer'])
|
42
|
+
end
|
43
|
+
@customer_reference = hash['customerReference'] if hash.key? 'customerReference'
|
44
|
+
@recurrence_type = hash['recurrenceType'] if hash.key? 'recurrenceType'
|
45
|
+
@status = hash['status'] if hash.key? 'status'
|
46
|
+
@unique_mandate_reference = hash['uniqueMandateReference'] if hash.key? 'uniqueMandateReference'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/redirect_data'
|
6
|
+
|
7
|
+
module OnlinePayments::SDK
|
8
|
+
module Domain
|
9
|
+
|
10
|
+
# @attr [String] action_type
|
11
|
+
# @attr [OnlinePayments::SDK::Domain::RedirectData] redirect_data
|
12
|
+
class MerchantAction < OnlinePayments::SDK::DataObject
|
13
|
+
attr_accessor :action_type
|
14
|
+
attr_accessor :redirect_data
|
15
|
+
|
16
|
+
# @return (Hash)
|
17
|
+
def to_h
|
18
|
+
hash = super
|
19
|
+
hash['actionType'] = @action_type unless @action_type.nil?
|
20
|
+
hash['redirectData'] = @redirect_data.to_h if @redirect_data
|
21
|
+
hash
|
22
|
+
end
|
23
|
+
|
24
|
+
def from_hash(hash)
|
25
|
+
super
|
26
|
+
@action_type = hash['actionType'] if hash.key? 'actionType'
|
27
|
+
if hash.key? 'redirectData'
|
28
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['redirectData']] unless hash['redirectData'].is_a? Hash
|
29
|
+
@redirect_data = OnlinePayments::SDK::Domain::RedirectData.new_from_hash(hash['redirectData'])
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] dpan
|
10
|
+
# @attr [String] expiry_date
|
11
|
+
class MobilePaymentData < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :dpan
|
13
|
+
attr_accessor :expiry_date
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['dpan'] = @dpan unless @dpan.nil?
|
19
|
+
hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@dpan = hash['dpan'] if hash.key? 'dpan'
|
26
|
+
@expiry_date = hash['expiryDate'] if hash.key? 'expiryDate'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
|
6
|
+
module OnlinePayments::SDK
|
7
|
+
module Domain
|
8
|
+
|
9
|
+
# @attr [String] authorization_mode
|
10
|
+
# @attr [Integer] payment_product_id
|
11
|
+
class MobilePaymentMethodHostedCheckoutSpecificInput < OnlinePayments::SDK::DataObject
|
12
|
+
attr_accessor :authorization_mode
|
13
|
+
attr_accessor :payment_product_id
|
14
|
+
|
15
|
+
# @return (Hash)
|
16
|
+
def to_h
|
17
|
+
hash = super
|
18
|
+
hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
|
19
|
+
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
20
|
+
hash
|
21
|
+
end
|
22
|
+
|
23
|
+
def from_hash(hash)
|
24
|
+
super
|
25
|
+
@authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode'
|
26
|
+
@payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated.
|
3
|
+
#
|
4
|
+
require 'onlinepayments/sdk/data_object'
|
5
|
+
require 'onlinepayments/sdk/domain/decrypted_payment_data'
|
6
|
+
require 'onlinepayments/sdk/domain/mobile_payment_product320_specific_input'
|
7
|
+
|
8
|
+
module OnlinePayments::SDK
|
9
|
+
module Domain
|
10
|
+
|
11
|
+
# @attr [String] authorization_mode
|
12
|
+
# @attr [OnlinePayments::SDK::Domain::DecryptedPaymentData] decrypted_payment_data
|
13
|
+
# @attr [String] encrypted_payment_data
|
14
|
+
# @attr [String] ephemeral_key
|
15
|
+
# @attr [OnlinePayments::SDK::Domain::MobilePaymentProduct320SpecificInput] payment_product320_specific_input
|
16
|
+
# @attr [Integer] payment_product_id
|
17
|
+
# @attr [String] public_key_hash
|
18
|
+
# @attr [true/false] requires_approval
|
19
|
+
class MobilePaymentMethodSpecificInput < OnlinePayments::SDK::DataObject
|
20
|
+
attr_accessor :authorization_mode
|
21
|
+
attr_accessor :decrypted_payment_data
|
22
|
+
attr_accessor :encrypted_payment_data
|
23
|
+
attr_accessor :ephemeral_key
|
24
|
+
attr_accessor :payment_product320_specific_input
|
25
|
+
attr_accessor :payment_product_id
|
26
|
+
attr_accessor :public_key_hash
|
27
|
+
attr_accessor :requires_approval
|
28
|
+
|
29
|
+
# @return (Hash)
|
30
|
+
def to_h
|
31
|
+
hash = super
|
32
|
+
hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
|
33
|
+
hash['decryptedPaymentData'] = @decrypted_payment_data.to_h if @decrypted_payment_data
|
34
|
+
hash['encryptedPaymentData'] = @encrypted_payment_data unless @encrypted_payment_data.nil?
|
35
|
+
hash['ephemeralKey'] = @ephemeral_key unless @ephemeral_key.nil?
|
36
|
+
hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h if @payment_product320_specific_input
|
37
|
+
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
38
|
+
hash['publicKeyHash'] = @public_key_hash unless @public_key_hash.nil?
|
39
|
+
hash['requiresApproval'] = @requires_approval unless @requires_approval.nil?
|
40
|
+
hash
|
41
|
+
end
|
42
|
+
|
43
|
+
def from_hash(hash)
|
44
|
+
super
|
45
|
+
@authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode'
|
46
|
+
if hash.key? 'decryptedPaymentData'
|
47
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['decryptedPaymentData']] unless hash['decryptedPaymentData'].is_a? Hash
|
48
|
+
@decrypted_payment_data = OnlinePayments::SDK::Domain::DecryptedPaymentData.new_from_hash(hash['decryptedPaymentData'])
|
49
|
+
end
|
50
|
+
@encrypted_payment_data = hash['encryptedPaymentData'] if hash.key? 'encryptedPaymentData'
|
51
|
+
@ephemeral_key = hash['ephemeralKey'] if hash.key? 'ephemeralKey'
|
52
|
+
if hash.key? 'paymentProduct320SpecificInput'
|
53
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash
|
54
|
+
@payment_product320_specific_input = OnlinePayments::SDK::Domain::MobilePaymentProduct320SpecificInput.new_from_hash(hash['paymentProduct320SpecificInput'])
|
55
|
+
end
|
56
|
+
@payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
|
57
|
+
@public_key_hash = hash['publicKeyHash'] if hash.key? 'publicKeyHash'
|
58
|
+
@requires_approval = hash['requiresApproval'] if hash.key? 'requiresApproval'
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|