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,239 @@
1
+ # SubFiPay::PaymentMethodsApi
2
+
3
+ All URIs are relative to *https://pay-sandbox.subfi.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_payment_method**](PaymentMethodsApi.md#create_payment_method) | **POST** /payment_methods | Create a payment method |
8
+ | [**get_payment_method**](PaymentMethodsApi.md#get_payment_method) | **GET** /payment_methods/{id} | Retrieve a payment method |
9
+ | [**list_payment_methods**](PaymentMethodsApi.md#list_payment_methods) | **GET** /payment_methods | List all payment methods |
10
+
11
+
12
+ ## create_payment_method
13
+
14
+ > <PaymentMethodResponse> create_payment_method(x_api_version, x_account_id, payment_method_attributes, opts)
15
+
16
+ Create a payment method
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'subfi_pay'
23
+ # setup authorization
24
+ SubFiPay.configure do |config|
25
+ # Configure API key authorization: ApiKeyAuth
26
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = SubFiPay::PaymentMethodsApi.new
32
+ x_api_version = 'x_api_version_example' # String |
33
+ x_account_id = 'x_account_id_example' # String |
34
+ payment_method_attributes = SubFiPay::PaymentMethodAttributes.new({type: 'type_example'}) # PaymentMethodAttributes |
35
+ opts = {
36
+ x_idempotency_key: 'x_idempotency_key_example' # String |
37
+ }
38
+
39
+ begin
40
+ # Create a payment method
41
+ result = api_instance.create_payment_method(x_api_version, x_account_id, payment_method_attributes, opts)
42
+ p result
43
+ rescue SubFiPay::ApiError => e
44
+ puts "Error when calling PaymentMethodsApi->create_payment_method: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the create_payment_method_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<PaymentMethodResponse>, Integer, Hash)> create_payment_method_with_http_info(x_api_version, x_account_id, payment_method_attributes, opts)
53
+
54
+ ```ruby
55
+ begin
56
+ # Create a payment method
57
+ data, status_code, headers = api_instance.create_payment_method_with_http_info(x_api_version, x_account_id, payment_method_attributes, opts)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <PaymentMethodResponse>
61
+ rescue SubFiPay::ApiError => e
62
+ puts "Error when calling PaymentMethodsApi->create_payment_method_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **x_api_version** | **String** | | |
71
+ | **x_account_id** | **String** | | |
72
+ | **payment_method_attributes** | [**PaymentMethodAttributes**](PaymentMethodAttributes.md) | | |
73
+ | **x_idempotency_key** | **String** | | [optional] |
74
+
75
+ ### Return type
76
+
77
+ [**PaymentMethodResponse**](PaymentMethodResponse.md)
78
+
79
+ ### Authorization
80
+
81
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
82
+
83
+ ### HTTP request headers
84
+
85
+ - **Content-Type**: application/json
86
+ - **Accept**: application/json
87
+
88
+
89
+ ## get_payment_method
90
+
91
+ > <PaymentMethodResponse> get_payment_method(x_api_version, x_account_id, id)
92
+
93
+ Retrieve a payment method
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::PaymentMethodsApi.new
109
+ x_api_version = 'x_api_version_example' # String |
110
+ x_account_id = 'x_account_id_example' # String |
111
+ id = 'id_example' # String |
112
+
113
+ begin
114
+ # Retrieve a payment method
115
+ result = api_instance.get_payment_method(x_api_version, x_account_id, id)
116
+ p result
117
+ rescue SubFiPay::ApiError => e
118
+ puts "Error when calling PaymentMethodsApi->get_payment_method: #{e}"
119
+ end
120
+ ```
121
+
122
+ #### Using the get_payment_method_with_http_info variant
123
+
124
+ This returns an Array which contains the response data, status code and headers.
125
+
126
+ > <Array(<PaymentMethodResponse>, Integer, Hash)> get_payment_method_with_http_info(x_api_version, x_account_id, id)
127
+
128
+ ```ruby
129
+ begin
130
+ # Retrieve a payment method
131
+ data, status_code, headers = api_instance.get_payment_method_with_http_info(x_api_version, x_account_id, id)
132
+ p status_code # => 2xx
133
+ p headers # => { ... }
134
+ p data # => <PaymentMethodResponse>
135
+ rescue SubFiPay::ApiError => e
136
+ puts "Error when calling PaymentMethodsApi->get_payment_method_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** | | |
147
+
148
+ ### Return type
149
+
150
+ [**PaymentMethodResponse**](PaymentMethodResponse.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
+ ## list_payment_methods
163
+
164
+ > <ListPaymentMethodsResponse> list_payment_methods(x_api_version, x_account_id, customer_id, opts)
165
+
166
+ List all payment methods
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::PaymentMethodsApi.new
182
+ x_api_version = 'x_api_version_example' # String |
183
+ x_account_id = 'x_account_id_example' # String |
184
+ customer_id = 'customer_id_example' # String | The ID of the customer to filter payment methods by.
185
+ opts = {
186
+ page: 56, # Integer | The page of results to retrieve.
187
+ per_page: 56 # Integer | Number of results per page.
188
+ }
189
+
190
+ begin
191
+ # List all payment methods
192
+ result = api_instance.list_payment_methods(x_api_version, x_account_id, customer_id, opts)
193
+ p result
194
+ rescue SubFiPay::ApiError => e
195
+ puts "Error when calling PaymentMethodsApi->list_payment_methods: #{e}"
196
+ end
197
+ ```
198
+
199
+ #### Using the list_payment_methods_with_http_info variant
200
+
201
+ This returns an Array which contains the response data, status code and headers.
202
+
203
+ > <Array(<ListPaymentMethodsResponse>, Integer, Hash)> list_payment_methods_with_http_info(x_api_version, x_account_id, customer_id, opts)
204
+
205
+ ```ruby
206
+ begin
207
+ # List all payment methods
208
+ data, status_code, headers = api_instance.list_payment_methods_with_http_info(x_api_version, x_account_id, customer_id, opts)
209
+ p status_code # => 2xx
210
+ p headers # => { ... }
211
+ p data # => <ListPaymentMethodsResponse>
212
+ rescue SubFiPay::ApiError => e
213
+ puts "Error when calling PaymentMethodsApi->list_payment_methods_with_http_info: #{e}"
214
+ end
215
+ ```
216
+
217
+ ### Parameters
218
+
219
+ | Name | Type | Description | Notes |
220
+ | ---- | ---- | ----------- | ----- |
221
+ | **x_api_version** | **String** | | |
222
+ | **x_account_id** | **String** | | |
223
+ | **customer_id** | **String** | The ID of the customer to filter payment methods by. | |
224
+ | **page** | **Integer** | The page of results to retrieve. | [optional] |
225
+ | **per_page** | **Integer** | Number of results per page. | [optional] |
226
+
227
+ ### Return type
228
+
229
+ [**ListPaymentMethodsResponse**](ListPaymentMethodsResponse.md)
230
+
231
+ ### Authorization
232
+
233
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
234
+
235
+ ### HTTP request headers
236
+
237
+ - **Content-Type**: Not defined
238
+ - **Accept**: application/json
239
+
@@ -0,0 +1,20 @@
1
+ # SubFiPay::RefundAttributes
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount** | **Integer** | | [optional] |
8
+ | **charge_id** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'subfi_pay'
14
+
15
+ instance = SubFiPay::RefundAttributes.new(
16
+ amount: null,
17
+ charge_id: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,30 @@
1
+ # SubFiPay::RefundResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **failure_reason** | **String** | | [optional] |
9
+ | **state** | **String** | | [optional] |
10
+ | **created_at** | **Time** | | [optional] |
11
+ | **connected_account_id** | **String** | | [optional] |
12
+ | **amount** | **Integer** | | [optional] |
13
+ | **charge_id** | **String** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'subfi_pay'
19
+
20
+ instance = SubFiPay::RefundResponse.new(
21
+ id: null,
22
+ failure_reason: null,
23
+ state: null,
24
+ created_at: null,
25
+ connected_account_id: null,
26
+ amount: null,
27
+ charge_id: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,311 @@
1
+ # SubFiPay::RefundsApi
2
+
3
+ All URIs are relative to *https://pay-sandbox.subfi.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**cancel_refund**](RefundsApi.md#cancel_refund) | **PUT** /refunds/{id}/cancel | Cancel a refund |
8
+ | [**create_refund**](RefundsApi.md#create_refund) | **POST** /refunds | Create a refund |
9
+ | [**get_refund**](RefundsApi.md#get_refund) | **GET** /refunds/{id} | Get a refund by ID |
10
+ | [**list_refunds**](RefundsApi.md#list_refunds) | **GET** /refunds | List refunds for a Charge |
11
+
12
+
13
+ ## cancel_refund
14
+
15
+ > <RefundResponse> cancel_refund(x_api_version, x_account_id, id)
16
+
17
+ Cancel a refund
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'subfi_pay'
24
+ # setup authorization
25
+ SubFiPay.configure do |config|
26
+ # Configure API key authorization: ApiKeyAuth
27
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = SubFiPay::RefundsApi.new
33
+ x_api_version = 'x_api_version_example' # String |
34
+ x_account_id = 'x_account_id_example' # String |
35
+ id = 'id_example' # String | The ID of the refund to cancel.
36
+
37
+ begin
38
+ # Cancel a refund
39
+ result = api_instance.cancel_refund(x_api_version, x_account_id, id)
40
+ p result
41
+ rescue SubFiPay::ApiError => e
42
+ puts "Error when calling RefundsApi->cancel_refund: #{e}"
43
+ end
44
+ ```
45
+
46
+ #### Using the cancel_refund_with_http_info variant
47
+
48
+ This returns an Array which contains the response data, status code and headers.
49
+
50
+ > <Array(<RefundResponse>, Integer, Hash)> cancel_refund_with_http_info(x_api_version, x_account_id, id)
51
+
52
+ ```ruby
53
+ begin
54
+ # Cancel a refund
55
+ data, status_code, headers = api_instance.cancel_refund_with_http_info(x_api_version, x_account_id, id)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => <RefundResponse>
59
+ rescue SubFiPay::ApiError => e
60
+ puts "Error when calling RefundsApi->cancel_refund_with_http_info: #{e}"
61
+ end
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **x_api_version** | **String** | | |
69
+ | **x_account_id** | **String** | | |
70
+ | **id** | **String** | The ID of the refund to cancel. | |
71
+
72
+ ### Return type
73
+
74
+ [**RefundResponse**](RefundResponse.md)
75
+
76
+ ### Authorization
77
+
78
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: Not defined
83
+ - **Accept**: application/json
84
+
85
+
86
+ ## create_refund
87
+
88
+ > <RefundResponse> create_refund(x_api_version, x_account_id, refund_attributes, opts)
89
+
90
+ Create a refund
91
+
92
+ ### Examples
93
+
94
+ ```ruby
95
+ require 'time'
96
+ require 'subfi_pay'
97
+ # setup authorization
98
+ SubFiPay.configure do |config|
99
+ # Configure API key authorization: ApiKeyAuth
100
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
101
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
102
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
103
+ end
104
+
105
+ api_instance = SubFiPay::RefundsApi.new
106
+ x_api_version = 'x_api_version_example' # String |
107
+ x_account_id = 'x_account_id_example' # String |
108
+ refund_attributes = SubFiPay::RefundAttributes.new({charge_id: 'charge_id_example'}) # RefundAttributes |
109
+ opts = {
110
+ x_idempotency_key: 'x_idempotency_key_example' # String |
111
+ }
112
+
113
+ begin
114
+ # Create a refund
115
+ result = api_instance.create_refund(x_api_version, x_account_id, refund_attributes, opts)
116
+ p result
117
+ rescue SubFiPay::ApiError => e
118
+ puts "Error when calling RefundsApi->create_refund: #{e}"
119
+ end
120
+ ```
121
+
122
+ #### Using the create_refund_with_http_info variant
123
+
124
+ This returns an Array which contains the response data, status code and headers.
125
+
126
+ > <Array(<RefundResponse>, Integer, Hash)> create_refund_with_http_info(x_api_version, x_account_id, refund_attributes, opts)
127
+
128
+ ```ruby
129
+ begin
130
+ # Create a refund
131
+ data, status_code, headers = api_instance.create_refund_with_http_info(x_api_version, x_account_id, refund_attributes, opts)
132
+ p status_code # => 2xx
133
+ p headers # => { ... }
134
+ p data # => <RefundResponse>
135
+ rescue SubFiPay::ApiError => e
136
+ puts "Error when calling RefundsApi->create_refund_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
+ | **refund_attributes** | [**RefundAttributes**](RefundAttributes.md) | | |
147
+ | **x_idempotency_key** | **String** | | [optional] |
148
+
149
+ ### Return type
150
+
151
+ [**RefundResponse**](RefundResponse.md)
152
+
153
+ ### Authorization
154
+
155
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
156
+
157
+ ### HTTP request headers
158
+
159
+ - **Content-Type**: application/json
160
+ - **Accept**: application/json
161
+
162
+
163
+ ## get_refund
164
+
165
+ > <RefundResponse> get_refund(x_api_version, x_account_id, id, opts)
166
+
167
+ Get a refund by ID
168
+
169
+ ### Examples
170
+
171
+ ```ruby
172
+ require 'time'
173
+ require 'subfi_pay'
174
+ # setup authorization
175
+ SubFiPay.configure do |config|
176
+ # Configure API key authorization: ApiKeyAuth
177
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
178
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
179
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
180
+ end
181
+
182
+ api_instance = SubFiPay::RefundsApi.new
183
+ x_api_version = 'x_api_version_example' # String |
184
+ x_account_id = 'x_account_id_example' # String |
185
+ id = 'id_example' # String | The ID of the refund to retrieve.
186
+ opts = {
187
+ connected_account_id: 'connected_account_id_example' # String | Filter results by sub_merchant ID.
188
+ }
189
+
190
+ begin
191
+ # Get a refund by ID
192
+ result = api_instance.get_refund(x_api_version, x_account_id, id, opts)
193
+ p result
194
+ rescue SubFiPay::ApiError => e
195
+ puts "Error when calling RefundsApi->get_refund: #{e}"
196
+ end
197
+ ```
198
+
199
+ #### Using the get_refund_with_http_info variant
200
+
201
+ This returns an Array which contains the response data, status code and headers.
202
+
203
+ > <Array(<RefundResponse>, Integer, Hash)> get_refund_with_http_info(x_api_version, x_account_id, id, opts)
204
+
205
+ ```ruby
206
+ begin
207
+ # Get a refund by ID
208
+ data, status_code, headers = api_instance.get_refund_with_http_info(x_api_version, x_account_id, id, opts)
209
+ p status_code # => 2xx
210
+ p headers # => { ... }
211
+ p data # => <RefundResponse>
212
+ rescue SubFiPay::ApiError => e
213
+ puts "Error when calling RefundsApi->get_refund_with_http_info: #{e}"
214
+ end
215
+ ```
216
+
217
+ ### Parameters
218
+
219
+ | Name | Type | Description | Notes |
220
+ | ---- | ---- | ----------- | ----- |
221
+ | **x_api_version** | **String** | | |
222
+ | **x_account_id** | **String** | | |
223
+ | **id** | **String** | The ID of the refund to retrieve. | |
224
+ | **connected_account_id** | **String** | Filter results by sub_merchant ID. | [optional] |
225
+
226
+ ### Return type
227
+
228
+ [**RefundResponse**](RefundResponse.md)
229
+
230
+ ### Authorization
231
+
232
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
233
+
234
+ ### HTTP request headers
235
+
236
+ - **Content-Type**: Not defined
237
+ - **Accept**: application/json
238
+
239
+
240
+ ## list_refunds
241
+
242
+ > <ListRefundsResponse> list_refunds(x_api_version, x_account_id, charge_id)
243
+
244
+ List refunds for a Charge
245
+
246
+ ### Examples
247
+
248
+ ```ruby
249
+ require 'time'
250
+ require 'subfi_pay'
251
+ # setup authorization
252
+ SubFiPay.configure do |config|
253
+ # Configure API key authorization: ApiKeyAuth
254
+ config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
255
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
256
+ # config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
257
+ end
258
+
259
+ api_instance = SubFiPay::RefundsApi.new
260
+ x_api_version = 'x_api_version_example' # String |
261
+ x_account_id = 'x_account_id_example' # String |
262
+ charge_id = 'charge_id_example' # String | The ID of the charge to which this refund belongs.
263
+
264
+ begin
265
+ # List refunds for a Charge
266
+ result = api_instance.list_refunds(x_api_version, x_account_id, charge_id)
267
+ p result
268
+ rescue SubFiPay::ApiError => e
269
+ puts "Error when calling RefundsApi->list_refunds: #{e}"
270
+ end
271
+ ```
272
+
273
+ #### Using the list_refunds_with_http_info variant
274
+
275
+ This returns an Array which contains the response data, status code and headers.
276
+
277
+ > <Array(<ListRefundsResponse>, Integer, Hash)> list_refunds_with_http_info(x_api_version, x_account_id, charge_id)
278
+
279
+ ```ruby
280
+ begin
281
+ # List refunds for a Charge
282
+ data, status_code, headers = api_instance.list_refunds_with_http_info(x_api_version, x_account_id, charge_id)
283
+ p status_code # => 2xx
284
+ p headers # => { ... }
285
+ p data # => <ListRefundsResponse>
286
+ rescue SubFiPay::ApiError => e
287
+ puts "Error when calling RefundsApi->list_refunds_with_http_info: #{e}"
288
+ end
289
+ ```
290
+
291
+ ### Parameters
292
+
293
+ | Name | Type | Description | Notes |
294
+ | ---- | ---- | ----------- | ----- |
295
+ | **x_api_version** | **String** | | |
296
+ | **x_account_id** | **String** | | |
297
+ | **charge_id** | **String** | The ID of the charge to which this refund belongs. | |
298
+
299
+ ### Return type
300
+
301
+ [**ListRefundsResponse**](ListRefundsResponse.md)
302
+
303
+ ### Authorization
304
+
305
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
306
+
307
+ ### HTTP request headers
308
+
309
+ - **Content-Type**: Not defined
310
+ - **Accept**: application/json
311
+
@@ -0,0 +1,18 @@
1
+ # SubFiPay::RollAccessKeyAttributes
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **access_key** | [**RollAccessKeyAttributesAccessKey**](RollAccessKeyAttributesAccessKey.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'subfi_pay'
13
+
14
+ instance = SubFiPay::RollAccessKeyAttributes.new(
15
+ access_key: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # SubFiPay::RollAccessKeyAttributesAccessKey
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **expires_at** | **Time** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'subfi_pay'
13
+
14
+ instance = SubFiPay::RollAccessKeyAttributesAccessKey.new(
15
+ expires_at: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # SubFiPay::RollAccessKeyRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **access_key** | [**RollAccessKeyRequestAccessKey**](RollAccessKeyRequestAccessKey.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'subfi_pay'
13
+
14
+ instance = SubFiPay::RollAccessKeyRequest.new(
15
+ access_key: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # SubFiPay::RollAccessKeyRequestAccessKey
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **expires_at** | **Time** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'subfi_pay'
13
+
14
+ instance = SubFiPay::RollAccessKeyRequestAccessKey.new(
15
+ expires_at: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,30 @@
1
+ # SubFiPay::SubscriptionAttributes
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::SubscriptionAttributes.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
+