straddle 1.0.4 → 1.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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +84 -89
  4. data/SKILL.md +4 -2
  5. data/api.md +23 -23
  6. data/lib/straddle/client.rb +24 -7
  7. data/lib/straddle/errors.rb +40 -0
  8. data/lib/straddle/file_part.rb +13 -1
  9. data/lib/straddle/internal/transport/base_client.rb +186 -42
  10. data/lib/straddle/internal/transport/connection_pool.rb +160 -0
  11. data/lib/straddle/internal/transport/pooled_net_requester.rb +77 -10
  12. data/lib/straddle/internal/type/base_model.rb +69 -18
  13. data/lib/straddle/internal/type/base_page.rb +14 -0
  14. data/lib/straddle/internal/type/boolean.rb +3 -1
  15. data/lib/straddle/internal/type/converter.rb +13 -3
  16. data/lib/straddle/internal/type/enum.rb +9 -4
  17. data/lib/straddle/internal/type/file_input.rb +8 -2
  18. data/lib/straddle/internal/type/hash_of.rb +3 -1
  19. data/lib/straddle/internal/type/union.rb +21 -7
  20. data/lib/straddle/internal/type/unknown.rb +3 -1
  21. data/lib/straddle/internal/util.rb +273 -15
  22. data/lib/straddle/internal/webhook_verifier.rb +240 -0
  23. data/lib/straddle/internal.rb +5 -1
  24. data/lib/straddle/models/capability_request_create_params.rb +18 -18
  25. data/lib/straddle/models/paykey.rb +3 -2
  26. data/lib/straddle/models/paykey_created_v1_webhook_event.rb +7 -2
  27. data/lib/straddle/models/paykey_event_v1_webhook_event.rb +7 -2
  28. data/lib/straddle/models/webhook_unwrap_params.rb +2 -0
  29. data/lib/straddle/models.rb +30 -31
  30. data/lib/straddle/request_options.rb +13 -5
  31. data/lib/straddle/resources/accounts.rb +11 -12
  32. data/lib/straddle/resources/bridge.rb +8 -4
  33. data/lib/straddle/resources/capability_requests.rb +4 -5
  34. data/lib/straddle/resources/charges.rb +18 -15
  35. data/lib/straddle/resources/customers/review.rb +5 -6
  36. data/lib/straddle/resources/customers.rb +34 -35
  37. data/lib/straddle/resources/funding_events.rb +20 -20
  38. data/lib/straddle/resources/linked_bank_accounts.rb +9 -11
  39. data/lib/straddle/resources/organizations.rb +6 -6
  40. data/lib/straddle/resources/paykeys/review.rb +5 -6
  41. data/lib/straddle/resources/paykeys.rb +34 -39
  42. data/lib/straddle/resources/payments.rb +8 -7
  43. data/lib/straddle/resources/payouts.rb +18 -15
  44. data/lib/straddle/resources/representatives.rb +7 -6
  45. data/lib/straddle/resources/webhooks.rb +63 -6
  46. data/lib/straddle/version.rb +1 -1
  47. data/lib/straddle.rb +5 -6
  48. data/rbi/straddle/client.rbi +13 -0
  49. data/rbi/straddle/errors.rbi +25 -27
  50. data/rbi/straddle/internal/transport/base_client.rbi +45 -54
  51. data/rbi/straddle/internal/transport/connection_pool.rbi +44 -0
  52. data/rbi/straddle/internal/transport/pooled_net_requester.rbi +15 -16
  53. data/rbi/straddle/internal/type/base_model.rbi +24 -38
  54. data/rbi/straddle/internal/type/base_page.rbi +5 -0
  55. data/rbi/straddle/internal/type/converter.rbi +9 -42
  56. data/rbi/straddle/internal/type/enum.rbi +1 -5
  57. data/rbi/straddle/internal/type/request_parameters.rbi +1 -3
  58. data/rbi/straddle/internal/type/union.rbi +2 -11
  59. data/rbi/straddle/internal/util.rbi +101 -115
  60. data/rbi/straddle/internal/webhook_verifier.rbi +86 -0
  61. data/rbi/straddle/internal.rbi +1 -2
  62. data/rbi/straddle/models/capability_request_create_params.rbi +18 -18
  63. data/rbi/straddle/models/paykey.rbi +4 -2
  64. data/rbi/straddle/models/paykey_created_v1_webhook_event.rbi +6 -2
  65. data/rbi/straddle/models/paykey_event_v1_webhook_event.rbi +6 -2
  66. data/rbi/straddle/models/webhook_unwrap_params.rbi +2 -0
  67. data/rbi/straddle/models.rbi +2 -0
  68. data/rbi/straddle/request_options.rbi +4 -10
  69. data/rbi/straddle/resources/accounts.rbi +2 -1
  70. data/rbi/straddle/resources/bridge.rbi +8 -4
  71. data/rbi/straddle/resources/charges.rbi +4 -2
  72. data/rbi/straddle/resources/customers.rbi +7 -3
  73. data/rbi/straddle/resources/funding_events.rbi +5 -2
  74. data/rbi/straddle/resources/organizations.rbi +2 -1
  75. data/rbi/straddle/resources/paykeys.rbi +2 -1
  76. data/rbi/straddle/resources/payments.rbi +3 -1
  77. data/rbi/straddle/resources/payouts.rbi +4 -2
  78. data/rbi/straddle/resources/representatives.rbi +3 -1
  79. data/rbi/straddle/resources/webhooks.rbi +107 -2
  80. data/sig/straddle/client.rbs +4 -0
  81. data/sig/straddle/errors.rbs +13 -0
  82. data/sig/straddle/internal/transport/base_client.rbs +19 -1
  83. data/sig/straddle/internal/transport/connection_pool.rbs +19 -0
  84. data/sig/straddle/internal/transport/pooled_net_requester.rbs +11 -1
  85. data/sig/straddle/internal/type/base_model.rbs +4 -0
  86. data/sig/straddle/internal/type/base_page.rbs +2 -0
  87. data/sig/straddle/internal/util.rbs +29 -1
  88. data/sig/straddle/internal/webhook_verifier.rbs +53 -0
  89. data/sig/straddle/models/capability_request_create_params.rbs +24 -24
  90. data/sig/straddle/models/webhook_unwrap_params.rbs +4 -0
  91. data/sig/straddle/models.rbs +2 -0
  92. data/sig/straddle/resources/webhooks.rbs +59 -1
  93. metadata +12 -60
@@ -63,7 +63,8 @@ module Straddle
63
63
  )
64
64
  end
65
65
 
66
- # Returns a charge by its unique identifier.
66
+ # Returns a charge by its unique `id`. Includes payment amount, status history,
67
+ # customer and paykey details, funding IDs, and trace IDs.
67
68
  #
68
69
  # @overload retrieve(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
69
70
  #
@@ -85,12 +86,11 @@ module Straddle
85
86
  @client.request(
86
87
  method: :get,
87
88
  path: ["v1/charges/%1$s", id],
88
- headers:
89
- parsed.transform_keys(
90
- correlation_id: "correlation-id",
91
- request_id: "request-id",
92
- straddle_account_id: "straddle-account-id"
93
- ),
89
+ headers: parsed.transform_keys(
90
+ correlation_id: "correlation-id",
91
+ request_id: "request-id",
92
+ straddle_account_id: "straddle-account-id"
93
+ ),
94
94
  model: Straddle::ChargeResponse,
95
95
  options: options
96
96
  )
@@ -231,7 +231,8 @@ module Straddle
231
231
  )
232
232
  end
233
233
 
234
- # Return a charge with its sensitive fields unmasked.
234
+ # Returns a charge by `id` with sensitive fields unmasked, including the full
235
+ # `paykey` value. Includes payment status history, funding IDs, and trace IDs.
235
236
  #
236
237
  # @overload list_unmasked(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
237
238
  #
@@ -253,12 +254,11 @@ module Straddle
253
254
  @client.request(
254
255
  method: :get,
255
256
  path: ["v1/charges/%1$s/unmask", id],
256
- headers:
257
- parsed.transform_keys(
258
- correlation_id: "correlation-id",
259
- request_id: "request-id",
260
- straddle_account_id: "straddle-account-id"
261
- ),
257
+ headers: parsed.transform_keys(
258
+ correlation_id: "correlation-id",
259
+ request_id: "request-id",
260
+ straddle_account_id: "straddle-account-id"
261
+ ),
262
262
  model: Straddle::UnmaskedChargeResponse,
263
263
  options: options
264
264
  )
@@ -443,7 +443,10 @@ module Straddle
443
443
  @client.request(
444
444
  method: :post,
445
445
  path: ["v1/charges/%1$s/authorization", id],
446
- headers: parsed.slice(*header_params.keys).transform_keys(header_params),
446
+ headers: {
447
+ "content-type" => "multipart/form-data",
448
+ **parsed.slice(*header_params.keys).transform_keys(header_params)
449
+ },
447
450
  body: parsed.except(*header_params.keys),
448
451
  model: Straddle::ChargeResponse,
449
452
  options: options
@@ -30,12 +30,11 @@ module Straddle
30
30
  @client.request(
31
31
  method: :get,
32
32
  path: ["v1/customers/%1$s/review", id],
33
- headers:
34
- parsed.transform_keys(
35
- correlation_id: "correlation-id",
36
- request_id: "request-id",
37
- straddle_account_id: "straddle-account-id"
38
- ),
33
+ headers: parsed.transform_keys(
34
+ correlation_id: "correlation-id",
35
+ request_id: "request-id",
36
+ straddle_account_id: "straddle-account-id"
37
+ ),
39
38
  model: Straddle::Customers::CustomerReviewResponse,
40
39
  options: options
41
40
  )
@@ -13,7 +13,9 @@ module Straddle
13
13
  # Some parameter documentations has been truncated, see
14
14
  # {Straddle::Models::CustomerCreateParams} for more details.
15
15
  #
16
- # Creates a customer and starts identity, fraud, and risk assessments.
16
+ # Creates a customer record and starts identity, fraud, and risk assessments.
17
+ # Returns the created customer with its status, profile details, compliance
18
+ # profile, and configuration.
17
19
  #
18
20
  # @overload create(device:, email:, name:, phone:, type:, address: nil, compliance_profile: nil, config: nil, external_id: nil, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
19
21
  #
@@ -68,7 +70,8 @@ module Straddle
68
70
  )
69
71
  end
70
72
 
71
- # Returns a customer by `id`.
73
+ # Returns a customer by its unique `id`. Includes the customer's profile,
74
+ # verification status, compliance profile, and metadata.
72
75
  #
73
76
  # @overload retrieve(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
74
77
  #
@@ -90,12 +93,11 @@ module Straddle
90
93
  @client.request(
91
94
  method: :get,
92
95
  path: ["v1/customers/%1$s", id],
93
- headers:
94
- parsed.transform_keys(
95
- correlation_id: "correlation-id",
96
- request_id: "request-id",
97
- straddle_account_id: "straddle-account-id"
98
- ),
96
+ headers: parsed.transform_keys(
97
+ correlation_id: "correlation-id",
98
+ request_id: "request-id",
99
+ straddle_account_id: "straddle-account-id"
100
+ ),
99
101
  model: Straddle::CustomerResponse,
100
102
  options: options
101
103
  )
@@ -104,7 +106,8 @@ module Straddle
104
106
  # Some parameter documentations has been truncated, see
105
107
  # {Straddle::Models::CustomerUpdateParams} for more details.
106
108
  #
107
- # Updates an existing customer's profile, status, and metadata.
109
+ # Updates an existing customer's profile, status, compliance profile, and
110
+ # metadata. Returns the updated customer record.
108
111
  #
109
112
  # @overload update(id, device:, email:, name:, phone:, status:, address: nil, compliance_profile: nil, external_id: nil, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
110
113
  #
@@ -223,12 +226,11 @@ module Straddle
223
226
  method: :get,
224
227
  path: "v1/customers",
225
228
  query: query,
226
- headers:
227
- parsed.except(*query_params).transform_keys(
228
- correlation_id: "correlation-id",
229
- request_id: "request-id",
230
- straddle_account_id: "straddle-account-id"
231
- ),
229
+ headers: parsed.except(*query_params).transform_keys(
230
+ correlation_id: "correlation-id",
231
+ request_id: "request-id",
232
+ straddle_account_id: "straddle-account-id"
233
+ ),
232
234
  model: Straddle::CustomerSummaryList,
233
235
  options: options
234
236
  )
@@ -259,13 +261,12 @@ module Straddle
259
261
  @client.request(
260
262
  method: :delete,
261
263
  path: ["v1/customers/%1$s", id],
262
- headers:
263
- parsed.transform_keys(
264
- correlation_id: "correlation-id",
265
- idempotency_key: "idempotency-key",
266
- request_id: "request-id",
267
- straddle_account_id: "straddle-account-id"
268
- ),
264
+ headers: parsed.transform_keys(
265
+ correlation_id: "correlation-id",
266
+ idempotency_key: "idempotency-key",
267
+ request_id: "request-id",
268
+ straddle_account_id: "straddle-account-id"
269
+ ),
269
270
  model: Straddle::CustomerResponse,
270
271
  options: options
271
272
  )
@@ -295,12 +296,11 @@ module Straddle
295
296
  @client.request(
296
297
  method: :get,
297
298
  path: ["v1/customers/%1$s/unmasked", id],
298
- headers:
299
- parsed.transform_keys(
300
- correlation_id: "correlation-id",
301
- request_id: "request-id",
302
- straddle_account_id: "straddle-account-id"
303
- ),
299
+ headers: parsed.transform_keys(
300
+ correlation_id: "correlation-id",
301
+ request_id: "request-id",
302
+ straddle_account_id: "straddle-account-id"
303
+ ),
304
304
  model: Straddle::UnmaskedCustomerResponse,
305
305
  options: options
306
306
  )
@@ -331,13 +331,12 @@ module Straddle
331
331
  @client.request(
332
332
  method: :put,
333
333
  path: ["v1/customers/%1$s/refresh_review", id],
334
- headers:
335
- parsed.transform_keys(
336
- correlation_id: "correlation-id",
337
- idempotency_key: "idempotency-key",
338
- request_id: "request-id",
339
- straddle_account_id: "straddle-account-id"
340
- ),
334
+ headers: parsed.transform_keys(
335
+ correlation_id: "correlation-id",
336
+ idempotency_key: "idempotency-key",
337
+ request_id: "request-id",
338
+ straddle_account_id: "straddle-account-id"
339
+ ),
341
340
  model: Straddle::CustomerResponse,
342
341
  options: options
343
342
  )
@@ -28,12 +28,11 @@ module Straddle
28
28
  @client.request(
29
29
  method: :get,
30
30
  path: ["v1/funding_events/%1$s", id],
31
- headers:
32
- parsed.transform_keys(
33
- correlation_id: "correlation-id",
34
- request_id: "request-id",
35
- straddle_account_id: "straddle-account-id"
36
- ),
31
+ headers: parsed.transform_keys(
32
+ correlation_id: "correlation-id",
33
+ request_id: "request-id",
34
+ straddle_account_id: "straddle-account-id"
35
+ ),
37
36
  model: Straddle::FundingEventResponse,
38
37
  options: options
39
38
  )
@@ -42,7 +41,9 @@ module Straddle
42
41
  # Some parameter documentations has been truncated, see
43
42
  # {Straddle::Models::FundingEventListParams} for more details.
44
43
  #
45
- # Returns a paginated list of funding events that match the specified filters.
44
+ # Returns a paginated list of funding event summaries matching the specified
45
+ # filters. Supports filtering by direction, event type, status, trace ID, and
46
+ # creation dates.
46
47
  #
47
48
  # @overload list(created_from: nil, created_to: nil, direction: nil, event_type: nil, page_number: nil, page_size: nil, search_text: nil, sort_by: nil, sort_order: nil, status: nil, status_reason: nil, status_source: nil, trace_id: nil, trace_number: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
48
49
  #
@@ -108,12 +109,11 @@ module Straddle
108
109
  method: :get,
109
110
  path: "v1/funding_events",
110
111
  query: query,
111
- headers:
112
- parsed.except(*query_params).transform_keys(
113
- correlation_id: "correlation-id",
114
- request_id: "request-id",
115
- straddle_account_id: "straddle-account-id"
116
- ),
112
+ headers: parsed.except(*query_params).transform_keys(
113
+ correlation_id: "correlation-id",
114
+ request_id: "request-id",
115
+ straddle_account_id: "straddle-account-id"
116
+ ),
117
117
  model: Straddle::FundingEventSummaryList,
118
118
  options: options
119
119
  )
@@ -122,7 +122,8 @@ module Straddle
122
122
  # Some parameter documentations has been truncated, see
123
123
  # {Straddle::Models::FundingEventListPaymentsParams} for more details.
124
124
  #
125
- # Returns a paginated list of payments included in the funding event.
125
+ # Returns a paginated list of payments included in the specified funding event
126
+ # `id`. Includes each payment's type, status, amounts, and trace IDs.
126
127
  #
127
128
  # @overload list_payments(id, default_page_size: nil, default_sort: nil, default_sort_order: nil, include_metadata: nil, page_number: nil, page_size: nil, sort_by: nil, sort_order: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
128
129
  #
@@ -172,12 +173,11 @@ module Straddle
172
173
  method: :get,
173
174
  path: ["v1/funding_event_payments/%1$s", id],
174
175
  query: query,
175
- headers:
176
- parsed.except(*query_params).transform_keys(
177
- correlation_id: "correlation-id",
178
- request_id: "request-id",
179
- straddle_account_id: "straddle-account-id"
180
- ),
176
+ headers: parsed.except(*query_params).transform_keys(
177
+ correlation_id: "correlation-id",
178
+ request_id: "request-id",
179
+ straddle_account_id: "straddle-account-id"
180
+ ),
181
181
  model: Straddle::FundingEventPaymentList,
182
182
  options: options
183
183
  )
@@ -164,11 +164,10 @@ module Straddle
164
164
  method: :get,
165
165
  path: "v1/linked_bank_accounts",
166
166
  query: query,
167
- headers:
168
- parsed.except(*query_params).transform_keys(
169
- correlation_id: "correlation-id",
170
- request_id: "request-id"
171
- ),
167
+ headers: parsed.except(*query_params).transform_keys(
168
+ correlation_id: "correlation-id",
169
+ request_id: "request-id"
170
+ ),
172
171
  model: Straddle::LinkedBankAccountList,
173
172
  options: options
174
173
  )
@@ -197,12 +196,11 @@ module Straddle
197
196
  @client.request(
198
197
  method: :patch,
199
198
  path: ["v1/linked_bank_accounts/%1$s/cancel", linked_bank_account_id],
200
- headers:
201
- parsed.transform_keys(
202
- correlation_id: "correlation-id",
203
- idempotency_key: "idempotency-key",
204
- request_id: "request-id"
205
- ),
199
+ headers: parsed.transform_keys(
200
+ correlation_id: "correlation-id",
201
+ idempotency_key: "idempotency-key",
202
+ request_id: "request-id"
203
+ ),
206
204
  model: Straddle::LinkedBankAccountResponse,
207
205
  options: options
208
206
  )
@@ -46,7 +46,8 @@ module Straddle
46
46
  )
47
47
  end
48
48
 
49
- # Returns the organization with the specified ID.
49
+ # Returns the organization with the specified `organization_id`. Includes the
50
+ # organization's name, `external_id`, metadata, and timestamps.
50
51
  #
51
52
  # @overload retrieve(organization_id, correlation_id: nil, request_id: nil, request_options: {})
52
53
  #
@@ -109,11 +110,10 @@ module Straddle
109
110
  method: :get,
110
111
  path: "v1/organizations",
111
112
  query: query,
112
- headers:
113
- parsed.except(*query_params).transform_keys(
114
- correlation_id: "correlation-id",
115
- request_id: "request-id"
116
- ),
113
+ headers: parsed.except(*query_params).transform_keys(
114
+ correlation_id: "correlation-id",
115
+ request_id: "request-id"
116
+ ),
117
117
  model: Straddle::OrganizationList,
118
118
  options: options
119
119
  )
@@ -29,12 +29,11 @@ module Straddle
29
29
  @client.request(
30
30
  method: :get,
31
31
  path: ["v1/paykeys/%1$s/review", id],
32
- headers:
33
- parsed.transform_keys(
34
- correlation_id: "correlation-id",
35
- request_id: "request-id",
36
- straddle_account_id: "straddle-account-id"
37
- ),
32
+ headers: parsed.transform_keys(
33
+ correlation_id: "correlation-id",
34
+ request_id: "request-id",
35
+ straddle_account_id: "straddle-account-id"
36
+ ),
38
37
  model: Straddle::Paykeys::PaykeyReviewResponse,
39
38
  options: options
40
39
  )
@@ -33,12 +33,11 @@ module Straddle
33
33
  @client.request(
34
34
  method: :get,
35
35
  path: ["v1/paykeys/%1$s", id],
36
- headers:
37
- parsed.transform_keys(
38
- correlation_id: "correlation-id",
39
- request_id: "request-id",
40
- straddle_account_id: "straddle-account-id"
41
- ),
36
+ headers: parsed.transform_keys(
37
+ correlation_id: "correlation-id",
38
+ request_id: "request-id",
39
+ straddle_account_id: "straddle-account-id"
40
+ ),
42
41
  model: Straddle::PaykeyResponse,
43
42
  options: options
44
43
  )
@@ -105,12 +104,11 @@ module Straddle
105
104
  method: :get,
106
105
  path: "v1/paykeys",
107
106
  query: query,
108
- headers:
109
- parsed.except(*query_params).transform_keys(
110
- correlation_id: "correlation-id",
111
- request_id: "request-id",
112
- straddle_account_id: "straddle-account-id"
113
- ),
107
+ headers: parsed.except(*query_params).transform_keys(
108
+ correlation_id: "correlation-id",
109
+ request_id: "request-id",
110
+ straddle_account_id: "straddle-account-id"
111
+ ),
114
112
  model: Straddle::PaykeySummaryList,
115
113
  options: options
116
114
  )
@@ -119,7 +117,8 @@ module Straddle
119
117
  # Some parameter documentations has been truncated, see
120
118
  # {Straddle::Models::PaykeyCancelParams} for more details.
121
119
  #
122
- # Cancels a paykey so it cannot be used for new payments.
120
+ # Cancels a paykey by `id` so it cannot be used for new payments. Accepts an
121
+ # optional cancellation `reason` and returns the updated paykey.
123
122
  #
124
123
  # @overload cancel(id, reason: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
125
124
  #
@@ -182,12 +181,11 @@ module Straddle
182
181
  @client.request(
183
182
  method: :get,
184
183
  path: ["v1/paykeys/%1$s/unmasked", id],
185
- headers:
186
- parsed.transform_keys(
187
- correlation_id: "correlation-id",
188
- request_id: "request-id",
189
- straddle_account_id: "straddle-account-id"
190
- ),
184
+ headers: parsed.transform_keys(
185
+ correlation_id: "correlation-id",
186
+ request_id: "request-id",
187
+ straddle_account_id: "straddle-account-id"
188
+ ),
191
189
  model: Straddle::UnmaskedPaykeyResponse,
192
190
  options: options
193
191
  )
@@ -218,13 +216,12 @@ module Straddle
218
216
  @client.request(
219
217
  method: :put,
220
218
  path: ["v1/paykeys/%1$s/refresh_balance", id],
221
- headers:
222
- parsed.transform_keys(
223
- correlation_id: "correlation-id",
224
- idempotency_key: "idempotency-key",
225
- request_id: "request-id",
226
- straddle_account_id: "straddle-account-id"
227
- ),
219
+ headers: parsed.transform_keys(
220
+ correlation_id: "correlation-id",
221
+ idempotency_key: "idempotency-key",
222
+ request_id: "request-id",
223
+ straddle_account_id: "straddle-account-id"
224
+ ),
228
225
  model: Straddle::PaykeyResponse,
229
226
  options: options
230
227
  )
@@ -255,13 +252,12 @@ module Straddle
255
252
  @client.request(
256
253
  method: :put,
257
254
  path: ["v1/paykeys/%1$s/refresh_review", id],
258
- headers:
259
- parsed.transform_keys(
260
- correlation_id: "correlation-id",
261
- idempotency_key: "idempotency-key",
262
- request_id: "request-id",
263
- straddle_account_id: "straddle-account-id"
264
- ),
255
+ headers: parsed.transform_keys(
256
+ correlation_id: "correlation-id",
257
+ idempotency_key: "idempotency-key",
258
+ request_id: "request-id",
259
+ straddle_account_id: "straddle-account-id"
260
+ ),
265
261
  model: Straddle::PaykeyResponse,
266
262
  options: options
267
263
  )
@@ -290,12 +286,11 @@ module Straddle
290
286
  @client.request(
291
287
  method: :get,
292
288
  path: ["v1/paykeys/%1$s/reveal", id],
293
- headers:
294
- parsed.transform_keys(
295
- correlation_id: "correlation-id",
296
- request_id: "request-id",
297
- straddle_account_id: "straddle-account-id"
298
- ),
289
+ headers: parsed.transform_keys(
290
+ correlation_id: "correlation-id",
291
+ request_id: "request-id",
292
+ straddle_account_id: "straddle-account-id"
293
+ ),
299
294
  model: Straddle::RevealedPaykeyResponse,
300
295
  options: options
301
296
  )
@@ -7,7 +7,9 @@ module Straddle
7
7
  # Some parameter documentations has been truncated, see
8
8
  # {Straddle::Models::PaymentListParams} for more details.
9
9
  #
10
- # Returns a paged list of charges and payouts that match the filters.
10
+ # Returns a paginated list of charges and payouts matching the specified filters.
11
+ # Supports filtering by payment type, status, customer, paykey, amount range, and
12
+ # dates.
11
13
  #
12
14
  # @overload list(customer_id: nil, default_page_size: nil, default_sort: nil, default_sort_order: nil, external_id: nil, funding_id: nil, has_refund: nil, has_resubmit: nil, include_metadata: nil, is_refund: nil, is_resubmit: nil, max_amount: nil, max_created_at: nil, max_effective_at: nil, max_payment_date: nil, max_updated_at: nil, min_amount: nil, min_created_at: nil, min_effective_at: nil, min_payment_date: nil, min_updated_at: nil, page_number: nil, page_size: nil, paykey: nil, paykey_id: nil, payment_id: nil, payment_status: nil, payment_type: nil, search_text: nil, sort_by: nil, sort_order: nil, status_reason: nil, status_source: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
13
15
  #
@@ -130,12 +132,11 @@ module Straddle
130
132
  method: :get,
131
133
  path: "v1/payments",
132
134
  query: query,
133
- headers:
134
- parsed.except(*query_params).transform_keys(
135
- correlation_id: "correlation-id",
136
- request_id: "request-id",
137
- straddle_account_id: "straddle-account-id"
138
- ),
135
+ headers: parsed.except(*query_params).transform_keys(
136
+ correlation_id: "correlation-id",
137
+ request_id: "request-id",
138
+ straddle_account_id: "straddle-account-id"
139
+ ),
139
140
  model: Straddle::PaymentSummaryList,
140
141
  options: options
141
142
  )
@@ -61,7 +61,8 @@ module Straddle
61
61
  )
62
62
  end
63
63
 
64
- # Returns a payout by its unique identifier.
64
+ # Returns a payout by its unique `id`. Includes payment amount, status history,
65
+ # customer and paykey details, funding IDs, and trace IDs.
65
66
  #
66
67
  # @overload retrieve(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
67
68
  #
@@ -83,12 +84,11 @@ module Straddle
83
84
  @client.request(
84
85
  method: :get,
85
86
  path: ["v1/payouts/%1$s", id],
86
- headers:
87
- parsed.transform_keys(
88
- correlation_id: "correlation-id",
89
- request_id: "request-id",
90
- straddle_account_id: "straddle-account-id"
91
- ),
87
+ headers: parsed.transform_keys(
88
+ correlation_id: "correlation-id",
89
+ request_id: "request-id",
90
+ straddle_account_id: "straddle-account-id"
91
+ ),
92
92
  model: Straddle::PayoutResponse,
93
93
  options: options
94
94
  )
@@ -229,7 +229,8 @@ module Straddle
229
229
  )
230
230
  end
231
231
 
232
- # Return a payout with its sensitive fields unmasked.
232
+ # Returns a payout by `id` with sensitive fields unmasked, including the full
233
+ # `paykey` value. Includes payment status history, funding IDs, and trace IDs.
233
234
  #
234
235
  # @overload list_unmasked(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
235
236
  #
@@ -251,12 +252,11 @@ module Straddle
251
252
  @client.request(
252
253
  method: :get,
253
254
  path: ["v1/payouts/%1$s/unmask", id],
254
- headers:
255
- parsed.transform_keys(
256
- correlation_id: "correlation-id",
257
- request_id: "request-id",
258
- straddle_account_id: "straddle-account-id"
259
- ),
255
+ headers: parsed.transform_keys(
256
+ correlation_id: "correlation-id",
257
+ request_id: "request-id",
258
+ straddle_account_id: "straddle-account-id"
259
+ ),
260
260
  model: Straddle::UnmaskedPayoutResponse,
261
261
  options: options
262
262
  )
@@ -389,7 +389,10 @@ module Straddle
389
389
  @client.request(
390
390
  method: :post,
391
391
  path: ["v1/payouts/%1$s/authorization", id],
392
- headers: parsed.slice(*header_params.keys).transform_keys(header_params),
392
+ headers: {
393
+ "content-type" => "multipart/form-data",
394
+ **parsed.slice(*header_params.keys).transform_keys(header_params)
395
+ },
393
396
  body: parsed.except(*header_params.keys),
394
397
  model: Straddle::PayoutResponse,
395
398
  options: options
@@ -62,7 +62,9 @@ module Straddle
62
62
  )
63
63
  end
64
64
 
65
- # Returns the representative with the specified ID.
65
+ # Returns the representative with the specified `representative_id`. Includes
66
+ # personal details, verification status, and ownership or control relationship
67
+ # flags.
66
68
  #
67
69
  # @overload retrieve(representative_id, correlation_id: nil, request_id: nil, request_options: {})
68
70
  #
@@ -194,11 +196,10 @@ module Straddle
194
196
  method: :get,
195
197
  path: "v1/representatives",
196
198
  query: query,
197
- headers:
198
- parsed.except(*query_params).transform_keys(
199
- correlation_id: "correlation-id",
200
- request_id: "request-id"
201
- ),
199
+ headers: parsed.except(*query_params).transform_keys(
200
+ correlation_id: "correlation-id",
201
+ request_id: "request-id"
202
+ ),
202
203
  model: Straddle::RepresentativeList,
203
204
  options: options
204
205
  )