maytes-api-client-rb 0.1.1

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 (163) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +21 -0
  4. data/README.md +47 -0
  5. data/Rakefile +10 -0
  6. data/docs/CancelCheckout409Response.md +24 -0
  7. data/docs/CancelCheckoutRequest.md +18 -0
  8. data/docs/CancelCheckoutResponse.md +18 -0
  9. data/docs/CaptureCheckout409Response.md +24 -0
  10. data/docs/CaptureCheckout422Response.md +24 -0
  11. data/docs/CaptureCheckoutRequest.md +24 -0
  12. data/docs/CaptureCheckoutResponse.md +18 -0
  13. data/docs/Checkout.md +48 -0
  14. data/docs/CheckoutCancelled.md +22 -0
  15. data/docs/CheckoutCaptured.md +28 -0
  16. data/docs/CheckoutCreated.md +24 -0
  17. data/docs/CheckoutDiscount.md +30 -0
  18. data/docs/CheckoutFee.md +32 -0
  19. data/docs/CreateCheckout401Response.md +24 -0
  20. data/docs/CreateCheckout409Response.md +24 -0
  21. data/docs/CreateCheckout422Response.md +24 -0
  22. data/docs/CreateCheckoutRequest.md +44 -0
  23. data/docs/CreateCheckoutResponse.md +18 -0
  24. data/docs/CreateRefundRequest.md +20 -0
  25. data/docs/CustomerData.md +22 -0
  26. data/docs/DefaultApi.md +633 -0
  27. data/docs/DigitalGoodsCustomData.md +18 -0
  28. data/docs/DigitalGoodsLineItem.md +38 -0
  29. data/docs/DonationLineItem.md +36 -0
  30. data/docs/ErrorResponseDto.md +24 -0
  31. data/docs/Fee.md +24 -0
  32. data/docs/FeeBreakdownLine.md +24 -0
  33. data/docs/FoodBeverageLineItem.md +36 -0
  34. data/docs/GetCheckout404Response.md +24 -0
  35. data/docs/GetCheckout422Response.md +24 -0
  36. data/docs/GetCheckoutResponse.md +18 -0
  37. data/docs/GetSettlementResponse.md +18 -0
  38. data/docs/HealthResponse.md +18 -0
  39. data/docs/LineItem.md +94 -0
  40. data/docs/ListSettlementsResponse.md +18 -0
  41. data/docs/OAuthTokenRequest.md +30 -0
  42. data/docs/OAuthTokenResponse.md +26 -0
  43. data/docs/OtherLineItem.md +36 -0
  44. data/docs/PhysicalGoodsCustomData.md +20 -0
  45. data/docs/PhysicalGoodsLineItem.md +38 -0
  46. data/docs/RefundCheckout402Response.md +24 -0
  47. data/docs/RefundCheckout409Response.md +24 -0
  48. data/docs/ServiceCustomData.md +18 -0
  49. data/docs/ServiceLineItem.md +38 -0
  50. data/docs/Settlement.md +52 -0
  51. data/docs/Tax.md +22 -0
  52. data/docs/TicketCustomData.md +40 -0
  53. data/docs/TicketLineItem.md +38 -0
  54. data/docs/TicketSeating.md +24 -0
  55. data/lib/maytes_api_client/api/default_api.rb +642 -0
  56. data/lib/maytes_api_client/api_client.rb +397 -0
  57. data/lib/maytes_api_client/api_error.rb +58 -0
  58. data/lib/maytes_api_client/api_model_base.rb +88 -0
  59. data/lib/maytes_api_client/configuration.rb +316 -0
  60. data/lib/maytes_api_client/managed_client.rb +140 -0
  61. data/lib/maytes_api_client/models/cancel_checkout409_response.rb +258 -0
  62. data/lib/maytes_api_client/models/cancel_checkout_request.rb +147 -0
  63. data/lib/maytes_api_client/models/cancel_checkout_response.rb +164 -0
  64. data/lib/maytes_api_client/models/capture_checkout409_response.rb +258 -0
  65. data/lib/maytes_api_client/models/capture_checkout422_response.rb +258 -0
  66. data/lib/maytes_api_client/models/capture_checkout_request.rb +218 -0
  67. data/lib/maytes_api_client/models/capture_checkout_response.rb +164 -0
  68. data/lib/maytes_api_client/models/checkout.rb +483 -0
  69. data/lib/maytes_api_client/models/checkout_cancelled.rb +202 -0
  70. data/lib/maytes_api_client/models/checkout_captured.rb +266 -0
  71. data/lib/maytes_api_client/models/checkout_created.rb +242 -0
  72. data/lib/maytes_api_client/models/checkout_discount.rb +329 -0
  73. data/lib/maytes_api_client/models/checkout_fee.rb +351 -0
  74. data/lib/maytes_api_client/models/create_checkout401_response.rb +258 -0
  75. data/lib/maytes_api_client/models/create_checkout409_response.rb +258 -0
  76. data/lib/maytes_api_client/models/create_checkout422_response.rb +258 -0
  77. data/lib/maytes_api_client/models/create_checkout_request.rb +444 -0
  78. data/lib/maytes_api_client/models/create_checkout_response.rb +164 -0
  79. data/lib/maytes_api_client/models/create_refund_request.rb +212 -0
  80. data/lib/maytes_api_client/models/customer_data.rb +168 -0
  81. data/lib/maytes_api_client/models/digital_goods_custom_data.rb +148 -0
  82. data/lib/maytes_api_client/models/digital_goods_line_item.rb +414 -0
  83. data/lib/maytes_api_client/models/donation_line_item.rb +405 -0
  84. data/lib/maytes_api_client/models/error_response_dto.rb +227 -0
  85. data/lib/maytes_api_client/models/fee.rb +271 -0
  86. data/lib/maytes_api_client/models/fee_breakdown_line.rb +266 -0
  87. data/lib/maytes_api_client/models/food_beverage_line_item.rb +405 -0
  88. data/lib/maytes_api_client/models/get_checkout404_response.rb +258 -0
  89. data/lib/maytes_api_client/models/get_checkout422_response.rb +258 -0
  90. data/lib/maytes_api_client/models/get_checkout_response.rb +164 -0
  91. data/lib/maytes_api_client/models/get_settlement_response.rb +164 -0
  92. data/lib/maytes_api_client/models/health_response.rb +164 -0
  93. data/lib/maytes_api_client/models/line_item.rb +65 -0
  94. data/lib/maytes_api_client/models/list_settlements_response.rb +166 -0
  95. data/lib/maytes_api_client/models/o_auth_token_request.rb +244 -0
  96. data/lib/maytes_api_client/models/o_auth_token_response.rb +251 -0
  97. data/lib/maytes_api_client/models/other_line_item.rb +405 -0
  98. data/lib/maytes_api_client/models/physical_goods_custom_data.rb +173 -0
  99. data/lib/maytes_api_client/models/physical_goods_line_item.rb +431 -0
  100. data/lib/maytes_api_client/models/refund_checkout402_response.rb +258 -0
  101. data/lib/maytes_api_client/models/refund_checkout409_response.rb +258 -0
  102. data/lib/maytes_api_client/models/service_custom_data.rb +148 -0
  103. data/lib/maytes_api_client/models/service_line_item.rb +414 -0
  104. data/lib/maytes_api_client/models/settlement.rb +526 -0
  105. data/lib/maytes_api_client/models/tax.rb +202 -0
  106. data/lib/maytes_api_client/models/ticket_custom_data.rb +333 -0
  107. data/lib/maytes_api_client/models/ticket_line_item.rb +431 -0
  108. data/lib/maytes_api_client/models/ticket_seating.rb +176 -0
  109. data/lib/maytes_api_client/version.rb +15 -0
  110. data/lib/maytes_api_client/webhook_verifier.rb +212 -0
  111. data/lib/maytes_api_client.rb +95 -0
  112. data/maytes_api_client.gemspec +39 -0
  113. data/spec/api/default_api_spec.rb +145 -0
  114. data/spec/models/cancel_checkout409_response_spec.rb +58 -0
  115. data/spec/models/cancel_checkout_request_spec.rb +36 -0
  116. data/spec/models/cancel_checkout_response_spec.rb +36 -0
  117. data/spec/models/capture_checkout409_response_spec.rb +58 -0
  118. data/spec/models/capture_checkout422_response_spec.rb +58 -0
  119. data/spec/models/capture_checkout_request_spec.rb +54 -0
  120. data/spec/models/capture_checkout_response_spec.rb +36 -0
  121. data/spec/models/checkout_cancelled_spec.rb +48 -0
  122. data/spec/models/checkout_captured_spec.rb +66 -0
  123. data/spec/models/checkout_created_spec.rb +54 -0
  124. data/spec/models/checkout_discount_spec.rb +76 -0
  125. data/spec/models/checkout_fee_spec.rb +86 -0
  126. data/spec/models/checkout_spec.rb +126 -0
  127. data/spec/models/create_checkout401_response_spec.rb +58 -0
  128. data/spec/models/create_checkout409_response_spec.rb +58 -0
  129. data/spec/models/create_checkout422_response_spec.rb +58 -0
  130. data/spec/models/create_checkout_request_spec.rb +118 -0
  131. data/spec/models/create_checkout_response_spec.rb +36 -0
  132. data/spec/models/create_refund_request_spec.rb +42 -0
  133. data/spec/models/customer_data_spec.rb +48 -0
  134. data/spec/models/digital_goods_custom_data_spec.rb +36 -0
  135. data/spec/models/digital_goods_line_item_spec.rb +100 -0
  136. data/spec/models/donation_line_item_spec.rb +94 -0
  137. data/spec/models/error_response_dto_spec.rb +54 -0
  138. data/spec/models/fee_breakdown_line_spec.rb +58 -0
  139. data/spec/models/fee_spec.rb +54 -0
  140. data/spec/models/food_beverage_line_item_spec.rb +94 -0
  141. data/spec/models/get_checkout404_response_spec.rb +58 -0
  142. data/spec/models/get_checkout422_response_spec.rb +58 -0
  143. data/spec/models/get_checkout_response_spec.rb +36 -0
  144. data/spec/models/get_settlement_response_spec.rb +36 -0
  145. data/spec/models/health_response_spec.rb +36 -0
  146. data/spec/models/line_item_spec.rb +44 -0
  147. data/spec/models/list_settlements_response_spec.rb +36 -0
  148. data/spec/models/o_auth_token_request_spec.rb +72 -0
  149. data/spec/models/o_auth_token_response_spec.rb +60 -0
  150. data/spec/models/other_line_item_spec.rb +94 -0
  151. data/spec/models/physical_goods_custom_data_spec.rb +42 -0
  152. data/spec/models/physical_goods_line_item_spec.rb +100 -0
  153. data/spec/models/refund_checkout402_response_spec.rb +58 -0
  154. data/spec/models/refund_checkout409_response_spec.rb +58 -0
  155. data/spec/models/service_custom_data_spec.rb +36 -0
  156. data/spec/models/service_line_item_spec.rb +100 -0
  157. data/spec/models/settlement_spec.rb +138 -0
  158. data/spec/models/tax_spec.rb +48 -0
  159. data/spec/models/ticket_custom_data_spec.rb +106 -0
  160. data/spec/models/ticket_line_item_spec.rb +100 -0
  161. data/spec/models/ticket_seating_spec.rb +54 -0
  162. data/spec/spec_helper.rb +111 -0
  163. metadata +295 -0
@@ -0,0 +1,633 @@
1
+ # MaytesApiClient::DefaultApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**cancel_checkout**](DefaultApi.md#cancel_checkout) | **POST** /api/merchant/v1/checkouts/{checkoutUuid}/cancel | Cancel authorized checkout |
8
+ | [**capture_checkout**](DefaultApi.md#capture_checkout) | **POST** /api/merchant/v1/checkouts/{checkoutUuid}/capture | Capture authorized checkout |
9
+ | [**create_checkout**](DefaultApi.md#create_checkout) | **POST** /api/merchant/v1/checkouts | Create a new checkout |
10
+ | [**get_checkout**](DefaultApi.md#get_checkout) | **GET** /api/merchant/v1/checkouts/{checkoutUuid} | Get checkout details |
11
+ | [**get_health**](DefaultApi.md#get_health) | **GET** /api/health | Health check |
12
+ | [**get_o_auth_token**](DefaultApi.md#get_o_auth_token) | **POST** /oauth/token | Issue an access token |
13
+ | [**get_settlement**](DefaultApi.md#get_settlement) | **GET** /api/merchant/v1/settlements/{uuid} | Get a settlement by UUID |
14
+ | [**list_settlements**](DefaultApi.md#list_settlements) | **GET** /api/merchant/v1/settlements | List settlements for this merchant |
15
+ | [**refund_checkout**](DefaultApi.md#refund_checkout) | **POST** /api/merchant/v1/checkouts/{checkoutUuid}/refund | Refund a captured checkout |
16
+
17
+
18
+ ## cancel_checkout
19
+
20
+ > <CancelCheckoutResponse> cancel_checkout(checkout_uuid, cancel_checkout_request)
21
+
22
+ Cancel authorized checkout
23
+
24
+ ### Examples
25
+
26
+ ```ruby
27
+ require 'time'
28
+ require 'maytes_api_client'
29
+ # setup authorization
30
+ MaytesApiClient.configure do |config|
31
+ # Configure Bearer authorization (JWT): bearer
32
+ config.access_token = 'YOUR_BEARER_TOKEN'
33
+ end
34
+
35
+ api_instance = MaytesApiClient::DefaultApi.new
36
+ checkout_uuid = 'checkout_uuid_example' # String |
37
+ cancel_checkout_request = MaytesApiClient::CancelCheckoutRequest.new # CancelCheckoutRequest |
38
+
39
+ begin
40
+ # Cancel authorized checkout
41
+ result = api_instance.cancel_checkout(checkout_uuid, cancel_checkout_request)
42
+ p result
43
+ rescue MaytesApiClient::ApiError => e
44
+ puts "Error when calling DefaultApi->cancel_checkout: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the cancel_checkout_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<CancelCheckoutResponse>, Integer, Hash)> cancel_checkout_with_http_info(checkout_uuid, cancel_checkout_request)
53
+
54
+ ```ruby
55
+ begin
56
+ # Cancel authorized checkout
57
+ data, status_code, headers = api_instance.cancel_checkout_with_http_info(checkout_uuid, cancel_checkout_request)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <CancelCheckoutResponse>
61
+ rescue MaytesApiClient::ApiError => e
62
+ puts "Error when calling DefaultApi->cancel_checkout_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **checkout_uuid** | **String** | | |
71
+ | **cancel_checkout_request** | [**CancelCheckoutRequest**](CancelCheckoutRequest.md) | | |
72
+
73
+ ### Return type
74
+
75
+ [**CancelCheckoutResponse**](CancelCheckoutResponse.md)
76
+
77
+ ### Authorization
78
+
79
+ [bearer](../README.md#bearer)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: application/json
84
+ - **Accept**: application/json
85
+
86
+
87
+ ## capture_checkout
88
+
89
+ > <CaptureCheckoutResponse> capture_checkout(checkout_uuid, capture_checkout_request)
90
+
91
+ Capture authorized checkout
92
+
93
+ ### Examples
94
+
95
+ ```ruby
96
+ require 'time'
97
+ require 'maytes_api_client'
98
+ # setup authorization
99
+ MaytesApiClient.configure do |config|
100
+ # Configure Bearer authorization (JWT): bearer
101
+ config.access_token = 'YOUR_BEARER_TOKEN'
102
+ end
103
+
104
+ api_instance = MaytesApiClient::DefaultApi.new
105
+ checkout_uuid = 'checkout_uuid_example' # String |
106
+ capture_checkout_request = MaytesApiClient::CaptureCheckoutRequest.new # CaptureCheckoutRequest |
107
+
108
+ begin
109
+ # Capture authorized checkout
110
+ result = api_instance.capture_checkout(checkout_uuid, capture_checkout_request)
111
+ p result
112
+ rescue MaytesApiClient::ApiError => e
113
+ puts "Error when calling DefaultApi->capture_checkout: #{e}"
114
+ end
115
+ ```
116
+
117
+ #### Using the capture_checkout_with_http_info variant
118
+
119
+ This returns an Array which contains the response data, status code and headers.
120
+
121
+ > <Array(<CaptureCheckoutResponse>, Integer, Hash)> capture_checkout_with_http_info(checkout_uuid, capture_checkout_request)
122
+
123
+ ```ruby
124
+ begin
125
+ # Capture authorized checkout
126
+ data, status_code, headers = api_instance.capture_checkout_with_http_info(checkout_uuid, capture_checkout_request)
127
+ p status_code # => 2xx
128
+ p headers # => { ... }
129
+ p data # => <CaptureCheckoutResponse>
130
+ rescue MaytesApiClient::ApiError => e
131
+ puts "Error when calling DefaultApi->capture_checkout_with_http_info: #{e}"
132
+ end
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ | Name | Type | Description | Notes |
138
+ | ---- | ---- | ----------- | ----- |
139
+ | **checkout_uuid** | **String** | | |
140
+ | **capture_checkout_request** | [**CaptureCheckoutRequest**](CaptureCheckoutRequest.md) | | |
141
+
142
+ ### Return type
143
+
144
+ [**CaptureCheckoutResponse**](CaptureCheckoutResponse.md)
145
+
146
+ ### Authorization
147
+
148
+ [bearer](../README.md#bearer)
149
+
150
+ ### HTTP request headers
151
+
152
+ - **Content-Type**: application/json
153
+ - **Accept**: application/json
154
+
155
+
156
+ ## create_checkout
157
+
158
+ > <CreateCheckoutResponse> create_checkout(create_checkout_request)
159
+
160
+ Create a new checkout
161
+
162
+ ### Examples
163
+
164
+ ```ruby
165
+ require 'time'
166
+ require 'maytes_api_client'
167
+ # setup authorization
168
+ MaytesApiClient.configure do |config|
169
+ # Configure Bearer authorization (JWT): bearer
170
+ config.access_token = 'YOUR_BEARER_TOKEN'
171
+ end
172
+
173
+ api_instance = MaytesApiClient::DefaultApi.new
174
+ create_checkout_request = MaytesApiClient::CreateCheckoutRequest.new({total_amount: 37, currency: 'currency_example', return_url: 'return_url_example', cancel_url: 'cancel_url_example', items: [MaytesApiClient::DigitalGoodsLineItem.new({item_ref: 'item_ref_example', name: 'name_example', quantity: 37, unit_price: 37, currency: 'currency_example', category: 'digital_goods'})]}) # CreateCheckoutRequest |
175
+
176
+ begin
177
+ # Create a new checkout
178
+ result = api_instance.create_checkout(create_checkout_request)
179
+ p result
180
+ rescue MaytesApiClient::ApiError => e
181
+ puts "Error when calling DefaultApi->create_checkout: #{e}"
182
+ end
183
+ ```
184
+
185
+ #### Using the create_checkout_with_http_info variant
186
+
187
+ This returns an Array which contains the response data, status code and headers.
188
+
189
+ > <Array(<CreateCheckoutResponse>, Integer, Hash)> create_checkout_with_http_info(create_checkout_request)
190
+
191
+ ```ruby
192
+ begin
193
+ # Create a new checkout
194
+ data, status_code, headers = api_instance.create_checkout_with_http_info(create_checkout_request)
195
+ p status_code # => 2xx
196
+ p headers # => { ... }
197
+ p data # => <CreateCheckoutResponse>
198
+ rescue MaytesApiClient::ApiError => e
199
+ puts "Error when calling DefaultApi->create_checkout_with_http_info: #{e}"
200
+ end
201
+ ```
202
+
203
+ ### Parameters
204
+
205
+ | Name | Type | Description | Notes |
206
+ | ---- | ---- | ----------- | ----- |
207
+ | **create_checkout_request** | [**CreateCheckoutRequest**](CreateCheckoutRequest.md) | | |
208
+
209
+ ### Return type
210
+
211
+ [**CreateCheckoutResponse**](CreateCheckoutResponse.md)
212
+
213
+ ### Authorization
214
+
215
+ [bearer](../README.md#bearer)
216
+
217
+ ### HTTP request headers
218
+
219
+ - **Content-Type**: application/json
220
+ - **Accept**: application/json
221
+
222
+
223
+ ## get_checkout
224
+
225
+ > <GetCheckoutResponse> get_checkout(checkout_uuid, opts)
226
+
227
+ Get checkout details
228
+
229
+ ### Examples
230
+
231
+ ```ruby
232
+ require 'time'
233
+ require 'maytes_api_client'
234
+ # setup authorization
235
+ MaytesApiClient.configure do |config|
236
+ # Configure Bearer authorization (JWT): bearer
237
+ config.access_token = 'YOUR_BEARER_TOKEN'
238
+ end
239
+
240
+ api_instance = MaytesApiClient::DefaultApi.new
241
+ checkout_uuid = 'checkout_uuid_example' # String |
242
+ opts = {
243
+ merchant_order_id: 'merchant_order_id_example' # String |
244
+ }
245
+
246
+ begin
247
+ # Get checkout details
248
+ result = api_instance.get_checkout(checkout_uuid, opts)
249
+ p result
250
+ rescue MaytesApiClient::ApiError => e
251
+ puts "Error when calling DefaultApi->get_checkout: #{e}"
252
+ end
253
+ ```
254
+
255
+ #### Using the get_checkout_with_http_info variant
256
+
257
+ This returns an Array which contains the response data, status code and headers.
258
+
259
+ > <Array(<GetCheckoutResponse>, Integer, Hash)> get_checkout_with_http_info(checkout_uuid, opts)
260
+
261
+ ```ruby
262
+ begin
263
+ # Get checkout details
264
+ data, status_code, headers = api_instance.get_checkout_with_http_info(checkout_uuid, opts)
265
+ p status_code # => 2xx
266
+ p headers # => { ... }
267
+ p data # => <GetCheckoutResponse>
268
+ rescue MaytesApiClient::ApiError => e
269
+ puts "Error when calling DefaultApi->get_checkout_with_http_info: #{e}"
270
+ end
271
+ ```
272
+
273
+ ### Parameters
274
+
275
+ | Name | Type | Description | Notes |
276
+ | ---- | ---- | ----------- | ----- |
277
+ | **checkout_uuid** | **String** | | |
278
+ | **merchant_order_id** | **String** | | [optional] |
279
+
280
+ ### Return type
281
+
282
+ [**GetCheckoutResponse**](GetCheckoutResponse.md)
283
+
284
+ ### Authorization
285
+
286
+ [bearer](../README.md#bearer)
287
+
288
+ ### HTTP request headers
289
+
290
+ - **Content-Type**: Not defined
291
+ - **Accept**: application/json
292
+
293
+
294
+ ## get_health
295
+
296
+ > <HealthResponse> get_health
297
+
298
+ Health check
299
+
300
+ ### Examples
301
+
302
+ ```ruby
303
+ require 'time'
304
+ require 'maytes_api_client'
305
+
306
+ api_instance = MaytesApiClient::DefaultApi.new
307
+
308
+ begin
309
+ # Health check
310
+ result = api_instance.get_health
311
+ p result
312
+ rescue MaytesApiClient::ApiError => e
313
+ puts "Error when calling DefaultApi->get_health: #{e}"
314
+ end
315
+ ```
316
+
317
+ #### Using the get_health_with_http_info variant
318
+
319
+ This returns an Array which contains the response data, status code and headers.
320
+
321
+ > <Array(<HealthResponse>, Integer, Hash)> get_health_with_http_info
322
+
323
+ ```ruby
324
+ begin
325
+ # Health check
326
+ data, status_code, headers = api_instance.get_health_with_http_info
327
+ p status_code # => 2xx
328
+ p headers # => { ... }
329
+ p data # => <HealthResponse>
330
+ rescue MaytesApiClient::ApiError => e
331
+ puts "Error when calling DefaultApi->get_health_with_http_info: #{e}"
332
+ end
333
+ ```
334
+
335
+ ### Parameters
336
+
337
+ This endpoint does not need any parameter.
338
+
339
+ ### Return type
340
+
341
+ [**HealthResponse**](HealthResponse.md)
342
+
343
+ ### Authorization
344
+
345
+ No authorization required
346
+
347
+ ### HTTP request headers
348
+
349
+ - **Content-Type**: Not defined
350
+ - **Accept**: application/json
351
+
352
+
353
+ ## get_o_auth_token
354
+
355
+ > <OAuthTokenResponse> get_o_auth_token(o_auth_token_request)
356
+
357
+ Issue an access token
358
+
359
+ ### Examples
360
+
361
+ ```ruby
362
+ require 'time'
363
+ require 'maytes_api_client'
364
+
365
+ api_instance = MaytesApiClient::DefaultApi.new
366
+ o_auth_token_request = MaytesApiClient::OAuthTokenRequest.new({grant_type: 'grant_type_example', client_id: 'client_id_example'}) # OAuthTokenRequest |
367
+
368
+ begin
369
+ # Issue an access token
370
+ result = api_instance.get_o_auth_token(o_auth_token_request)
371
+ p result
372
+ rescue MaytesApiClient::ApiError => e
373
+ puts "Error when calling DefaultApi->get_o_auth_token: #{e}"
374
+ end
375
+ ```
376
+
377
+ #### Using the get_o_auth_token_with_http_info variant
378
+
379
+ This returns an Array which contains the response data, status code and headers.
380
+
381
+ > <Array(<OAuthTokenResponse>, Integer, Hash)> get_o_auth_token_with_http_info(o_auth_token_request)
382
+
383
+ ```ruby
384
+ begin
385
+ # Issue an access token
386
+ data, status_code, headers = api_instance.get_o_auth_token_with_http_info(o_auth_token_request)
387
+ p status_code # => 2xx
388
+ p headers # => { ... }
389
+ p data # => <OAuthTokenResponse>
390
+ rescue MaytesApiClient::ApiError => e
391
+ puts "Error when calling DefaultApi->get_o_auth_token_with_http_info: #{e}"
392
+ end
393
+ ```
394
+
395
+ ### Parameters
396
+
397
+ | Name | Type | Description | Notes |
398
+ | ---- | ---- | ----------- | ----- |
399
+ | **o_auth_token_request** | [**OAuthTokenRequest**](OAuthTokenRequest.md) | | |
400
+
401
+ ### Return type
402
+
403
+ [**OAuthTokenResponse**](OAuthTokenResponse.md)
404
+
405
+ ### Authorization
406
+
407
+ No authorization required
408
+
409
+ ### HTTP request headers
410
+
411
+ - **Content-Type**: application/json
412
+ - **Accept**: application/json
413
+
414
+
415
+ ## get_settlement
416
+
417
+ > <GetSettlementResponse> get_settlement(uuid)
418
+
419
+ Get a settlement by UUID
420
+
421
+ ### Examples
422
+
423
+ ```ruby
424
+ require 'time'
425
+ require 'maytes_api_client'
426
+ # setup authorization
427
+ MaytesApiClient.configure do |config|
428
+ # Configure Bearer authorization (JWT): bearer
429
+ config.access_token = 'YOUR_BEARER_TOKEN'
430
+ end
431
+
432
+ api_instance = MaytesApiClient::DefaultApi.new
433
+ uuid = 'uuid_example' # String | Settlement UUID
434
+
435
+ begin
436
+ # Get a settlement by UUID
437
+ result = api_instance.get_settlement(uuid)
438
+ p result
439
+ rescue MaytesApiClient::ApiError => e
440
+ puts "Error when calling DefaultApi->get_settlement: #{e}"
441
+ end
442
+ ```
443
+
444
+ #### Using the get_settlement_with_http_info variant
445
+
446
+ This returns an Array which contains the response data, status code and headers.
447
+
448
+ > <Array(<GetSettlementResponse>, Integer, Hash)> get_settlement_with_http_info(uuid)
449
+
450
+ ```ruby
451
+ begin
452
+ # Get a settlement by UUID
453
+ data, status_code, headers = api_instance.get_settlement_with_http_info(uuid)
454
+ p status_code # => 2xx
455
+ p headers # => { ... }
456
+ p data # => <GetSettlementResponse>
457
+ rescue MaytesApiClient::ApiError => e
458
+ puts "Error when calling DefaultApi->get_settlement_with_http_info: #{e}"
459
+ end
460
+ ```
461
+
462
+ ### Parameters
463
+
464
+ | Name | Type | Description | Notes |
465
+ | ---- | ---- | ----------- | ----- |
466
+ | **uuid** | **String** | Settlement UUID | |
467
+
468
+ ### Return type
469
+
470
+ [**GetSettlementResponse**](GetSettlementResponse.md)
471
+
472
+ ### Authorization
473
+
474
+ [bearer](../README.md#bearer)
475
+
476
+ ### HTTP request headers
477
+
478
+ - **Content-Type**: Not defined
479
+ - **Accept**: application/json
480
+
481
+
482
+ ## list_settlements
483
+
484
+ > <ListSettlementsResponse> list_settlements(opts)
485
+
486
+ List settlements for this merchant
487
+
488
+ Returns settlements for the authenticated merchant. Default sort: created_at ASC.
489
+
490
+ ### Examples
491
+
492
+ ```ruby
493
+ require 'time'
494
+ require 'maytes_api_client'
495
+ # setup authorization
496
+ MaytesApiClient.configure do |config|
497
+ # Configure Bearer authorization (JWT): bearer
498
+ config.access_token = 'YOUR_BEARER_TOKEN'
499
+ end
500
+
501
+ api_instance = MaytesApiClient::DefaultApi.new
502
+ opts = {
503
+ offset: TODO, # Object | Pagination offset (default 0)
504
+ limit: TODO, # Object | Max records to return (default 50, max 200)
505
+ sort_dir: 'asc', # String | Sort direction (default: asc)
506
+ sort_by: 'created_at', # String | Field to sort by (default: created_at)
507
+ created_before: TODO, # Object | Include settlements created at or before this ISO-8601 timestamp
508
+ created_after: TODO, # Object | Include settlements created at or after this ISO-8601 timestamp
509
+ status: 'CREATED' # String | Filter by status
510
+ }
511
+
512
+ begin
513
+ # List settlements for this merchant
514
+ result = api_instance.list_settlements(opts)
515
+ p result
516
+ rescue MaytesApiClient::ApiError => e
517
+ puts "Error when calling DefaultApi->list_settlements: #{e}"
518
+ end
519
+ ```
520
+
521
+ #### Using the list_settlements_with_http_info variant
522
+
523
+ This returns an Array which contains the response data, status code and headers.
524
+
525
+ > <Array(<ListSettlementsResponse>, Integer, Hash)> list_settlements_with_http_info(opts)
526
+
527
+ ```ruby
528
+ begin
529
+ # List settlements for this merchant
530
+ data, status_code, headers = api_instance.list_settlements_with_http_info(opts)
531
+ p status_code # => 2xx
532
+ p headers # => { ... }
533
+ p data # => <ListSettlementsResponse>
534
+ rescue MaytesApiClient::ApiError => e
535
+ puts "Error when calling DefaultApi->list_settlements_with_http_info: #{e}"
536
+ end
537
+ ```
538
+
539
+ ### Parameters
540
+
541
+ | Name | Type | Description | Notes |
542
+ | ---- | ---- | ----------- | ----- |
543
+ | **offset** | [**Object**](.md) | Pagination offset (default 0) | [optional] |
544
+ | **limit** | [**Object**](.md) | Max records to return (default 50, max 200) | [optional] |
545
+ | **sort_dir** | **String** | Sort direction (default: asc) | [optional] |
546
+ | **sort_by** | **String** | Field to sort by (default: created_at) | [optional] |
547
+ | **created_before** | [**Object**](.md) | Include settlements created at or before this ISO-8601 timestamp | [optional] |
548
+ | **created_after** | [**Object**](.md) | Include settlements created at or after this ISO-8601 timestamp | [optional] |
549
+ | **status** | **String** | Filter by status | [optional] |
550
+
551
+ ### Return type
552
+
553
+ [**ListSettlementsResponse**](ListSettlementsResponse.md)
554
+
555
+ ### Authorization
556
+
557
+ [bearer](../README.md#bearer)
558
+
559
+ ### HTTP request headers
560
+
561
+ - **Content-Type**: Not defined
562
+ - **Accept**: application/json
563
+
564
+
565
+ ## refund_checkout
566
+
567
+ > refund_checkout(checkout_uuid, create_refund_request)
568
+
569
+ Refund a captured checkout
570
+
571
+ Initiates a full refund of the captured payment. Returns 204 immediately; Stripe confirms asynchronously via webhook. Poll GET /checkouts/:uuid for status and refund details.
572
+
573
+ ### Examples
574
+
575
+ ```ruby
576
+ require 'time'
577
+ require 'maytes_api_client'
578
+ # setup authorization
579
+ MaytesApiClient.configure do |config|
580
+ # Configure Bearer authorization (JWT): bearer
581
+ config.access_token = 'YOUR_BEARER_TOKEN'
582
+ end
583
+
584
+ api_instance = MaytesApiClient::DefaultApi.new
585
+ checkout_uuid = 'checkout_uuid_example' # String |
586
+ create_refund_request = MaytesApiClient::CreateRefundRequest.new({merchant_refund_ref: 'merchant_refund_ref_example'}) # CreateRefundRequest |
587
+
588
+ begin
589
+ # Refund a captured checkout
590
+ api_instance.refund_checkout(checkout_uuid, create_refund_request)
591
+ rescue MaytesApiClient::ApiError => e
592
+ puts "Error when calling DefaultApi->refund_checkout: #{e}"
593
+ end
594
+ ```
595
+
596
+ #### Using the refund_checkout_with_http_info variant
597
+
598
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
599
+
600
+ > <Array(nil, Integer, Hash)> refund_checkout_with_http_info(checkout_uuid, create_refund_request)
601
+
602
+ ```ruby
603
+ begin
604
+ # Refund a captured checkout
605
+ data, status_code, headers = api_instance.refund_checkout_with_http_info(checkout_uuid, create_refund_request)
606
+ p status_code # => 2xx
607
+ p headers # => { ... }
608
+ p data # => nil
609
+ rescue MaytesApiClient::ApiError => e
610
+ puts "Error when calling DefaultApi->refund_checkout_with_http_info: #{e}"
611
+ end
612
+ ```
613
+
614
+ ### Parameters
615
+
616
+ | Name | Type | Description | Notes |
617
+ | ---- | ---- | ----------- | ----- |
618
+ | **checkout_uuid** | **String** | | |
619
+ | **create_refund_request** | [**CreateRefundRequest**](CreateRefundRequest.md) | | |
620
+
621
+ ### Return type
622
+
623
+ nil (empty response body)
624
+
625
+ ### Authorization
626
+
627
+ [bearer](../README.md#bearer)
628
+
629
+ ### HTTP request headers
630
+
631
+ - **Content-Type**: application/json
632
+ - **Accept**: application/json
633
+
@@ -0,0 +1,18 @@
1
+ # MaytesApiClient::DigitalGoodsCustomData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **product_category** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'maytes_api_client'
13
+
14
+ instance = MaytesApiClient::DigitalGoodsCustomData.new(
15
+ product_category: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,38 @@
1
+ # MaytesApiClient::DigitalGoodsLineItem
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **item_ref** | **String** | | |
8
+ | **parent_ref** | **String** | | [optional] |
9
+ | **sku** | **String** | | [optional] |
10
+ | **name** | **String** | | |
11
+ | **description** | **String** | | [optional] |
12
+ | **image_url** | **String** | | [optional] |
13
+ | **quantity** | **Integer** | | |
14
+ | **unit_price** | **Integer** | | |
15
+ | **currency** | **String** | | |
16
+ | **category** | **String** | | |
17
+ | **custom_data** | [**DigitalGoodsCustomData**](DigitalGoodsCustomData.md) | | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'maytes_api_client'
23
+
24
+ instance = MaytesApiClient::DigitalGoodsLineItem.new(
25
+ item_ref: null,
26
+ parent_ref: null,
27
+ sku: null,
28
+ name: null,
29
+ description: null,
30
+ image_url: null,
31
+ quantity: null,
32
+ unit_price: null,
33
+ currency: null,
34
+ category: null,
35
+ custom_data: null
36
+ )
37
+ ```
38
+