straddle 1.0.0 → 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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +65 -0
  3. data/README.md +84 -89
  4. data/SKILL.md +4 -2
  5. data/api.md +26 -26
  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/payout.rb +14 -14
  29. data/lib/straddle/models/unmasked_payout.rb +14 -14
  30. data/lib/straddle/models/webhook_unwrap_params.rb +2 -0
  31. data/lib/straddle/models.rb +30 -31
  32. data/lib/straddle/request_options.rb +13 -5
  33. data/lib/straddle/resources/accounts.rb +11 -12
  34. data/lib/straddle/resources/bridge.rb +8 -4
  35. data/lib/straddle/resources/capability_requests.rb +4 -5
  36. data/lib/straddle/resources/charges.rb +18 -15
  37. data/lib/straddle/resources/customers/review.rb +5 -6
  38. data/lib/straddle/resources/customers.rb +34 -35
  39. data/lib/straddle/resources/funding_events.rb +20 -20
  40. data/lib/straddle/resources/linked_bank_accounts.rb +9 -11
  41. data/lib/straddle/resources/organizations.rb +6 -6
  42. data/lib/straddle/resources/paykeys/review.rb +5 -6
  43. data/lib/straddle/resources/paykeys.rb +34 -39
  44. data/lib/straddle/resources/payments.rb +8 -7
  45. data/lib/straddle/resources/payouts.rb +18 -15
  46. data/lib/straddle/resources/representatives.rb +7 -6
  47. data/lib/straddle/resources/webhooks.rb +63 -6
  48. data/lib/straddle/version.rb +1 -1
  49. data/lib/straddle.rb +5 -6
  50. data/rbi/straddle/client.rbi +13 -0
  51. data/rbi/straddle/errors.rbi +25 -27
  52. data/rbi/straddle/internal/transport/base_client.rbi +45 -54
  53. data/rbi/straddle/internal/transport/connection_pool.rbi +44 -0
  54. data/rbi/straddle/internal/transport/pooled_net_requester.rbi +15 -16
  55. data/rbi/straddle/internal/type/base_model.rbi +24 -38
  56. data/rbi/straddle/internal/type/base_page.rbi +5 -0
  57. data/rbi/straddle/internal/type/converter.rbi +9 -42
  58. data/rbi/straddle/internal/type/enum.rbi +1 -5
  59. data/rbi/straddle/internal/type/request_parameters.rbi +1 -3
  60. data/rbi/straddle/internal/type/union.rbi +2 -11
  61. data/rbi/straddle/internal/util.rbi +101 -115
  62. data/rbi/straddle/internal/webhook_verifier.rbi +86 -0
  63. data/rbi/straddle/internal.rbi +1 -2
  64. data/rbi/straddle/models/capability_request_create_params.rbi +18 -18
  65. data/rbi/straddle/models/paykey.rbi +4 -2
  66. data/rbi/straddle/models/paykey_created_v1_webhook_event.rbi +6 -2
  67. data/rbi/straddle/models/paykey_event_v1_webhook_event.rbi +6 -2
  68. data/rbi/straddle/models/payout.rbi +18 -18
  69. data/rbi/straddle/models/unmasked_payout.rbi +18 -18
  70. data/rbi/straddle/models/webhook_unwrap_params.rbi +2 -0
  71. data/rbi/straddle/models.rbi +2 -0
  72. data/rbi/straddle/request_options.rbi +4 -10
  73. data/rbi/straddle/resources/accounts.rbi +2 -1
  74. data/rbi/straddle/resources/bridge.rbi +8 -4
  75. data/rbi/straddle/resources/charges.rbi +4 -2
  76. data/rbi/straddle/resources/customers.rbi +7 -3
  77. data/rbi/straddle/resources/funding_events.rbi +5 -2
  78. data/rbi/straddle/resources/organizations.rbi +2 -1
  79. data/rbi/straddle/resources/paykeys.rbi +2 -1
  80. data/rbi/straddle/resources/payments.rbi +3 -1
  81. data/rbi/straddle/resources/payouts.rbi +4 -2
  82. data/rbi/straddle/resources/representatives.rbi +3 -1
  83. data/rbi/straddle/resources/webhooks.rbi +107 -2
  84. data/sig/straddle/client.rbs +4 -0
  85. data/sig/straddle/errors.rbs +13 -0
  86. data/sig/straddle/internal/transport/base_client.rbs +19 -1
  87. data/sig/straddle/internal/transport/connection_pool.rbs +19 -0
  88. data/sig/straddle/internal/transport/pooled_net_requester.rbs +11 -1
  89. data/sig/straddle/internal/type/base_model.rbs +4 -0
  90. data/sig/straddle/internal/type/base_page.rbs +2 -0
  91. data/sig/straddle/internal/util.rbs +29 -1
  92. data/sig/straddle/internal/webhook_verifier.rbs +53 -0
  93. data/sig/straddle/models/capability_request_create_params.rbs +24 -24
  94. data/sig/straddle/models/payout.rbs +12 -12
  95. data/sig/straddle/models/unmasked_payout.rbs +12 -12
  96. data/sig/straddle/models/webhook_unwrap_params.rbs +4 -0
  97. data/sig/straddle/models.rbs +2 -0
  98. data/sig/straddle/resources/webhooks.rbs +59 -1
  99. metadata +12 -60
@@ -26,8 +26,8 @@ module Straddle
26
26
  end
27
27
 
28
28
  # @!attribute idempotency_key
29
- # Idempotency key to send with request and all associated retries. Will only be
30
- # sent for write requests.
29
+ # Idempotency key to send with this request and its retries when the client
30
+ # has an idempotency header configured.
31
31
  #
32
32
  # @return [String, nil]
33
33
  optional :idempotency_key, String
@@ -37,7 +37,10 @@ module Straddle
37
37
  # `query` given at the client level.
38
38
  #
39
39
  # @return [Hash{String=>Array<String>, String, nil}, nil]
40
- optional :extra_query, Straddle::Internal::Type::HashOf[Straddle::Internal::Type::ArrayOf[String]]
40
+ optional :extra_query,
41
+ Straddle::Internal::Type::HashOf[
42
+ Straddle::Internal::Type::ArrayOf[String]
43
+ ]
41
44
 
42
45
  # @!attribute extra_headers
43
46
  # Extra headers to send with the request. These are `.merged`’d into any
@@ -51,7 +54,10 @@ module Straddle
51
54
  # generated as part of the normal request.
52
55
  #
53
56
  # @return [Object, nil]
54
- optional :extra_body, Straddle::Internal::Type::HashOf[Straddle::Internal::Type::Unknown]
57
+ optional :extra_body,
58
+ Straddle::Internal::Type::HashOf[
59
+ Straddle::Internal::Type::Unknown
60
+ ]
55
61
 
56
62
  # @!attribute max_retries
57
63
  # Maximum number of retries to attempt after a failed initial request.
@@ -71,7 +77,9 @@ module Straddle
71
77
  # @param values [Hash{Symbol=>Object}]
72
78
 
73
79
  define_sorbet_constant!(:OrHash) do
74
- T.type_alias { T.any(Straddle::RequestOptions, Straddle::Internal::AnyHash) }
80
+ T.type_alias do
81
+ T.any(Straddle::RequestOptions, Straddle::Internal::AnyHash)
82
+ end
75
83
  end
76
84
  end
77
85
  end
@@ -52,7 +52,8 @@ module Straddle
52
52
  )
53
53
  end
54
54
 
55
- # Returns the account with the specified ID.
55
+ # Returns the account with the specified `account_id`. Includes the account's
56
+ # status, business profile, capabilities, settings, and access level.
56
57
  #
57
58
  # @overload retrieve(account_id, correlation_id: nil, request_id: nil, request_options: {})
58
59
  #
@@ -163,11 +164,10 @@ module Straddle
163
164
  method: :get,
164
165
  path: "v1/accounts",
165
166
  query: query,
166
- headers:
167
- parsed.except(*query_params).transform_keys(
168
- correlation_id: "correlation-id",
169
- request_id: "request-id"
170
- ),
167
+ headers: parsed.except(*query_params).transform_keys(
168
+ correlation_id: "correlation-id",
169
+ request_id: "request-id"
170
+ ),
171
171
  model: Straddle::AccountList,
172
172
  options: options
173
173
  )
@@ -246,12 +246,11 @@ module Straddle
246
246
  method: :post,
247
247
  path: ["v1/accounts/%1$s/simulate", account_id],
248
248
  query: query,
249
- headers:
250
- parsed.except(*query_params).transform_keys(
251
- correlation_id: "correlation-id",
252
- idempotency_key: "idempotency-key",
253
- request_id: "request-id"
254
- ),
249
+ headers: parsed.except(*query_params).transform_keys(
250
+ correlation_id: "correlation-id",
251
+ idempotency_key: "idempotency-key",
252
+ request_id: "request-id"
253
+ ),
255
254
  model: Straddle::AccountResponse,
256
255
  options: options
257
256
  )
@@ -8,7 +8,8 @@ module Straddle
8
8
  # Some parameter documentations has been truncated, see
9
9
  # {Straddle::Models::BridgeCreateBankAccountPaykeyParams} for more details.
10
10
  #
11
- # Creates a paykey from a routing number, account number, and account type.
11
+ # Creates a paykey directly from a customer's `routing_number`, `account_number`,
12
+ # and `account_type`. Returns the new paykey with its status and bank details.
12
13
  #
13
14
  # @overload create_bank_account_paykey(account_number:, account_type:, customer_id:, routing_number:, config: nil, external_id: nil, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
14
15
  #
@@ -60,7 +61,8 @@ module Straddle
60
61
  # Some parameter documentations has been truncated, see
61
62
  # {Straddle::Models::BridgeCreatePlaidPaykeyParams} for more details.
62
63
  #
63
- # Creates a paykey from a Plaid processor token.
64
+ # Creates a paykey from a customer's `plaid_token`. Returns the created paykey
65
+ # with its status, institution name, and bank details.
64
66
  #
65
67
  # @overload create_plaid_paykey(customer_id:, plaid_token:, config: nil, external_id: nil, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
66
68
  #
@@ -108,7 +110,8 @@ module Straddle
108
110
  # Some parameter documentations has been truncated, see
109
111
  # {Straddle::Models::BridgeCreateQuilttPaykeyParams} for more details.
110
112
  #
111
- # Creates a paykey from a Quiltt processor token.
113
+ # Creates a paykey from a customer's `quiltt_token`. Returns the created paykey
114
+ # with its unmasked `paykey` value, status, and bank details.
112
115
  #
113
116
  # @overload create_quiltt_paykey(customer_id:, quiltt_token:, config: nil, external_id: nil, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
114
117
  #
@@ -156,7 +159,8 @@ module Straddle
156
159
  # Some parameter documentations has been truncated, see
157
160
  # {Straddle::Models::BridgeCreateTokenParams} for more details.
158
161
  #
159
- # Creates a session token for the Bridge widget.
162
+ # Creates a `bridge_token` for a customer to initialize the Bridge widget. Use
163
+ # this token to connect bank accounts and create paykeys.
160
164
  #
161
165
  # @overload create_token(customer_id:, config: nil, external_id: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
162
166
  #
@@ -96,11 +96,10 @@ module Straddle
96
96
  method: :get,
97
97
  path: ["v1/accounts/%1$s/capability_requests", account_id],
98
98
  query: query,
99
- headers:
100
- parsed.except(*query_params).transform_keys(
101
- correlation_id: "correlation-id",
102
- request_id: "request-id"
103
- ),
99
+ headers: parsed.except(*query_params).transform_keys(
100
+ correlation_id: "correlation-id",
101
+ request_id: "request-id"
102
+ ),
104
103
  model: Straddle::CapabilityRequestList,
105
104
  options: options
106
105
  )
@@ -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
  )