straddle 0.3.0 → 0.4.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 (248) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +74 -0
  3. data/README.md +10 -1
  4. data/lib/straddle/client.rb +34 -0
  5. data/lib/straddle/internal/transport/pooled_net_requester.rb +13 -11
  6. data/lib/straddle/internal/util.rb +39 -3
  7. data/lib/straddle/models/bridge/link_create_paykey_response.rb +8 -0
  8. data/lib/straddle/models/bridge/link_create_tan_response.rb +8 -0
  9. data/lib/straddle/models/charge_cancel_params.rb +8 -1
  10. data/lib/straddle/models/charge_create_params.rb +20 -4
  11. data/lib/straddle/models/charge_get_params.rb +7 -1
  12. data/lib/straddle/models/charge_hold_params.rb +8 -1
  13. data/lib/straddle/models/charge_release_params.rb +8 -1
  14. data/lib/straddle/models/charge_unmask_params.rb +7 -1
  15. data/lib/straddle/models/charge_unmask_response.rb +59 -5
  16. data/lib/straddle/models/charge_update_params.rb +11 -4
  17. data/lib/straddle/models/charge_v1.rb +59 -5
  18. data/lib/straddle/models/customer_delete_params.rb +7 -1
  19. data/lib/straddle/models/customer_get_params.rb +7 -1
  20. data/lib/straddle/models/customer_unmasked_params.rb +7 -1
  21. data/lib/straddle/models/customer_update_params.rb +8 -1
  22. data/lib/straddle/models/customers/review_decision_params.rb +8 -1
  23. data/lib/straddle/models/customers/review_get_params.rb +7 -1
  24. data/lib/straddle/models/customers/review_refresh_review_params.rb +7 -1
  25. data/lib/straddle/models/embed/account_get_params.rb +11 -1
  26. data/lib/straddle/models/embed/account_onboard_params.rb +7 -1
  27. data/lib/straddle/models/embed/account_paged_v1.rb +4 -0
  28. data/lib/straddle/models/embed/account_simulate_params.rb +7 -1
  29. data/lib/straddle/models/embed/account_update_params.rb +8 -1
  30. data/lib/straddle/models/embed/account_v1.rb +4 -0
  31. data/lib/straddle/models/embed/accounts/capability_request_create_params.rb +8 -1
  32. data/lib/straddle/models/embed/accounts/capability_request_list_params.rb +8 -1
  33. data/lib/straddle/models/embed/accounts/capability_request_paged_v1.rb +9 -1
  34. data/lib/straddle/models/embed/address_v1.rb +14 -38
  35. data/lib/straddle/models/embed/linked_bank_account_cancel_params.rb +7 -1
  36. data/lib/straddle/models/embed/linked_bank_account_get_params.rb +7 -1
  37. data/lib/straddle/models/embed/linked_bank_account_unmask_params.rb +7 -1
  38. data/lib/straddle/models/embed/linked_bank_account_update_params.rb +8 -1
  39. data/lib/straddle/models/embed/organization_get_params.rb +7 -1
  40. data/lib/straddle/models/embed/representative_get_params.rb +7 -1
  41. data/lib/straddle/models/embed/representative_unmask_params.rb +7 -1
  42. data/lib/straddle/models/embed/representative_update_params.rb +8 -1
  43. data/lib/straddle/models/funding_event_get_params.rb +7 -1
  44. data/lib/straddle/models/funding_event_list_params.rb +105 -1
  45. data/lib/straddle/models/funding_event_summary_item_v1.rb +128 -1
  46. data/lib/straddle/models/funding_event_summary_paged_v1.rb +128 -1
  47. data/lib/straddle/models/paykey_cancel_params.rb +7 -1
  48. data/lib/straddle/models/paykey_get_params.rb +7 -1
  49. data/lib/straddle/models/paykey_list_params.rb +24 -1
  50. data/lib/straddle/models/paykey_reveal_params.rb +7 -1
  51. data/lib/straddle/models/paykey_reveal_response.rb +8 -0
  52. data/lib/straddle/models/paykey_summary_paged_v1.rb +19 -1
  53. data/lib/straddle/models/paykey_unmasked_params.rb +7 -1
  54. data/lib/straddle/models/paykey_unmasked_v1.rb +8 -0
  55. data/lib/straddle/models/paykey_update_balance_params.rb +7 -1
  56. data/lib/straddle/models/paykey_v1.rb +19 -1
  57. data/lib/straddle/models/paykeys/review_decision_params.rb +7 -1
  58. data/lib/straddle/models/paykeys/review_get_params.rb +7 -1
  59. data/lib/straddle/models/paykeys/review_get_response.rb +19 -4
  60. data/lib/straddle/models/paykeys/review_refresh_review_params.rb +7 -1
  61. data/lib/straddle/models/payment_list_params.rb +17 -1
  62. data/lib/straddle/models/payment_summary_paged_v1.rb +13 -4
  63. data/lib/straddle/models/payout_cancel_params.rb +8 -1
  64. data/lib/straddle/models/payout_create_params.rb +20 -4
  65. data/lib/straddle/models/payout_get_params.rb +7 -1
  66. data/lib/straddle/models/payout_hold_params.rb +8 -1
  67. data/lib/straddle/models/payout_release_params.rb +8 -1
  68. data/lib/straddle/models/payout_unmask_params.rb +7 -1
  69. data/lib/straddle/models/payout_unmask_response.rb +59 -5
  70. data/lib/straddle/models/payout_update_params.rb +11 -4
  71. data/lib/straddle/models/payout_v1.rb +59 -5
  72. data/lib/straddle/models/status_details_v1.rb +7 -0
  73. data/lib/straddle/resources/bridge/link.rb +12 -6
  74. data/lib/straddle/resources/bridge.rb +13 -1
  75. data/lib/straddle/resources/charges.rb +13 -8
  76. data/lib/straddle/resources/customers/review.rb +7 -1
  77. data/lib/straddle/resources/customers.rb +23 -10
  78. data/lib/straddle/resources/embed/accounts/capability_requests.rb +9 -4
  79. data/lib/straddle/resources/embed/accounts.rb +25 -14
  80. data/lib/straddle/resources/embed/linked_bank_accounts.rb +11 -6
  81. data/lib/straddle/resources/embed/organizations.rb +7 -2
  82. data/lib/straddle/resources/embed/representatives.rb +15 -8
  83. data/lib/straddle/resources/embed.rb +19 -0
  84. data/lib/straddle/resources/funding_events.rb +22 -3
  85. data/lib/straddle/resources/paykeys/review.rb +7 -2
  86. data/lib/straddle/resources/paykeys.rb +36 -11
  87. data/lib/straddle/resources/payments.rb +12 -6
  88. data/lib/straddle/resources/payouts.rb +11 -7
  89. data/lib/straddle/version.rb +1 -1
  90. data/lib/straddle.rb +1 -0
  91. data/manifest.yaml +1 -0
  92. data/rbi/straddle/client.rbi +34 -0
  93. data/rbi/straddle/internal/util.rbi +21 -1
  94. data/rbi/straddle/models/bridge/link_create_paykey_response.rbi +40 -0
  95. data/rbi/straddle/models/bridge/link_create_tan_response.rbi +40 -0
  96. data/rbi/straddle/models/charge_cancel_params.rbi +6 -0
  97. data/rbi/straddle/models/charge_create_params.rbi +19 -3
  98. data/rbi/straddle/models/charge_get_params.rbi +6 -0
  99. data/rbi/straddle/models/charge_hold_params.rbi +6 -0
  100. data/rbi/straddle/models/charge_release_params.rbi +6 -0
  101. data/rbi/straddle/models/charge_unmask_params.rbi +6 -0
  102. data/rbi/straddle/models/charge_unmask_response.rbi +143 -6
  103. data/rbi/straddle/models/charge_update_params.rbi +9 -3
  104. data/rbi/straddle/models/charge_v1.rbi +135 -6
  105. data/rbi/straddle/models/customer_delete_params.rbi +6 -0
  106. data/rbi/straddle/models/customer_get_params.rbi +6 -0
  107. data/rbi/straddle/models/customer_unmasked_params.rbi +6 -0
  108. data/rbi/straddle/models/customer_update_params.rbi +6 -0
  109. data/rbi/straddle/models/customers/review_decision_params.rbi +6 -0
  110. data/rbi/straddle/models/customers/review_get_params.rbi +6 -0
  111. data/rbi/straddle/models/customers/review_refresh_review_params.rbi +6 -0
  112. data/rbi/straddle/models/embed/account_get_params.rbi +13 -1
  113. data/rbi/straddle/models/embed/account_onboard_params.rbi +6 -0
  114. data/rbi/straddle/models/embed/account_paged_v1.rbi +20 -0
  115. data/rbi/straddle/models/embed/account_simulate_params.rbi +6 -0
  116. data/rbi/straddle/models/embed/account_update_params.rbi +6 -0
  117. data/rbi/straddle/models/embed/account_v1.rbi +20 -0
  118. data/rbi/straddle/models/embed/accounts/capability_request_create_params.rbi +6 -0
  119. data/rbi/straddle/models/embed/accounts/capability_request_list_params.rbi +6 -0
  120. data/rbi/straddle/models/embed/accounts/capability_request_paged_v1.rbi +8 -0
  121. data/rbi/straddle/models/embed/address_v1.rbi +18 -42
  122. data/rbi/straddle/models/embed/linked_bank_account_cancel_params.rbi +6 -0
  123. data/rbi/straddle/models/embed/linked_bank_account_get_params.rbi +11 -1
  124. data/rbi/straddle/models/embed/linked_bank_account_unmask_params.rbi +11 -1
  125. data/rbi/straddle/models/embed/linked_bank_account_update_params.rbi +6 -0
  126. data/rbi/straddle/models/embed/organization_get_params.rbi +11 -1
  127. data/rbi/straddle/models/embed/representative_get_params.rbi +11 -1
  128. data/rbi/straddle/models/embed/representative_unmask_params.rbi +11 -1
  129. data/rbi/straddle/models/embed/representative_update_params.rbi +6 -0
  130. data/rbi/straddle/models/funding_event_get_params.rbi +6 -0
  131. data/rbi/straddle/models/funding_event_list_params.rbi +333 -0
  132. data/rbi/straddle/models/funding_event_summary_item_v1.rbi +392 -0
  133. data/rbi/straddle/models/funding_event_summary_paged_v1.rbi +393 -0
  134. data/rbi/straddle/models/paykey_cancel_params.rbi +6 -0
  135. data/rbi/straddle/models/paykey_get_params.rbi +6 -0
  136. data/rbi/straddle/models/paykey_list_params.rbi +30 -0
  137. data/rbi/straddle/models/paykey_reveal_params.rbi +6 -0
  138. data/rbi/straddle/models/paykey_reveal_response.rbi +40 -0
  139. data/rbi/straddle/models/paykey_summary_paged_v1.rbi +55 -3
  140. data/rbi/straddle/models/paykey_unmasked_params.rbi +6 -0
  141. data/rbi/straddle/models/paykey_unmasked_v1.rbi +40 -0
  142. data/rbi/straddle/models/paykey_update_balance_params.rbi +6 -0
  143. data/rbi/straddle/models/paykey_v1.rbi +52 -3
  144. data/rbi/straddle/models/paykeys/review_decision_params.rbi +6 -0
  145. data/rbi/straddle/models/paykeys/review_get_params.rbi +6 -0
  146. data/rbi/straddle/models/paykeys/review_get_response.rbi +55 -18
  147. data/rbi/straddle/models/paykeys/review_refresh_review_params.rbi +6 -0
  148. data/rbi/straddle/models/payment_list_params.rbi +51 -0
  149. data/rbi/straddle/models/payment_summary_paged_v1.rbi +16 -3
  150. data/rbi/straddle/models/payout_cancel_params.rbi +6 -0
  151. data/rbi/straddle/models/payout_create_params.rbi +19 -3
  152. data/rbi/straddle/models/payout_get_params.rbi +6 -0
  153. data/rbi/straddle/models/payout_hold_params.rbi +6 -0
  154. data/rbi/straddle/models/payout_release_params.rbi +6 -0
  155. data/rbi/straddle/models/payout_unmask_params.rbi +6 -0
  156. data/rbi/straddle/models/payout_unmask_response.rbi +140 -3
  157. data/rbi/straddle/models/payout_update_params.rbi +9 -3
  158. data/rbi/straddle/models/payout_v1.rbi +132 -3
  159. data/rbi/straddle/models/status_details_v1.rbi +29 -0
  160. data/rbi/straddle/resources/bridge/link.rbi +12 -6
  161. data/rbi/straddle/resources/bridge.rbi +13 -1
  162. data/rbi/straddle/resources/charges.rbi +13 -8
  163. data/rbi/straddle/resources/customers/review.rbi +7 -1
  164. data/rbi/straddle/resources/customers.rbi +20 -8
  165. data/rbi/straddle/resources/embed/accounts/capability_requests.rbi +6 -2
  166. data/rbi/straddle/resources/embed/accounts.rbi +19 -10
  167. data/rbi/straddle/resources/embed/linked_bank_accounts.rbi +8 -4
  168. data/rbi/straddle/resources/embed/organizations.rbi +4 -0
  169. data/rbi/straddle/resources/embed/representatives.rbi +12 -6
  170. data/rbi/straddle/resources/embed.rbi +19 -0
  171. data/rbi/straddle/resources/funding_events.rbi +27 -0
  172. data/rbi/straddle/resources/paykeys/review.rbi +7 -2
  173. data/rbi/straddle/resources/paykeys.rbi +26 -8
  174. data/rbi/straddle/resources/payments.rbi +8 -3
  175. data/rbi/straddle/resources/payouts.rbi +11 -7
  176. data/sig/straddle/internal/util.rbs +10 -0
  177. data/sig/straddle/models/bridge/link_create_paykey_response.rbs +17 -1
  178. data/sig/straddle/models/bridge/link_create_tan_response.rbs +17 -1
  179. data/sig/straddle/models/charge_cancel_params.rbs +5 -0
  180. data/sig/straddle/models/charge_create_params.rbs +14 -4
  181. data/sig/straddle/models/charge_get_params.rbs +5 -0
  182. data/sig/straddle/models/charge_hold_params.rbs +5 -0
  183. data/sig/straddle/models/charge_release_params.rbs +5 -0
  184. data/sig/straddle/models/charge_unmask_params.rbs +5 -0
  185. data/sig/straddle/models/charge_unmask_response.rbs +57 -7
  186. data/sig/straddle/models/charge_update_params.rbs +9 -4
  187. data/sig/straddle/models/charge_v1.rbs +57 -7
  188. data/sig/straddle/models/customer_delete_params.rbs +5 -0
  189. data/sig/straddle/models/customer_get_params.rbs +5 -0
  190. data/sig/straddle/models/customer_unmasked_params.rbs +5 -0
  191. data/sig/straddle/models/customer_update_params.rbs +5 -0
  192. data/sig/straddle/models/customers/review_decision_params.rbs +5 -0
  193. data/sig/straddle/models/customers/review_get_params.rbs +5 -0
  194. data/sig/straddle/models/customers/review_refresh_review_params.rbs +5 -0
  195. data/sig/straddle/models/embed/account_get_params.rbs +5 -1
  196. data/sig/straddle/models/embed/account_onboard_params.rbs +5 -0
  197. data/sig/straddle/models/embed/account_paged_v1.rbs +18 -2
  198. data/sig/straddle/models/embed/account_simulate_params.rbs +5 -0
  199. data/sig/straddle/models/embed/account_update_params.rbs +5 -0
  200. data/sig/straddle/models/embed/account_v1.rbs +18 -2
  201. data/sig/straddle/models/embed/accounts/capability_request_create_params.rbs +5 -0
  202. data/sig/straddle/models/embed/accounts/capability_request_list_params.rbs +5 -0
  203. data/sig/straddle/models/embed/accounts/capability_request_paged_v1.rbs +5 -0
  204. data/sig/straddle/models/embed/address_v1.rbs +12 -27
  205. data/sig/straddle/models/embed/linked_bank_account_cancel_params.rbs +10 -1
  206. data/sig/straddle/models/embed/linked_bank_account_get_params.rbs +9 -1
  207. data/sig/straddle/models/embed/linked_bank_account_unmask_params.rbs +9 -1
  208. data/sig/straddle/models/embed/linked_bank_account_update_params.rbs +5 -0
  209. data/sig/straddle/models/embed/organization_get_params.rbs +5 -1
  210. data/sig/straddle/models/embed/representative_get_params.rbs +9 -1
  211. data/sig/straddle/models/embed/representative_unmask_params.rbs +9 -1
  212. data/sig/straddle/models/embed/representative_update_params.rbs +5 -0
  213. data/sig/straddle/models/funding_event_get_params.rbs +5 -0
  214. data/sig/straddle/models/funding_event_list_params.rbs +125 -0
  215. data/sig/straddle/models/funding_event_summary_item_v1.rbs +164 -0
  216. data/sig/straddle/models/funding_event_summary_paged_v1.rbs +164 -0
  217. data/sig/straddle/models/paykey_cancel_params.rbs +5 -0
  218. data/sig/straddle/models/paykey_get_params.rbs +5 -0
  219. data/sig/straddle/models/paykey_list_params.rbs +17 -1
  220. data/sig/straddle/models/paykey_reveal_params.rbs +5 -0
  221. data/sig/straddle/models/paykey_reveal_response.rbs +17 -1
  222. data/sig/straddle/models/paykey_summary_paged_v1.rbs +25 -4
  223. data/sig/straddle/models/paykey_unmasked_params.rbs +5 -0
  224. data/sig/straddle/models/paykey_unmasked_v1.rbs +17 -1
  225. data/sig/straddle/models/paykey_update_balance_params.rbs +5 -0
  226. data/sig/straddle/models/paykey_v1.rbs +25 -4
  227. data/sig/straddle/models/paykeys/review_decision_params.rbs +5 -0
  228. data/sig/straddle/models/paykeys/review_get_params.rbs +5 -0
  229. data/sig/straddle/models/paykeys/review_get_response.rbs +28 -10
  230. data/sig/straddle/models/paykeys/review_refresh_review_params.rbs +5 -0
  231. data/sig/straddle/models/payment_list_params.rbs +23 -0
  232. data/sig/straddle/models/payment_summary_paged_v1.rbs +11 -4
  233. data/sig/straddle/models/payout_cancel_params.rbs +5 -0
  234. data/sig/straddle/models/payout_create_params.rbs +14 -4
  235. data/sig/straddle/models/payout_get_params.rbs +5 -0
  236. data/sig/straddle/models/payout_hold_params.rbs +5 -0
  237. data/sig/straddle/models/payout_release_params.rbs +5 -0
  238. data/sig/straddle/models/payout_unmask_params.rbs +5 -0
  239. data/sig/straddle/models/payout_unmask_response.rbs +54 -4
  240. data/sig/straddle/models/payout_update_params.rbs +9 -4
  241. data/sig/straddle/models/payout_v1.rbs +54 -4
  242. data/sig/straddle/models/status_details_v1.rbs +14 -0
  243. data/sig/straddle/resources/charges.rbs +2 -2
  244. data/sig/straddle/resources/funding_events.rbs +4 -0
  245. data/sig/straddle/resources/paykeys.rbs +2 -0
  246. data/sig/straddle/resources/payments.rbs +1 -0
  247. data/sig/straddle/resources/payouts.rbs +2 -2
  248. metadata +16 -2
@@ -89,7 +89,7 @@ module Straddle
89
89
  attr_accessor :currency
90
90
 
91
91
  # An arbitrary description for the payout.
92
- sig { returns(String) }
92
+ sig { returns(T.nilable(String)) }
93
93
  attr_accessor :description
94
94
 
95
95
  # Information about the device used when the customer authorized the payout.
@@ -132,6 +132,10 @@ module Straddle
132
132
  sig { returns(T::Array[Straddle::PayoutV1::Data::StatusHistory]) }
133
133
  attr_accessor :status_history
134
134
 
135
+ # Trace Ids.
136
+ sig { returns(T::Hash[Symbol, String]) }
137
+ attr_accessor :trace_ids
138
+
135
139
  # The time the payout was created.
136
140
  sig { returns(T.nilable(Time)) }
137
141
  attr_accessor :created_at
@@ -182,6 +186,19 @@ module Straddle
182
186
  sig { returns(T.nilable(Time)) }
183
187
  attr_accessor :processed_at
184
188
 
189
+ # Related payments.
190
+ sig do
191
+ returns(
192
+ T.nilable(
193
+ T::Hash[
194
+ Symbol,
195
+ Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
196
+ ]
197
+ )
198
+ )
199
+ end
200
+ attr_accessor :related_payments
201
+
185
202
  # The time the payout was last updated.
186
203
  sig { returns(T.nilable(Time)) }
187
204
  attr_accessor :updated_at
@@ -192,7 +209,7 @@ module Straddle
192
209
  amount: Integer,
193
210
  config: Straddle::PayoutV1::Data::Config::OrHash,
194
211
  currency: String,
195
- description: String,
212
+ description: T.nilable(String),
196
213
  device: Straddle::DeviceInfoV1::OrHash,
197
214
  external_id: String,
198
215
  funding_ids: T::Array[String],
@@ -202,6 +219,7 @@ module Straddle
202
219
  status_details: Straddle::StatusDetailsV1::OrHash,
203
220
  status_history:
204
221
  T::Array[Straddle::PayoutV1::Data::StatusHistory::OrHash],
222
+ trace_ids: T::Hash[Symbol, String],
205
223
  created_at: T.nilable(Time),
206
224
  customer_details: Straddle::CustomerDetailsV1::OrHash,
207
225
  effective_at: T.nilable(Time),
@@ -209,6 +227,13 @@ module Straddle
209
227
  paykey_details: Straddle::PaykeyDetailsV1::OrHash,
210
228
  payment_rail: Straddle::PayoutV1::Data::PaymentRail::OrSymbol,
211
229
  processed_at: T.nilable(Time),
230
+ related_payments:
231
+ T.nilable(
232
+ T::Hash[
233
+ Symbol,
234
+ Straddle::PayoutV1::Data::RelatedPayment::OrSymbol
235
+ ]
236
+ ),
212
237
  updated_at: T.nilable(Time)
213
238
  ).returns(T.attached_class)
214
239
  end
@@ -241,6 +266,8 @@ module Straddle
241
266
  status_details:,
242
267
  # History of the status changes for the payout.
243
268
  status_history:,
269
+ # Trace Ids.
270
+ trace_ids:,
244
271
  # The time the payout was created.
245
272
  created_at: nil,
246
273
  # Information about the customer associated with the payout.
@@ -258,6 +285,8 @@ module Straddle
258
285
  # The time the payout was processed by Straddle and originated to the payment
259
286
  # rail.
260
287
  processed_at: nil,
288
+ # Related payments.
289
+ related_payments: nil,
261
290
  # The time the payout was last updated.
262
291
  updated_at: nil
263
292
  )
@@ -270,7 +299,7 @@ module Straddle
270
299
  amount: Integer,
271
300
  config: Straddle::PayoutV1::Data::Config,
272
301
  currency: String,
273
- description: String,
302
+ description: T.nilable(String),
274
303
  device: Straddle::DeviceInfoV1,
275
304
  external_id: String,
276
305
  funding_ids: T::Array[String],
@@ -279,6 +308,7 @@ module Straddle
279
308
  status: Straddle::PayoutV1::Data::Status::TaggedSymbol,
280
309
  status_details: Straddle::StatusDetailsV1,
281
310
  status_history: T::Array[Straddle::PayoutV1::Data::StatusHistory],
311
+ trace_ids: T::Hash[Symbol, String],
282
312
  created_at: T.nilable(Time),
283
313
  customer_details: Straddle::CustomerDetailsV1,
284
314
  effective_at: T.nilable(Time),
@@ -286,6 +316,13 @@ module Straddle
286
316
  paykey_details: Straddle::PaykeyDetailsV1,
287
317
  payment_rail: Straddle::PayoutV1::Data::PaymentRail::TaggedSymbol,
288
318
  processed_at: T.nilable(Time),
319
+ related_payments:
320
+ T.nilable(
321
+ T::Hash[
322
+ Symbol,
323
+ Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
324
+ ]
325
+ ),
289
326
  updated_at: T.nilable(Time)
290
327
  }
291
328
  )
@@ -302,6 +339,14 @@ module Straddle
302
339
  )
303
340
  end
304
341
 
342
+ # Defines whether to automatically place this charge on hold after being created.
343
+ sig { returns(T.nilable(T::Boolean)) }
344
+ attr_accessor :auto_hold
345
+
346
+ # The reason the payout is being automatically held on creation.
347
+ sig { returns(T.nilable(String)) }
348
+ attr_accessor :auto_hold_message
349
+
305
350
  # Payment will simulate processing if not Standard.
306
351
  sig do
307
352
  returns(
@@ -323,11 +368,17 @@ module Straddle
323
368
  # Configuration for the payout.
324
369
  sig do
325
370
  params(
371
+ auto_hold: T.nilable(T::Boolean),
372
+ auto_hold_message: T.nilable(String),
326
373
  sandbox_outcome:
327
374
  Straddle::PayoutV1::Data::Config::SandboxOutcome::OrSymbol
328
375
  ).returns(T.attached_class)
329
376
  end
330
377
  def self.new(
378
+ # Defines whether to automatically place this charge on hold after being created.
379
+ auto_hold: nil,
380
+ # The reason the payout is being automatically held on creation.
381
+ auto_hold_message: nil,
331
382
  # Payment will simulate processing if not Standard.
332
383
  sandbox_outcome: nil
333
384
  )
@@ -336,6 +387,8 @@ module Straddle
336
387
  sig do
337
388
  override.returns(
338
389
  {
390
+ auto_hold: T.nilable(T::Boolean),
391
+ auto_hold_message: T.nilable(String),
339
392
  sandbox_outcome:
340
393
  Straddle::PayoutV1::Data::Config::SandboxOutcome::TaggedSymbol
341
394
  }
@@ -445,6 +498,8 @@ module Straddle
445
498
  PAID = T.let(:paid, Straddle::PayoutV1::Data::Status::TaggedSymbol)
446
499
  REVERSED =
447
500
  T.let(:reversed, Straddle::PayoutV1::Data::Status::TaggedSymbol)
501
+ VALIDATING =
502
+ T.let(:validating, Straddle::PayoutV1::Data::Status::TaggedSymbol)
448
503
 
449
504
  sig do
450
505
  override.returns(
@@ -659,6 +714,41 @@ module Straddle
659
714
  :payout_refused,
660
715
  Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
661
716
  )
717
+ CANCEL_REQUEST =
718
+ T.let(
719
+ :cancel_request,
720
+ Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
721
+ )
722
+ FAILED_VERIFICATION =
723
+ T.let(
724
+ :failed_verification,
725
+ Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
726
+ )
727
+ REQUIRE_REVIEW =
728
+ T.let(
729
+ :require_review,
730
+ Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
731
+ )
732
+ BLOCKED_BY_SYSTEM =
733
+ T.let(
734
+ :blocked_by_system,
735
+ Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
736
+ )
737
+ WATCHTOWER_REVIEW =
738
+ T.let(
739
+ :watchtower_review,
740
+ Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
741
+ )
742
+ VALIDATING =
743
+ T.let(
744
+ :validating,
745
+ Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
746
+ )
747
+ AUTO_HOLD =
748
+ T.let(
749
+ :auto_hold,
750
+ Straddle::PayoutV1::Data::StatusHistory::Reason::TaggedSymbol
751
+ )
662
752
 
663
753
  sig do
664
754
  override.returns(
@@ -769,6 +859,11 @@ module Straddle
769
859
  :reversed,
770
860
  Straddle::PayoutV1::Data::StatusHistory::Status::TaggedSymbol
771
861
  )
862
+ VALIDATING =
863
+ T.let(
864
+ :validating,
865
+ Straddle::PayoutV1::Data::StatusHistory::Status::TaggedSymbol
866
+ )
772
867
 
773
868
  sig do
774
869
  override.returns(
@@ -802,6 +897,40 @@ module Straddle
802
897
  def self.values
803
898
  end
804
899
  end
900
+
901
+ module RelatedPayment
902
+ extend Straddle::Internal::Type::Enum
903
+
904
+ TaggedSymbol =
905
+ T.type_alias do
906
+ T.all(Symbol, Straddle::PayoutV1::Data::RelatedPayment)
907
+ end
908
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
909
+
910
+ ORIGINAL =
911
+ T.let(
912
+ :original,
913
+ Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
914
+ )
915
+ RESUBMIT =
916
+ T.let(
917
+ :resubmit,
918
+ Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
919
+ )
920
+ REFUND =
921
+ T.let(
922
+ :refund,
923
+ Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol
924
+ )
925
+
926
+ sig do
927
+ override.returns(
928
+ T::Array[Straddle::PayoutV1::Data::RelatedPayment::TaggedSymbol]
929
+ )
930
+ end
931
+ def self.values
932
+ end
933
+ end
805
934
  end
806
935
 
807
936
  # Indicates the structure of the returned content.
@@ -162,6 +162,35 @@ module Straddle
162
162
  :payout_refused,
163
163
  Straddle::StatusDetailsV1::Reason::TaggedSymbol
164
164
  )
165
+ CANCEL_REQUEST =
166
+ T.let(
167
+ :cancel_request,
168
+ Straddle::StatusDetailsV1::Reason::TaggedSymbol
169
+ )
170
+ FAILED_VERIFICATION =
171
+ T.let(
172
+ :failed_verification,
173
+ Straddle::StatusDetailsV1::Reason::TaggedSymbol
174
+ )
175
+ REQUIRE_REVIEW =
176
+ T.let(
177
+ :require_review,
178
+ Straddle::StatusDetailsV1::Reason::TaggedSymbol
179
+ )
180
+ BLOCKED_BY_SYSTEM =
181
+ T.let(
182
+ :blocked_by_system,
183
+ Straddle::StatusDetailsV1::Reason::TaggedSymbol
184
+ )
185
+ WATCHTOWER_REVIEW =
186
+ T.let(
187
+ :watchtower_review,
188
+ Straddle::StatusDetailsV1::Reason::TaggedSymbol
189
+ )
190
+ VALIDATING =
191
+ T.let(:validating, Straddle::StatusDetailsV1::Reason::TaggedSymbol)
192
+ AUTO_HOLD =
193
+ T.let(:auto_hold, Straddle::StatusDetailsV1::Reason::TaggedSymbol)
165
194
 
166
195
  sig do
167
196
  override.returns(
@@ -3,6 +3,12 @@
3
3
  module Straddle
4
4
  module Resources
5
5
  class Bridge
6
+ # Bridge provides a comprehensive suite of tools for connecting customer bank
7
+ # accounts. Use it to generate secure widget sessions for instant account
8
+ # verification, accept tokens from major providers like Plaid and Finicity, or
9
+ # verify accounts directly via our API. Bridge handles all sensitive banking
10
+ # credentials and ensures secure, compliant connections with support for 90% of US
11
+ # bank accounts.
6
12
  class Link
7
13
  # Use Bridge to create a new paykey using a bank routing and account number as the
8
14
  # source. This endpoint allows you to create a secure payment token linked to a
@@ -27,13 +33,13 @@ module Straddle
27
33
  def bank_account(
28
34
  # Body param: The bank account number.
29
35
  account_number:,
30
- # Body param:
36
+ # Body param
31
37
  account_type:,
32
38
  # Body param: Unique identifier of the related customer object.
33
39
  customer_id:,
34
40
  # Body param: The routing number of the bank account.
35
41
  routing_number:,
36
- # Body param:
42
+ # Body param
37
43
  config: nil,
38
44
  # Body param: Unique identifier for the paykey in your database, used for
39
45
  # cross-referencing between Straddle and your systems.
@@ -78,7 +84,7 @@ module Straddle
78
84
  # Body param: Quiltt processor token generated by your application for use with
79
85
  # the Straddle API.
80
86
  quiltt_token:,
81
- # Body param:
87
+ # Body param
82
88
  config: nil,
83
89
  # Body param: Unique identifier for the paykey in your database, used for
84
90
  # cross-referencing between Straddle and your systems.
@@ -118,7 +124,7 @@ module Straddle
118
124
  ).returns(Straddle::Models::Bridge::LinkCreateTanResponse)
119
125
  end
120
126
  def create_tan(
121
- # Body param:
127
+ # Body param
122
128
  account_type:,
123
129
  # Body param: Unique identifier of the related customer object.
124
130
  customer_id:,
@@ -126,7 +132,7 @@ module Straddle
126
132
  routing_number:,
127
133
  # Body param: Tokenized account number.
128
134
  tan:,
129
- # Body param:
135
+ # Body param
130
136
  config: nil,
131
137
  # Body param: Unique identifier for the paykey in your database, used for
132
138
  # cross-referencing between Straddle and your systems.
@@ -171,7 +177,7 @@ module Straddle
171
177
  # Body param: Plaid processor token generated by your application for use with the
172
178
  # Straddle API.
173
179
  plaid_token:,
174
- # Body param:
180
+ # Body param
175
181
  config: nil,
176
182
  # Body param: Unique identifier for the paykey in your database, used for
177
183
  # cross-referencing between Straddle and your systems.
@@ -2,7 +2,19 @@
2
2
 
3
3
  module Straddle
4
4
  module Resources
5
+ # Bridge provides a comprehensive suite of tools for connecting customer bank
6
+ # accounts. Use it to generate secure widget sessions for instant account
7
+ # verification, accept tokens from major providers like Plaid and Finicity, or
8
+ # verify accounts directly via our API. Bridge handles all sensitive banking
9
+ # credentials and ensures secure, compliant connections with support for 90% of US
10
+ # bank accounts.
5
11
  class Bridge
12
+ # Bridge provides a comprehensive suite of tools for connecting customer bank
13
+ # accounts. Use it to generate secure widget sessions for instant account
14
+ # verification, accept tokens from major providers like Plaid and Finicity, or
15
+ # verify accounts directly via our API. Bridge handles all sensitive banking
16
+ # credentials and ensures secure, compliant connections with support for 90% of US
17
+ # bank accounts.
6
18
  sig { returns(Straddle::Resources::Bridge::Link) }
7
19
  attr_reader :link
8
20
 
@@ -23,7 +35,7 @@ module Straddle
23
35
  # Body param: The Straddle generated unique identifier of the `customer` to create
24
36
  # a bridge token for.
25
37
  customer_id:,
26
- # Body param:
38
+ # Body param
27
39
  config: nil,
28
40
  # Body param: Unique identifier for the paykey in your database, used for
29
41
  # cross-referencing between Straddle and your systems.
@@ -2,6 +2,11 @@
2
2
 
3
3
  module Straddle
4
4
  module Resources
5
+ # Charges represent attempts to debit money from a customer's bank account using a
6
+ # Paykey. Each charge includes automatic balance verification, real-time fraud
7
+ # screening, and multi-rail optimization and detailed status tracking throughout
8
+ # the payment lifecycle. Use charges to accept bank payments with confidence
9
+ # knowing every transaction is protected.
5
10
  class Charges
6
11
  # Use charges to collect money from a customer for the sale of goods or services.
7
12
  sig do
@@ -10,7 +15,7 @@ module Straddle
10
15
  config: Straddle::ChargeCreateParams::Config::OrHash,
11
16
  consent_type: Straddle::ChargeCreateParams::ConsentType::OrSymbol,
12
17
  currency: String,
13
- description: String,
18
+ description: T.nilable(String),
14
19
  device: Straddle::DeviceInfoV1::OrHash,
15
20
  external_id: String,
16
21
  paykey: String,
@@ -26,7 +31,7 @@ module Straddle
26
31
  def create(
27
32
  # Body param: The amount of the charge in cents.
28
33
  amount:,
29
- # Body param:
34
+ # Body param
30
35
  config:,
31
36
  # Body param: The channel or mechanism through which the payment was authorized.
32
37
  # Use `internet` for payments made online or through a mobile app and `signed` for
@@ -37,7 +42,7 @@ module Straddle
37
42
  currency:,
38
43
  # Body param: An arbitrary description for the charge.
39
44
  description:,
40
- # Body param:
45
+ # Body param
41
46
  device:,
42
47
  # Body param: Unique identifier for the charge in your database. This value must
43
48
  # be unique across all charges.
@@ -70,7 +75,7 @@ module Straddle
70
75
  params(
71
76
  id: String,
72
77
  amount: Integer,
73
- description: String,
78
+ description: T.nilable(String),
74
79
  payment_date: Date,
75
80
  metadata: T.nilable(T::Hash[Symbol, String]),
76
81
  correlation_id: String,
@@ -81,7 +86,7 @@ module Straddle
81
86
  ).returns(Straddle::ChargeV1)
82
87
  end
83
88
  def update(
84
- # Path param:
89
+ # Path param
85
90
  id,
86
91
  # Body param: The amount of the charge in cents.
87
92
  amount:,
@@ -121,7 +126,7 @@ module Straddle
121
126
  ).returns(Straddle::ChargeV1)
122
127
  end
123
128
  def cancel(
124
- # Path param:
129
+ # Path param
125
130
  id,
126
131
  # Body param: Details about why the charge status was updated.
127
132
  reason: nil,
@@ -176,7 +181,7 @@ module Straddle
176
181
  ).returns(Straddle::ChargeV1)
177
182
  end
178
183
  def hold(
179
- # Path param:
184
+ # Path param
180
185
  id,
181
186
  # Body param: Details about why the charge status was updated.
182
187
  reason: nil,
@@ -208,7 +213,7 @@ module Straddle
208
213
  ).returns(Straddle::ChargeV1)
209
214
  end
210
215
  def release(
211
- # Path param:
216
+ # Path param
212
217
  id,
213
218
  # Body param: Details about why the charge status was updated.
214
219
  reason: nil,
@@ -3,6 +3,12 @@
3
3
  module Straddle
4
4
  module Resources
5
5
  class Customers
6
+ # Customers represent the end users who send or receive payments through your
7
+ # integration. Each customer undergoes automatic identity verification and fraud
8
+ # screening upon creation. Use customers to track payment history, manage bank
9
+ # account connections, and maintain a secure record of all transactions associated
10
+ # with a user. Customers can be either individuals or businesses with appropriate
11
+ # compliance checks for each type.
6
12
  class Review
7
13
  # Updates the status of a customer's identity decision. This endpoint allows you
8
14
  # to modify the outcome of a customer risk screening and is useful for correcting
@@ -20,7 +26,7 @@ module Straddle
20
26
  ).returns(Straddle::CustomerV1)
21
27
  end
22
28
  def decision(
23
- # Path param:
29
+ # Path param
24
30
  id,
25
31
  # Body param: The final status of the customer review.
26
32
  status:,
@@ -2,7 +2,19 @@
2
2
 
3
3
  module Straddle
4
4
  module Resources
5
+ # Customers represent the end users who send or receive payments through your
6
+ # integration. Each customer undergoes automatic identity verification and fraud
7
+ # screening upon creation. Use customers to track payment history, manage bank
8
+ # account connections, and maintain a secure record of all transactions associated
9
+ # with a user. Customers can be either individuals or businesses with appropriate
10
+ # compliance checks for each type.
5
11
  class Customers
12
+ # Customers represent the end users who send or receive payments through your
13
+ # integration. Each customer undergoes automatic identity verification and fraud
14
+ # screening upon creation. Use customers to track payment history, manage bank
15
+ # account connections, and maintain a secure record of all transactions associated
16
+ # with a user. Customers can be either individuals or businesses with appropriate
17
+ # compliance checks for each type.
6
18
  sig { returns(Straddle::Resources::Customers::Review) }
7
19
  attr_reader :review
8
20
 
@@ -35,7 +47,7 @@ module Straddle
35
47
  ).returns(Straddle::CustomerV1)
36
48
  end
37
49
  def create(
38
- # Body param:
50
+ # Body param
39
51
  device:,
40
52
  # Body param: The customer's email address.
41
53
  email:,
@@ -44,7 +56,7 @@ module Straddle
44
56
  # Body param: The customer's phone number in E.164 format. Mobile number is
45
57
  # preferred.
46
58
  phone:,
47
- # Body param:
59
+ # Body param
48
60
  type:,
49
61
  # Body param: An object containing the customer's address. **This is optional.**
50
62
  # If used, all required fields must be present.
@@ -53,7 +65,7 @@ module Straddle
53
65
  # optional.** If all required fields must be present for the appropriate customer
54
66
  # type.
55
67
  compliance_profile: nil,
56
- # Body param:
68
+ # Body param
57
69
  config: nil,
58
70
  # Body param: Unique identifier for the customer in your database, used for
59
71
  # cross-referencing between Straddle and your systems.
@@ -103,9 +115,9 @@ module Straddle
103
115
  ).returns(Straddle::CustomerV1)
104
116
  end
105
117
  def update(
106
- # Path param:
118
+ # Path param
107
119
  id,
108
- # Body param:
120
+ # Body param
109
121
  device:,
110
122
  # Body param: The customer's email address.
111
123
  email:,
@@ -113,7 +125,7 @@ module Straddle
113
125
  name:,
114
126
  # Body param: The customer's phone number in E.164 format.
115
127
  phone:,
116
- # Body param:
128
+ # Body param
117
129
  status:,
118
130
  # Body param: An object containing the customer's address. This is optional, but
119
131
  # if provided, all required fields must be present.
@@ -186,9 +198,9 @@ module Straddle
186
198
  page_size: nil,
187
199
  # Query param: General search term to filter customers.
188
200
  search_text: nil,
189
- # Query param:
201
+ # Query param
190
202
  sort_by: nil,
191
- # Query param:
203
+ # Query param
192
204
  sort_order: nil,
193
205
  # Query param: Filter customers by their current `status`.
194
206
  status: nil,
@@ -4,6 +4,10 @@ module Straddle
4
4
  module Resources
5
5
  class Embed
6
6
  class Accounts
7
+ # Capabilities enable specific features and services for an Account. Use
8
+ # capability requests to unlock higher processing limits, new payment types, or
9
+ # additional platform features as your users' businesses grow. Track approval
10
+ # status and manage documentation requirements through a single interface.
7
11
  class CapabilityRequests
8
12
  # Submits a request to enable a specific capability for an account. Use this
9
13
  # endpoint to request additional features or services for an account.
@@ -29,7 +33,7 @@ module Straddle
29
33
  ).returns(Straddle::Embed::Accounts::CapabilityRequestPagedV1)
30
34
  end
31
35
  def create(
32
- # Path param:
36
+ # Path param
33
37
  account_id,
34
38
  # Body param: Allows the account to accept payments from businesses.
35
39
  businesses: nil,
@@ -83,7 +87,7 @@ module Straddle
83
87
  )
84
88
  end
85
89
  def list(
86
- # Path param:
90
+ # Path param
87
91
  account_id,
88
92
  # Query param: Filter capability requests by category.
89
93
  category: nil,
@@ -3,7 +3,16 @@
3
3
  module Straddle
4
4
  module Resources
5
5
  class Embed
6
+ # Accounts represent businesses using Straddle through your platform. Each account
7
+ # must complete automated verification before processing payments. Use accounts to
8
+ # manage your users' payment capabilities, track verification status, and control
9
+ # access to features. Accounts can be instantly created in sandbox and require
10
+ # additional verification for production access.
6
11
  class Accounts
12
+ # Capabilities enable specific features and services for an Account. Use
13
+ # capability requests to unlock higher processing limits, new payment types, or
14
+ # additional platform features as your users' businesses grow. Track approval
15
+ # status and manage documentation requirements through a single interface.
7
16
  sig do
8
17
  returns(Straddle::Resources::Embed::Accounts::CapabilityRequests)
9
18
  end
@@ -35,7 +44,7 @@ module Straddle
35
44
  # Body param: The type of account to be created. Currently, only `business` is
36
45
  # supported.
37
46
  account_type:,
38
- # Body param:
47
+ # Body param
39
48
  business_profile:,
40
49
  # Body param: The unique identifier of the organization related to this account.
41
50
  organization_id:,
@@ -71,9 +80,9 @@ module Straddle
71
80
  ).returns(Straddle::Embed::AccountV1)
72
81
  end
73
82
  def update(
74
- # Path param:
83
+ # Path param
75
84
  account_id,
76
- # Body param:
85
+ # Body param
77
86
  business_profile:,
78
87
  # Body param: Unique identifier for the account in your database, used for
79
88
  # cross-referencing between Straddle and your systems.
@@ -119,15 +128,15 @@ module Straddle
119
128
  page_number: nil,
120
129
  # Query param: Page size. Default value: 100. Max value: 1000
121
130
  page_size: nil,
122
- # Query param:
131
+ # Query param
123
132
  search_text: nil,
124
133
  # Query param: Sort By. Default value: 'id'.
125
134
  sort_by: nil,
126
135
  # Query param: Sort Order. Default value: 'asc'.
127
136
  sort_order: nil,
128
- # Query param:
137
+ # Query param
129
138
  status: nil,
130
- # Query param:
139
+ # Query param
131
140
  type: nil,
132
141
  # Header param: Optional client generated identifier to trace and debug a series
133
142
  # of requests.
@@ -174,9 +183,9 @@ module Straddle
174
183
  ).returns(Straddle::Embed::AccountV1)
175
184
  end
176
185
  def onboard(
177
- # Path param:
186
+ # Path param
178
187
  account_id,
179
- # Body param:
188
+ # Body param
180
189
  terms_of_service:,
181
190
  # Header param: Optional client generated identifier to trace and debug a series
182
191
  # of requests.
@@ -203,9 +212,9 @@ module Straddle
203
212
  ).returns(Straddle::Embed::AccountV1)
204
213
  end
205
214
  def simulate(
206
- # Path param:
215
+ # Path param
207
216
  account_id,
208
- # Query param:
217
+ # Query param
209
218
  final_status: nil,
210
219
  # Header param: Optional client generated identifier to trace and debug a series
211
220
  # of requests.