subfi_pay 0.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 +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +101 -0
- data/README.md +188 -0
- data/Rakefile +10 -0
- data/bin/console +11 -0
- data/docs/AccessKey.md +32 -0
- data/docs/AccessKeysApi.md +228 -0
- data/docs/AccountAttributes.md +20 -0
- data/docs/AccountAttributesAccount.md +20 -0
- data/docs/AccountCreateRequest.md +18 -0
- data/docs/AccountResponse.md +26 -0
- data/docs/AccountsApi.md +227 -0
- data/docs/BalanceTransactionAttributes.md +30 -0
- data/docs/BalanceTransactionResponse.md +38 -0
- data/docs/BalanceTransactionsApi.md +87 -0
- data/docs/BankAccountProfile.md +28 -0
- data/docs/BillingAddress.md +36 -0
- data/docs/CardProfile.md +42 -0
- data/docs/ChargeAttributes.md +26 -0
- data/docs/ChargeResponse.md +42 -0
- data/docs/ChargesApi.md +167 -0
- data/docs/ConnectedAccountAttributes.md +20 -0
- data/docs/ConnectedAccountResponse.md +26 -0
- data/docs/CreateAccountRequest.md +18 -0
- data/docs/CreateAccountRequestAccount.md +20 -0
- data/docs/CreateCustomerRequest.md +24 -0
- data/docs/CreateWebhookEndpointRequest.md +18 -0
- data/docs/CreateWebhookEndpointRequestWebhookEndpoint.md +28 -0
- data/docs/Customer.md +26 -0
- data/docs/CustomerAttributes.md +24 -0
- data/docs/CustomerAttributesCustomer.md +24 -0
- data/docs/CustomerCreateRequest.md +18 -0
- data/docs/CustomerUpdateAttributes.md +20 -0
- data/docs/CustomerUpdateAttributesCustomer.md +20 -0
- data/docs/CustomerUpdateRequest.md +18 -0
- data/docs/CustomersApi.md +307 -0
- data/docs/Event.md +30 -0
- data/docs/EventsApi.md +159 -0
- data/docs/ListAccessKeysResponse.md +20 -0
- data/docs/ListAccountsResponse.md +20 -0
- data/docs/ListBalanceTransactionsResponse.md +20 -0
- data/docs/ListChargesResponse.md +20 -0
- data/docs/ListCustomersResponse.md +20 -0
- data/docs/ListEventsResponse.md +20 -0
- data/docs/ListPaymentIntentsResponse.md +20 -0
- data/docs/ListPaymentMethodsResponse.md +20 -0
- data/docs/ListRefundsResponse.md +20 -0
- data/docs/ListWebhookEndpointsResponse.md +20 -0
- data/docs/ListWebhookRequestsResponse.md +20 -0
- data/docs/Meta.md +28 -0
- data/docs/PaymentIntentAttributes.md +26 -0
- data/docs/PaymentIntentAttributesPaymentIntent.md +26 -0
- data/docs/PaymentIntentCreateRequest.md +18 -0
- data/docs/PaymentIntentResponse.md +30 -0
- data/docs/PaymentIntentUpdateAttributes.md +18 -0
- data/docs/PaymentIntentUpdateAttributesPaymentIntent.md +18 -0
- data/docs/PaymentIntentsApi.md +533 -0
- data/docs/PaymentMethodAttributes.md +24 -0
- data/docs/PaymentMethodResponse.md +36 -0
- data/docs/PaymentMethodsApi.md +239 -0
- data/docs/RefundAttributes.md +20 -0
- data/docs/RefundResponse.md +30 -0
- data/docs/RefundsApi.md +311 -0
- data/docs/RollAccessKeyAttributes.md +18 -0
- data/docs/RollAccessKeyAttributesAccessKey.md +18 -0
- data/docs/RollAccessKeyRequest.md +18 -0
- data/docs/RollAccessKeyRequestAccessKey.md +18 -0
- data/docs/SubscriptionAttributes.md +30 -0
- data/docs/SubscriptionAttributesSubscription.md +30 -0
- data/docs/SubscriptionCreateRequest.md +18 -0
- data/docs/SubscriptionCreateRequestSubscription.md +30 -0
- data/docs/SubscriptionResponse.md +36 -0
- data/docs/SubscriptionsApi.md +155 -0
- data/docs/WebhookEndpoint.md +34 -0
- data/docs/WebhookEndpointsApi.md +380 -0
- data/docs/WebhookRequest.md +38 -0
- data/docs/WebhookRequestsApi.md +85 -0
- data/git_push.sh +57 -0
- data/lib/subfi_pay/api/access_keys_api.rb +235 -0
- data/lib/subfi_pay/api/accounts_api.rb +231 -0
- data/lib/subfi_pay/api/balance_transactions_api.rb +100 -0
- data/lib/subfi_pay/api/charges_api.rb +181 -0
- data/lib/subfi_pay/api/customers_api.rb +331 -0
- data/lib/subfi_pay/api/events_api.rb +172 -0
- data/lib/subfi_pay/api/payment_intents_api.rb +566 -0
- data/lib/subfi_pay/api/payment_methods_api.rb +262 -0
- data/lib/subfi_pay/api/refunds_api.rb +334 -0
- data/lib/subfi_pay/api/subscriptions_api.rb +177 -0
- data/lib/subfi_pay/api/webhook_endpoints_api.rb +404 -0
- data/lib/subfi_pay/api/webhook_requests_api.rb +97 -0
- data/lib/subfi_pay/api_client.rb +394 -0
- data/lib/subfi_pay/api_error.rb +58 -0
- data/lib/subfi_pay/configuration.rb +305 -0
- data/lib/subfi_pay/models/access_key.rb +275 -0
- data/lib/subfi_pay/models/account_attributes.rb +221 -0
- data/lib/subfi_pay/models/account_attributes_account.rb +221 -0
- data/lib/subfi_pay/models/account_create_request.rb +212 -0
- data/lib/subfi_pay/models/account_response.rb +248 -0
- data/lib/subfi_pay/models/balance_transaction_attributes.rb +266 -0
- data/lib/subfi_pay/models/balance_transaction_response.rb +303 -0
- data/lib/subfi_pay/models/bank_account_profile.rb +257 -0
- data/lib/subfi_pay/models/billing_address.rb +294 -0
- data/lib/subfi_pay/models/card_profile.rb +324 -0
- data/lib/subfi_pay/models/charge_attributes.rb +265 -0
- data/lib/subfi_pay/models/charge_response.rb +326 -0
- data/lib/subfi_pay/models/connected_account_attributes.rb +235 -0
- data/lib/subfi_pay/models/connected_account_response.rb +248 -0
- data/lib/subfi_pay/models/create_account_request.rb +219 -0
- data/lib/subfi_pay/models/create_account_request_account.rb +221 -0
- data/lib/subfi_pay/models/create_customer_request.rb +239 -0
- data/lib/subfi_pay/models/create_webhook_endpoint_request.rb +212 -0
- data/lib/subfi_pay/models/create_webhook_endpoint_request_webhook_endpoint.rb +257 -0
- data/lib/subfi_pay/models/customer.rb +248 -0
- data/lib/subfi_pay/models/customer_attributes.rb +239 -0
- data/lib/subfi_pay/models/customer_attributes_customer.rb +239 -0
- data/lib/subfi_pay/models/customer_create_request.rb +212 -0
- data/lib/subfi_pay/models/customer_update_attributes.rb +221 -0
- data/lib/subfi_pay/models/customer_update_attributes_customer.rb +221 -0
- data/lib/subfi_pay/models/customer_update_request.rb +212 -0
- data/lib/subfi_pay/models/event.rb +266 -0
- data/lib/subfi_pay/models/list_access_keys_response.rb +223 -0
- data/lib/subfi_pay/models/list_accounts_response.rb +223 -0
- data/lib/subfi_pay/models/list_balance_transactions_response.rb +223 -0
- data/lib/subfi_pay/models/list_charges_response.rb +223 -0
- data/lib/subfi_pay/models/list_customers_response.rb +223 -0
- data/lib/subfi_pay/models/list_events_response.rb +223 -0
- data/lib/subfi_pay/models/list_payment_intents_response.rb +223 -0
- data/lib/subfi_pay/models/list_payment_methods_response.rb +223 -0
- data/lib/subfi_pay/models/list_refunds_response.rb +223 -0
- data/lib/subfi_pay/models/list_webhook_endpoints_response.rb +223 -0
- data/lib/subfi_pay/models/list_webhook_requests_response.rb +223 -0
- data/lib/subfi_pay/models/meta.rb +259 -0
- data/lib/subfi_pay/models/payment_intent_attributes.rb +257 -0
- data/lib/subfi_pay/models/payment_intent_attributes_payment_intent.rb +257 -0
- data/lib/subfi_pay/models/payment_intent_create_request.rb +212 -0
- data/lib/subfi_pay/models/payment_intent_response.rb +268 -0
- data/lib/subfi_pay/models/payment_intent_update_attributes.rb +212 -0
- data/lib/subfi_pay/models/payment_intent_update_attributes_payment_intent.rb +214 -0
- data/lib/subfi_pay/models/payment_method_attributes.rb +246 -0
- data/lib/subfi_pay/models/payment_method_response.rb +296 -0
- data/lib/subfi_pay/models/refund_attributes.rb +228 -0
- data/lib/subfi_pay/models/refund_response.rb +268 -0
- data/lib/subfi_pay/models/roll_access_key_attributes.rb +212 -0
- data/lib/subfi_pay/models/roll_access_key_attributes_access_key.rb +219 -0
- data/lib/subfi_pay/models/roll_access_key_request.rb +212 -0
- data/lib/subfi_pay/models/roll_access_key_request_access_key.rb +219 -0
- data/lib/subfi_pay/models/subscription_attributes.rb +266 -0
- data/lib/subfi_pay/models/subscription_attributes_subscription.rb +266 -0
- data/lib/subfi_pay/models/subscription_create_request.rb +212 -0
- data/lib/subfi_pay/models/subscription_create_request_subscription.rb +266 -0
- data/lib/subfi_pay/models/subscription_response.rb +293 -0
- data/lib/subfi_pay/models/webhook_endpoint.rb +284 -0
- data/lib/subfi_pay/models/webhook_request.rb +302 -0
- data/lib/subfi_pay/version.rb +15 -0
- data/lib/subfi_pay.rb +99 -0
- data/run_fix_gemfile.sh +11 -0
- data/spec/api/access_keys_api_spec.rb +138 -0
- data/spec/api/accounts_api_spec.rb +145 -0
- data/spec/api/balance_transactions_api_spec.rb +86 -0
- data/spec/api/charges_api_spec.rb +121 -0
- data/spec/api/customers_api_spec.rb +134 -0
- data/spec/api/events_api_spec.rb +105 -0
- data/spec/api/payment_intents_api_spec.rb +250 -0
- data/spec/api/payment_methods_api_spec.rb +226 -0
- data/spec/api/refunds_api_spec.rb +158 -0
- data/spec/api/subscriptions_api_spec.rb +113 -0
- data/spec/api/webhook_endpoints_api_spec.rb +198 -0
- data/spec/api/webhook_requests_api_spec.rb +79 -0
- data/spec/configuration_spec.rb +23 -0
- data/spec/fixtures/access_keys/list_200.json +1 -0
- data/spec/fixtures/access_keys/roll_200.json +1 -0
- data/spec/fixtures/accounts/create_201.json +1 -0
- data/spec/fixtures/accounts/list_200.json +1 -0
- data/spec/fixtures/accounts/show_200.json +1 -0
- data/spec/fixtures/balance_transactions/list_200.json +69 -0
- data/spec/fixtures/charges/create_201.json +39 -0
- data/spec/fixtures/charges/list_200.json +1 -0
- data/spec/fixtures/charges/retrieve_200.json +1 -0
- data/spec/fixtures/customers/create_201.json +1 -0
- data/spec/fixtures/customers/list_200.json +1 -0
- data/spec/fixtures/customers/show_200.json +1 -0
- data/spec/fixtures/events/list_200.json +1 -0
- data/spec/fixtures/events/show_200.json +1 -0
- data/spec/fixtures/payment_intents/cancel_200.json +1 -0
- data/spec/fixtures/payment_intents/capture_200.json +1 -0
- data/spec/fixtures/payment_intents/confirm_200.json +1 -0
- data/spec/fixtures/payment_intents/create_201.json +1 -0
- data/spec/fixtures/payment_intents/fetch_200.json +1 -0
- data/spec/fixtures/payment_intents/list_200.json +1 -0
- data/spec/fixtures/payment_intents/update_200.json +1 -0
- data/spec/fixtures/payment_methods/create_bank_account_201.json +1 -0
- data/spec/fixtures/payment_methods/create_card_201.json +1 -0
- data/spec/fixtures/payment_methods/get_bank_account_200.json +29 -0
- data/spec/fixtures/payment_methods/get_card_200.json +1 -0
- data/spec/fixtures/payment_methods/list_200.json +1 -0
- data/spec/fixtures/refunds/create_201.json +1 -0
- data/spec/fixtures/refunds/list_200.json +1 -0
- data/spec/fixtures/refunds/show_200.json +1 -0
- data/spec/fixtures/subscriptions/create_201.json +1 -0
- data/spec/fixtures/subscriptions/show_200.json +1 -0
- data/spec/fixtures/webhook_endpoints/create_201.json +11 -0
- data/spec/fixtures/webhook_endpoints/list_200.json +1 -0
- data/spec/fixtures/webhook_endpoints/show_200.json +1 -0
- data/spec/fixtures/webhook_endpoints/update_200.json +13 -0
- data/spec/fixtures/webhook_requests/list_200.json +1 -0
- data/spec/models/access_key_spec.rb +39 -0
- data/spec/models/account_attributes_spec.rb +40 -0
- data/spec/models/account_create_request_spec.rb +38 -0
- data/spec/models/account_response_spec.rb +39 -0
- data/spec/models/balance_transaction_response_spec.rb +38 -0
- data/spec/models/bank_account_profile_spec.rb +38 -0
- data/spec/models/billing_address_spec.rb +38 -0
- data/spec/models/card_profile_spec.rb +38 -0
- data/spec/models/charge_attributes_spec.rb +45 -0
- data/spec/models/charge_response_spec.rb +45 -0
- data/spec/models/connected_account_attributes_spec.rb +38 -0
- data/spec/models/connected_account_response_spec.rb +39 -0
- data/spec/models/create_account_request_account_spec.rb +39 -0
- data/spec/models/create_account_request_spec.rb +39 -0
- data/spec/models/create_webhook_endpoint_request_spec.rb +38 -0
- data/spec/models/create_webhook_endpoint_request_webhook_endpoint_spec.rb +38 -0
- data/spec/models/customer_attributes_spec.rb +40 -0
- data/spec/models/customer_create_request_spec.rb +38 -0
- data/spec/models/customer_spec.rb +39 -0
- data/spec/models/customer_update_attributes_spec.rb +39 -0
- data/spec/models/customer_update_request_spec.rb +39 -0
- data/spec/models/event_spec.rb +39 -0
- data/spec/models/list_access_keys_response_spec.rb +38 -0
- data/spec/models/list_accounts_response_spec.rb +38 -0
- data/spec/models/list_balance_transactions_response_spec.rb +38 -0
- data/spec/models/list_charges_response_spec.rb +38 -0
- data/spec/models/list_customers_response_spec.rb +39 -0
- data/spec/models/list_events_response_spec.rb +38 -0
- data/spec/models/list_payment_intents_response_spec.rb +45 -0
- data/spec/models/list_payment_methods_response_spec.rb +39 -0
- data/spec/models/list_refunds_response_spec.rb +38 -0
- data/spec/models/list_webhook_endpoints_response_spec.rb +38 -0
- data/spec/models/list_webhook_requests_response_spec.rb +39 -0
- data/spec/models/meta_spec.rb +38 -0
- data/spec/models/payment_intent_attributes_spec.rb +44 -0
- data/spec/models/payment_intent_create_request_spec.rb +38 -0
- data/spec/models/payment_intent_response_spec.rb +45 -0
- data/spec/models/payment_intent_update_attributes_payment_intent_spec.rb +38 -0
- data/spec/models/payment_intent_update_attributes_spec.rb +37 -0
- data/spec/models/payment_method_attributes_spec.rb +38 -0
- data/spec/models/payment_method_response_spec.rb +38 -0
- data/spec/models/refund_attributes_spec.rb +39 -0
- data/spec/models/refund_response_spec.rb +38 -0
- data/spec/models/roll_access_key_attributes_access_key_spec.rb +39 -0
- data/spec/models/roll_access_key_attributes_spec.rb +40 -0
- data/spec/models/roll_access_key_request_access_key_spec.rb +38 -0
- data/spec/models/roll_access_key_request_spec.rb +37 -0
- data/spec/models/subscription_attributes_spec.rb +38 -0
- data/spec/models/subscription_create_request_spec.rb +40 -0
- data/spec/models/subscription_response_spec.rb +38 -0
- data/spec/models/webhook_endpoint_spec.rb +40 -0
- data/spec/models/webhook_request_spec.rb +40 -0
- data/spec/spec_helper.rb +123 -0
- data/subfi_pay.gemspec +39 -0
- metadata +444 -0
@@ -0,0 +1,177 @@
|
|
1
|
+
=begin
|
2
|
+
#SubFi Pay API
|
3
|
+
|
4
|
+
#API for SubFi Pay services
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module SubFiPay
|
16
|
+
class SubscriptionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a new subscription
|
23
|
+
# @param x_api_version [String]
|
24
|
+
# @param x_account_id [String]
|
25
|
+
# @param subscription_create_request [SubscriptionCreateRequest]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [SubscriptionResponse]
|
28
|
+
def create_subscription(x_api_version, x_account_id, subscription_create_request, opts = {})
|
29
|
+
data, _status_code, _headers = create_subscription_with_http_info(x_api_version, x_account_id, subscription_create_request, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new subscription
|
34
|
+
# @param x_api_version [String]
|
35
|
+
# @param x_account_id [String]
|
36
|
+
# @param subscription_create_request [SubscriptionCreateRequest]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(SubscriptionResponse, Integer, Hash)>] SubscriptionResponse data, response status code and response headers
|
39
|
+
def create_subscription_with_http_info(x_api_version, x_account_id, subscription_create_request, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.create_subscription ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'x_api_version' is set
|
44
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling SubscriptionsApi.create_subscription"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'x_account_id' is set
|
48
|
+
if @api_client.config.client_side_validation && x_account_id.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'x_account_id' when calling SubscriptionsApi.create_subscription"
|
50
|
+
end
|
51
|
+
# verify the required parameter 'subscription_create_request' is set
|
52
|
+
if @api_client.config.client_side_validation && subscription_create_request.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'subscription_create_request' when calling SubscriptionsApi.create_subscription"
|
54
|
+
end
|
55
|
+
# resource path
|
56
|
+
local_var_path = '/subscriptions'
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = opts[:query_params] || {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
# HTTP header 'Content-Type'
|
66
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
67
|
+
if !content_type.nil?
|
68
|
+
header_params['Content-Type'] = content_type
|
69
|
+
end
|
70
|
+
header_params[:'X-Api-Version'] = x_api_version
|
71
|
+
header_params[:'X-Account-Id'] = x_account_id
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = opts[:form_params] || {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_create_request)
|
78
|
+
|
79
|
+
# return_type
|
80
|
+
return_type = opts[:debug_return_type] || 'SubscriptionResponse'
|
81
|
+
|
82
|
+
# auth_names
|
83
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
84
|
+
|
85
|
+
new_options = opts.merge(
|
86
|
+
:operation => :"SubscriptionsApi.create_subscription",
|
87
|
+
:header_params => header_params,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body,
|
91
|
+
:auth_names => auth_names,
|
92
|
+
:return_type => return_type
|
93
|
+
)
|
94
|
+
|
95
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
98
|
+
end
|
99
|
+
return data, status_code, headers
|
100
|
+
end
|
101
|
+
|
102
|
+
# Retrieve a subscription by ID
|
103
|
+
# @param x_api_version [String]
|
104
|
+
# @param x_account_id [String]
|
105
|
+
# @param id [String] The ID of the subscription to retrieve
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [SubscriptionResponse]
|
108
|
+
def get_subscription(x_api_version, x_account_id, id, opts = {})
|
109
|
+
data, _status_code, _headers = get_subscription_with_http_info(x_api_version, x_account_id, id, opts)
|
110
|
+
data
|
111
|
+
end
|
112
|
+
|
113
|
+
# Retrieve a subscription by ID
|
114
|
+
# @param x_api_version [String]
|
115
|
+
# @param x_account_id [String]
|
116
|
+
# @param id [String] The ID of the subscription to retrieve
|
117
|
+
# @param [Hash] opts the optional parameters
|
118
|
+
# @return [Array<(SubscriptionResponse, Integer, Hash)>] SubscriptionResponse data, response status code and response headers
|
119
|
+
def get_subscription_with_http_info(x_api_version, x_account_id, id, opts = {})
|
120
|
+
if @api_client.config.debugging
|
121
|
+
@api_client.config.logger.debug 'Calling API: SubscriptionsApi.get_subscription ...'
|
122
|
+
end
|
123
|
+
# verify the required parameter 'x_api_version' is set
|
124
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
125
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling SubscriptionsApi.get_subscription"
|
126
|
+
end
|
127
|
+
# verify the required parameter 'x_account_id' is set
|
128
|
+
if @api_client.config.client_side_validation && x_account_id.nil?
|
129
|
+
fail ArgumentError, "Missing the required parameter 'x_account_id' when calling SubscriptionsApi.get_subscription"
|
130
|
+
end
|
131
|
+
# verify the required parameter 'id' is set
|
132
|
+
if @api_client.config.client_side_validation && id.nil?
|
133
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SubscriptionsApi.get_subscription"
|
134
|
+
end
|
135
|
+
# resource path
|
136
|
+
local_var_path = '/subscriptions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
137
|
+
|
138
|
+
# query parameters
|
139
|
+
query_params = opts[:query_params] || {}
|
140
|
+
|
141
|
+
# header parameters
|
142
|
+
header_params = opts[:header_params] || {}
|
143
|
+
# HTTP header 'Accept' (if needed)
|
144
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
145
|
+
header_params[:'X-Api-Version'] = x_api_version
|
146
|
+
header_params[:'X-Account-Id'] = x_account_id
|
147
|
+
|
148
|
+
# form parameters
|
149
|
+
form_params = opts[:form_params] || {}
|
150
|
+
|
151
|
+
# http body (model)
|
152
|
+
post_body = opts[:debug_body]
|
153
|
+
|
154
|
+
# return_type
|
155
|
+
return_type = opts[:debug_return_type] || 'SubscriptionResponse'
|
156
|
+
|
157
|
+
# auth_names
|
158
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
159
|
+
|
160
|
+
new_options = opts.merge(
|
161
|
+
:operation => :"SubscriptionsApi.get_subscription",
|
162
|
+
:header_params => header_params,
|
163
|
+
:query_params => query_params,
|
164
|
+
:form_params => form_params,
|
165
|
+
:body => post_body,
|
166
|
+
:auth_names => auth_names,
|
167
|
+
:return_type => return_type
|
168
|
+
)
|
169
|
+
|
170
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
171
|
+
if @api_client.config.debugging
|
172
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
173
|
+
end
|
174
|
+
return data, status_code, headers
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
@@ -0,0 +1,404 @@
|
|
1
|
+
=begin
|
2
|
+
#SubFi Pay API
|
3
|
+
|
4
|
+
#API for SubFi Pay services
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module SubFiPay
|
16
|
+
class WebhookEndpointsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a webhook endpoint
|
23
|
+
# @param x_api_version [String]
|
24
|
+
# @param create_webhook_endpoint_request [CreateWebhookEndpointRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [WebhookEndpoint]
|
27
|
+
def create_webhook_endpoint(x_api_version, create_webhook_endpoint_request, opts = {})
|
28
|
+
data, _status_code, _headers = create_webhook_endpoint_with_http_info(x_api_version, create_webhook_endpoint_request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a webhook endpoint
|
33
|
+
# @param x_api_version [String]
|
34
|
+
# @param create_webhook_endpoint_request [CreateWebhookEndpointRequest]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(WebhookEndpoint, Integer, Hash)>] WebhookEndpoint data, response status code and response headers
|
37
|
+
def create_webhook_endpoint_with_http_info(x_api_version, create_webhook_endpoint_request, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: WebhookEndpointsApi.create_webhook_endpoint ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'x_api_version' is set
|
42
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling WebhookEndpointsApi.create_webhook_endpoint"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'create_webhook_endpoint_request' is set
|
46
|
+
if @api_client.config.client_side_validation && create_webhook_endpoint_request.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'create_webhook_endpoint_request' when calling WebhookEndpointsApi.create_webhook_endpoint"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/webhook_endpoints'
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
61
|
+
if !content_type.nil?
|
62
|
+
header_params['Content-Type'] = content_type
|
63
|
+
end
|
64
|
+
header_params[:'X-Api-Version'] = x_api_version
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = opts[:form_params] || {}
|
68
|
+
|
69
|
+
# http body (model)
|
70
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_webhook_endpoint_request)
|
71
|
+
|
72
|
+
# return_type
|
73
|
+
return_type = opts[:debug_return_type] || 'WebhookEndpoint'
|
74
|
+
|
75
|
+
# auth_names
|
76
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
77
|
+
|
78
|
+
new_options = opts.merge(
|
79
|
+
:operation => :"WebhookEndpointsApi.create_webhook_endpoint",
|
80
|
+
:header_params => header_params,
|
81
|
+
:query_params => query_params,
|
82
|
+
:form_params => form_params,
|
83
|
+
:body => post_body,
|
84
|
+
:auth_names => auth_names,
|
85
|
+
:return_type => return_type
|
86
|
+
)
|
87
|
+
|
88
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: WebhookEndpointsApi#create_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
95
|
+
# Delete a webhook endpoint by ID
|
96
|
+
# @param x_api_version [String]
|
97
|
+
# @param x_account_id [String]
|
98
|
+
# @param id [String]
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [nil]
|
101
|
+
def delete_webhook_endpoint(x_api_version, x_account_id, id, opts = {})
|
102
|
+
delete_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, opts)
|
103
|
+
nil
|
104
|
+
end
|
105
|
+
|
106
|
+
# Delete a webhook endpoint by ID
|
107
|
+
# @param x_api_version [String]
|
108
|
+
# @param x_account_id [String]
|
109
|
+
# @param id [String]
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
112
|
+
def delete_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, opts = {})
|
113
|
+
if @api_client.config.debugging
|
114
|
+
@api_client.config.logger.debug 'Calling API: WebhookEndpointsApi.delete_webhook_endpoint ...'
|
115
|
+
end
|
116
|
+
# verify the required parameter 'x_api_version' is set
|
117
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
118
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling WebhookEndpointsApi.delete_webhook_endpoint"
|
119
|
+
end
|
120
|
+
# verify the required parameter 'x_account_id' is set
|
121
|
+
if @api_client.config.client_side_validation && x_account_id.nil?
|
122
|
+
fail ArgumentError, "Missing the required parameter 'x_account_id' when calling WebhookEndpointsApi.delete_webhook_endpoint"
|
123
|
+
end
|
124
|
+
# verify the required parameter 'id' is set
|
125
|
+
if @api_client.config.client_side_validation && id.nil?
|
126
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhookEndpointsApi.delete_webhook_endpoint"
|
127
|
+
end
|
128
|
+
# resource path
|
129
|
+
local_var_path = '/webhook_endpoints/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
130
|
+
|
131
|
+
# query parameters
|
132
|
+
query_params = opts[:query_params] || {}
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = opts[:header_params] || {}
|
136
|
+
header_params[:'X-Api-Version'] = x_api_version
|
137
|
+
header_params[:'X-Account-Id'] = x_account_id
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = opts[:form_params] || {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = opts[:debug_body]
|
144
|
+
|
145
|
+
# return_type
|
146
|
+
return_type = opts[:debug_return_type]
|
147
|
+
|
148
|
+
# auth_names
|
149
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
150
|
+
|
151
|
+
new_options = opts.merge(
|
152
|
+
:operation => :"WebhookEndpointsApi.delete_webhook_endpoint",
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => return_type
|
159
|
+
)
|
160
|
+
|
161
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: WebhookEndpointsApi#delete_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
|
168
|
+
# Retrieve a webhook endpoint by ID
|
169
|
+
# @param x_api_version [String]
|
170
|
+
# @param x_account_id [String]
|
171
|
+
# @param id [String]
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @return [WebhookEndpoint]
|
174
|
+
def get_webhook_endpoint(x_api_version, x_account_id, id, opts = {})
|
175
|
+
data, _status_code, _headers = get_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, opts)
|
176
|
+
data
|
177
|
+
end
|
178
|
+
|
179
|
+
# Retrieve a webhook endpoint by ID
|
180
|
+
# @param x_api_version [String]
|
181
|
+
# @param x_account_id [String]
|
182
|
+
# @param id [String]
|
183
|
+
# @param [Hash] opts the optional parameters
|
184
|
+
# @return [Array<(WebhookEndpoint, Integer, Hash)>] WebhookEndpoint data, response status code and response headers
|
185
|
+
def get_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, opts = {})
|
186
|
+
if @api_client.config.debugging
|
187
|
+
@api_client.config.logger.debug 'Calling API: WebhookEndpointsApi.get_webhook_endpoint ...'
|
188
|
+
end
|
189
|
+
# verify the required parameter 'x_api_version' is set
|
190
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
191
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling WebhookEndpointsApi.get_webhook_endpoint"
|
192
|
+
end
|
193
|
+
# verify the required parameter 'x_account_id' is set
|
194
|
+
if @api_client.config.client_side_validation && x_account_id.nil?
|
195
|
+
fail ArgumentError, "Missing the required parameter 'x_account_id' when calling WebhookEndpointsApi.get_webhook_endpoint"
|
196
|
+
end
|
197
|
+
# verify the required parameter 'id' is set
|
198
|
+
if @api_client.config.client_side_validation && id.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhookEndpointsApi.get_webhook_endpoint"
|
200
|
+
end
|
201
|
+
# resource path
|
202
|
+
local_var_path = '/webhook_endpoints/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
203
|
+
|
204
|
+
# query parameters
|
205
|
+
query_params = opts[:query_params] || {}
|
206
|
+
|
207
|
+
# header parameters
|
208
|
+
header_params = opts[:header_params] || {}
|
209
|
+
# HTTP header 'Accept' (if needed)
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
211
|
+
header_params[:'X-Api-Version'] = x_api_version
|
212
|
+
header_params[:'X-Account-Id'] = x_account_id
|
213
|
+
|
214
|
+
# form parameters
|
215
|
+
form_params = opts[:form_params] || {}
|
216
|
+
|
217
|
+
# http body (model)
|
218
|
+
post_body = opts[:debug_body]
|
219
|
+
|
220
|
+
# return_type
|
221
|
+
return_type = opts[:debug_return_type] || 'WebhookEndpoint'
|
222
|
+
|
223
|
+
# auth_names
|
224
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
225
|
+
|
226
|
+
new_options = opts.merge(
|
227
|
+
:operation => :"WebhookEndpointsApi.get_webhook_endpoint",
|
228
|
+
:header_params => header_params,
|
229
|
+
:query_params => query_params,
|
230
|
+
:form_params => form_params,
|
231
|
+
:body => post_body,
|
232
|
+
:auth_names => auth_names,
|
233
|
+
:return_type => return_type
|
234
|
+
)
|
235
|
+
|
236
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "API called: WebhookEndpointsApi#get_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
|
+
end
|
240
|
+
return data, status_code, headers
|
241
|
+
end
|
242
|
+
|
243
|
+
# List all webhook endpoints
|
244
|
+
# @param x_api_version [String]
|
245
|
+
# @param x_account_id [String]
|
246
|
+
# @param [Hash] opts the optional parameters
|
247
|
+
# @option opts [Integer] :page The page of results to retrieve.
|
248
|
+
# @option opts [Integer] :per_page Number of results per page.
|
249
|
+
# @return [ListWebhookEndpointsResponse]
|
250
|
+
def list_webhook_endpoints(x_api_version, x_account_id, opts = {})
|
251
|
+
data, _status_code, _headers = list_webhook_endpoints_with_http_info(x_api_version, x_account_id, opts)
|
252
|
+
data
|
253
|
+
end
|
254
|
+
|
255
|
+
# List all webhook endpoints
|
256
|
+
# @param x_api_version [String]
|
257
|
+
# @param x_account_id [String]
|
258
|
+
# @param [Hash] opts the optional parameters
|
259
|
+
# @option opts [Integer] :page The page of results to retrieve.
|
260
|
+
# @option opts [Integer] :per_page Number of results per page.
|
261
|
+
# @return [Array<(ListWebhookEndpointsResponse, Integer, Hash)>] ListWebhookEndpointsResponse data, response status code and response headers
|
262
|
+
def list_webhook_endpoints_with_http_info(x_api_version, x_account_id, opts = {})
|
263
|
+
if @api_client.config.debugging
|
264
|
+
@api_client.config.logger.debug 'Calling API: WebhookEndpointsApi.list_webhook_endpoints ...'
|
265
|
+
end
|
266
|
+
# verify the required parameter 'x_api_version' is set
|
267
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
268
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling WebhookEndpointsApi.list_webhook_endpoints"
|
269
|
+
end
|
270
|
+
# verify the required parameter 'x_account_id' is set
|
271
|
+
if @api_client.config.client_side_validation && x_account_id.nil?
|
272
|
+
fail ArgumentError, "Missing the required parameter 'x_account_id' when calling WebhookEndpointsApi.list_webhook_endpoints"
|
273
|
+
end
|
274
|
+
# resource path
|
275
|
+
local_var_path = '/webhook_endpoints'
|
276
|
+
|
277
|
+
# query parameters
|
278
|
+
query_params = opts[:query_params] || {}
|
279
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
280
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
281
|
+
|
282
|
+
# header parameters
|
283
|
+
header_params = opts[:header_params] || {}
|
284
|
+
# HTTP header 'Accept' (if needed)
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
286
|
+
header_params[:'X-Api-Version'] = x_api_version
|
287
|
+
header_params[:'X-Account-Id'] = x_account_id
|
288
|
+
|
289
|
+
# form parameters
|
290
|
+
form_params = opts[:form_params] || {}
|
291
|
+
|
292
|
+
# http body (model)
|
293
|
+
post_body = opts[:debug_body]
|
294
|
+
|
295
|
+
# return_type
|
296
|
+
return_type = opts[:debug_return_type] || 'ListWebhookEndpointsResponse'
|
297
|
+
|
298
|
+
# auth_names
|
299
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
300
|
+
|
301
|
+
new_options = opts.merge(
|
302
|
+
:operation => :"WebhookEndpointsApi.list_webhook_endpoints",
|
303
|
+
:header_params => header_params,
|
304
|
+
:query_params => query_params,
|
305
|
+
:form_params => form_params,
|
306
|
+
:body => post_body,
|
307
|
+
:auth_names => auth_names,
|
308
|
+
:return_type => return_type
|
309
|
+
)
|
310
|
+
|
311
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
312
|
+
if @api_client.config.debugging
|
313
|
+
@api_client.config.logger.debug "API called: WebhookEndpointsApi#list_webhook_endpoints\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
314
|
+
end
|
315
|
+
return data, status_code, headers
|
316
|
+
end
|
317
|
+
|
318
|
+
# Update a webhook endpoint by ID
|
319
|
+
# @param x_api_version [String]
|
320
|
+
# @param x_account_id [String]
|
321
|
+
# @param id [String]
|
322
|
+
# @param create_webhook_endpoint_request [CreateWebhookEndpointRequest]
|
323
|
+
# @param [Hash] opts the optional parameters
|
324
|
+
# @return [WebhookEndpoint]
|
325
|
+
def update_webhook_endpoint(x_api_version, x_account_id, id, create_webhook_endpoint_request, opts = {})
|
326
|
+
data, _status_code, _headers = update_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, create_webhook_endpoint_request, opts)
|
327
|
+
data
|
328
|
+
end
|
329
|
+
|
330
|
+
# Update a webhook endpoint by ID
|
331
|
+
# @param x_api_version [String]
|
332
|
+
# @param x_account_id [String]
|
333
|
+
# @param id [String]
|
334
|
+
# @param create_webhook_endpoint_request [CreateWebhookEndpointRequest]
|
335
|
+
# @param [Hash] opts the optional parameters
|
336
|
+
# @return [Array<(WebhookEndpoint, Integer, Hash)>] WebhookEndpoint data, response status code and response headers
|
337
|
+
def update_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, create_webhook_endpoint_request, opts = {})
|
338
|
+
if @api_client.config.debugging
|
339
|
+
@api_client.config.logger.debug 'Calling API: WebhookEndpointsApi.update_webhook_endpoint ...'
|
340
|
+
end
|
341
|
+
# verify the required parameter 'x_api_version' is set
|
342
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
343
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling WebhookEndpointsApi.update_webhook_endpoint"
|
344
|
+
end
|
345
|
+
# verify the required parameter 'x_account_id' is set
|
346
|
+
if @api_client.config.client_side_validation && x_account_id.nil?
|
347
|
+
fail ArgumentError, "Missing the required parameter 'x_account_id' when calling WebhookEndpointsApi.update_webhook_endpoint"
|
348
|
+
end
|
349
|
+
# verify the required parameter 'id' is set
|
350
|
+
if @api_client.config.client_side_validation && id.nil?
|
351
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling WebhookEndpointsApi.update_webhook_endpoint"
|
352
|
+
end
|
353
|
+
# verify the required parameter 'create_webhook_endpoint_request' is set
|
354
|
+
if @api_client.config.client_side_validation && create_webhook_endpoint_request.nil?
|
355
|
+
fail ArgumentError, "Missing the required parameter 'create_webhook_endpoint_request' when calling WebhookEndpointsApi.update_webhook_endpoint"
|
356
|
+
end
|
357
|
+
# resource path
|
358
|
+
local_var_path = '/webhook_endpoints/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
359
|
+
|
360
|
+
# query parameters
|
361
|
+
query_params = opts[:query_params] || {}
|
362
|
+
|
363
|
+
# header parameters
|
364
|
+
header_params = opts[:header_params] || {}
|
365
|
+
# HTTP header 'Accept' (if needed)
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
367
|
+
# HTTP header 'Content-Type'
|
368
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
369
|
+
if !content_type.nil?
|
370
|
+
header_params['Content-Type'] = content_type
|
371
|
+
end
|
372
|
+
header_params[:'X-Api-Version'] = x_api_version
|
373
|
+
header_params[:'X-Account-Id'] = x_account_id
|
374
|
+
|
375
|
+
# form parameters
|
376
|
+
form_params = opts[:form_params] || {}
|
377
|
+
|
378
|
+
# http body (model)
|
379
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_webhook_endpoint_request)
|
380
|
+
|
381
|
+
# return_type
|
382
|
+
return_type = opts[:debug_return_type] || 'WebhookEndpoint'
|
383
|
+
|
384
|
+
# auth_names
|
385
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
386
|
+
|
387
|
+
new_options = opts.merge(
|
388
|
+
:operation => :"WebhookEndpointsApi.update_webhook_endpoint",
|
389
|
+
:header_params => header_params,
|
390
|
+
:query_params => query_params,
|
391
|
+
:form_params => form_params,
|
392
|
+
:body => post_body,
|
393
|
+
:auth_names => auth_names,
|
394
|
+
:return_type => return_type
|
395
|
+
)
|
396
|
+
|
397
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
398
|
+
if @api_client.config.debugging
|
399
|
+
@api_client.config.logger.debug "API called: WebhookEndpointsApi#update_webhook_endpoint\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
400
|
+
end
|
401
|
+
return data, status_code, headers
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
=begin
|
2
|
+
#SubFi Pay API
|
3
|
+
|
4
|
+
#API for SubFi Pay services
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.7.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module SubFiPay
|
16
|
+
class WebhookRequestsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List all webhook requests
|
23
|
+
# @param x_api_version [String]
|
24
|
+
# @param x_account_id [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Integer] :page The page of results to retrieve.
|
27
|
+
# @option opts [Integer] :per_page Number of results per page.
|
28
|
+
# @return [ListWebhookRequestsResponse]
|
29
|
+
def list_webhook_requests(x_api_version, x_account_id, opts = {})
|
30
|
+
data, _status_code, _headers = list_webhook_requests_with_http_info(x_api_version, x_account_id, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# List all webhook requests
|
35
|
+
# @param x_api_version [String]
|
36
|
+
# @param x_account_id [String]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [Integer] :page The page of results to retrieve.
|
39
|
+
# @option opts [Integer] :per_page Number of results per page.
|
40
|
+
# @return [Array<(ListWebhookRequestsResponse, Integer, Hash)>] ListWebhookRequestsResponse data, response status code and response headers
|
41
|
+
def list_webhook_requests_with_http_info(x_api_version, x_account_id, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: WebhookRequestsApi.list_webhook_requests ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'x_api_version' is set
|
46
|
+
if @api_client.config.client_side_validation && x_api_version.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'x_api_version' when calling WebhookRequestsApi.list_webhook_requests"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'x_account_id' is set
|
50
|
+
if @api_client.config.client_side_validation && x_account_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'x_account_id' when calling WebhookRequestsApi.list_webhook_requests"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/webhook_requests'
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
59
|
+
query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
header_params[:'X-Api-Version'] = x_api_version
|
66
|
+
header_params[:'X-Account-Id'] = x_account_id
|
67
|
+
|
68
|
+
# form parameters
|
69
|
+
form_params = opts[:form_params] || {}
|
70
|
+
|
71
|
+
# http body (model)
|
72
|
+
post_body = opts[:debug_body]
|
73
|
+
|
74
|
+
# return_type
|
75
|
+
return_type = opts[:debug_return_type] || 'ListWebhookRequestsResponse'
|
76
|
+
|
77
|
+
# auth_names
|
78
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
79
|
+
|
80
|
+
new_options = opts.merge(
|
81
|
+
:operation => :"WebhookRequestsApi.list_webhook_requests",
|
82
|
+
:header_params => header_params,
|
83
|
+
:query_params => query_params,
|
84
|
+
:form_params => form_params,
|
85
|
+
:body => post_body,
|
86
|
+
:auth_names => auth_names,
|
87
|
+
:return_type => return_type
|
88
|
+
)
|
89
|
+
|
90
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug "API called: WebhookRequestsApi#list_webhook_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
|
+
end
|
94
|
+
return data, status_code, headers
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|