direct-sdk-ruby 1.0.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 +7 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +141 -0
- data/Rakefile +34 -0
- data/direct-sdk-ruby.gemspec +28 -0
- data/lib/ingenico/direct/sdk.rb +26 -0
- data/lib/ingenico/direct/sdk/api_exception.rb +42 -0
- data/lib/ingenico/direct/sdk/api_resource.rb +115 -0
- data/lib/ingenico/direct/sdk/authenticator.rb +16 -0
- data/lib/ingenico/direct/sdk/authorization_exception.rb +13 -0
- data/lib/ingenico/direct/sdk/call_context.rb +26 -0
- data/lib/ingenico/direct/sdk/client.rb +85 -0
- data/lib/ingenico/direct/sdk/communication_exception.rb +16 -0
- data/lib/ingenico/direct/sdk/communicator.rb +301 -0
- data/lib/ingenico/direct/sdk/communicator_configuration.rb +59 -0
- data/lib/ingenico/direct/sdk/connection.rb +41 -0
- data/lib/ingenico/direct/sdk/data_object.rb +32 -0
- data/lib/ingenico/direct/sdk/declined_payment_exception.rb +30 -0
- data/lib/ingenico/direct/sdk/declined_payout_exception.rb +32 -0
- data/lib/ingenico/direct/sdk/declined_refund_exception.rb +32 -0
- data/lib/ingenico/direct/sdk/declined_transaction_exception.rb +16 -0
- data/lib/ingenico/direct/sdk/defaultimpl.rb +6 -0
- data/lib/ingenico/direct/sdk/defaultimpl/authorization_type.rb +24 -0
- data/lib/ingenico/direct/sdk/defaultimpl/default_authenticator.rb +108 -0
- data/lib/ingenico/direct/sdk/defaultimpl/default_connection.rb +293 -0
- data/lib/ingenico/direct/sdk/defaultimpl/default_marshaller.rb +32 -0
- data/lib/ingenico/direct/sdk/direct_exception.rb +15 -0
- data/lib/ingenico/direct/sdk/domain/account_on_file.rb +50 -0
- data/lib/ingenico/direct/sdk/domain/account_on_file_attribute.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/account_on_file_display_hints.rb +38 -0
- data/lib/ingenico/direct/sdk/domain/additional_order_input.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/address.rb +51 -0
- data/lib/ingenico/direct/sdk/domain/address_personal.rb +59 -0
- data/lib/ingenico/direct/sdk/domain/airline_data.rb +129 -0
- data/lib/ingenico/direct/sdk/domain/airline_flight_leg.rb +99 -0
- data/lib/ingenico/direct/sdk/domain/airline_passenger.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/amount_breakdown.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/amount_of_money.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/api_error.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/browser_data.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/cancel_payment_response.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/capture.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/capture_output.rb +79 -0
- data/lib/ingenico/direct/sdk/domain/capture_payment_request.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/capture_response.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/capture_status_output.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/captures_response.rb +34 -0
- data/lib/ingenico/direct/sdk/domain/card.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/card_essentials.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/card_fraud_results.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/card_payment_method_specific_input.rb +95 -0
- data/lib/ingenico/direct/sdk/domain/card_payment_method_specific_input_base.rb +79 -0
- data/lib/ingenico/direct/sdk/domain/card_payment_method_specific_output.rb +67 -0
- data/lib/ingenico/direct/sdk/domain/card_payout_method_specific_input.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/card_recurrence_details.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/card_without_cvv.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/company_information.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/complete_payment_card_payment_method_specific_input.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/complete_payment_request.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/complete_payment_response.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/contact_details.rb +43 -0
- data/lib/ingenico/direct/sdk/domain/create_hosted_checkout_request.rb +63 -0
- data/lib/ingenico/direct/sdk/domain/create_hosted_checkout_response.rb +49 -0
- data/lib/ingenico/direct/sdk/domain/create_hosted_tokenization_request.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/create_hosted_tokenization_response.rb +41 -0
- data/lib/ingenico/direct/sdk/domain/create_payment_request.rb +67 -0
- data/lib/ingenico/direct/sdk/domain/create_payment_response.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/create_payout_request.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/create_token_request.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/created_payment_output.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/created_token_response.rb +51 -0
- data/lib/ingenico/direct/sdk/domain/customer.rb +87 -0
- data/lib/ingenico/direct/sdk/domain/customer_account.rb +71 -0
- data/lib/ingenico/direct/sdk/domain/customer_account_authentication.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/customer_device.rb +51 -0
- data/lib/ingenico/direct/sdk/domain/customer_payment_activity.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/customer_token.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/decrypted_payment_data.rb +43 -0
- data/lib/ingenico/direct/sdk/domain/directory_entry.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/empty_validator.rb +13 -0
- data/lib/ingenico/direct/sdk/domain/error_response.rb +38 -0
- data/lib/ingenico/direct/sdk/domain/external_cardholder_authentication_data.rb +59 -0
- data/lib/ingenico/direct/sdk/domain/external_token_linked.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/fixed_list_validator.rb +33 -0
- data/lib/ingenico/direct/sdk/domain/fraud_fields.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/fraud_results.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/g_pay_three_d_secure.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/get_hosted_checkout_response.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/get_hosted_tokenization_response.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/get_payment_product_groups_response.rb +34 -0
- data/lib/ingenico/direct/sdk/domain/get_payment_products_response.rb +34 -0
- data/lib/ingenico/direct/sdk/domain/gift_card_purchase.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/hosted_checkout_specific_input.rb +55 -0
- data/lib/ingenico/direct/sdk/domain/hosted_checkout_specific_output.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/label_template_element.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/length_validator.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/line_item.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/line_item_invoice_data.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/loan_recipient.rb +43 -0
- data/lib/ingenico/direct/sdk/domain/merchant_action.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/mobile_payment_data.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_input.rb +63 -0
- data/lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb +59 -0
- data/lib/ingenico/direct/sdk/domain/mobile_payment_product320_specific_input.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/order.rb +71 -0
- data/lib/ingenico/direct/sdk/domain/order_line_details.rb +55 -0
- data/lib/ingenico/direct/sdk/domain/order_references.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/order_status_output.rb +50 -0
- data/lib/ingenico/direct/sdk/domain/order_type_information.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/payment_account_on_file.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/payment_creation_output.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/payment_error_response.rb +46 -0
- data/lib/ingenico/direct/sdk/domain/payment_output.rb +79 -0
- data/lib/ingenico/direct/sdk/domain/payment_product.rb +77 -0
- data/lib/ingenico/direct/sdk/domain/payment_product5100_specific_input.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/payment_product5402_specific_output.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/payment_product5500_specific_output.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/payment_product771_specific_output.rb +13 -0
- data/lib/ingenico/direct/sdk/domain/payment_product840_customer_account.rb +55 -0
- data/lib/ingenico/direct/sdk/domain/payment_product840_specific_output.rb +54 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_display_hints.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_field.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_field_data_restrictions.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_field_display_element.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_field_display_hints.rb +71 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_field_form_element.rb +38 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_field_tooltip.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_field_validators.rb +91 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_filter.rb +43 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_filters_hosted_checkout.rb +38 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_group.rb +43 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_networks_response.rb +33 -0
- data/lib/ingenico/direct/sdk/domain/payment_references.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/payment_response.rb +55 -0
- data/lib/ingenico/direct/sdk/domain/payment_status_output.rb +58 -0
- data/lib/ingenico/direct/sdk/domain/payout_error_response.rb +46 -0
- data/lib/ingenico/direct/sdk/domain/payout_output.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/payout_response.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/payout_result.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/payout_status_output.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/personal_information.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/personal_information_token.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/personal_name.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/personal_name_token.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/product_directory.rb +34 -0
- data/lib/ingenico/direct/sdk/domain/protection_eligibility.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/range_validator.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/redirect_data.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/redirect_payment_method_specific_input.rb +67 -0
- data/lib/ingenico/direct/sdk/domain/redirect_payment_method_specific_output.rb +67 -0
- data/lib/ingenico/direct/sdk/domain/redirect_payment_product809_specific_input.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/redirect_payment_product840_specific_input.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/redirection_data.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/refund_card_method_specific_output.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/refund_e_wallet_method_specific_output.rb +39 -0
- data/lib/ingenico/direct/sdk/domain/refund_error_response.rb +46 -0
- data/lib/ingenico/direct/sdk/domain/refund_mobile_method_specific_output.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/refund_output.rb +79 -0
- data/lib/ingenico/direct/sdk/domain/refund_payment_product840_customer_account.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/refund_payment_product840_specific_output.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/refund_redirect_method_specific_output.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/refund_request.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/refund_response.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/refunds_response.rb +34 -0
- data/lib/ingenico/direct/sdk/domain/regular_expression_validator.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/sepa_direct_debit_payment_method_specific_output.rb +43 -0
- data/lib/ingenico/direct/sdk/domain/session_request.rb +33 -0
- data/lib/ingenico/direct/sdk/domain/session_response.rb +49 -0
- data/lib/ingenico/direct/sdk/domain/shipping.rb +51 -0
- data/lib/ingenico/direct/sdk/domain/shopping_cart.rb +65 -0
- data/lib/ingenico/direct/sdk/domain/shopping_cart_extension.rb +52 -0
- data/lib/ingenico/direct/sdk/domain/test_connection.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/three_d_secure.rb +63 -0
- data/lib/ingenico/direct/sdk/domain/three_d_secure_base.rb +47 -0
- data/lib/ingenico/direct/sdk/domain/three_d_secure_data.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/three_d_secure_results.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/token_card.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/token_card_data.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/token_card_specific_input.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/token_data.rb +31 -0
- data/lib/ingenico/direct/sdk/domain/token_e_wallet.rb +35 -0
- data/lib/ingenico/direct/sdk/domain/token_response.rb +55 -0
- data/lib/ingenico/direct/sdk/domain/value_mapping_element.rb +38 -0
- data/lib/ingenico/direct/sdk/endpoint_configuration.rb +127 -0
- data/lib/ingenico/direct/sdk/exceptions.rb +8 -0
- data/lib/ingenico/direct/sdk/factory.rb +136 -0
- data/lib/ingenico/direct/sdk/idempotence_exception.rb +24 -0
- data/lib/ingenico/direct/sdk/logging.rb +10 -0
- data/lib/ingenico/direct/sdk/logging/communicator_logger.rb +22 -0
- data/lib/ingenico/direct/sdk/logging/log_message_builder.rb +56 -0
- data/lib/ingenico/direct/sdk/logging/logging_capable.rb +19 -0
- data/lib/ingenico/direct/sdk/logging/logging_util.rb +271 -0
- data/lib/ingenico/direct/sdk/logging/request_log_message_builder.rb +39 -0
- data/lib/ingenico/direct/sdk/logging/response_log_message_builder.rb +34 -0
- data/lib/ingenico/direct/sdk/logging/ruby_communicator_logger.rb +57 -0
- data/lib/ingenico/direct/sdk/logging/stdout_communicator_logger.rb +34 -0
- data/lib/ingenico/direct/sdk/marshaller.rb +24 -0
- data/lib/ingenico/direct/sdk/marshaller_syntax_exception.rb +6 -0
- data/lib/ingenico/direct/sdk/merchant/hostedcheckout/hosted_checkout_client.rb +87 -0
- data/lib/ingenico/direct/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb +87 -0
- data/lib/ingenico/direct/sdk/merchant/merchant_client.rb +83 -0
- data/lib/ingenico/direct/sdk/merchant/payments/payments_client.rb +291 -0
- data/lib/ingenico/direct/sdk/merchant/payouts/payouts_client.rb +87 -0
- data/lib/ingenico/direct/sdk/merchant/productgroups/get_product_group_params.rb +58 -0
- data/lib/ingenico/direct/sdk/merchant/productgroups/get_product_groups_params.rb +58 -0
- data/lib/ingenico/direct/sdk/merchant/productgroups/product_groups_client.rb +88 -0
- data/lib/ingenico/direct/sdk/merchant/products/get_payment_product_networks_params.rb +39 -0
- data/lib/ingenico/direct/sdk/merchant/products/get_payment_product_params.rb +58 -0
- data/lib/ingenico/direct/sdk/merchant/products/get_payment_products_params.rb +58 -0
- data/lib/ingenico/direct/sdk/merchant/products/get_product_directory_params.rb +31 -0
- data/lib/ingenico/direct/sdk/merchant/products/products_client.rb +156 -0
- data/lib/ingenico/direct/sdk/merchant/services/services_client.rb +52 -0
- data/lib/ingenico/direct/sdk/merchant/sessions/sessions_client.rb +55 -0
- data/lib/ingenico/direct/sdk/merchant/tokens/tokens_client.rb +117 -0
- data/lib/ingenico/direct/sdk/meta_data_provider.rb +150 -0
- data/lib/ingenico/direct/sdk/modules.rb +71 -0
- data/lib/ingenico/direct/sdk/not_found_exception.rb +16 -0
- data/lib/ingenico/direct/sdk/param_request.rb +11 -0
- data/lib/ingenico/direct/sdk/pooled_connection.rb +21 -0
- data/lib/ingenico/direct/sdk/proxy_configuration.rb +74 -0
- data/lib/ingenico/direct/sdk/reference_exception.rb +14 -0
- data/lib/ingenico/direct/sdk/request_header.rb +50 -0
- data/lib/ingenico/direct/sdk/request_param.rb +23 -0
- data/lib/ingenico/direct/sdk/response_exception.rb +47 -0
- data/lib/ingenico/direct/sdk/response_header.rb +42 -0
- data/lib/ingenico/direct/sdk/validation_exception.rb +14 -0
- data/lib/ingenico/direct/sdk/webhooks.rb +11 -0
- data/lib/ingenico/direct/sdk/webhooks/api_version_mismatch_exception.rb +20 -0
- data/lib/ingenico/direct/sdk/webhooks/in_memory_secret_key_store.rb +56 -0
- data/lib/ingenico/direct/sdk/webhooks/secret_key_not_available_exception.rb +17 -0
- data/lib/ingenico/direct/sdk/webhooks/secret_key_store.rb +16 -0
- data/lib/ingenico/direct/sdk/webhooks/signature_validation_exception.rb +19 -0
- data/lib/ingenico/direct/sdk/webhooks/webhooks.rb +22 -0
- data/lib/ingenico/direct/sdk/webhooks/webhooks_event.rb +58 -0
- data/lib/ingenico/direct/sdk/webhooks/webhooks_helper.rb +99 -0
- data/lib/ingenico/direct/sdk/webhooks/webhooks_helper_builder.rb +25 -0
- metadata +385 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This class was auto-generated from the API references found at
|
|
3
|
+
# https://support.direct.ingenico.com/documentation/api/reference/
|
|
4
|
+
#
|
|
5
|
+
require 'ingenico/direct/sdk/api_resource'
|
|
6
|
+
require 'ingenico/direct/sdk/response_exception'
|
|
7
|
+
require 'ingenico/direct/sdk/domain/cancel_payment_response'
|
|
8
|
+
require 'ingenico/direct/sdk/domain/capture_payment_request'
|
|
9
|
+
require 'ingenico/direct/sdk/domain/capture_response'
|
|
10
|
+
require 'ingenico/direct/sdk/domain/captures_response'
|
|
11
|
+
require 'ingenico/direct/sdk/domain/complete_payment_request'
|
|
12
|
+
require 'ingenico/direct/sdk/domain/complete_payment_response'
|
|
13
|
+
require 'ingenico/direct/sdk/domain/create_payment_request'
|
|
14
|
+
require 'ingenico/direct/sdk/domain/create_payment_response'
|
|
15
|
+
require 'ingenico/direct/sdk/domain/error_response'
|
|
16
|
+
require 'ingenico/direct/sdk/domain/payment_error_response'
|
|
17
|
+
require 'ingenico/direct/sdk/domain/payment_response'
|
|
18
|
+
require 'ingenico/direct/sdk/domain/refund_error_response'
|
|
19
|
+
require 'ingenico/direct/sdk/domain/refund_request'
|
|
20
|
+
require 'ingenico/direct/sdk/domain/refund_response'
|
|
21
|
+
require 'ingenico/direct/sdk/domain/refunds_response'
|
|
22
|
+
|
|
23
|
+
module Ingenico::Direct::SDK
|
|
24
|
+
module Merchant
|
|
25
|
+
module Payments
|
|
26
|
+
|
|
27
|
+
# Payments client. Thread-safe.
|
|
28
|
+
class PaymentsClient < Ingenico::Direct::SDK::ApiResource
|
|
29
|
+
|
|
30
|
+
# @param parent [Ingenico::Direct::SDK::ApiResource]
|
|
31
|
+
# @param path_context [Hash, nil]
|
|
32
|
+
def initialize(parent, path_context = nil)
|
|
33
|
+
super(parent, path_context)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Resource /v2/!{merchantId}/payments - {https://support.direct.ingenico.com/documentation/api/reference#operation/CreatePaymentApi Create payment}
|
|
37
|
+
# @param body [Ingenico::Direct::SDK::Domain::CreatePaymentRequest]
|
|
38
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
39
|
+
# @return [Ingenico::Direct::SDK::Domain::CreatePaymentResponse]
|
|
40
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
41
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
42
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
43
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
44
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
45
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
46
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
47
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
48
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
49
|
+
def create_payment(body, context = nil)
|
|
50
|
+
uri = instantiate_uri('/v2/{merchantId}/payments')
|
|
51
|
+
@communicator.post(
|
|
52
|
+
uri,
|
|
53
|
+
client_headers,
|
|
54
|
+
nil,
|
|
55
|
+
body,
|
|
56
|
+
Ingenico::Direct::SDK::Domain::CreatePaymentResponse,
|
|
57
|
+
context
|
|
58
|
+
)
|
|
59
|
+
rescue ResponseException => e
|
|
60
|
+
error_type = Ingenico::Direct::SDK::Domain::PaymentErrorResponse
|
|
61
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
62
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId} - {https://support.direct.ingenico.com/documentation/api/reference#operation/GetPaymentApi Get payment}
|
|
66
|
+
# @param payment_id [String]
|
|
67
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
68
|
+
# @return [Ingenico::Direct::SDK::Domain::PaymentResponse]
|
|
69
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
70
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
71
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
72
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
73
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
74
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
75
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
76
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
77
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
78
|
+
def get_payment(payment_id, context = nil)
|
|
79
|
+
path_context = {
|
|
80
|
+
'paymentId'.freeze => payment_id,
|
|
81
|
+
}
|
|
82
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}', path_context)
|
|
83
|
+
@communicator.get(
|
|
84
|
+
uri,
|
|
85
|
+
client_headers,
|
|
86
|
+
nil,
|
|
87
|
+
Ingenico::Direct::SDK::Domain::PaymentResponse,
|
|
88
|
+
context
|
|
89
|
+
)
|
|
90
|
+
rescue ResponseException => e
|
|
91
|
+
error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
|
|
92
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
93
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId}/complete - {https://support.direct.ingenico.com/documentation/api/reference#operation/CompletePaymentApi Complete payment}
|
|
97
|
+
# @param payment_id [String]
|
|
98
|
+
# @param body [Ingenico::Direct::SDK::Domain::CompletePaymentRequest]
|
|
99
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
100
|
+
# @return [Ingenico::Direct::SDK::Domain::CompletePaymentResponse]
|
|
101
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
102
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
103
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
104
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
105
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
106
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
107
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
108
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
109
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
110
|
+
def complete_payment(payment_id, body, context = nil)
|
|
111
|
+
path_context = {
|
|
112
|
+
'paymentId'.freeze => payment_id,
|
|
113
|
+
}
|
|
114
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}/complete', path_context)
|
|
115
|
+
@communicator.post(
|
|
116
|
+
uri,
|
|
117
|
+
client_headers,
|
|
118
|
+
nil,
|
|
119
|
+
body,
|
|
120
|
+
Ingenico::Direct::SDK::Domain::CompletePaymentResponse,
|
|
121
|
+
context
|
|
122
|
+
)
|
|
123
|
+
rescue ResponseException => e
|
|
124
|
+
error_type = Ingenico::Direct::SDK::Domain::PaymentErrorResponse
|
|
125
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
126
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId}/cancel - {https://support.direct.ingenico.com/documentation/api/reference#operation/CancelPaymentApi Cancel payment}
|
|
130
|
+
# @param payment_id [String]
|
|
131
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
132
|
+
# @return [Ingenico::Direct::SDK::Domain::CancelPaymentResponse]
|
|
133
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
134
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
135
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
136
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
137
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
138
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
139
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
140
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
141
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
142
|
+
def cancel_payment(payment_id, context = nil)
|
|
143
|
+
path_context = {
|
|
144
|
+
'paymentId'.freeze => payment_id,
|
|
145
|
+
}
|
|
146
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}/cancel', path_context)
|
|
147
|
+
@communicator.post(
|
|
148
|
+
uri,
|
|
149
|
+
client_headers,
|
|
150
|
+
nil,
|
|
151
|
+
nil,
|
|
152
|
+
Ingenico::Direct::SDK::Domain::CancelPaymentResponse,
|
|
153
|
+
context
|
|
154
|
+
)
|
|
155
|
+
rescue ResponseException => e
|
|
156
|
+
error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
|
|
157
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
158
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId}/refund - {https://support.direct.ingenico.com/documentation/api/reference#operation/RefundPaymentApi Refund payment}
|
|
162
|
+
# @param payment_id [String]
|
|
163
|
+
# @param body [Ingenico::Direct::SDK::Domain::RefundRequest]
|
|
164
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
165
|
+
# @return [Ingenico::Direct::SDK::Domain::RefundResponse]
|
|
166
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
167
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
168
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
169
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
170
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
171
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
172
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
173
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
174
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
175
|
+
def refund_payment(payment_id, body, context = nil)
|
|
176
|
+
path_context = {
|
|
177
|
+
'paymentId'.freeze => payment_id,
|
|
178
|
+
}
|
|
179
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}/refund', path_context)
|
|
180
|
+
@communicator.post(
|
|
181
|
+
uri,
|
|
182
|
+
client_headers,
|
|
183
|
+
nil,
|
|
184
|
+
body,
|
|
185
|
+
Ingenico::Direct::SDK::Domain::RefundResponse,
|
|
186
|
+
context
|
|
187
|
+
)
|
|
188
|
+
rescue ResponseException => e
|
|
189
|
+
error_type = Ingenico::Direct::SDK::Domain::RefundErrorResponse
|
|
190
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
191
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId}/capture - {https://support.direct.ingenico.com/documentation/api/reference#operation/CapturePaymentApi Capture payment}
|
|
195
|
+
# @param payment_id [String]
|
|
196
|
+
# @param body [Ingenico::Direct::SDK::Domain::CapturePaymentRequest]
|
|
197
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
198
|
+
# @return [Ingenico::Direct::SDK::Domain::CaptureResponse]
|
|
199
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
200
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
201
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
202
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
203
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
204
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
205
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
206
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
207
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
208
|
+
def capture_payment(payment_id, body, context = nil)
|
|
209
|
+
path_context = {
|
|
210
|
+
'paymentId'.freeze => payment_id,
|
|
211
|
+
}
|
|
212
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}/capture', path_context)
|
|
213
|
+
@communicator.post(
|
|
214
|
+
uri,
|
|
215
|
+
client_headers,
|
|
216
|
+
nil,
|
|
217
|
+
body,
|
|
218
|
+
Ingenico::Direct::SDK::Domain::CaptureResponse,
|
|
219
|
+
context
|
|
220
|
+
)
|
|
221
|
+
rescue ResponseException => e
|
|
222
|
+
error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
|
|
223
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
224
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId}/captures - {https://support.direct.ingenico.com/documentation/api/reference#operation/GetCapturesApi Get Captures Api}
|
|
228
|
+
# @param payment_id [String]
|
|
229
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
230
|
+
# @return [Ingenico::Direct::SDK::Domain::CapturesResponse]
|
|
231
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
232
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
233
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
234
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
235
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
236
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
237
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
238
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
239
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
240
|
+
def get_captures(payment_id, context = nil)
|
|
241
|
+
path_context = {
|
|
242
|
+
'paymentId'.freeze => payment_id,
|
|
243
|
+
}
|
|
244
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}/captures', path_context)
|
|
245
|
+
@communicator.get(
|
|
246
|
+
uri,
|
|
247
|
+
client_headers,
|
|
248
|
+
nil,
|
|
249
|
+
Ingenico::Direct::SDK::Domain::CapturesResponse,
|
|
250
|
+
context
|
|
251
|
+
)
|
|
252
|
+
rescue ResponseException => e
|
|
253
|
+
error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
|
|
254
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
255
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId}/refunds - {https://support.direct.ingenico.com/documentation/api/reference#operation/GetRefundsApi Get Refunds Api}
|
|
259
|
+
# @param payment_id [String]
|
|
260
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
261
|
+
# @return [Ingenico::Direct::SDK::Domain::RefundsResponse]
|
|
262
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
263
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
264
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
265
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
266
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
267
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
268
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
269
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
270
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
271
|
+
def get_refunds(payment_id, context = nil)
|
|
272
|
+
path_context = {
|
|
273
|
+
'paymentId'.freeze => payment_id,
|
|
274
|
+
}
|
|
275
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}/refunds', path_context)
|
|
276
|
+
@communicator.get(
|
|
277
|
+
uri,
|
|
278
|
+
client_headers,
|
|
279
|
+
nil,
|
|
280
|
+
Ingenico::Direct::SDK::Domain::RefundsResponse,
|
|
281
|
+
context
|
|
282
|
+
)
|
|
283
|
+
rescue ResponseException => e
|
|
284
|
+
error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
|
|
285
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
286
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
end
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This class was auto-generated from the API references found at
|
|
3
|
+
# https://support.direct.ingenico.com/documentation/api/reference/
|
|
4
|
+
#
|
|
5
|
+
require 'ingenico/direct/sdk/api_resource'
|
|
6
|
+
require 'ingenico/direct/sdk/response_exception'
|
|
7
|
+
require 'ingenico/direct/sdk/domain/create_payout_request'
|
|
8
|
+
require 'ingenico/direct/sdk/domain/error_response'
|
|
9
|
+
require 'ingenico/direct/sdk/domain/payout_error_response'
|
|
10
|
+
require 'ingenico/direct/sdk/domain/payout_response'
|
|
11
|
+
|
|
12
|
+
module Ingenico::Direct::SDK
|
|
13
|
+
module Merchant
|
|
14
|
+
module Payouts
|
|
15
|
+
|
|
16
|
+
# Payouts client. Thread-safe.
|
|
17
|
+
class PayoutsClient < Ingenico::Direct::SDK::ApiResource
|
|
18
|
+
|
|
19
|
+
# @param parent [Ingenico::Direct::SDK::ApiResource]
|
|
20
|
+
# @param path_context [Hash, nil]
|
|
21
|
+
def initialize(parent, path_context = nil)
|
|
22
|
+
super(parent, path_context)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Resource /v2/!{merchantId}/payouts - {https://support.direct.ingenico.com/documentation/api/reference#operation/CreatePayoutApi Create payout}
|
|
26
|
+
# @param body [Ingenico::Direct::SDK::Domain::CreatePayoutRequest]
|
|
27
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
28
|
+
# @return [Ingenico::Direct::SDK::Domain::PayoutResponse]
|
|
29
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
30
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
31
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
32
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
33
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
34
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
35
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
36
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
37
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
38
|
+
def create_payout(body, context = nil)
|
|
39
|
+
uri = instantiate_uri('/v2/{merchantId}/payouts')
|
|
40
|
+
@communicator.post(
|
|
41
|
+
uri,
|
|
42
|
+
client_headers,
|
|
43
|
+
nil,
|
|
44
|
+
body,
|
|
45
|
+
Ingenico::Direct::SDK::Domain::PayoutResponse,
|
|
46
|
+
context
|
|
47
|
+
)
|
|
48
|
+
rescue ResponseException => e
|
|
49
|
+
error_type = Ingenico::Direct::SDK::Domain::PayoutErrorResponse
|
|
50
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
51
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Resource /v2/!{merchantId}/payouts/!{payoutId} - {https://support.direct.ingenico.com/documentation/api/reference#operation/GetPayoutApi Get payout}
|
|
55
|
+
# @param payout_id [String]
|
|
56
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
|
57
|
+
# @return [Ingenico::Direct::SDK::Domain::PayoutResponse]
|
|
58
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
|
59
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
|
60
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
|
61
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
|
62
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
|
63
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
|
64
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
|
65
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
|
66
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
|
67
|
+
def get_payout(payout_id, context = nil)
|
|
68
|
+
path_context = {
|
|
69
|
+
'payoutId'.freeze => payout_id,
|
|
70
|
+
}
|
|
71
|
+
uri = instantiate_uri('/v2/{merchantId}/payouts/{payoutId}', path_context)
|
|
72
|
+
@communicator.get(
|
|
73
|
+
uri,
|
|
74
|
+
client_headers,
|
|
75
|
+
nil,
|
|
76
|
+
Ingenico::Direct::SDK::Domain::PayoutResponse,
|
|
77
|
+
context
|
|
78
|
+
)
|
|
79
|
+
rescue ResponseException => e
|
|
80
|
+
error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
|
|
81
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
|
82
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This class was auto-generated from the API references found at
|
|
3
|
+
# https://support.direct.ingenico.com/documentation/api/reference/
|
|
4
|
+
#
|
|
5
|
+
require 'ingenico/direct/sdk/param_request'
|
|
6
|
+
require 'ingenico/direct/sdk/request_param'
|
|
7
|
+
|
|
8
|
+
module Ingenico::Direct::SDK
|
|
9
|
+
module Merchant
|
|
10
|
+
module ProductGroups
|
|
11
|
+
|
|
12
|
+
# Query parameters for {https://support.direct.ingenico.com/documentation/api/reference#operation/GetProductGroup Get product group}
|
|
13
|
+
# @attr [String] country_code
|
|
14
|
+
# @attr [String] currency_code
|
|
15
|
+
# @attr [String] locale
|
|
16
|
+
# @attr [Integer] amount
|
|
17
|
+
# @attr [true/false] is_recurring
|
|
18
|
+
# @attr [Array<String>] hide
|
|
19
|
+
class GetProductGroupParams < Ingenico::Direct::SDK::ParamRequest
|
|
20
|
+
|
|
21
|
+
attr_accessor :country_code
|
|
22
|
+
|
|
23
|
+
attr_accessor :currency_code
|
|
24
|
+
|
|
25
|
+
attr_accessor :locale
|
|
26
|
+
|
|
27
|
+
attr_accessor :amount
|
|
28
|
+
|
|
29
|
+
attr_accessor :is_recurring
|
|
30
|
+
|
|
31
|
+
attr_accessor :hide
|
|
32
|
+
|
|
33
|
+
# Adds the parameter _value_ to the _hide_ Array
|
|
34
|
+
# @param value [String]
|
|
35
|
+
def add_hide(value)
|
|
36
|
+
unless @hide
|
|
37
|
+
@hide = []
|
|
38
|
+
end
|
|
39
|
+
@hide << value
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @return [Array<Ingenico::Direct::SDK::RequestParam>] representing the attributes of this class
|
|
43
|
+
def to_request_parameters
|
|
44
|
+
result = []
|
|
45
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
46
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
47
|
+
result << RequestParam.new('locale', @locale) unless @locale.nil?
|
|
48
|
+
result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
|
|
49
|
+
result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
|
|
50
|
+
unless @hide.nil?
|
|
51
|
+
@hide.each {|e| result << RequestParam.new('hide', e)}
|
|
52
|
+
end
|
|
53
|
+
result
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This class was auto-generated from the API references found at
|
|
3
|
+
# https://support.direct.ingenico.com/documentation/api/reference/
|
|
4
|
+
#
|
|
5
|
+
require 'ingenico/direct/sdk/param_request'
|
|
6
|
+
require 'ingenico/direct/sdk/request_param'
|
|
7
|
+
|
|
8
|
+
module Ingenico::Direct::SDK
|
|
9
|
+
module Merchant
|
|
10
|
+
module ProductGroups
|
|
11
|
+
|
|
12
|
+
# Query parameters for {https://support.direct.ingenico.com/documentation/api/reference#operation/GetProductGroups Get product groups}
|
|
13
|
+
# @attr [String] country_code
|
|
14
|
+
# @attr [String] currency_code
|
|
15
|
+
# @attr [String] locale
|
|
16
|
+
# @attr [Integer] amount
|
|
17
|
+
# @attr [true/false] is_recurring
|
|
18
|
+
# @attr [Array<String>] hide
|
|
19
|
+
class GetProductGroupsParams < Ingenico::Direct::SDK::ParamRequest
|
|
20
|
+
|
|
21
|
+
attr_accessor :country_code
|
|
22
|
+
|
|
23
|
+
attr_accessor :currency_code
|
|
24
|
+
|
|
25
|
+
attr_accessor :locale
|
|
26
|
+
|
|
27
|
+
attr_accessor :amount
|
|
28
|
+
|
|
29
|
+
attr_accessor :is_recurring
|
|
30
|
+
|
|
31
|
+
attr_accessor :hide
|
|
32
|
+
|
|
33
|
+
# Adds the parameter _value_ to the _hide_ Array
|
|
34
|
+
# @param value [String]
|
|
35
|
+
def add_hide(value)
|
|
36
|
+
unless @hide
|
|
37
|
+
@hide = []
|
|
38
|
+
end
|
|
39
|
+
@hide << value
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @return [Array<Ingenico::Direct::SDK::RequestParam>] representing the attributes of this class
|
|
43
|
+
def to_request_parameters
|
|
44
|
+
result = []
|
|
45
|
+
result << RequestParam.new('countryCode', @country_code) unless @country_code.nil?
|
|
46
|
+
result << RequestParam.new('currencyCode', @currency_code) unless @currency_code.nil?
|
|
47
|
+
result << RequestParam.new('locale', @locale) unless @locale.nil?
|
|
48
|
+
result << RequestParam.new('amount', @amount.to_s) unless @amount.nil?
|
|
49
|
+
result << RequestParam.new('isRecurring', @is_recurring.to_s) unless @is_recurring.nil?
|
|
50
|
+
unless @hide.nil?
|
|
51
|
+
@hide.each {|e| result << RequestParam.new('hide', e)}
|
|
52
|
+
end
|
|
53
|
+
result
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|