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,113 @@
1
+ =begin
2
+ #SubFi Pay API
3
+
4
+ #API for SubFi Pay services
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.7.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for SubFiPay::SubscriptionsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'SubscriptionsApi' do
20
+ let(:api_instance) { SubFiPay::SubscriptionsApi.new }
21
+ let(:api_key) { Faker::Alphanumeric.alphanumeric(number: 32) }
22
+ let(:api_version) { "0.1.0" }
23
+ let(:account_id) { Faker::Alphanumeric.alphanumeric(number: 32) }
24
+ let(:config) do
25
+ api_instance.api_client.config.tap do |c|
26
+ c.api_key['ApiKeyAuth'] = api_key
27
+ c.host = "localhost:3000"
28
+ c.scheme = "http"
29
+ end
30
+ end
31
+ let(:path) { "/subscriptions" }
32
+ let(:request_headers) do
33
+ {
34
+ 'Accept' => 'application/json',
35
+ "Content-Type" => "application/json",
36
+ 'X-Api-Version' => api_version,
37
+ 'X-Api-Key' => api_key,
38
+ 'X-Account-Id' => account_id
39
+ }
40
+ end
41
+ let(:response_headers) do
42
+ {
43
+ 'Accept' => 'application/json',
44
+ "Content-Type" => "application/json"
45
+ }
46
+ end
47
+
48
+ describe 'test an instance of SubscriptionsApi' do
49
+ it 'should create an instance of SubscriptionsApi' do
50
+ expect(api_instance).to be_instance_of(SubFiPay::SubscriptionsApi)
51
+ end
52
+ end
53
+
54
+ # unit tests for create_subscription
55
+ # Create a new subscription
56
+ # @param x_api_version
57
+ # @param subscription_create_request
58
+ # @param [Hash] opts the optional parameters
59
+ # @return [SubscriptionResponse]
60
+ describe 'create_subscription test' do
61
+ let(:body) do
62
+ {
63
+ subscription: {
64
+ plan_id: Faker::Alphanumeric.alphanumeric(number: 32),
65
+ customer_id: Faker::Alphanumeric.alphanumeric(number: 32)
66
+ }
67
+ }
68
+ end
69
+
70
+ before do
71
+ stub_request(:post, [config.host, path].join)
72
+ .with(headers: request_headers, body: body.to_json)
73
+ .to_return(
74
+ status: 201,
75
+ body: fixture("subscriptions/create_201.json"),
76
+ headers: response_headers
77
+ )
78
+ end
79
+
80
+ it 'should work' do
81
+ res = api_instance.create_subscription(api_version, account_id, body)
82
+
83
+ expect(res).to be_instance_of(SubFiPay::SubscriptionResponse)
84
+ end
85
+ end
86
+
87
+ # unit tests for get_subscription
88
+ # Retrieve a subscription by ID
89
+ # @param x_api_version
90
+ # @param id The ID of the subscription to retrieve
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [SubscriptionResponse]
93
+ describe 'get_subscription test' do
94
+ let(:subscription_id) { Faker::Alphanumeric.alphanumeric(number: 32) }
95
+
96
+ before do
97
+ stub_request(:get, [config.host, "#{path}/#{subscription_id}"].join)
98
+ .with(headers: request_headers)
99
+ .to_return(
100
+ status: 200,
101
+ body: fixture("subscriptions/show_200.json"),
102
+ headers: response_headers
103
+ )
104
+ end
105
+
106
+ it 'should work' do
107
+ res = api_instance.get_subscription(api_version, account_id, subscription_id)
108
+
109
+ expect(res).to be_instance_of(SubFiPay::SubscriptionResponse)
110
+ end
111
+ end
112
+
113
+ end
@@ -0,0 +1,198 @@
1
+ =begin
2
+ #SubFi Pay API
3
+
4
+ #API for SubFi Pay services
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.7.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for SubFiPay::WebhookEndpointsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'WebhookEndpointsApi' do
20
+ let(:api_instance) { SubFiPay::WebhookEndpointsApi.new }
21
+ let(:api_key) { Faker::Alphanumeric.alphanumeric(number: 32) }
22
+ let(:api_version) { "0.1.0" }
23
+ let(:account_id) { Faker::Alphanumeric.alphanumeric(number: 32) }
24
+ let(:config) do
25
+ api_instance.api_client.config.tap do |c|
26
+ c.api_key['ApiKeyAuth'] = api_key
27
+ c.host = "localhost:3000"
28
+ c.scheme = "http"
29
+ end
30
+ end
31
+ let(:path) { "/webhook_endpoints" }
32
+ let(:request_headers) do
33
+ {
34
+ "Content-Type" => "application/json",
35
+ 'X-Api-Version' => SubFiPay::VERSION,
36
+ 'X-Api-Key' => api_key,
37
+ 'Expect' => '',
38
+ }
39
+ end
40
+ let(:response_headers) do
41
+ {
42
+ 'Accept' => 'application/json',
43
+ "Content-Type" => "application/json"
44
+ }
45
+ end
46
+
47
+ describe 'test an instance of WebhookEndpointsApi' do
48
+ it 'should create an instance of WebhookEndpointsApi' do
49
+ expect(api_instance).to be_instance_of(SubFiPay::WebhookEndpointsApi)
50
+ end
51
+ end
52
+
53
+ # unit tests for create_webhook_endpoint
54
+ # Create a webhook endpoint
55
+ # @param x_api_version
56
+ # @param create_webhook_endpoint_request
57
+ # @param [Hash] opts the optional parameters
58
+ # @return [WebhookEndpoint]
59
+ describe 'create_webhook_endpoint test' do
60
+ let(:body) do
61
+ {
62
+ webhook_endpoint: {
63
+ url: Faker::Internet.url,
64
+ enabled_events: %w(payment_intent.created payment_intent.succeeded)
65
+ }
66
+ }
67
+ end
68
+
69
+ before do
70
+ stub_request(:post, [config.host, path].join)
71
+ .with(headers: request_headers)
72
+ .to_return(
73
+ status: 200,
74
+ body: fixture("webhook_endpoints/create_201.json"),
75
+ headers: response_headers
76
+ )
77
+ end
78
+
79
+ it 'should work' do
80
+ res = api_instance.create_webhook_endpoint(api_version, account_id, body)
81
+
82
+ expect(res).to be_instance_of(SubFiPay::WebhookEndpoint)
83
+ end
84
+ end
85
+
86
+ # unit tests for delete_webhook_endpoint
87
+ # Delete a webhook endpoint by ID
88
+ # @param x_api_version
89
+ # @param id
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [nil]
92
+ describe 'delete_webhook_endpoint test' do
93
+ let(:webhook_endpoint_id) { Faker::Alphanumeric.alphanumeric(number: 32) }
94
+
95
+ before do
96
+ stub_request(:delete, [config.host, "#{path}/#{webhook_endpoint_id}"].join)
97
+ .with(headers: request_headers)
98
+ .to_return(
99
+ status: 204,
100
+ body: "",
101
+ headers: response_headers
102
+ )
103
+ end
104
+
105
+ it 'should work' do
106
+ res = api_instance.delete_webhook_endpoint(api_version, account_id, webhook_endpoint_id)
107
+
108
+ expect(res).to be_nil
109
+ end
110
+ end
111
+
112
+ # unit tests for get_webhook_endpoint
113
+ # Retrieve a webhook endpoint by ID
114
+ # @param x_api_version
115
+ # @param id
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [WebhookEndpoint]
118
+ describe 'get_webhook_endpoint test' do
119
+ let(:webhook_endpoint_id) { Faker::Alphanumeric.alphanumeric(number: 32) }
120
+
121
+ before do
122
+ stub_request(:get, [config.host, "#{path}/#{webhook_endpoint_id}"].join)
123
+ .with(headers: request_headers)
124
+ .to_return(
125
+ status: 200,
126
+ body: fixture("webhook_endpoints/show_200.json"),
127
+ headers: response_headers
128
+ )
129
+ end
130
+
131
+ it 'should work' do
132
+ res = api_instance.get_webhook_endpoint(api_version, account_id, webhook_endpoint_id)
133
+
134
+ expect(res).to be_instance_of(SubFiPay::WebhookEndpoint)
135
+ end
136
+ end
137
+
138
+ # unit tests for list_webhook_endpoints
139
+ # List all webhook endpoints
140
+ # @param x_api_version
141
+ # @param [Hash] opts the optional parameters
142
+ # @option opts [Integer] :page The page of results to retrieve.
143
+ # @option opts [Integer] :per_page Number of results per page.
144
+ # @return [ListWebhookEndpointsResponse]
145
+ describe 'list_webhook_endpoints test' do
146
+ before do
147
+ stub_request(:get, [config.host, path].join)
148
+ .with(headers: request_headers)
149
+ .to_return(
150
+ status: 200,
151
+ body: fixture("webhook_endpoints/list_200.json"),
152
+ headers: response_headers
153
+ )
154
+ end
155
+
156
+ it 'should work' do
157
+ res = api_instance.list_webhook_endpoints(api_version, account_id)
158
+
159
+ expect(res).to be_instance_of(SubFiPay::ListWebhookEndpointsResponse)
160
+ end
161
+ end
162
+
163
+ # unit tests for update_webhook_endpoint
164
+ # Update a webhook endpoint by ID
165
+ # @param x_api_version
166
+ # @param id
167
+ # @param create_webhook_endpoint_request
168
+ # @param [Hash] opts the optional parameters
169
+ # @return [WebhookEndpoint]
170
+ describe 'update_webhook_endpoint test' do
171
+ let(:webhook_endpoint_id) { Faker::Alphanumeric.alphanumeric(number: 32) }
172
+
173
+ let(:body) do
174
+ {
175
+ webhook_endpoint: {
176
+ url: Faker::Internet.url,
177
+ enabled_events: %w(payment_intent.created payment_intent.succeeded)
178
+ }
179
+ }
180
+ end
181
+
182
+ before do
183
+ stub_request(:patch, [config.host, "#{path}/#{webhook_endpoint_id}"].join)
184
+ .with(headers: request_headers, body:)
185
+ .to_return(
186
+ status: 200,
187
+ body: fixture("webhook_endpoints/update_200.json"),
188
+ headers: response_headers
189
+ )
190
+ end
191
+
192
+ it 'should work' do
193
+ res = api_instance.update_webhook_endpoint(api_version, account_id, webhook_endpoint_id, body)
194
+
195
+ expect(res).to be_instance_of(SubFiPay::WebhookEndpoint)
196
+ end
197
+ end
198
+ end
@@ -0,0 +1,79 @@
1
+ =begin
2
+ #SubFi Pay API
3
+
4
+ #API for SubFi Pay services
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.7.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for SubFiPay::WebhookRequestsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'WebhookRequestsApi' do
20
+ let(:api_instance) { SubFiPay::WebhookRequestsApi.new }
21
+ let(:api_key) { Faker::Alphanumeric.alphanumeric(number: 32) }
22
+ let(:api_version) { "0.1.0" }
23
+ let(:account_id) { Faker::Number.number(digits: 10) }
24
+ let(:config) do
25
+ api_instance.api_client.config.tap do |c|
26
+ c.api_key['ApiKeyAuth'] = api_key
27
+ c.host = "localhost:3000"
28
+ c.scheme = "http"
29
+ end
30
+ end
31
+ let(:path) { "/webhook_requests" }
32
+ let(:request_headers) do
33
+ {
34
+ 'Accept' => 'application/json',
35
+ "Content-Type" => "application/json",
36
+ 'X-Api-Version' => api_version,
37
+ 'X-Api-Key' => api_key
38
+ }
39
+ end
40
+ let(:response_headers) do
41
+ {
42
+ 'Accept' => 'application/json',
43
+ "Content-Type" => "application/json"
44
+ }
45
+ end
46
+
47
+
48
+ describe 'test an instance of WebhookRequestsApi' do
49
+ it 'should create an instance of WebhookRequestsApi' do
50
+ expect(api_instance).to be_instance_of(SubFiPay::WebhookRequestsApi)
51
+ end
52
+ end
53
+
54
+ # unit tests for list_webhook_requests
55
+ # List all webhook requests
56
+ # @param x_api_version
57
+ # @param [Hash] opts the optional parameters
58
+ # @option opts [Integer] :page The page of results to retrieve.
59
+ # @option opts [Integer] :per_page Number of results per page.
60
+ # @return [ListWebhookRequestsResponse]
61
+ describe 'list_webhook_requests test' do
62
+ before do
63
+ stub_request(:get, [config.host, path].join)
64
+ .with(headers: request_headers)
65
+ .to_return(
66
+ status: 200,
67
+ body: fixture("webhook_requests/list_200.json"),
68
+ headers: response_headers
69
+ )
70
+ end
71
+
72
+ it 'should work' do
73
+ res = api_instance.list_webhook_requests(api_version, account_id)
74
+
75
+ expect(res).to be_instance_of(SubFiPay::ListWebhookRequestsResponse)
76
+ end
77
+ end
78
+
79
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+
5
+ RSpec.describe SubFiPay::Configuration do
6
+ let(:api_key) { Faker::Lorem.word }
7
+ let(:scheme) { "http" }
8
+ let(:host) { "localhost:3000" }
9
+
10
+ it "forwards config to SubFi object" do
11
+ SubFiPay.configure do |config|
12
+ config.api_key = api_key
13
+ config.scheme = scheme
14
+ config.host = host
15
+ end
16
+
17
+ client = SubFiPay::ApiClient.new
18
+
19
+ expect(client.config.api_key).to eq(api_key)
20
+ expect(client.config.scheme).to eq(scheme)
21
+ expect(client.config.host).to eq(host)
22
+ end
23
+ end
@@ -0,0 +1 @@
1
+ {"data":[{"id":"3422207a-b741-479c-8a25-a98a8233ba22","can_roll":true,"created_at":"2024-12-30T11:33:46-05:00","expires_at":null,"key":"priv_test_TfftrEMpeaWriZU2bwhJtxhw","last_used_at":null,"live":false,"type":"PrivateAccessKey","updated_at":"2024-12-30T11:33:46-05:00"},{"id":"b6d163cd-6cdc-4bc8-8784-1f0a2e2ba93f","can_roll":true,"created_at":"2024-12-30T11:33:46-05:00","expires_at":null,"key":"pub_test_yi1tsC3Q5ybRsGz9GwGrjXoZ","last_used_at":null,"live":false,"type":"PublicAccessKey","updated_at":"2024-12-30T11:33:46-05:00"}],"meta":{"current_page":1,"next_page":null,"prev_page":null,"first_page":true,"last_page":true,"total_pages":1}}
@@ -0,0 +1 @@
1
+ {"data":[{"id":"43ed573d-debc-48b6-8c74-f186b40bf649","can_roll":true,"created_at":"2024-12-30T11:33:46-05:00","expires_at":null,"key":"pub_test_GYAFvLcHZwUBBz39RqquYH45","last_used_at":null,"live":false,"type":"PublicAccessKey","updated_at":"2024-12-30T11:33:46-05:00"},{"id":"d4110ec1-82ad-41be-88b8-bea2bdcd926e","can_roll":true,"created_at":"2024-12-30T11:33:46-05:00","expires_at":null,"key":"priv_test_VY7ompKWJgs9qnBbtAR4xKFu","last_used_at":null,"live":false,"type":"PrivateAccessKey","updated_at":"2024-12-30T11:33:46-05:00"}],"meta":{"current_page":1,"next_page":null,"prev_page":null,"first_page":true,"last_page":true,"total_pages":1}}
@@ -0,0 +1 @@
1
+ {"id":"8eb1086b-eed3-4f1f-bf04-c5a9103a8562","active":true,"created_at":"2024-12-30T16:34:42Z","name":"dolor","updated_at":"2024-12-30T16:34:42Z","worldpay_merchant_id":"sit"}
@@ -0,0 +1 @@
1
+ {"data":[{"id":"916cb159-3551-43bc-bf83-0d651e46cf8e","active":true,"created_at":"2024-12-30T16:34:42Z","name":"Mertz, Hand and Berge52039","updated_at":"2024-12-30T16:34:42Z","worldpay_merchant_id":null}],"meta":{"current_page":1,"next_page":null,"prev_page":null,"first_page":true,"last_page":true,"total_pages":1}}
@@ -0,0 +1 @@
1
+ {"id":"087abc5c-caff-4e3e-b4be-2dbc114fd2bd","active":true,"created_at":"2024-12-30T16:34:42Z","name":"Ortiz LLC19876","updated_at":"2024-12-30T16:34:42Z","worldpay_merchant_id":null}
@@ -0,0 +1,69 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "id": "504ca58d-565a-4ff3-9d1c-bd2083136a0e",
5
+ "amount": 518032,
6
+ "charge_id": "3f073e08-bf42-47ad-ab83-c714c1cf1ada",
7
+ "created_at": "2024-07-10T12:09:01-04:00",
8
+ "fee": 0,
9
+ "net": 518032,
10
+ "refund_id": null,
11
+ "state": "processing",
12
+ "connected_account_id": "05868256-abe7-41a4-bd61-4af7c7b6b5f7",
13
+ "type": "charge",
14
+ "updated_at": "2024-07-10T12:09:01-04:00"
15
+ },
16
+ {
17
+ "id": "16aae7e2-c482-4191-ab4e-9c86dc70d2cb",
18
+ "amount": 518032,
19
+ "charge_id": "3f073e08-bf42-47ad-ab83-c714c1cf1ada",
20
+ "created_at": "2024-07-10T12:09:01-04:00",
21
+ "fee": 0,
22
+ "net": 518032,
23
+ "refund_id": null,
24
+ "state": "authorized",
25
+ "connected_account_id": "05868256-abe7-41a4-bd61-4af7c7b6b5f7",
26
+ "type": "charge",
27
+ "updated_at": "2024-07-10T12:09:01-04:00"
28
+ },
29
+ {
30
+ "id": "07f2cd7a-8b94-4ff3-8430-1786c15fb1fb",
31
+ "amount": 518032,
32
+ "charge_id": "3f073e08-bf42-47ad-ab83-c714c1cf1ada",
33
+ "created_at": "2024-07-10T12:09:01-04:00",
34
+ "fee": 0,
35
+ "net": 518032,
36
+ "refund_id": null,
37
+ "state": "captured",
38
+ "connected_account_id": "05868256-abe7-41a4-bd61-4af7c7b6b5f7",
39
+ "type": "charge",
40
+ "updated_at": "2024-07-10T12:09:01-04:00"
41
+ },
42
+ {
43
+ "id": "7ebedca1-6d35-414a-9e33-df2a8370ac97",
44
+ "amount": -518032,
45
+ "charge_id": null,
46
+ "created_at": "2024-07-10T12:09:01-04:00",
47
+ "fee": 0,
48
+ "net": -518032,
49
+ "refund_id": "692d3fcf-030f-4677-8f24-126fad1a57ca",
50
+ "state": "processing",
51
+ "connected_account_id": "05868256-abe7-41a4-bd61-4af7c7b6b5f7",
52
+ "type": "refund",
53
+ "updated_at": "2024-07-10T12:09:01-04:00"
54
+ },
55
+ {
56
+ "id": "93d82dd6-e645-42aa-86b3-1dbd5258b8f0",
57
+ "amount": -518032,
58
+ "charge_id": null,
59
+ "created_at": "2024-07-10T12:09:01-04:00",
60
+ "fee": 0,
61
+ "net": -518032,
62
+ "refund_id": "692d3fcf-030f-4677-8f24-126fad1a57ca",
63
+ "state": "completed",
64
+ "connected_account_id": "05868256-abe7-41a4-bd61-4af7c7b6b5f7",
65
+ "type": "refund",
66
+ "updated_at": "2024-07-10T12:09:01-04:00"
67
+ }
68
+ ]
69
+ }
@@ -0,0 +1,39 @@
1
+ {"id": "f466e9aa-b783-4464-ae2f-3eb4ba4734fb",
2
+ "amount": 75013,
3
+ "captured_at": null,
4
+ "description": null,
5
+ "failure_reason": null,
6
+ "merchant_id": "2e98f79a-8277-4191-a318-0031d8ed2b28",
7
+ "payment_method":
8
+ {"id": "50a68d58-14b3-45e4-901e-45d55e452d79",
9
+ "billing_address":
10
+ {"address_line1": "980 Hyatt Course",
11
+ "address_line2": null,
12
+ "city": "New Isiahstad",
13
+ "country": "US",
14
+ "email": "normand.schneider@gleichner.example",
15
+ "first_name": "Raul",
16
+ "last_name": "Durgan",
17
+ "phone": "1619783601",
18
+ "postal_code": "192351986",
19
+ "state": "NC"},
20
+ "card_profile":
21
+ {"avs_check": "00",
22
+ "avs_check_message": null,
23
+ "brand": "visa",
24
+ "cvc_check": "M",
25
+ "cvc_check_message": null,
26
+ "exp_month": 1,
27
+ "exp_year": 2028,
28
+ "funding": null,
29
+ "last4": "9012",
30
+ "three_d_secure_supported": null,
31
+ "token": "4123456789012"},
32
+ "created_at": "2024-09-17T20:39:20Z",
33
+ "metadata": null,
34
+ "partner_id": "23a7c1d3e79270701fe9",
35
+ "sub_merchant_id": null,
36
+ "updated_at": "2024-09-17T20:39:20Z"},
37
+ "processor_id": null,
38
+ "state": "processing",
39
+ "sub_merchant_id": "a19bd11f-2715-4176-9508-64086548c286"}
@@ -0,0 +1 @@
1
+ {"data":[{"id":"49c2e565-125c-429d-9220-a5f116e759e5","account_id":"3d794cba-cc16-4893-b232-274b2c16af5b","amount":73944,"created_at":"2024-12-30T11:33:46-05:00","description":"Nisi vero quo expedita.","failure_reason":null,"payment_method":{"id":"917b5048-db08-45e2-94b5-7054a876c542","billing_address":{"address_line1":"293 Funk Centers","address_line2":null,"city":"South Lydatown","country":"US","email":"eldon_yost@armstrong.example","first_name":"Christine","last_name":"Larson","phone":null,"postal_code":"18024","state":"MA"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:46-05:00","customer_id":"e7ee4e81-dfd7-4ec8-bcad-d668f1dc3ea8","metadata":null,"updated_at":"2024-12-30T11:33:46-05:00"},"processor_transaction_id":"RnkX7W74m4Q5iJ","refunds":[],"state":"succeeded","succeeded_at":"2024-12-30 11:33:46 -0500","updated_at":"2024-12-30T11:33:46-05:00"},{"id":"605b3db9-2df7-41b5-8284-fc4451afb643","account_id":"3d794cba-cc16-4893-b232-274b2c16af5b","amount":11095,"created_at":"2024-12-30T11:33:46-05:00","description":"Suscipit repellat sunt enim.","failure_reason":null,"payment_method":{"id":"70ceedd9-02da-4c3b-8f20-8452fa6b305f","billing_address":{"address_line1":"355 Hettinger Circles","address_line2":null,"city":"Maximinaberg","country":"US","email":"eddy@kutch.test","first_name":"Cyndi","last_name":"Skiles","phone":null,"postal_code":"207908192","state":"IA"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:46-05:00","customer_id":"82838aa0-566f-4cb8-8107-3cef71be62ec","metadata":null,"updated_at":"2024-12-30T11:33:46-05:00"},"processor_transaction_id":"DSjB6fw0y3UrP","refunds":[],"state":"succeeded","succeeded_at":"2024-12-30 11:33:46 -0500","updated_at":"2024-12-30T11:33:46-05:00"}],"meta":{"current_page":1,"next_page":null,"prev_page":null,"first_page":true,"last_page":true,"total_pages":1}}
@@ -0,0 +1 @@
1
+ {"id":"1502cb6b-676c-45ab-b3d2-d48814668ea0","account_id":"a10ea4bd-86c0-4521-be65-ccbed17d03e7","amount":69426,"created_at":"2024-12-30T11:33:46-05:00","description":"Voluptatem officiis cupiditate saepe.","failure_reason":null,"payment_method":{"id":"6db994f1-d908-4117-9d98-b5bb4c487e98","billing_address":{"address_line1":"707 Abshire Ranch","address_line2":null,"city":"West Sandy","country":"US","email":"jimmy@grady.example","first_name":"Henry","last_name":"Blick","phone":null,"postal_code":"33262","state":"OR"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:46-05:00","customer_id":"61cdcfa3-abd9-41fe-9d4c-54eb2780c62e","metadata":null,"updated_at":"2024-12-30T11:33:46-05:00"},"processor_transaction_id":"jlqJr4zjZ","refunds":[],"state":"succeeded","succeeded_at":"2024-12-30 11:33:46 -0500","updated_at":"2024-12-30T11:33:46-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"a65b2506-a50d-48d8-993e-2dc18d5e57de","created_at":"2024-12-30T11:33:46-05:00","default_payment_method_id":null,"email":"elias.kling@stracke.test","metadata":{"foo":"bar"},"name":"Miss Dollie Altenwerth","phone":null,"updated_at":"2024-12-30T11:33:46-05:00"}
@@ -0,0 +1 @@
1
+ {"data":[{"id":"70025092-dbd1-407f-9534-355b022b77de","created_at":"2024-12-30T11:33:46-05:00","default_payment_method_id":null,"email":"hal@farrell.example","metadata":null,"name":"Serafina Hickle","phone":null,"updated_at":"2024-12-30T11:33:46-05:00"},{"id":"ecc51528-292b-4be9-ac16-9ade82c10acb","created_at":"2024-12-30T11:33:46-05:00","default_payment_method_id":null,"email":"jame@green-fisher.example","metadata":null,"name":"Dudley Hodkiewicz","phone":null,"updated_at":"2024-12-30T11:33:46-05:00"}],"meta":{"current_page":1,"next_page":null,"prev_page":null,"first_page":true,"last_page":true,"total_pages":1}}
@@ -0,0 +1 @@
1
+ {"id":"c3846e3c-45a9-4a63-8a35-4ec10321ec23","created_at":"2024-12-30T11:33:46-05:00","default_payment_method_id":null,"email":"brunilda@white-bruen.example","metadata":null,"name":"The Hon. Antony Rolfson","phone":null,"updated_at":"2024-12-30T11:33:46-05:00"}
@@ -0,0 +1 @@
1
+ {"data":[{"id":"3792406e-dff9-4036-bcd2-0e5611c447ad","account_id":"90558b80-0461-467b-a299-a88cac27e35f","created_at":"2024-12-30T11:33:46-05:00","data":{"autem":"vitae"},"event":"payment_intent.requires_payment_method","updated_at":"2024-12-30T11:33:46-05:00"},{"id":"d14d7906-b6b6-4eeb-8705-0473ae6dcfa0","account_id":"90558b80-0461-467b-a299-a88cac27e35f","created_at":"2024-12-30T11:33:46-05:00","data":{"dolores":"aliquid"},"event":"refund.succeeded","updated_at":"2024-12-30T11:33:46-05:00"}],"meta":{"current_page":1,"next_page":null,"prev_page":null,"first_page":true,"last_page":true,"total_pages":1}}
@@ -0,0 +1 @@
1
+ {"id":"e854c22f-5a0c-47df-a1d8-90e9726bf74d","account_id":"d9488a0d-610a-4a91-b685-79f143912149","created_at":"2024-12-30T11:33:46-05:00","data":{"omnis":"cum"},"event":"refund.failed","updated_at":"2024-12-30T11:33:46-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"8bbc7d2b-56e4-413f-89d1-e18fc32933ae","active_charge_id":null,"active_payment_method_id":"f8782e9a-ddf4-4677-a354-e60af615601f","amount":55782,"can_refund":null,"can_void":true,"capture_method":"automatic","charges":[],"created_at":"2024-12-30T11:33:47-05:00","description":"Voluptate ut rerum sed.","metadata":null,"payment_methods":[{"id":"f8782e9a-ddf4-4677-a354-e60af615601f","billing_address":{"address_line1":"413 Donn Ferry","address_line2":null,"city":"Port Harris","country":"US","email":"mellisa_schmeler@gleason-pollich.test","first_name":"Max","last_name":"Leannon","phone":null,"postal_code":"721142341","state":"IA"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"52bd6b78-1ff8-497c-ab3e-7e05a8b0563f","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"}],"state":"cancelled","updated_at":"2024-12-30T11:33:47-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"052e73fb-93b7-435a-b60b-2d7ff9fcad74","active_charge_id":"8ccef1c4-4e7f-4bf9-94e9-95f6a996571e","active_payment_method_id":"dcde9df4-8096-4685-9709-029998477cc3","amount":42976,"can_refund":false,"can_void":true,"capture_method":"manual","charges":[{"id":"8ccef1c4-4e7f-4bf9-94e9-95f6a996571e","account_id":"736043c2-31f5-4309-848f-06024c662c28","amount":42976,"created_at":"2024-12-30T11:33:47-05:00","description":"Vero ullam quo repudiandae.","failure_reason":null,"payment_method":{"id":"dcde9df4-8096-4685-9709-029998477cc3","billing_address":{"address_line1":"395 Catrina Underpass","address_line2":null,"city":"Port Ward","country":"US","email":"rachelle@kilback-connelly.example","first_name":"Verline","last_name":"Hintz","phone":null,"postal_code":"099781186","state":"ME"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"a3da22fa-cd3d-48c9-8d3b-cef88eb4aa30","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"},"processor_transaction_id":"PaxMM9XkW3","refunds":[],"state":"processing","succeeded_at":null,"updated_at":"2024-12-30T11:33:47-05:00"}],"created_at":"2024-12-30T11:33:47-05:00","description":"Vero ullam quo repudiandae.","metadata":null,"payment_methods":[{"id":"dcde9df4-8096-4685-9709-029998477cc3","billing_address":{"address_line1":"395 Catrina Underpass","address_line2":null,"city":"Port Ward","country":"US","email":"rachelle@kilback-connelly.example","first_name":"Verline","last_name":"Hintz","phone":null,"postal_code":"099781186","state":"ME"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"a3da22fa-cd3d-48c9-8d3b-cef88eb4aa30","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"}],"state":"processing_capture","updated_at":"2024-12-30T11:33:47-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"b05e38b7-10ef-4d49-8266-95bc5096370e","active_charge_id":null,"active_payment_method_id":"e9cb5e89-167f-4ad4-a22d-5f8e9ae9be68","amount":53458,"can_refund":null,"can_void":true,"capture_method":"automatic","charges":[],"created_at":"2024-12-30T11:33:47-05:00","description":"Quaerat quas minima tempora.","metadata":null,"payment_methods":[{"id":"e9cb5e89-167f-4ad4-a22d-5f8e9ae9be68","billing_address":{"address_line1":"196 Justin Isle","address_line2":null,"city":"Samview","country":"US","email":"graig_aufderhar@homenick.example","first_name":"Enoch","last_name":"Langworth","phone":null,"postal_code":"068853997","state":"RI"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"8832b254-9cd9-4cda-aca8-ee023218a250","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"}],"state":"processing_sale","updated_at":"2024-12-30T11:33:47-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"26170819-6859-43cd-b1f3-5e80736e8a7b","active_charge_id":null,"active_payment_method_id":"be593d19-76ae-4b05-b01d-d5388ae32017","amount":36116,"can_refund":null,"can_void":true,"capture_method":"automatic_async","charges":[],"created_at":"2024-12-30T11:33:46-05:00","description":"Dolor at quaerat earum.","metadata":{"order_id":"1234567890"},"payment_methods":[{"id":"be593d19-76ae-4b05-b01d-d5388ae32017","billing_address":{"address_line1":"6450 Marvin Junctions","address_line2":null,"city":"Mikatown","country":"US","email":"tom@brekke-hauck.test","first_name":"Humberto","last_name":"Schmeler","phone":null,"postal_code":"278653386","state":"OR"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:46-05:00","customer_id":"a9cd3fab-d98d-4a6a-aa8c-45778759285e","metadata":null,"updated_at":"2024-12-30T11:33:46-05:00"}],"state":"requires_confirmation","updated_at":"2024-12-30T11:33:46-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"bf62eb42-5ab5-4256-956f-049c1d51fc7c","active_charge_id":null,"active_payment_method_id":null,"amount":10227,"can_refund":null,"can_void":true,"capture_method":"automatic","charges":[],"created_at":"2024-12-30T11:33:47-05:00","description":"Dolor dolorem ut omnis.","metadata":null,"payment_methods":[],"state":"requires_payment_method","updated_at":"2024-12-30T11:33:47-05:00"}
@@ -0,0 +1 @@
1
+ {"data":[{"id":"51d8bd41-fc4a-4cfd-96fa-9cb66da33135","active_charge_id":"cf7b6366-29e1-474c-bc04-0fd4a894ecc1","active_payment_method_id":"a972b22c-f835-4177-ac0f-227d85cb878a","amount":88424,"capture_method":"automatic_async","charge":{"id":"cf7b6366-29e1-474c-bc04-0fd4a894ecc1","account_id":"e2510ff9-763a-4ff2-b0c1-551727f5ccca","amount":88424,"created_at":"2024-12-30T11:33:46-05:00","description":"Sint consectetur illum odit.","failure_reason":null,"payment_method":{"id":"a972b22c-f835-4177-ac0f-227d85cb878a","billing_address":{"address_line1":"50540 Volkman Court","address_line2":null,"city":"Mayerttown","country":"US","email":"fritz@bayer-hahn.test","first_name":"Yoko","last_name":"Kassulke","phone":null,"postal_code":"20213","state":"LA"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:46-05:00","customer_id":"8aebcd11-ad59-4eb3-94d0-ca65ca4b2dc5","metadata":null,"updated_at":"2024-12-30T11:33:46-05:00"},"processor_transaction_id":"Kqk46NnEIVU1E69t","refunds":[],"state":"processing","succeeded_at":null,"updated_at":"2024-12-30T11:33:46-05:00"},"created_at":"2024-12-30T11:33:46-05:00","description":"Sint consectetur illum odit.","metadata":null,"state":"requires_capture","updated_at":"2024-12-30T11:33:46-05:00"},{"id":"043e967e-8b1d-44eb-9c97-788d652ccb1d","active_charge_id":"3aabfca5-da37-484e-9ba1-ed07c8c22304","active_payment_method_id":"4a7b71e5-6050-47de-a055-d45c127ebb20","amount":93512,"capture_method":"automatic","charge":{"id":"3aabfca5-da37-484e-9ba1-ed07c8c22304","account_id":"e2510ff9-763a-4ff2-b0c1-551727f5ccca","amount":93512,"created_at":"2024-12-30T11:33:46-05:00","description":"Nisi recusandae optio dolorum.","failure_reason":null,"payment_method":{"id":"4a7b71e5-6050-47de-a055-d45c127ebb20","billing_address":{"address_line1":"429 Digna Views","address_line2":null,"city":"West Jewelborough","country":"US","email":"ellamae@jacobs.example","first_name":"Deandrea","last_name":"Berge","phone":null,"postal_code":"890133871","state":"MO"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:46-05:00","customer_id":"afa113ee-bfb2-44ee-8c42-e2bb6b63e832","metadata":null,"updated_at":"2024-12-30T11:33:46-05:00"},"processor_transaction_id":"0okVgD9Qq84ET","refunds":[],"state":"succeeded","succeeded_at":"2024-12-30 11:33:46 -0500","updated_at":"2024-12-30T11:33:46-05:00"},"created_at":"2024-12-30T11:33:46-05:00","description":"Nisi recusandae optio dolorum.","metadata":null,"state":"succeeded","updated_at":"2024-12-30T11:33:46-05:00"}],"meta":{"current_page":1,"next_page":null,"prev_page":null,"first_page":true,"last_page":true,"total_pages":1}}
@@ -0,0 +1 @@
1
+ {"id":"0637d906-3c5a-4ad5-96a2-5b56b53888d4","active_charge_id":null,"active_payment_method_id":"6ae91118-512c-4c33-b670-be6177008ccd","amount":21339,"can_refund":null,"can_void":true,"capture_method":"automatic","charges":[],"created_at":"2024-12-30T11:33:47-05:00","description":"Voluptas praesentium est in.","metadata":null,"payment_methods":[{"id":"3da7902c-ecd6-4232-8a2d-873f2822e814","billing_address":{"address_line1":"6557 Mraz Bridge","address_line2":null,"city":"Cronamouth","country":"US","email":"melody.stoltenberg@wintheiser.example","first_name":"Karyn","last_name":"Little","phone":null,"postal_code":"91973","state":"KS"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"9862a83d-a53b-4c34-934e-2de85b2254a3","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"},{"id":"6ae91118-512c-4c33-b670-be6177008ccd","billing_address":{"address_line1":"8701 Dicki Fork","address_line2":null,"city":"North Enoch","country":"US","email":"emogene@lehner-white.example","first_name":"Oralia","last_name":"Wehner","phone":null,"postal_code":"511580215","state":"MA"},"card_profile":{"avs_check":"00","avs_check_message":null,"brand":"visa","cvc_check":"M","cvc_check_message":null,"exp_month":1,"exp_year":2028,"failure_reason":null,"first6":null,"funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"1b7fdda5-bd7e-419c-aa06-81717683afa3","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"}],"state":"requires_confirmation","updated_at":"2024-12-30T11:33:47-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"55a6aba1-a545-4098-960b-6b5fed07ded1","bank_account_profile":{"account_holder_name":"Janette Brakus Esq.","account_holder_type":"personal","account_type":"checking","bank_name":"Chase","last4":"9012","routing_number":"344583733","state":"active","token":"4123456789012"},"billing_address":{"address_line1":"3556 Ellis Stravenue","address_line2":"Apt. 325","city":"East Margieborough","country":"US","email":"peggy_nikolaus@bauch.example","first_name":"Twana","last_name":"Konopelski","phone":"+15668303653","postal_code":"78704","state":"CT"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"165b9709-c508-4413-b5af-269f14b83fce","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"}
@@ -0,0 +1 @@
1
+ {"id":"6515b229-7f9e-4d9f-8bff-64897f1a15d2","billing_address":null,"card_profile":{"avs_check":"00","avs_check_message":"et","brand":"visa","cvc_check":"M","cvc_check_message":"harum","exp_month":1,"exp_year":2027,"failure_reason":null,"first6":"412345","funding":null,"last4":"9012","state":"active","three_d_secure_supported":null,"token":"4123456789012"},"created_at":"2024-12-30T11:33:47-05:00","customer_id":"ca5caebd-5d9a-4a00-aa02-808147bbd871","metadata":null,"updated_at":"2024-12-30T11:33:47-05:00"}