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.
Files changed (261) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +11 -0
  3. data/Gemfile.lock +101 -0
  4. data/README.md +188 -0
  5. data/Rakefile +10 -0
  6. data/bin/console +11 -0
  7. data/docs/AccessKey.md +32 -0
  8. data/docs/AccessKeysApi.md +228 -0
  9. data/docs/AccountAttributes.md +20 -0
  10. data/docs/AccountAttributesAccount.md +20 -0
  11. data/docs/AccountCreateRequest.md +18 -0
  12. data/docs/AccountResponse.md +26 -0
  13. data/docs/AccountsApi.md +227 -0
  14. data/docs/BalanceTransactionAttributes.md +30 -0
  15. data/docs/BalanceTransactionResponse.md +38 -0
  16. data/docs/BalanceTransactionsApi.md +87 -0
  17. data/docs/BankAccountProfile.md +28 -0
  18. data/docs/BillingAddress.md +36 -0
  19. data/docs/CardProfile.md +42 -0
  20. data/docs/ChargeAttributes.md +26 -0
  21. data/docs/ChargeResponse.md +42 -0
  22. data/docs/ChargesApi.md +167 -0
  23. data/docs/ConnectedAccountAttributes.md +20 -0
  24. data/docs/ConnectedAccountResponse.md +26 -0
  25. data/docs/CreateAccountRequest.md +18 -0
  26. data/docs/CreateAccountRequestAccount.md +20 -0
  27. data/docs/CreateCustomerRequest.md +24 -0
  28. data/docs/CreateWebhookEndpointRequest.md +18 -0
  29. data/docs/CreateWebhookEndpointRequestWebhookEndpoint.md +28 -0
  30. data/docs/Customer.md +26 -0
  31. data/docs/CustomerAttributes.md +24 -0
  32. data/docs/CustomerAttributesCustomer.md +24 -0
  33. data/docs/CustomerCreateRequest.md +18 -0
  34. data/docs/CustomerUpdateAttributes.md +20 -0
  35. data/docs/CustomerUpdateAttributesCustomer.md +20 -0
  36. data/docs/CustomerUpdateRequest.md +18 -0
  37. data/docs/CustomersApi.md +307 -0
  38. data/docs/Event.md +30 -0
  39. data/docs/EventsApi.md +159 -0
  40. data/docs/ListAccessKeysResponse.md +20 -0
  41. data/docs/ListAccountsResponse.md +20 -0
  42. data/docs/ListBalanceTransactionsResponse.md +20 -0
  43. data/docs/ListChargesResponse.md +20 -0
  44. data/docs/ListCustomersResponse.md +20 -0
  45. data/docs/ListEventsResponse.md +20 -0
  46. data/docs/ListPaymentIntentsResponse.md +20 -0
  47. data/docs/ListPaymentMethodsResponse.md +20 -0
  48. data/docs/ListRefundsResponse.md +20 -0
  49. data/docs/ListWebhookEndpointsResponse.md +20 -0
  50. data/docs/ListWebhookRequestsResponse.md +20 -0
  51. data/docs/Meta.md +28 -0
  52. data/docs/PaymentIntentAttributes.md +26 -0
  53. data/docs/PaymentIntentAttributesPaymentIntent.md +26 -0
  54. data/docs/PaymentIntentCreateRequest.md +18 -0
  55. data/docs/PaymentIntentResponse.md +30 -0
  56. data/docs/PaymentIntentUpdateAttributes.md +18 -0
  57. data/docs/PaymentIntentUpdateAttributesPaymentIntent.md +18 -0
  58. data/docs/PaymentIntentsApi.md +533 -0
  59. data/docs/PaymentMethodAttributes.md +24 -0
  60. data/docs/PaymentMethodResponse.md +36 -0
  61. data/docs/PaymentMethodsApi.md +239 -0
  62. data/docs/RefundAttributes.md +20 -0
  63. data/docs/RefundResponse.md +30 -0
  64. data/docs/RefundsApi.md +311 -0
  65. data/docs/RollAccessKeyAttributes.md +18 -0
  66. data/docs/RollAccessKeyAttributesAccessKey.md +18 -0
  67. data/docs/RollAccessKeyRequest.md +18 -0
  68. data/docs/RollAccessKeyRequestAccessKey.md +18 -0
  69. data/docs/SubscriptionAttributes.md +30 -0
  70. data/docs/SubscriptionAttributesSubscription.md +30 -0
  71. data/docs/SubscriptionCreateRequest.md +18 -0
  72. data/docs/SubscriptionCreateRequestSubscription.md +30 -0
  73. data/docs/SubscriptionResponse.md +36 -0
  74. data/docs/SubscriptionsApi.md +155 -0
  75. data/docs/WebhookEndpoint.md +34 -0
  76. data/docs/WebhookEndpointsApi.md +380 -0
  77. data/docs/WebhookRequest.md +38 -0
  78. data/docs/WebhookRequestsApi.md +85 -0
  79. data/git_push.sh +57 -0
  80. data/lib/subfi_pay/api/access_keys_api.rb +235 -0
  81. data/lib/subfi_pay/api/accounts_api.rb +231 -0
  82. data/lib/subfi_pay/api/balance_transactions_api.rb +100 -0
  83. data/lib/subfi_pay/api/charges_api.rb +181 -0
  84. data/lib/subfi_pay/api/customers_api.rb +331 -0
  85. data/lib/subfi_pay/api/events_api.rb +172 -0
  86. data/lib/subfi_pay/api/payment_intents_api.rb +566 -0
  87. data/lib/subfi_pay/api/payment_methods_api.rb +262 -0
  88. data/lib/subfi_pay/api/refunds_api.rb +334 -0
  89. data/lib/subfi_pay/api/subscriptions_api.rb +177 -0
  90. data/lib/subfi_pay/api/webhook_endpoints_api.rb +404 -0
  91. data/lib/subfi_pay/api/webhook_requests_api.rb +97 -0
  92. data/lib/subfi_pay/api_client.rb +394 -0
  93. data/lib/subfi_pay/api_error.rb +58 -0
  94. data/lib/subfi_pay/configuration.rb +305 -0
  95. data/lib/subfi_pay/models/access_key.rb +275 -0
  96. data/lib/subfi_pay/models/account_attributes.rb +221 -0
  97. data/lib/subfi_pay/models/account_attributes_account.rb +221 -0
  98. data/lib/subfi_pay/models/account_create_request.rb +212 -0
  99. data/lib/subfi_pay/models/account_response.rb +248 -0
  100. data/lib/subfi_pay/models/balance_transaction_attributes.rb +266 -0
  101. data/lib/subfi_pay/models/balance_transaction_response.rb +303 -0
  102. data/lib/subfi_pay/models/bank_account_profile.rb +257 -0
  103. data/lib/subfi_pay/models/billing_address.rb +294 -0
  104. data/lib/subfi_pay/models/card_profile.rb +324 -0
  105. data/lib/subfi_pay/models/charge_attributes.rb +265 -0
  106. data/lib/subfi_pay/models/charge_response.rb +326 -0
  107. data/lib/subfi_pay/models/connected_account_attributes.rb +235 -0
  108. data/lib/subfi_pay/models/connected_account_response.rb +248 -0
  109. data/lib/subfi_pay/models/create_account_request.rb +219 -0
  110. data/lib/subfi_pay/models/create_account_request_account.rb +221 -0
  111. data/lib/subfi_pay/models/create_customer_request.rb +239 -0
  112. data/lib/subfi_pay/models/create_webhook_endpoint_request.rb +212 -0
  113. data/lib/subfi_pay/models/create_webhook_endpoint_request_webhook_endpoint.rb +257 -0
  114. data/lib/subfi_pay/models/customer.rb +248 -0
  115. data/lib/subfi_pay/models/customer_attributes.rb +239 -0
  116. data/lib/subfi_pay/models/customer_attributes_customer.rb +239 -0
  117. data/lib/subfi_pay/models/customer_create_request.rb +212 -0
  118. data/lib/subfi_pay/models/customer_update_attributes.rb +221 -0
  119. data/lib/subfi_pay/models/customer_update_attributes_customer.rb +221 -0
  120. data/lib/subfi_pay/models/customer_update_request.rb +212 -0
  121. data/lib/subfi_pay/models/event.rb +266 -0
  122. data/lib/subfi_pay/models/list_access_keys_response.rb +223 -0
  123. data/lib/subfi_pay/models/list_accounts_response.rb +223 -0
  124. data/lib/subfi_pay/models/list_balance_transactions_response.rb +223 -0
  125. data/lib/subfi_pay/models/list_charges_response.rb +223 -0
  126. data/lib/subfi_pay/models/list_customers_response.rb +223 -0
  127. data/lib/subfi_pay/models/list_events_response.rb +223 -0
  128. data/lib/subfi_pay/models/list_payment_intents_response.rb +223 -0
  129. data/lib/subfi_pay/models/list_payment_methods_response.rb +223 -0
  130. data/lib/subfi_pay/models/list_refunds_response.rb +223 -0
  131. data/lib/subfi_pay/models/list_webhook_endpoints_response.rb +223 -0
  132. data/lib/subfi_pay/models/list_webhook_requests_response.rb +223 -0
  133. data/lib/subfi_pay/models/meta.rb +259 -0
  134. data/lib/subfi_pay/models/payment_intent_attributes.rb +257 -0
  135. data/lib/subfi_pay/models/payment_intent_attributes_payment_intent.rb +257 -0
  136. data/lib/subfi_pay/models/payment_intent_create_request.rb +212 -0
  137. data/lib/subfi_pay/models/payment_intent_response.rb +268 -0
  138. data/lib/subfi_pay/models/payment_intent_update_attributes.rb +212 -0
  139. data/lib/subfi_pay/models/payment_intent_update_attributes_payment_intent.rb +214 -0
  140. data/lib/subfi_pay/models/payment_method_attributes.rb +246 -0
  141. data/lib/subfi_pay/models/payment_method_response.rb +296 -0
  142. data/lib/subfi_pay/models/refund_attributes.rb +228 -0
  143. data/lib/subfi_pay/models/refund_response.rb +268 -0
  144. data/lib/subfi_pay/models/roll_access_key_attributes.rb +212 -0
  145. data/lib/subfi_pay/models/roll_access_key_attributes_access_key.rb +219 -0
  146. data/lib/subfi_pay/models/roll_access_key_request.rb +212 -0
  147. data/lib/subfi_pay/models/roll_access_key_request_access_key.rb +219 -0
  148. data/lib/subfi_pay/models/subscription_attributes.rb +266 -0
  149. data/lib/subfi_pay/models/subscription_attributes_subscription.rb +266 -0
  150. data/lib/subfi_pay/models/subscription_create_request.rb +212 -0
  151. data/lib/subfi_pay/models/subscription_create_request_subscription.rb +266 -0
  152. data/lib/subfi_pay/models/subscription_response.rb +293 -0
  153. data/lib/subfi_pay/models/webhook_endpoint.rb +284 -0
  154. data/lib/subfi_pay/models/webhook_request.rb +302 -0
  155. data/lib/subfi_pay/version.rb +15 -0
  156. data/lib/subfi_pay.rb +99 -0
  157. data/run_fix_gemfile.sh +11 -0
  158. data/spec/api/access_keys_api_spec.rb +138 -0
  159. data/spec/api/accounts_api_spec.rb +145 -0
  160. data/spec/api/balance_transactions_api_spec.rb +86 -0
  161. data/spec/api/charges_api_spec.rb +121 -0
  162. data/spec/api/customers_api_spec.rb +134 -0
  163. data/spec/api/events_api_spec.rb +105 -0
  164. data/spec/api/payment_intents_api_spec.rb +250 -0
  165. data/spec/api/payment_methods_api_spec.rb +226 -0
  166. data/spec/api/refunds_api_spec.rb +158 -0
  167. data/spec/api/subscriptions_api_spec.rb +113 -0
  168. data/spec/api/webhook_endpoints_api_spec.rb +198 -0
  169. data/spec/api/webhook_requests_api_spec.rb +79 -0
  170. data/spec/configuration_spec.rb +23 -0
  171. data/spec/fixtures/access_keys/list_200.json +1 -0
  172. data/spec/fixtures/access_keys/roll_200.json +1 -0
  173. data/spec/fixtures/accounts/create_201.json +1 -0
  174. data/spec/fixtures/accounts/list_200.json +1 -0
  175. data/spec/fixtures/accounts/show_200.json +1 -0
  176. data/spec/fixtures/balance_transactions/list_200.json +69 -0
  177. data/spec/fixtures/charges/create_201.json +39 -0
  178. data/spec/fixtures/charges/list_200.json +1 -0
  179. data/spec/fixtures/charges/retrieve_200.json +1 -0
  180. data/spec/fixtures/customers/create_201.json +1 -0
  181. data/spec/fixtures/customers/list_200.json +1 -0
  182. data/spec/fixtures/customers/show_200.json +1 -0
  183. data/spec/fixtures/events/list_200.json +1 -0
  184. data/spec/fixtures/events/show_200.json +1 -0
  185. data/spec/fixtures/payment_intents/cancel_200.json +1 -0
  186. data/spec/fixtures/payment_intents/capture_200.json +1 -0
  187. data/spec/fixtures/payment_intents/confirm_200.json +1 -0
  188. data/spec/fixtures/payment_intents/create_201.json +1 -0
  189. data/spec/fixtures/payment_intents/fetch_200.json +1 -0
  190. data/spec/fixtures/payment_intents/list_200.json +1 -0
  191. data/spec/fixtures/payment_intents/update_200.json +1 -0
  192. data/spec/fixtures/payment_methods/create_bank_account_201.json +1 -0
  193. data/spec/fixtures/payment_methods/create_card_201.json +1 -0
  194. data/spec/fixtures/payment_methods/get_bank_account_200.json +29 -0
  195. data/spec/fixtures/payment_methods/get_card_200.json +1 -0
  196. data/spec/fixtures/payment_methods/list_200.json +1 -0
  197. data/spec/fixtures/refunds/create_201.json +1 -0
  198. data/spec/fixtures/refunds/list_200.json +1 -0
  199. data/spec/fixtures/refunds/show_200.json +1 -0
  200. data/spec/fixtures/subscriptions/create_201.json +1 -0
  201. data/spec/fixtures/subscriptions/show_200.json +1 -0
  202. data/spec/fixtures/webhook_endpoints/create_201.json +11 -0
  203. data/spec/fixtures/webhook_endpoints/list_200.json +1 -0
  204. data/spec/fixtures/webhook_endpoints/show_200.json +1 -0
  205. data/spec/fixtures/webhook_endpoints/update_200.json +13 -0
  206. data/spec/fixtures/webhook_requests/list_200.json +1 -0
  207. data/spec/models/access_key_spec.rb +39 -0
  208. data/spec/models/account_attributes_spec.rb +40 -0
  209. data/spec/models/account_create_request_spec.rb +38 -0
  210. data/spec/models/account_response_spec.rb +39 -0
  211. data/spec/models/balance_transaction_response_spec.rb +38 -0
  212. data/spec/models/bank_account_profile_spec.rb +38 -0
  213. data/spec/models/billing_address_spec.rb +38 -0
  214. data/spec/models/card_profile_spec.rb +38 -0
  215. data/spec/models/charge_attributes_spec.rb +45 -0
  216. data/spec/models/charge_response_spec.rb +45 -0
  217. data/spec/models/connected_account_attributes_spec.rb +38 -0
  218. data/spec/models/connected_account_response_spec.rb +39 -0
  219. data/spec/models/create_account_request_account_spec.rb +39 -0
  220. data/spec/models/create_account_request_spec.rb +39 -0
  221. data/spec/models/create_webhook_endpoint_request_spec.rb +38 -0
  222. data/spec/models/create_webhook_endpoint_request_webhook_endpoint_spec.rb +38 -0
  223. data/spec/models/customer_attributes_spec.rb +40 -0
  224. data/spec/models/customer_create_request_spec.rb +38 -0
  225. data/spec/models/customer_spec.rb +39 -0
  226. data/spec/models/customer_update_attributes_spec.rb +39 -0
  227. data/spec/models/customer_update_request_spec.rb +39 -0
  228. data/spec/models/event_spec.rb +39 -0
  229. data/spec/models/list_access_keys_response_spec.rb +38 -0
  230. data/spec/models/list_accounts_response_spec.rb +38 -0
  231. data/spec/models/list_balance_transactions_response_spec.rb +38 -0
  232. data/spec/models/list_charges_response_spec.rb +38 -0
  233. data/spec/models/list_customers_response_spec.rb +39 -0
  234. data/spec/models/list_events_response_spec.rb +38 -0
  235. data/spec/models/list_payment_intents_response_spec.rb +45 -0
  236. data/spec/models/list_payment_methods_response_spec.rb +39 -0
  237. data/spec/models/list_refunds_response_spec.rb +38 -0
  238. data/spec/models/list_webhook_endpoints_response_spec.rb +38 -0
  239. data/spec/models/list_webhook_requests_response_spec.rb +39 -0
  240. data/spec/models/meta_spec.rb +38 -0
  241. data/spec/models/payment_intent_attributes_spec.rb +44 -0
  242. data/spec/models/payment_intent_create_request_spec.rb +38 -0
  243. data/spec/models/payment_intent_response_spec.rb +45 -0
  244. data/spec/models/payment_intent_update_attributes_payment_intent_spec.rb +38 -0
  245. data/spec/models/payment_intent_update_attributes_spec.rb +37 -0
  246. data/spec/models/payment_method_attributes_spec.rb +38 -0
  247. data/spec/models/payment_method_response_spec.rb +38 -0
  248. data/spec/models/refund_attributes_spec.rb +39 -0
  249. data/spec/models/refund_response_spec.rb +38 -0
  250. data/spec/models/roll_access_key_attributes_access_key_spec.rb +39 -0
  251. data/spec/models/roll_access_key_attributes_spec.rb +40 -0
  252. data/spec/models/roll_access_key_request_access_key_spec.rb +38 -0
  253. data/spec/models/roll_access_key_request_spec.rb +37 -0
  254. data/spec/models/subscription_attributes_spec.rb +38 -0
  255. data/spec/models/subscription_create_request_spec.rb +40 -0
  256. data/spec/models/subscription_response_spec.rb +38 -0
  257. data/spec/models/webhook_endpoint_spec.rb +40 -0
  258. data/spec/models/webhook_request_spec.rb +40 -0
  259. data/spec/spec_helper.rb +123 -0
  260. data/subfi_pay.gemspec +39 -0
  261. metadata +444 -0
@@ -0,0 +1,30 @@
1
+ # SubFiPay::SubscriptionAttributesSubscription
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **connected_account_id** | **String** | | [optional] |
8
+ | **customer_id** | **String** | | [optional] |
9
+ | **payment_method_id** | **String** | | [optional] |
10
+ | **amount** | **Integer** | | [optional] |
11
+ | **interval** | **String** | | [optional] |
12
+ | **interval_count** | **Integer** | | [optional] |
13
+ | **next_payment_date** | **Time** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'subfi_pay'
19
+
20
+ instance = SubFiPay::SubscriptionAttributesSubscription.new(
21
+ connected_account_id: null,
22
+ customer_id: null,
23
+ payment_method_id: null,
24
+ amount: null,
25
+ interval: null,
26
+ interval_count: null,
27
+ next_payment_date: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,18 @@
1
+ # SubFiPay::SubscriptionCreateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **subscription** | [**SubscriptionAttributes**](SubscriptionAttributes.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'subfi_pay'
13
+
14
+ instance = SubFiPay::SubscriptionCreateRequest.new(
15
+ subscription: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,30 @@
1
+ # SubFiPay::SubscriptionCreateRequestSubscription
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **connected_account_id** | **String** | | [optional] |
8
+ | **customer_id** | **String** | | [optional] |
9
+ | **payment_method_id** | **String** | | [optional] |
10
+ | **amount** | **Integer** | | [optional] |
11
+ | **interval** | **String** | | [optional] |
12
+ | **interval_count** | **Integer** | | [optional] |
13
+ | **next_payment_date** | **Time** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'subfi_pay'
19
+
20
+ instance = SubFiPay::SubscriptionCreateRequestSubscription.new(
21
+ connected_account_id: null,
22
+ customer_id: null,
23
+ payment_method_id: null,
24
+ amount: null,
25
+ interval: null,
26
+ interval_count: null,
27
+ next_payment_date: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,36 @@
1
+ # SubFiPay::SubscriptionResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **connected_account_id** | **String** | | [optional] |
8
+ | **customer_id** | **String** | | [optional] |
9
+ | **payment_method_id** | **String** | | [optional] |
10
+ | **amount** | **Integer** | | [optional] |
11
+ | **interval** | **String** | | [optional] |
12
+ | **interval_count** | **Integer** | | [optional] |
13
+ | **next_payment_date** | **Time** | | [optional] |
14
+ | **state** | **String** | | [optional] |
15
+ | **created_at** | **Time** | | [optional] |
16
+ | **updated_at** | **Time** | | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'subfi_pay'
22
+
23
+ instance = SubFiPay::SubscriptionResponse.new(
24
+ connected_account_id: null,
25
+ customer_id: null,
26
+ payment_method_id: null,
27
+ amount: null,
28
+ interval: null,
29
+ interval_count: null,
30
+ next_payment_date: null,
31
+ state: null,
32
+ created_at: null,
33
+ updated_at: null
34
+ )
35
+ ```
36
+
@@ -0,0 +1,155 @@
1
+ # SubFiPay::SubscriptionsApi
2
+
3
+ All URIs are relative to *https://pay-sandbox.subfi.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_subscription**](SubscriptionsApi.md#create_subscription) | **POST** /subscriptions | Create a new subscription |
8
+ | [**get_subscription**](SubscriptionsApi.md#get_subscription) | **GET** /subscriptions/{id} | Retrieve a subscription by ID |
9
+
10
+
11
+ ## create_subscription
12
+
13
+ > <SubscriptionResponse> create_subscription(x_api_version, x_account_id, subscription_create_request)
14
+
15
+ Create a new subscription
16
+
17
+ ### Examples
18
+
19
+ ```ruby
20
+ require 'time'
21
+ require 'subfi_pay'
22
+ # setup authorization
23
+ SubFiPay.configure do |config|
24
+ # Configure API key authorization: ApiKeyAuth
25
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = SubFiPay::SubscriptionsApi.new
31
+ x_api_version = 'x_api_version_example' # String |
32
+ x_account_id = 'x_account_id_example' # String |
33
+ subscription_create_request = SubFiPay::SubscriptionCreateRequest.new # SubscriptionCreateRequest |
34
+
35
+ begin
36
+ # Create a new subscription
37
+ result = api_instance.create_subscription(x_api_version, x_account_id, subscription_create_request)
38
+ p result
39
+ rescue SubFiPay::ApiError => e
40
+ puts "Error when calling SubscriptionsApi->create_subscription: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the create_subscription_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<SubscriptionResponse>, Integer, Hash)> create_subscription_with_http_info(x_api_version, x_account_id, subscription_create_request)
49
+
50
+ ```ruby
51
+ begin
52
+ # Create a new subscription
53
+ data, status_code, headers = api_instance.create_subscription_with_http_info(x_api_version, x_account_id, subscription_create_request)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <SubscriptionResponse>
57
+ rescue SubFiPay::ApiError => e
58
+ puts "Error when calling SubscriptionsApi->create_subscription_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **x_api_version** | **String** | | |
67
+ | **x_account_id** | **String** | | |
68
+ | **subscription_create_request** | [**SubscriptionCreateRequest**](SubscriptionCreateRequest.md) | | |
69
+
70
+ ### Return type
71
+
72
+ [**SubscriptionResponse**](SubscriptionResponse.md)
73
+
74
+ ### Authorization
75
+
76
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
77
+
78
+ ### HTTP request headers
79
+
80
+ - **Content-Type**: application/json
81
+ - **Accept**: application/json
82
+
83
+
84
+ ## get_subscription
85
+
86
+ > <SubscriptionResponse> get_subscription(x_api_version, x_account_id, id)
87
+
88
+ Retrieve a subscription by ID
89
+
90
+ ### Examples
91
+
92
+ ```ruby
93
+ require 'time'
94
+ require 'subfi_pay'
95
+ # setup authorization
96
+ SubFiPay.configure do |config|
97
+ # Configure API key authorization: ApiKeyAuth
98
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
99
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
100
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
101
+ end
102
+
103
+ api_instance = SubFiPay::SubscriptionsApi.new
104
+ x_api_version = 'x_api_version_example' # String |
105
+ x_account_id = 'x_account_id_example' # String |
106
+ id = 'id_example' # String | The ID of the subscription to retrieve
107
+
108
+ begin
109
+ # Retrieve a subscription by ID
110
+ result = api_instance.get_subscription(x_api_version, x_account_id, id)
111
+ p result
112
+ rescue SubFiPay::ApiError => e
113
+ puts "Error when calling SubscriptionsApi->get_subscription: #{e}"
114
+ end
115
+ ```
116
+
117
+ #### Using the get_subscription_with_http_info variant
118
+
119
+ This returns an Array which contains the response data, status code and headers.
120
+
121
+ > <Array(<SubscriptionResponse>, Integer, Hash)> get_subscription_with_http_info(x_api_version, x_account_id, id)
122
+
123
+ ```ruby
124
+ begin
125
+ # Retrieve a subscription by ID
126
+ data, status_code, headers = api_instance.get_subscription_with_http_info(x_api_version, x_account_id, id)
127
+ p status_code # => 2xx
128
+ p headers # => { ... }
129
+ p data # => <SubscriptionResponse>
130
+ rescue SubFiPay::ApiError => e
131
+ puts "Error when calling SubscriptionsApi->get_subscription_with_http_info: #{e}"
132
+ end
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ | Name | Type | Description | Notes |
138
+ | ---- | ---- | ----------- | ----- |
139
+ | **x_api_version** | **String** | | |
140
+ | **x_account_id** | **String** | | |
141
+ | **id** | **String** | The ID of the subscription to retrieve | |
142
+
143
+ ### Return type
144
+
145
+ [**SubscriptionResponse**](SubscriptionResponse.md)
146
+
147
+ ### Authorization
148
+
149
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: application/json
155
+
@@ -0,0 +1,34 @@
1
+ # SubFiPay::WebhookEndpoint
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **event** | **String** | | [optional] |
9
+ | **metadata** | **Object** | | [optional] |
10
+ | **url** | **String** | | [optional] |
11
+ | **enabled** | **Boolean** | | [optional] |
12
+ | **account_id** | **String** | | [optional] |
13
+ | **connected_account_id** | **String** | | [optional] |
14
+ | **created_at** | **Time** | | [optional] |
15
+ | **updated_at** | **Time** | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'subfi_pay'
21
+
22
+ instance = SubFiPay::WebhookEndpoint.new(
23
+ id: null,
24
+ event: null,
25
+ metadata: null,
26
+ url: null,
27
+ enabled: null,
28
+ account_id: null,
29
+ connected_account_id: null,
30
+ created_at: null,
31
+ updated_at: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,380 @@
1
+ # SubFiPay::WebhookEndpointsApi
2
+
3
+ All URIs are relative to *https://pay-sandbox.subfi.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_webhook_endpoint**](WebhookEndpointsApi.md#create_webhook_endpoint) | **POST** /webhook_endpoints | Create a webhook endpoint |
8
+ | [**delete_webhook_endpoint**](WebhookEndpointsApi.md#delete_webhook_endpoint) | **DELETE** /webhook_endpoints/{id} | Delete a webhook endpoint by ID |
9
+ | [**get_webhook_endpoint**](WebhookEndpointsApi.md#get_webhook_endpoint) | **GET** /webhook_endpoints/{id} | Retrieve a webhook endpoint by ID |
10
+ | [**list_webhook_endpoints**](WebhookEndpointsApi.md#list_webhook_endpoints) | **GET** /webhook_endpoints | List all webhook endpoints |
11
+ | [**update_webhook_endpoint**](WebhookEndpointsApi.md#update_webhook_endpoint) | **PATCH** /webhook_endpoints/{id} | Update a webhook endpoint by ID |
12
+
13
+
14
+ ## create_webhook_endpoint
15
+
16
+ > <WebhookEndpoint> create_webhook_endpoint(x_api_version, create_webhook_endpoint_request)
17
+
18
+ Create a webhook endpoint
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'subfi_pay'
25
+ # setup authorization
26
+ SubFiPay.configure do |config|
27
+ # Configure API key authorization: ApiKeyAuth
28
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = SubFiPay::WebhookEndpointsApi.new
34
+ x_api_version = 'x_api_version_example' # String |
35
+ create_webhook_endpoint_request = SubFiPay::CreateWebhookEndpointRequest.new # CreateWebhookEndpointRequest |
36
+
37
+ begin
38
+ # Create a webhook endpoint
39
+ result = api_instance.create_webhook_endpoint(x_api_version, create_webhook_endpoint_request)
40
+ p result
41
+ rescue SubFiPay::ApiError => e
42
+ puts "Error when calling WebhookEndpointsApi->create_webhook_endpoint: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the create_webhook_endpoint_with_http_info variant
47
+
48
+ This returns an Array which contains the response data, status code and headers.
49
+
50
+ > <Array(<WebhookEndpoint>, Integer, Hash)> create_webhook_endpoint_with_http_info(x_api_version, create_webhook_endpoint_request)
51
+
52
+ ```ruby
53
+ begin
54
+ # Create a webhook endpoint
55
+ data, status_code, headers = api_instance.create_webhook_endpoint_with_http_info(x_api_version, create_webhook_endpoint_request)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => <WebhookEndpoint>
59
+ rescue SubFiPay::ApiError => e
60
+ puts "Error when calling WebhookEndpointsApi->create_webhook_endpoint_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **x_api_version** | **String** | | |
69
+ | **create_webhook_endpoint_request** | [**CreateWebhookEndpointRequest**](CreateWebhookEndpointRequest.md) | | |
70
+
71
+ ### Return type
72
+
73
+ [**WebhookEndpoint**](WebhookEndpoint.md)
74
+
75
+ ### Authorization
76
+
77
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
78
+
79
+ ### HTTP request headers
80
+
81
+ - **Content-Type**: application/json
82
+ - **Accept**: application/json
83
+
84
+
85
+ ## delete_webhook_endpoint
86
+
87
+ > delete_webhook_endpoint(x_api_version, x_account_id, id)
88
+
89
+ Delete a webhook endpoint by ID
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'subfi_pay'
96
+ # setup authorization
97
+ SubFiPay.configure do |config|
98
+ # Configure API key authorization: ApiKeyAuth
99
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
100
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
101
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
102
+ end
103
+
104
+ api_instance = SubFiPay::WebhookEndpointsApi.new
105
+ x_api_version = 'x_api_version_example' # String |
106
+ x_account_id = 'x_account_id_example' # String |
107
+ id = 'id_example' # String |
108
+
109
+ begin
110
+ # Delete a webhook endpoint by ID
111
+ api_instance.delete_webhook_endpoint(x_api_version, x_account_id, id)
112
+ rescue SubFiPay::ApiError => e
113
+ puts "Error when calling WebhookEndpointsApi->delete_webhook_endpoint: #{e}"
114
+ end
115
+ ```
116
+
117
+ #### Using the delete_webhook_endpoint_with_http_info variant
118
+
119
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
120
+
121
+ > <Array(nil, Integer, Hash)> delete_webhook_endpoint_with_http_info(x_api_version, x_account_id, id)
122
+
123
+ ```ruby
124
+ begin
125
+ # Delete a webhook endpoint by ID
126
+ data, status_code, headers = api_instance.delete_webhook_endpoint_with_http_info(x_api_version, x_account_id, id)
127
+ p status_code # => 2xx
128
+ p headers # => { ... }
129
+ p data # => nil
130
+ rescue SubFiPay::ApiError => e
131
+ puts "Error when calling WebhookEndpointsApi->delete_webhook_endpoint_with_http_info: #{e}"
132
+ end
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ | Name | Type | Description | Notes |
138
+ | ---- | ---- | ----------- | ----- |
139
+ | **x_api_version** | **String** | | |
140
+ | **x_account_id** | **String** | | |
141
+ | **id** | **String** | | |
142
+
143
+ ### Return type
144
+
145
+ nil (empty response body)
146
+
147
+ ### Authorization
148
+
149
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: Not defined
155
+
156
+
157
+ ## get_webhook_endpoint
158
+
159
+ > <WebhookEndpoint> get_webhook_endpoint(x_api_version, x_account_id, id)
160
+
161
+ Retrieve a webhook endpoint by ID
162
+
163
+ ### Examples
164
+
165
+ ```ruby
166
+ require 'time'
167
+ require 'subfi_pay'
168
+ # setup authorization
169
+ SubFiPay.configure do |config|
170
+ # Configure API key authorization: ApiKeyAuth
171
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
172
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
173
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
174
+ end
175
+
176
+ api_instance = SubFiPay::WebhookEndpointsApi.new
177
+ x_api_version = 'x_api_version_example' # String |
178
+ x_account_id = 'x_account_id_example' # String |
179
+ id = 'id_example' # String |
180
+
181
+ begin
182
+ # Retrieve a webhook endpoint by ID
183
+ result = api_instance.get_webhook_endpoint(x_api_version, x_account_id, id)
184
+ p result
185
+ rescue SubFiPay::ApiError => e
186
+ puts "Error when calling WebhookEndpointsApi->get_webhook_endpoint: #{e}"
187
+ end
188
+ ```
189
+
190
+ #### Using the get_webhook_endpoint_with_http_info variant
191
+
192
+ This returns an Array which contains the response data, status code and headers.
193
+
194
+ > <Array(<WebhookEndpoint>, Integer, Hash)> get_webhook_endpoint_with_http_info(x_api_version, x_account_id, id)
195
+
196
+ ```ruby
197
+ begin
198
+ # Retrieve a webhook endpoint by ID
199
+ data, status_code, headers = api_instance.get_webhook_endpoint_with_http_info(x_api_version, x_account_id, id)
200
+ p status_code # => 2xx
201
+ p headers # => { ... }
202
+ p data # => <WebhookEndpoint>
203
+ rescue SubFiPay::ApiError => e
204
+ puts "Error when calling WebhookEndpointsApi->get_webhook_endpoint_with_http_info: #{e}"
205
+ end
206
+ ```
207
+
208
+ ### Parameters
209
+
210
+ | Name | Type | Description | Notes |
211
+ | ---- | ---- | ----------- | ----- |
212
+ | **x_api_version** | **String** | | |
213
+ | **x_account_id** | **String** | | |
214
+ | **id** | **String** | | |
215
+
216
+ ### Return type
217
+
218
+ [**WebhookEndpoint**](WebhookEndpoint.md)
219
+
220
+ ### Authorization
221
+
222
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
223
+
224
+ ### HTTP request headers
225
+
226
+ - **Content-Type**: Not defined
227
+ - **Accept**: application/json
228
+
229
+
230
+ ## list_webhook_endpoints
231
+
232
+ > <ListWebhookEndpointsResponse> list_webhook_endpoints(x_api_version, x_account_id, opts)
233
+
234
+ List all webhook endpoints
235
+
236
+ ### Examples
237
+
238
+ ```ruby
239
+ require 'time'
240
+ require 'subfi_pay'
241
+ # setup authorization
242
+ SubFiPay.configure do |config|
243
+ # Configure API key authorization: ApiKeyAuth
244
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = SubFiPay::WebhookEndpointsApi.new
250
+ x_api_version = 'x_api_version_example' # String |
251
+ x_account_id = 'x_account_id_example' # String |
252
+ opts = {
253
+ page: 56, # Integer | The page of results to retrieve.
254
+ per_page: 56 # Integer | Number of results per page.
255
+ }
256
+
257
+ begin
258
+ # List all webhook endpoints
259
+ result = api_instance.list_webhook_endpoints(x_api_version, x_account_id, opts)
260
+ p result
261
+ rescue SubFiPay::ApiError => e
262
+ puts "Error when calling WebhookEndpointsApi->list_webhook_endpoints: #{e}"
263
+ end
264
+ ```
265
+
266
+ #### Using the list_webhook_endpoints_with_http_info variant
267
+
268
+ This returns an Array which contains the response data, status code and headers.
269
+
270
+ > <Array(<ListWebhookEndpointsResponse>, Integer, Hash)> list_webhook_endpoints_with_http_info(x_api_version, x_account_id, opts)
271
+
272
+ ```ruby
273
+ begin
274
+ # List all webhook endpoints
275
+ data, status_code, headers = api_instance.list_webhook_endpoints_with_http_info(x_api_version, x_account_id, opts)
276
+ p status_code # => 2xx
277
+ p headers # => { ... }
278
+ p data # => <ListWebhookEndpointsResponse>
279
+ rescue SubFiPay::ApiError => e
280
+ puts "Error when calling WebhookEndpointsApi->list_webhook_endpoints_with_http_info: #{e}"
281
+ end
282
+ ```
283
+
284
+ ### Parameters
285
+
286
+ | Name | Type | Description | Notes |
287
+ | ---- | ---- | ----------- | ----- |
288
+ | **x_api_version** | **String** | | |
289
+ | **x_account_id** | **String** | | |
290
+ | **page** | **Integer** | The page of results to retrieve. | [optional] |
291
+ | **per_page** | **Integer** | Number of results per page. | [optional] |
292
+
293
+ ### Return type
294
+
295
+ [**ListWebhookEndpointsResponse**](ListWebhookEndpointsResponse.md)
296
+
297
+ ### Authorization
298
+
299
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
300
+
301
+ ### HTTP request headers
302
+
303
+ - **Content-Type**: Not defined
304
+ - **Accept**: application/json
305
+
306
+
307
+ ## update_webhook_endpoint
308
+
309
+ > <WebhookEndpoint> update_webhook_endpoint(x_api_version, x_account_id, id, create_webhook_endpoint_request)
310
+
311
+ Update a webhook endpoint by ID
312
+
313
+ ### Examples
314
+
315
+ ```ruby
316
+ require 'time'
317
+ require 'subfi_pay'
318
+ # setup authorization
319
+ SubFiPay.configure do |config|
320
+ # Configure API key authorization: ApiKeyAuth
321
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
322
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
323
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
324
+ end
325
+
326
+ api_instance = SubFiPay::WebhookEndpointsApi.new
327
+ x_api_version = 'x_api_version_example' # String |
328
+ x_account_id = 'x_account_id_example' # String |
329
+ id = 'id_example' # String |
330
+ create_webhook_endpoint_request = SubFiPay::CreateWebhookEndpointRequest.new # CreateWebhookEndpointRequest |
331
+
332
+ begin
333
+ # Update a webhook endpoint by ID
334
+ result = api_instance.update_webhook_endpoint(x_api_version, x_account_id, id, create_webhook_endpoint_request)
335
+ p result
336
+ rescue SubFiPay::ApiError => e
337
+ puts "Error when calling WebhookEndpointsApi->update_webhook_endpoint: #{e}"
338
+ end
339
+ ```
340
+
341
+ #### Using the update_webhook_endpoint_with_http_info variant
342
+
343
+ This returns an Array which contains the response data, status code and headers.
344
+
345
+ > <Array(<WebhookEndpoint>, Integer, Hash)> update_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, create_webhook_endpoint_request)
346
+
347
+ ```ruby
348
+ begin
349
+ # Update a webhook endpoint by ID
350
+ data, status_code, headers = api_instance.update_webhook_endpoint_with_http_info(x_api_version, x_account_id, id, create_webhook_endpoint_request)
351
+ p status_code # => 2xx
352
+ p headers # => { ... }
353
+ p data # => <WebhookEndpoint>
354
+ rescue SubFiPay::ApiError => e
355
+ puts "Error when calling WebhookEndpointsApi->update_webhook_endpoint_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** | | |
366
+ | **create_webhook_endpoint_request** | [**CreateWebhookEndpointRequest**](CreateWebhookEndpointRequest.md) | | |
367
+
368
+ ### Return type
369
+
370
+ [**WebhookEndpoint**](WebhookEndpoint.md)
371
+
372
+ ### Authorization
373
+
374
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
375
+
376
+ ### HTTP request headers
377
+
378
+ - **Content-Type**: application/json
379
+ - **Accept**: application/json
380
+