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,533 @@
|
|
1
|
+
# SubFiPay::PaymentIntentsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://pay-sandbox.subfi.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**cancel_payment_intent**](PaymentIntentsApi.md#cancel_payment_intent) | **POST** /payment_intents/{id}/cancel | Cancel a payment intent |
|
8
|
+
| [**capture_payment_intent**](PaymentIntentsApi.md#capture_payment_intent) | **POST** /payment_intents/{id}/capture | Capture a payment intent |
|
9
|
+
| [**confirm_payment_intent**](PaymentIntentsApi.md#confirm_payment_intent) | **POST** /payment_intents/{id}/confirm | Confirm a payment intent |
|
10
|
+
| [**create_payment_intent**](PaymentIntentsApi.md#create_payment_intent) | **POST** /payment_intents | Create a new payment intent |
|
11
|
+
| [**get_payment_intent**](PaymentIntentsApi.md#get_payment_intent) | **GET** /payment_intents/{id} | Retrieve a payment intent by ID |
|
12
|
+
| [**list_payment_intents**](PaymentIntentsApi.md#list_payment_intents) | **GET** /payment_intents | List payment intents |
|
13
|
+
| [**update_payment_intent**](PaymentIntentsApi.md#update_payment_intent) | **PATCH** /payment_intents/{id} | Update a payment intent |
|
14
|
+
|
15
|
+
|
16
|
+
## cancel_payment_intent
|
17
|
+
|
18
|
+
> <PaymentIntentResponse> cancel_payment_intent(x_api_version, x_account_id, id)
|
19
|
+
|
20
|
+
Cancel a payment intent
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'subfi_pay'
|
27
|
+
# setup authorization
|
28
|
+
SubFiPay.configure do |config|
|
29
|
+
# Configure API key authorization: ApiKeyAuth
|
30
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
32
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = SubFiPay::PaymentIntentsApi.new
|
36
|
+
x_api_version = 'x_api_version_example' # String |
|
37
|
+
x_account_id = 'x_account_id_example' # String |
|
38
|
+
id = 'id_example' # String | The ID of the payment intent to cancel
|
39
|
+
|
40
|
+
begin
|
41
|
+
# Cancel a payment intent
|
42
|
+
result = api_instance.cancel_payment_intent(x_api_version, x_account_id, id)
|
43
|
+
p result
|
44
|
+
rescue SubFiPay::ApiError => e
|
45
|
+
puts "Error when calling PaymentIntentsApi->cancel_payment_intent: #{e}"
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
#### Using the cancel_payment_intent_with_http_info variant
|
50
|
+
|
51
|
+
This returns an Array which contains the response data, status code and headers.
|
52
|
+
|
53
|
+
> <Array(<PaymentIntentResponse>, Integer, Hash)> cancel_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
begin
|
57
|
+
# Cancel a payment intent
|
58
|
+
data, status_code, headers = api_instance.cancel_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
59
|
+
p status_code # => 2xx
|
60
|
+
p headers # => { ... }
|
61
|
+
p data # => <PaymentIntentResponse>
|
62
|
+
rescue SubFiPay::ApiError => e
|
63
|
+
puts "Error when calling PaymentIntentsApi->cancel_payment_intent_with_http_info: #{e}"
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
### Parameters
|
68
|
+
|
69
|
+
| Name | Type | Description | Notes |
|
70
|
+
| ---- | ---- | ----------- | ----- |
|
71
|
+
| **x_api_version** | **String** | | |
|
72
|
+
| **x_account_id** | **String** | | |
|
73
|
+
| **id** | **String** | The ID of the payment intent to cancel | |
|
74
|
+
|
75
|
+
### Return type
|
76
|
+
|
77
|
+
[**PaymentIntentResponse**](PaymentIntentResponse.md)
|
78
|
+
|
79
|
+
### Authorization
|
80
|
+
|
81
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
82
|
+
|
83
|
+
### HTTP request headers
|
84
|
+
|
85
|
+
- **Content-Type**: Not defined
|
86
|
+
- **Accept**: application/json
|
87
|
+
|
88
|
+
|
89
|
+
## capture_payment_intent
|
90
|
+
|
91
|
+
> <PaymentIntentResponse> capture_payment_intent(x_api_version, x_account_id, id)
|
92
|
+
|
93
|
+
Capture a payment intent
|
94
|
+
|
95
|
+
### Examples
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
require 'time'
|
99
|
+
require 'subfi_pay'
|
100
|
+
# setup authorization
|
101
|
+
SubFiPay.configure do |config|
|
102
|
+
# Configure API key authorization: ApiKeyAuth
|
103
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
104
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
105
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
106
|
+
end
|
107
|
+
|
108
|
+
api_instance = SubFiPay::PaymentIntentsApi.new
|
109
|
+
x_api_version = 'x_api_version_example' # String |
|
110
|
+
x_account_id = 'x_account_id_example' # String |
|
111
|
+
id = 'id_example' # String | The ID of the payment intent to capture
|
112
|
+
|
113
|
+
begin
|
114
|
+
# Capture a payment intent
|
115
|
+
result = api_instance.capture_payment_intent(x_api_version, x_account_id, id)
|
116
|
+
p result
|
117
|
+
rescue SubFiPay::ApiError => e
|
118
|
+
puts "Error when calling PaymentIntentsApi->capture_payment_intent: #{e}"
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
122
|
+
#### Using the capture_payment_intent_with_http_info variant
|
123
|
+
|
124
|
+
This returns an Array which contains the response data, status code and headers.
|
125
|
+
|
126
|
+
> <Array(<PaymentIntentResponse>, Integer, Hash)> capture_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
127
|
+
|
128
|
+
```ruby
|
129
|
+
begin
|
130
|
+
# Capture a payment intent
|
131
|
+
data, status_code, headers = api_instance.capture_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
132
|
+
p status_code # => 2xx
|
133
|
+
p headers # => { ... }
|
134
|
+
p data # => <PaymentIntentResponse>
|
135
|
+
rescue SubFiPay::ApiError => e
|
136
|
+
puts "Error when calling PaymentIntentsApi->capture_payment_intent_with_http_info: #{e}"
|
137
|
+
end
|
138
|
+
```
|
139
|
+
|
140
|
+
### Parameters
|
141
|
+
|
142
|
+
| Name | Type | Description | Notes |
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
144
|
+
| **x_api_version** | **String** | | |
|
145
|
+
| **x_account_id** | **String** | | |
|
146
|
+
| **id** | **String** | The ID of the payment intent to capture | |
|
147
|
+
|
148
|
+
### Return type
|
149
|
+
|
150
|
+
[**PaymentIntentResponse**](PaymentIntentResponse.md)
|
151
|
+
|
152
|
+
### Authorization
|
153
|
+
|
154
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
155
|
+
|
156
|
+
### HTTP request headers
|
157
|
+
|
158
|
+
- **Content-Type**: Not defined
|
159
|
+
- **Accept**: application/json
|
160
|
+
|
161
|
+
|
162
|
+
## confirm_payment_intent
|
163
|
+
|
164
|
+
> <PaymentIntentResponse> confirm_payment_intent(x_api_version, x_account_id, id)
|
165
|
+
|
166
|
+
Confirm a payment intent
|
167
|
+
|
168
|
+
### Examples
|
169
|
+
|
170
|
+
```ruby
|
171
|
+
require 'time'
|
172
|
+
require 'subfi_pay'
|
173
|
+
# setup authorization
|
174
|
+
SubFiPay.configure do |config|
|
175
|
+
# Configure API key authorization: ApiKeyAuth
|
176
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
177
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
178
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
179
|
+
end
|
180
|
+
|
181
|
+
api_instance = SubFiPay::PaymentIntentsApi.new
|
182
|
+
x_api_version = 'x_api_version_example' # String |
|
183
|
+
x_account_id = 'x_account_id_example' # String |
|
184
|
+
id = 'id_example' # String | The ID of the payment intent to confirm
|
185
|
+
|
186
|
+
begin
|
187
|
+
# Confirm a payment intent
|
188
|
+
result = api_instance.confirm_payment_intent(x_api_version, x_account_id, id)
|
189
|
+
p result
|
190
|
+
rescue SubFiPay::ApiError => e
|
191
|
+
puts "Error when calling PaymentIntentsApi->confirm_payment_intent: #{e}"
|
192
|
+
end
|
193
|
+
```
|
194
|
+
|
195
|
+
#### Using the confirm_payment_intent_with_http_info variant
|
196
|
+
|
197
|
+
This returns an Array which contains the response data, status code and headers.
|
198
|
+
|
199
|
+
> <Array(<PaymentIntentResponse>, Integer, Hash)> confirm_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
200
|
+
|
201
|
+
```ruby
|
202
|
+
begin
|
203
|
+
# Confirm a payment intent
|
204
|
+
data, status_code, headers = api_instance.confirm_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
205
|
+
p status_code # => 2xx
|
206
|
+
p headers # => { ... }
|
207
|
+
p data # => <PaymentIntentResponse>
|
208
|
+
rescue SubFiPay::ApiError => e
|
209
|
+
puts "Error when calling PaymentIntentsApi->confirm_payment_intent_with_http_info: #{e}"
|
210
|
+
end
|
211
|
+
```
|
212
|
+
|
213
|
+
### Parameters
|
214
|
+
|
215
|
+
| Name | Type | Description | Notes |
|
216
|
+
| ---- | ---- | ----------- | ----- |
|
217
|
+
| **x_api_version** | **String** | | |
|
218
|
+
| **x_account_id** | **String** | | |
|
219
|
+
| **id** | **String** | The ID of the payment intent to confirm | |
|
220
|
+
|
221
|
+
### Return type
|
222
|
+
|
223
|
+
[**PaymentIntentResponse**](PaymentIntentResponse.md)
|
224
|
+
|
225
|
+
### Authorization
|
226
|
+
|
227
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
228
|
+
|
229
|
+
### HTTP request headers
|
230
|
+
|
231
|
+
- **Content-Type**: Not defined
|
232
|
+
- **Accept**: application/json
|
233
|
+
|
234
|
+
|
235
|
+
## create_payment_intent
|
236
|
+
|
237
|
+
> <PaymentIntentResponse> create_payment_intent(x_api_version, x_account_id, payment_intent_create_request)
|
238
|
+
|
239
|
+
Create a new payment intent
|
240
|
+
|
241
|
+
### Examples
|
242
|
+
|
243
|
+
```ruby
|
244
|
+
require 'time'
|
245
|
+
require 'subfi_pay'
|
246
|
+
# setup authorization
|
247
|
+
SubFiPay.configure do |config|
|
248
|
+
# Configure API key authorization: ApiKeyAuth
|
249
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
250
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
251
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
252
|
+
end
|
253
|
+
|
254
|
+
api_instance = SubFiPay::PaymentIntentsApi.new
|
255
|
+
x_api_version = 'x_api_version_example' # String |
|
256
|
+
x_account_id = 'x_account_id_example' # String |
|
257
|
+
payment_intent_create_request = SubFiPay::PaymentIntentCreateRequest.new # PaymentIntentCreateRequest |
|
258
|
+
|
259
|
+
begin
|
260
|
+
# Create a new payment intent
|
261
|
+
result = api_instance.create_payment_intent(x_api_version, x_account_id, payment_intent_create_request)
|
262
|
+
p result
|
263
|
+
rescue SubFiPay::ApiError => e
|
264
|
+
puts "Error when calling PaymentIntentsApi->create_payment_intent: #{e}"
|
265
|
+
end
|
266
|
+
```
|
267
|
+
|
268
|
+
#### Using the create_payment_intent_with_http_info variant
|
269
|
+
|
270
|
+
This returns an Array which contains the response data, status code and headers.
|
271
|
+
|
272
|
+
> <Array(<PaymentIntentResponse>, Integer, Hash)> create_payment_intent_with_http_info(x_api_version, x_account_id, payment_intent_create_request)
|
273
|
+
|
274
|
+
```ruby
|
275
|
+
begin
|
276
|
+
# Create a new payment intent
|
277
|
+
data, status_code, headers = api_instance.create_payment_intent_with_http_info(x_api_version, x_account_id, payment_intent_create_request)
|
278
|
+
p status_code # => 2xx
|
279
|
+
p headers # => { ... }
|
280
|
+
p data # => <PaymentIntentResponse>
|
281
|
+
rescue SubFiPay::ApiError => e
|
282
|
+
puts "Error when calling PaymentIntentsApi->create_payment_intent_with_http_info: #{e}"
|
283
|
+
end
|
284
|
+
```
|
285
|
+
|
286
|
+
### Parameters
|
287
|
+
|
288
|
+
| Name | Type | Description | Notes |
|
289
|
+
| ---- | ---- | ----------- | ----- |
|
290
|
+
| **x_api_version** | **String** | | |
|
291
|
+
| **x_account_id** | **String** | | |
|
292
|
+
| **payment_intent_create_request** | [**PaymentIntentCreateRequest**](PaymentIntentCreateRequest.md) | | |
|
293
|
+
|
294
|
+
### Return type
|
295
|
+
|
296
|
+
[**PaymentIntentResponse**](PaymentIntentResponse.md)
|
297
|
+
|
298
|
+
### Authorization
|
299
|
+
|
300
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
301
|
+
|
302
|
+
### HTTP request headers
|
303
|
+
|
304
|
+
- **Content-Type**: application/json
|
305
|
+
- **Accept**: application/json
|
306
|
+
|
307
|
+
|
308
|
+
## get_payment_intent
|
309
|
+
|
310
|
+
> <PaymentIntentResponse> get_payment_intent(x_api_version, x_account_id, id)
|
311
|
+
|
312
|
+
Retrieve a payment intent by ID
|
313
|
+
|
314
|
+
### Examples
|
315
|
+
|
316
|
+
```ruby
|
317
|
+
require 'time'
|
318
|
+
require 'subfi_pay'
|
319
|
+
# setup authorization
|
320
|
+
SubFiPay.configure do |config|
|
321
|
+
# Configure API key authorization: ApiKeyAuth
|
322
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
323
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
324
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
325
|
+
end
|
326
|
+
|
327
|
+
api_instance = SubFiPay::PaymentIntentsApi.new
|
328
|
+
x_api_version = 'x_api_version_example' # String |
|
329
|
+
x_account_id = 'x_account_id_example' # String |
|
330
|
+
id = 'id_example' # String | The ID of the payment intent to retrieve
|
331
|
+
|
332
|
+
begin
|
333
|
+
# Retrieve a payment intent by ID
|
334
|
+
result = api_instance.get_payment_intent(x_api_version, x_account_id, id)
|
335
|
+
p result
|
336
|
+
rescue SubFiPay::ApiError => e
|
337
|
+
puts "Error when calling PaymentIntentsApi->get_payment_intent: #{e}"
|
338
|
+
end
|
339
|
+
```
|
340
|
+
|
341
|
+
#### Using the get_payment_intent_with_http_info variant
|
342
|
+
|
343
|
+
This returns an Array which contains the response data, status code and headers.
|
344
|
+
|
345
|
+
> <Array(<PaymentIntentResponse>, Integer, Hash)> get_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
346
|
+
|
347
|
+
```ruby
|
348
|
+
begin
|
349
|
+
# Retrieve a payment intent by ID
|
350
|
+
data, status_code, headers = api_instance.get_payment_intent_with_http_info(x_api_version, x_account_id, id)
|
351
|
+
p status_code # => 2xx
|
352
|
+
p headers # => { ... }
|
353
|
+
p data # => <PaymentIntentResponse>
|
354
|
+
rescue SubFiPay::ApiError => e
|
355
|
+
puts "Error when calling PaymentIntentsApi->get_payment_intent_with_http_info: #{e}"
|
356
|
+
end
|
357
|
+
```
|
358
|
+
|
359
|
+
### Parameters
|
360
|
+
|
361
|
+
| Name | Type | Description | Notes |
|
362
|
+
| ---- | ---- | ----------- | ----- |
|
363
|
+
| **x_api_version** | **String** | | |
|
364
|
+
| **x_account_id** | **String** | | |
|
365
|
+
| **id** | **String** | The ID of the payment intent to retrieve | |
|
366
|
+
|
367
|
+
### Return type
|
368
|
+
|
369
|
+
[**PaymentIntentResponse**](PaymentIntentResponse.md)
|
370
|
+
|
371
|
+
### Authorization
|
372
|
+
|
373
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
374
|
+
|
375
|
+
### HTTP request headers
|
376
|
+
|
377
|
+
- **Content-Type**: Not defined
|
378
|
+
- **Accept**: application/json
|
379
|
+
|
380
|
+
|
381
|
+
## list_payment_intents
|
382
|
+
|
383
|
+
> <ListPaymentIntentsResponse> list_payment_intents(x_api_version, x_account_id, opts)
|
384
|
+
|
385
|
+
List payment intents
|
386
|
+
|
387
|
+
### Examples
|
388
|
+
|
389
|
+
```ruby
|
390
|
+
require 'time'
|
391
|
+
require 'subfi_pay'
|
392
|
+
# setup authorization
|
393
|
+
SubFiPay.configure do |config|
|
394
|
+
# Configure API key authorization: ApiKeyAuth
|
395
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
396
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
397
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
398
|
+
end
|
399
|
+
|
400
|
+
api_instance = SubFiPay::PaymentIntentsApi.new
|
401
|
+
x_api_version = 'x_api_version_example' # String |
|
402
|
+
x_account_id = 'x_account_id_example' # String |
|
403
|
+
opts = {
|
404
|
+
page: 56, # Integer | The page of results to retrieve.
|
405
|
+
per_page: 56, # Integer | Number of results per page.
|
406
|
+
connected_account_id: 'connected_account_id_example' # String | Filter results by sub_merchant ID.
|
407
|
+
}
|
408
|
+
|
409
|
+
begin
|
410
|
+
# List payment intents
|
411
|
+
result = api_instance.list_payment_intents(x_api_version, x_account_id, opts)
|
412
|
+
p result
|
413
|
+
rescue SubFiPay::ApiError => e
|
414
|
+
puts "Error when calling PaymentIntentsApi->list_payment_intents: #{e}"
|
415
|
+
end
|
416
|
+
```
|
417
|
+
|
418
|
+
#### Using the list_payment_intents_with_http_info variant
|
419
|
+
|
420
|
+
This returns an Array which contains the response data, status code and headers.
|
421
|
+
|
422
|
+
> <Array(<ListPaymentIntentsResponse>, Integer, Hash)> list_payment_intents_with_http_info(x_api_version, x_account_id, opts)
|
423
|
+
|
424
|
+
```ruby
|
425
|
+
begin
|
426
|
+
# List payment intents
|
427
|
+
data, status_code, headers = api_instance.list_payment_intents_with_http_info(x_api_version, x_account_id, opts)
|
428
|
+
p status_code # => 2xx
|
429
|
+
p headers # => { ... }
|
430
|
+
p data # => <ListPaymentIntentsResponse>
|
431
|
+
rescue SubFiPay::ApiError => e
|
432
|
+
puts "Error when calling PaymentIntentsApi->list_payment_intents_with_http_info: #{e}"
|
433
|
+
end
|
434
|
+
```
|
435
|
+
|
436
|
+
### Parameters
|
437
|
+
|
438
|
+
| Name | Type | Description | Notes |
|
439
|
+
| ---- | ---- | ----------- | ----- |
|
440
|
+
| **x_api_version** | **String** | | |
|
441
|
+
| **x_account_id** | **String** | | |
|
442
|
+
| **page** | **Integer** | The page of results to retrieve. | [optional] |
|
443
|
+
| **per_page** | **Integer** | Number of results per page. | [optional] |
|
444
|
+
| **connected_account_id** | **String** | Filter results by sub_merchant ID. | [optional] |
|
445
|
+
|
446
|
+
### Return type
|
447
|
+
|
448
|
+
[**ListPaymentIntentsResponse**](ListPaymentIntentsResponse.md)
|
449
|
+
|
450
|
+
### Authorization
|
451
|
+
|
452
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
453
|
+
|
454
|
+
### HTTP request headers
|
455
|
+
|
456
|
+
- **Content-Type**: Not defined
|
457
|
+
- **Accept**: application/json
|
458
|
+
|
459
|
+
|
460
|
+
## update_payment_intent
|
461
|
+
|
462
|
+
> <PaymentIntentResponse> update_payment_intent(x_api_version, x_account_id, id, payment_intent_update_attributes)
|
463
|
+
|
464
|
+
Update a payment intent
|
465
|
+
|
466
|
+
### Examples
|
467
|
+
|
468
|
+
```ruby
|
469
|
+
require 'time'
|
470
|
+
require 'subfi_pay'
|
471
|
+
# setup authorization
|
472
|
+
SubFiPay.configure do |config|
|
473
|
+
# Configure API key authorization: ApiKeyAuth
|
474
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
475
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
476
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
477
|
+
end
|
478
|
+
|
479
|
+
api_instance = SubFiPay::PaymentIntentsApi.new
|
480
|
+
x_api_version = 'x_api_version_example' # String |
|
481
|
+
x_account_id = 'x_account_id_example' # String |
|
482
|
+
id = 'id_example' # String | The ID of the payment intent to update
|
483
|
+
payment_intent_update_attributes = SubFiPay::PaymentIntentUpdateAttributes.new # PaymentIntentUpdateAttributes |
|
484
|
+
|
485
|
+
begin
|
486
|
+
# Update a payment intent
|
487
|
+
result = api_instance.update_payment_intent(x_api_version, x_account_id, id, payment_intent_update_attributes)
|
488
|
+
p result
|
489
|
+
rescue SubFiPay::ApiError => e
|
490
|
+
puts "Error when calling PaymentIntentsApi->update_payment_intent: #{e}"
|
491
|
+
end
|
492
|
+
```
|
493
|
+
|
494
|
+
#### Using the update_payment_intent_with_http_info variant
|
495
|
+
|
496
|
+
This returns an Array which contains the response data, status code and headers.
|
497
|
+
|
498
|
+
> <Array(<PaymentIntentResponse>, Integer, Hash)> update_payment_intent_with_http_info(x_api_version, x_account_id, id, payment_intent_update_attributes)
|
499
|
+
|
500
|
+
```ruby
|
501
|
+
begin
|
502
|
+
# Update a payment intent
|
503
|
+
data, status_code, headers = api_instance.update_payment_intent_with_http_info(x_api_version, x_account_id, id, payment_intent_update_attributes)
|
504
|
+
p status_code # => 2xx
|
505
|
+
p headers # => { ... }
|
506
|
+
p data # => <PaymentIntentResponse>
|
507
|
+
rescue SubFiPay::ApiError => e
|
508
|
+
puts "Error when calling PaymentIntentsApi->update_payment_intent_with_http_info: #{e}"
|
509
|
+
end
|
510
|
+
```
|
511
|
+
|
512
|
+
### Parameters
|
513
|
+
|
514
|
+
| Name | Type | Description | Notes |
|
515
|
+
| ---- | ---- | ----------- | ----- |
|
516
|
+
| **x_api_version** | **String** | | |
|
517
|
+
| **x_account_id** | **String** | | |
|
518
|
+
| **id** | **String** | The ID of the payment intent to update | |
|
519
|
+
| **payment_intent_update_attributes** | [**PaymentIntentUpdateAttributes**](PaymentIntentUpdateAttributes.md) | | |
|
520
|
+
|
521
|
+
### Return type
|
522
|
+
|
523
|
+
[**PaymentIntentResponse**](PaymentIntentResponse.md)
|
524
|
+
|
525
|
+
### Authorization
|
526
|
+
|
527
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
528
|
+
|
529
|
+
### HTTP request headers
|
530
|
+
|
531
|
+
- **Content-Type**: application/json
|
532
|
+
- **Accept**: application/json
|
533
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# SubFiPay::PaymentMethodAttributes
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **type** | **String** | | |
|
8
|
+
| **billing_address_attributes** | [**BillingAddress**](BillingAddress.md) | | [optional] |
|
9
|
+
| **card_profile_attributes** | [**CardProfile**](CardProfile.md) | | [optional] |
|
10
|
+
| **bank_account_profile_attributes** | [**BankAccountProfile**](BankAccountProfile.md) | | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'subfi_pay'
|
16
|
+
|
17
|
+
instance = SubFiPay::PaymentMethodAttributes.new(
|
18
|
+
type: null,
|
19
|
+
billing_address_attributes: null,
|
20
|
+
card_profile_attributes: null,
|
21
|
+
bank_account_profile_attributes: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# SubFiPay::PaymentMethodResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | [optional] |
|
8
|
+
| **type** | **String** | | [optional] |
|
9
|
+
| **partner_id** | **String** | | [optional] |
|
10
|
+
| **created_at** | **Time** | | [optional] |
|
11
|
+
| **updated_at** | **Time** | | [optional] |
|
12
|
+
| **customer_id** | **String** | | [optional] |
|
13
|
+
| **metadata** | **Hash<String, String>** | Additional metadata key-value pairs | [optional] |
|
14
|
+
| **billing_address** | [**BillingAddress**](BillingAddress.md) | | [optional] |
|
15
|
+
| **card_profile** | [**CardProfile**](CardProfile.md) | | [optional] |
|
16
|
+
| **bank_account_profile** | [**BankAccountProfile**](BankAccountProfile.md) | | [optional] |
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'subfi_pay'
|
22
|
+
|
23
|
+
instance = SubFiPay::PaymentMethodResponse.new(
|
24
|
+
id: null,
|
25
|
+
type: null,
|
26
|
+
partner_id: null,
|
27
|
+
created_at: null,
|
28
|
+
updated_at: null,
|
29
|
+
customer_id: null,
|
30
|
+
metadata: null,
|
31
|
+
billing_address: null,
|
32
|
+
card_profile: null,
|
33
|
+
bank_account_profile: null
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|