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
@@ -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
  # @return [Straddle::Resources::Customers::Review]
7
19
  attr_reader :review
8
20
 
@@ -15,7 +27,7 @@ module Straddle
15
27
  #
16
28
  # @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: {})
17
29
  #
18
- # @param device [Straddle::Models::DeviceUnmaskedV1] Body param:
30
+ # @param device [Straddle::Models::DeviceUnmaskedV1] Body param
19
31
  #
20
32
  # @param email [String] Body param: The customer's email address.
21
33
  #
@@ -23,14 +35,14 @@ module Straddle
23
35
  #
24
36
  # @param phone [String] Body param: The customer's phone number in E.164 format. Mobile number is prefer
25
37
  #
26
- # @param type [Symbol, Straddle::Models::CustomerCreateParams::Type] Body param:
38
+ # @param type [Symbol, Straddle::Models::CustomerCreateParams::Type] Body param
27
39
  #
28
40
  # @param address [Straddle::Models::CustomerAddressV1, nil] Body param: An object containing the customer's address. **This is optional.** I
29
41
  #
30
42
  # @param compliance_profile [Straddle::Models::CustomerCreateParams::ComplianceProfile::IndividualComplianceProfile, Straddle::Models::CustomerCreateParams::ComplianceProfile::BusinessComplianceProfile, nil] Body param: An object containing the customer's compliance profile. \*\*This is
31
43
  # op
32
44
  #
33
- # @param config [Straddle::Models::CustomerCreateParams::Config] Body param:
45
+ # @param config [Straddle::Models::CustomerCreateParams::Config] Body param
34
46
  #
35
47
  # @param external_id [String, nil] Body param: Unique identifier for the customer in your database, used for cross-
36
48
  #
@@ -76,9 +88,9 @@ module Straddle
76
88
  #
77
89
  # @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: {})
78
90
  #
79
- # @param id [String] Path param:
91
+ # @param id [String] Path param
80
92
  #
81
- # @param device [Straddle::Models::DeviceUnmaskedV1] Body param:
93
+ # @param device [Straddle::Models::DeviceUnmaskedV1] Body param
82
94
  #
83
95
  # @param email [String] Body param: The customer's email address.
84
96
  #
@@ -86,7 +98,7 @@ module Straddle
86
98
  #
87
99
  # @param phone [String] Body param: The customer's phone number in E.164 format.
88
100
  #
89
- # @param status [Symbol, Straddle::Models::CustomerUpdateParams::Status] Body param:
101
+ # @param status [Symbol, Straddle::Models::CustomerUpdateParams::Status] Body param
90
102
  #
91
103
  # @param address [Straddle::Models::CustomerAddressV1, nil] Body param: An object containing the customer's address. This is optional, but i
92
104
  #
@@ -154,9 +166,9 @@ module Straddle
154
166
  #
155
167
  # @param search_text [String] Query param: General search term to filter customers.
156
168
  #
157
- # @param sort_by [Symbol, Straddle::Models::CustomerListParams::SortBy] Query param:
169
+ # @param sort_by [Symbol, Straddle::Models::CustomerListParams::SortBy] Query param
158
170
  #
159
- # @param sort_order [Symbol, Straddle::Models::CustomerListParams::SortOrder] Query param:
171
+ # @param sort_order [Symbol, Straddle::Models::CustomerListParams::SortOrder] Query param
160
172
  #
161
173
  # @param status [Array<Symbol, Straddle::Models::CustomerListParams::Status>] Query param: Filter customers by their current `status`.
162
174
  #
@@ -174,7 +186,6 @@ module Straddle
174
186
  #
175
187
  # @see Straddle::Models::CustomerListParams
176
188
  def list(params = {})
177
- parsed, options = Straddle::CustomerListParams.dump_request(params)
178
189
  query_params =
179
190
  [
180
191
  :created_from,
@@ -190,10 +201,12 @@ module Straddle
190
201
  :status,
191
202
  :types
192
203
  ]
204
+ parsed, options = Straddle::CustomerListParams.dump_request(params)
205
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
193
206
  @client.request(
194
207
  method: :get,
195
208
  path: "v1/customers",
196
- query: parsed.slice(*query_params),
209
+ query: query,
197
210
  headers: parsed.except(*query_params).transform_keys(
198
211
  correlation_id: "correlation-id",
199
212
  request_id: "request-id",
@@ -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
  # Some parameter documentations has been truncated, see
9
13
  # {Straddle::Models::Embed::Accounts::CapabilityRequestCreateParams} for more
@@ -14,7 +18,7 @@ module Straddle
14
18
  #
15
19
  # @overload create(account_id, businesses: nil, charges: nil, individuals: nil, internet: nil, payouts: nil, signed_agreement: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
16
20
  #
17
- # @param account_id [String] Path param:
21
+ # @param account_id [String] Path param
18
22
  #
19
23
  # @param businesses [Straddle::Models::Embed::Accounts::CapabilityRequestCreateParams::Businesses] Body param: Allows the account to accept payments from businesses.
20
24
  #
@@ -63,7 +67,7 @@ module Straddle
63
67
  #
64
68
  # @overload list(account_id, category: nil, page_number: nil, page_size: nil, sort_by: nil, sort_order: nil, status: nil, type: nil, correlation_id: nil, request_id: nil, request_options: {})
65
69
  #
66
- # @param account_id [String] Path param:
70
+ # @param account_id [String] Path param
67
71
  #
68
72
  # @param category [Symbol, Straddle::Models::Embed::Accounts::CapabilityRequestListParams::Category] Query param: Filter capability requests by category.
69
73
  #
@@ -89,12 +93,13 @@ module Straddle
89
93
  #
90
94
  # @see Straddle::Models::Embed::Accounts::CapabilityRequestListParams
91
95
  def list(account_id, params = {})
92
- parsed, options = Straddle::Embed::Accounts::CapabilityRequestListParams.dump_request(params)
93
96
  query_params = [:category, :page_number, :page_size, :sort_by, :sort_order, :status, :type]
97
+ parsed, options = Straddle::Embed::Accounts::CapabilityRequestListParams.dump_request(params)
98
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
94
99
  @client.request(
95
100
  method: :get,
96
101
  path: ["v1/accounts/%1$s/capability_requests", account_id],
97
- query: parsed.slice(*query_params),
102
+ query: query,
98
103
  headers: parsed.except(*query_params).transform_keys(
99
104
  correlation_id: "correlation-id",
100
105
  request_id: "request-id"
@@ -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
  # @return [Straddle::Resources::Embed::Accounts::CapabilityRequests]
8
17
  attr_reader :capability_requests
9
18
 
@@ -20,7 +29,7 @@ module Straddle
20
29
  #
21
30
  # @param account_type [Symbol, Straddle::Models::Embed::AccountCreateParams::AccountType] Body param: The type of account to be created. Currently, only `business` is sup
22
31
  #
23
- # @param business_profile [Straddle::Models::Embed::BusinessProfileV1] Body param:
32
+ # @param business_profile [Straddle::Models::Embed::BusinessProfileV1] Body param
24
33
  #
25
34
  # @param organization_id [String] Body param: The unique identifier of the organization related to this account.
26
35
  #
@@ -61,9 +70,9 @@ module Straddle
61
70
  #
62
71
  # @overload update(account_id, business_profile:, external_id: nil, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
63
72
  #
64
- # @param account_id [String] Path param:
73
+ # @param account_id [String] Path param
65
74
  #
66
- # @param business_profile [Straddle::Models::Embed::BusinessProfileV1] Body param:
75
+ # @param business_profile [Straddle::Models::Embed::BusinessProfileV1] Body param
67
76
  #
68
77
  # @param external_id [String, nil] Body param: Unique identifier for the account in your database, used for cross-r
69
78
  #
@@ -108,15 +117,15 @@ module Straddle
108
117
  #
109
118
  # @param page_size [Integer] Query param: Page size. Default value: 100. Max value: 1000
110
119
  #
111
- # @param search_text [String] Query param:
120
+ # @param search_text [String] Query param
112
121
  #
113
122
  # @param sort_by [String] Query param: Sort By. Default value: 'id'.
114
123
  #
115
124
  # @param sort_order [Symbol, Straddle::Models::Embed::AccountListParams::SortOrder] Query param: Sort Order. Default value: 'asc'.
116
125
  #
117
- # @param status [Symbol, Straddle::Models::Embed::AccountListParams::Status] Query param:
126
+ # @param status [Symbol, Straddle::Models::Embed::AccountListParams::Status] Query param
118
127
  #
119
- # @param type [Symbol, Straddle::Models::Embed::AccountListParams::Type] Query param:
128
+ # @param type [Symbol, Straddle::Models::Embed::AccountListParams::Type] Query param
120
129
  #
121
130
  # @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
122
131
  #
@@ -128,12 +137,13 @@ module Straddle
128
137
  #
129
138
  # @see Straddle::Models::Embed::AccountListParams
130
139
  def list(params = {})
131
- parsed, options = Straddle::Embed::AccountListParams.dump_request(params)
132
140
  query_params = [:page_number, :page_size, :search_text, :sort_by, :sort_order, :status, :type]
141
+ parsed, options = Straddle::Embed::AccountListParams.dump_request(params)
142
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
133
143
  @client.request(
134
144
  method: :get,
135
145
  path: "v1/accounts",
136
- query: parsed.slice(*query_params),
146
+ query: query,
137
147
  headers: parsed.except(*query_params).transform_keys(
138
148
  correlation_id: "correlation-id",
139
149
  request_id: "request-id"
@@ -181,9 +191,9 @@ module Straddle
181
191
  #
182
192
  # @overload onboard(account_id, terms_of_service:, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
183
193
  #
184
- # @param account_id [String] Path param:
194
+ # @param account_id [String] Path param
185
195
  #
186
- # @param terms_of_service [Straddle::Models::Embed::TermsOfServiceV1] Body param:
196
+ # @param terms_of_service [Straddle::Models::Embed::TermsOfServiceV1] Body param
187
197
  #
188
198
  # @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
189
199
  #
@@ -218,9 +228,9 @@ module Straddle
218
228
  #
219
229
  # @overload simulate(account_id, final_status: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
220
230
  #
221
- # @param account_id [String] Path param:
231
+ # @param account_id [String] Path param
222
232
  #
223
- # @param final_status [Symbol, Straddle::Models::Embed::AccountSimulateParams::FinalStatus] Query param:
233
+ # @param final_status [Symbol, Straddle::Models::Embed::AccountSimulateParams::FinalStatus] Query param
224
234
  #
225
235
  # @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
226
236
  #
@@ -234,12 +244,13 @@ module Straddle
234
244
  #
235
245
  # @see Straddle::Models::Embed::AccountSimulateParams
236
246
  def simulate(account_id, params = {})
237
- parsed, options = Straddle::Embed::AccountSimulateParams.dump_request(params)
238
247
  query_params = [:final_status]
248
+ parsed, options = Straddle::Embed::AccountSimulateParams.dump_request(params)
249
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
239
250
  @client.request(
240
251
  method: :post,
241
252
  path: ["v1/accounts/%1$s/simulate", account_id],
242
- query: parsed.slice(*query_params),
253
+ query: query,
243
254
  headers: parsed.except(*query_params).transform_keys(
244
255
  correlation_id: "correlation-id",
245
256
  idempotency_key: "idempotency-key",
@@ -3,6 +3,10 @@
3
3
  module Straddle
4
4
  module Resources
5
5
  class Embed
6
+ # Linked bank accounts connect your platform users' external bank accounts to
7
+ # Straddle for settlements and payment funding. Each linked account undergoes
8
+ # automated verification and continuous monitoring. Use linked accounts to manage
9
+ # where clients receive deposits, fund payouts, and track settlement preferences.
6
10
  class LinkedBankAccounts
7
11
  # Some parameter documentations has been truncated, see
8
12
  # {Straddle::Models::Embed::LinkedBankAccountCreateParams} for more details.
@@ -16,7 +20,7 @@ module Straddle
16
20
  #
17
21
  # @param account_id [String, nil] Body param: The unique identifier of the Straddle account to associate this bank
18
22
  #
19
- # @param bank_account [Straddle::Models::Embed::LinkedBankAccountCreateParams::BankAccount] Body param:
23
+ # @param bank_account [Straddle::Models::Embed::LinkedBankAccountCreateParams::BankAccount] Body param
20
24
  #
21
25
  # @param description [String, nil] Body param: Optional description for the bank account.
22
26
  #
@@ -61,9 +65,9 @@ module Straddle
61
65
  #
62
66
  # @overload update(linked_bank_account_id, bank_account:, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
63
67
  #
64
- # @param linked_bank_account_id [String] Path param:
68
+ # @param linked_bank_account_id [String] Path param
65
69
  #
66
- # @param bank_account [Straddle::Models::Embed::LinkedBankAccountUpdateParams::BankAccount] Body param:
70
+ # @param bank_account [Straddle::Models::Embed::LinkedBankAccountUpdateParams::BankAccount] Body param
67
71
  #
68
72
  # @param metadata [Hash{Symbol=>String, nil}, nil] Body param: Up to 20 additional user-defined key-value pairs. Useful for storing
69
73
  #
@@ -104,7 +108,7 @@ module Straddle
104
108
  #
105
109
  # @param account_id [String] Query param: The unique identifier of the related account.
106
110
  #
107
- # @param level [Symbol, Straddle::Models::Embed::LinkedBankAccountListParams::Level] Query param:
111
+ # @param level [Symbol, Straddle::Models::Embed::LinkedBankAccountListParams::Level] Query param
108
112
  #
109
113
  # @param page_number [Integer] Query param: Results page number. Starts at page 1.
110
114
  #
@@ -128,7 +132,6 @@ module Straddle
128
132
  #
129
133
  # @see Straddle::Models::Embed::LinkedBankAccountListParams
130
134
  def list(params = {})
131
- parsed, options = Straddle::Embed::LinkedBankAccountListParams.dump_request(params)
132
135
  query_params = [
133
136
  :account_id,
134
137
  :level,
@@ -139,10 +142,12 @@ module Straddle
139
142
  :sort_order,
140
143
  :status
141
144
  ]
145
+ parsed, options = Straddle::Embed::LinkedBankAccountListParams.dump_request(params)
146
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
142
147
  @client.request(
143
148
  method: :get,
144
149
  path: "v1/linked_bank_accounts",
145
- query: parsed.slice(*query_params),
150
+ query: query,
146
151
  headers: parsed.except(*query_params).transform_keys(
147
152
  correlation_id: "correlation-id",
148
153
  request_id: "request-id"
@@ -3,6 +3,10 @@
3
3
  module Straddle
4
4
  module Resources
5
5
  class Embed
6
+ # Organizations are a powerful feature in Straddle that allow you to manage
7
+ # multiple accounts under a single umbrella. This hierarchical structure is
8
+ # particularly useful for businesses with complex operations, multiple
9
+ # departments, or legally related entities.
6
10
  class Organizations
7
11
  # Some parameter documentations has been truncated, see
8
12
  # {Straddle::Models::Embed::OrganizationCreateParams} for more details.
@@ -76,12 +80,13 @@ module Straddle
76
80
  #
77
81
  # @see Straddle::Models::Embed::OrganizationListParams
78
82
  def list(params = {})
79
- parsed, options = Straddle::Embed::OrganizationListParams.dump_request(params)
80
83
  query_params = [:external_id, :name, :page_number, :page_size, :sort_by, :sort_order]
84
+ parsed, options = Straddle::Embed::OrganizationListParams.dump_request(params)
85
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
81
86
  @client.request(
82
87
  method: :get,
83
88
  path: "v1/organizations",
84
- query: parsed.slice(*query_params),
89
+ query: query,
85
90
  headers: parsed.except(*query_params).transform_keys(
86
91
  correlation_id: "correlation-id",
87
92
  request_id: "request-id"
@@ -3,6 +3,12 @@
3
3
  module Straddle
4
4
  module Resources
5
5
  class Embed
6
+ # Representatives are individuals who have legal authority or significant
7
+ # responsibility within a business entity associated with a Straddle account. Each
8
+ # representative undergoes automated verification as part of KYC/KYB compliance.
9
+ # Use representatives to collect and verify beneficial owners, control persons,
10
+ # and authorized signers required for account onboarding. Representatives also
11
+ # determine who can legally operate the account and make important changes.
6
12
  class Representatives
7
13
  # Some parameter documentations has been truncated, see
8
14
  # {Straddle::Models::Embed::RepresentativeCreateParams} for more details.
@@ -25,7 +31,7 @@ module Straddle
25
31
  #
26
32
  # @param mobile_number [String] Body param: The mobile phone number of the representative.
27
33
  #
28
- # @param relationship [Straddle::Models::Embed::RepresentativeCreateParams::Relationship] Body param:
34
+ # @param relationship [Straddle::Models::Embed::RepresentativeCreateParams::Relationship] Body param
29
35
  #
30
36
  # @param ssn_last4 [String] Body param: The last 4 digits of the representative's Social Security Number.
31
37
  #
@@ -67,7 +73,7 @@ module Straddle
67
73
  #
68
74
  # @overload update(representative_id, dob:, email:, first_name:, last_name:, mobile_number:, relationship:, ssn_last4:, external_id: nil, metadata: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
69
75
  #
70
- # @param representative_id [String] Path param:
76
+ # @param representative_id [String] Path param
71
77
  #
72
78
  # @param dob [Date] Body param: The date of birth of the representative, in ISO 8601 format (YYYY-MM
73
79
  #
@@ -79,7 +85,7 @@ module Straddle
79
85
  #
80
86
  # @param mobile_number [String] Body param: The mobile phone number of the representative.
81
87
  #
82
- # @param relationship [Straddle::Models::Embed::RepresentativeUpdateParams::Relationship] Body param:
88
+ # @param relationship [Straddle::Models::Embed::RepresentativeUpdateParams::Relationship] Body param
83
89
  #
84
90
  # @param ssn_last4 [String] Body param: The last 4 digits of the representative's Social Security Number.
85
91
  #
@@ -124,15 +130,15 @@ module Straddle
124
130
  #
125
131
  # @param account_id [String] Query param: The unique identifier of the account to list representatives for.
126
132
  #
127
- # @param level [Symbol, Straddle::Models::Embed::RepresentativeListParams::Level] Query param:
133
+ # @param level [Symbol, Straddle::Models::Embed::RepresentativeListParams::Level] Query param
128
134
  #
129
- # @param organization_id [String] Query param:
135
+ # @param organization_id [String] Query param
130
136
  #
131
137
  # @param page_number [Integer] Query param: Results page number. Starts at page 1.
132
138
  #
133
139
  # @param page_size [Integer] Query param: Page size. Max value: 1000
134
140
  #
135
- # @param platform_id [String] Query param:
141
+ # @param platform_id [String] Query param
136
142
  #
137
143
  # @param sort_by [String] Query param: Sort By.
138
144
  #
@@ -148,7 +154,6 @@ module Straddle
148
154
  #
149
155
  # @see Straddle::Models::Embed::RepresentativeListParams
150
156
  def list(params = {})
151
- parsed, options = Straddle::Embed::RepresentativeListParams.dump_request(params)
152
157
  query_params =
153
158
  [
154
159
  :account_id,
@@ -160,10 +165,12 @@ module Straddle
160
165
  :sort_by,
161
166
  :sort_order
162
167
  ]
168
+ parsed, options = Straddle::Embed::RepresentativeListParams.dump_request(params)
169
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
163
170
  @client.request(
164
171
  method: :get,
165
172
  path: "v1/representatives",
166
- query: parsed.slice(*query_params),
173
+ query: query,
167
174
  headers: parsed.except(*query_params).transform_keys(
168
175
  correlation_id: "correlation-id",
169
176
  request_id: "request-id"
@@ -3,15 +3,34 @@
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
  # @return [Straddle::Resources::Embed::Accounts]
7
12
  attr_reader :accounts
8
13
 
14
+ # Linked bank accounts connect your platform users' external bank accounts to
15
+ # Straddle for settlements and payment funding. Each linked account undergoes
16
+ # automated verification and continuous monitoring. Use linked accounts to manage
17
+ # where clients receive deposits, fund payouts, and track settlement preferences.
9
18
  # @return [Straddle::Resources::Embed::LinkedBankAccounts]
10
19
  attr_reader :linked_bank_accounts
11
20
 
21
+ # Organizations are a powerful feature in Straddle that allow you to manage
22
+ # multiple accounts under a single umbrella. This hierarchical structure is
23
+ # particularly useful for businesses with complex operations, multiple
24
+ # departments, or legally related entities.
12
25
  # @return [Straddle::Resources::Embed::Organizations]
13
26
  attr_reader :organizations
14
27
 
28
+ # Representatives are individuals who have legal authority or significant
29
+ # responsibility within a business entity associated with a Straddle account. Each
30
+ # representative undergoes automated verification as part of KYC/KYB compliance.
31
+ # Use representatives to collect and verify beneficial owners, control persons,
32
+ # and authorized signers required for account onboarding. Representatives also
33
+ # determine who can legally operate the account and make important changes.
15
34
  # @return [Straddle::Resources::Embed::Representatives]
16
35
  attr_reader :representatives
17
36
 
@@ -2,6 +2,12 @@
2
2
 
3
3
  module Straddle
4
4
  module Resources
5
+ # Funding events represent all money movement between Straddle and an Account's
6
+ # external bank accounts. They are automatically generated when charges settle or
7
+ # payouts are initiated. Each event provides detailed tracking of settlement
8
+ # status, fee breakdowns, and reconciliation data across both incoming and
9
+ # outgoing transfers. Use funding events to monitor your platform's entire money
10
+ # movement lifecycle.
5
11
  class FundingEvents
6
12
  # Some parameter documentations has been truncated, see
7
13
  # {Straddle::Models::FundingEventListParams} for more details.
@@ -9,7 +15,7 @@ module Straddle
9
15
  # Retrieves a list of funding events for your account. This endpoint supports
10
16
  # advanced sorting and filtering options.
11
17
  #
12
- # @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, trace_number: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
18
+ # @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: {})
13
19
  #
14
20
  # @param created_from [Date, nil] Query param: The start date of the range to filter by using the `YYYY-MM-DD` for
15
21
  #
@@ -29,6 +35,14 @@ module Straddle
29
35
  #
30
36
  # @param sort_order [Symbol, Straddle::Models::FundingEventListParams::SortOrder] Query param: The order in which to sort the results.
31
37
  #
38
+ # @param status [Array<Symbol, Straddle::Models::FundingEventListParams::Status>, nil] Query param: Funding Event status.
39
+ #
40
+ # @param status_reason [Array<Symbol, Straddle::Models::FundingEventListParams::StatusReason>, nil] Query param: Reason for latest payment status change.
41
+ #
42
+ # @param status_source [Array<Symbol, Straddle::Models::FundingEventListParams::StatusSource>, nil] Query param: Source of latest payment status change.
43
+ #
44
+ # @param trace_id [String, nil] Query param: Trace Id.
45
+ #
32
46
  # @param trace_number [String, nil] Query param: Trace number.
33
47
  #
34
48
  # @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
@@ -43,7 +57,6 @@ module Straddle
43
57
  #
44
58
  # @see Straddle::Models::FundingEventListParams
45
59
  def list(params = {})
46
- parsed, options = Straddle::FundingEventListParams.dump_request(params)
47
60
  query_params =
48
61
  [
49
62
  :created_from,
@@ -55,12 +68,18 @@ module Straddle
55
68
  :search_text,
56
69
  :sort_by,
57
70
  :sort_order,
71
+ :status,
72
+ :status_reason,
73
+ :status_source,
74
+ :trace_id,
58
75
  :trace_number
59
76
  ]
77
+ parsed, options = Straddle::FundingEventListParams.dump_request(params)
78
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
60
79
  @client.request(
61
80
  method: :get,
62
81
  path: "v1/funding_events",
63
- query: parsed.slice(*query_params),
82
+ query: query,
64
83
  headers: parsed.except(*query_params).transform_keys(
65
84
  correlation_id: "correlation-id",
66
85
  request_id: "request-id",
@@ -3,6 +3,11 @@
3
3
  module Straddle
4
4
  module Resources
5
5
  class Paykeys
6
+ # Paykeys are secure tokens that link verified customer identities to their bank
7
+ # accounts. Each Paykey includes built-in balance checking, fraud detection
8
+ # through LSTM machine learning models, and can be reused for subscriptions and
9
+ # recurring payments without storing sensitive data. Paykeys eliminate fraud by
10
+ # ensuring the person initiating payment owns the funding account.
6
11
  class Review
7
12
  # Some parameter documentations has been truncated, see
8
13
  # {Straddle::Models::Paykeys::ReviewDecisionParams} for more details.
@@ -11,9 +16,9 @@ module Straddle
11
16
  #
12
17
  # @overload decision(id, status:, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
13
18
  #
14
- # @param id [String] Path param:
19
+ # @param id [String] Path param
15
20
  #
16
- # @param status [Symbol, Straddle::Models::Paykeys::ReviewDecisionParams::Status] Body param:
21
+ # @param status [Symbol, Straddle::Models::Paykeys::ReviewDecisionParams::Status] Body param
17
22
  #
18
23
  # @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
19
24
  #
@@ -2,7 +2,17 @@
2
2
 
3
3
  module Straddle
4
4
  module Resources
5
+ # Paykeys are secure tokens that link verified customer identities to their bank
6
+ # accounts. Each Paykey includes built-in balance checking, fraud detection
7
+ # through LSTM machine learning models, and can be reused for subscriptions and
8
+ # recurring payments without storing sensitive data. Paykeys eliminate fraud by
9
+ # ensuring the person initiating payment owns the funding account.
5
10
  class Paykeys
11
+ # Paykeys are secure tokens that link verified customer identities to their bank
12
+ # accounts. Each Paykey includes built-in balance checking, fraud detection
13
+ # through LSTM machine learning models, and can be reused for subscriptions and
14
+ # recurring payments without storing sensitive data. Paykeys eliminate fraud by
15
+ # ensuring the person initiating payment owns the funding account.
6
16
  # @return [Straddle::Resources::Paykeys::Review]
7
17
  attr_reader :review
8
18
 
@@ -12,7 +22,7 @@ module Straddle
12
22
  # Returns a list of paykeys associated with a Straddle account. This endpoint
13
23
  # supports advanced sorting and filtering options.
14
24
  #
15
- # @overload list(customer_id: nil, page_number: nil, page_size: nil, sort_by: nil, sort_order: nil, source: nil, status: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
25
+ # @overload list(customer_id: nil, page_number: nil, page_size: nil, search_text: nil, sort_by: nil, sort_order: nil, source: nil, status: nil, unblock_eligible: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
16
26
  #
17
27
  # @param customer_id [String] Query param: Filter paykeys by related customer ID.
18
28
  #
@@ -20,14 +30,18 @@ module Straddle
20
30
  #
21
31
  # @param page_size [Integer] Query param: Number of results per page. Maximum: 1000.
22
32
  #
23
- # @param sort_by [Symbol, Straddle::Models::PaykeyListParams::SortBy] Query param:
33
+ # @param search_text [String] Query param: General search term to filter paykeys.
24
34
  #
25
- # @param sort_order [Symbol, Straddle::Models::PaykeyListParams::SortOrder] Query param:
35
+ # @param sort_by [Symbol, Straddle::Models::PaykeyListParams::SortBy] Query param
36
+ #
37
+ # @param sort_order [Symbol, Straddle::Models::PaykeyListParams::SortOrder] Query param
26
38
  #
27
39
  # @param source [Array<Symbol, Straddle::Models::PaykeyListParams::Source>] Query param: Filter paykeys by their source.
28
40
  #
29
41
  # @param status [Array<Symbol, Straddle::Models::PaykeyListParams::Status>] Query param: Filter paykeys by their current status.
30
42
  #
43
+ # @param unblock_eligible [Boolean] Query param: Filter paykeys by unblock eligibility. When true, returns only bloc
44
+ #
31
45
  # @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
32
46
  #
33
47
  # @param request_id [String] Header param: Optional client generated identifier to trace and debug a request.
@@ -40,12 +54,24 @@ module Straddle
40
54
  #
41
55
  # @see Straddle::Models::PaykeyListParams
42
56
  def list(params = {})
57
+ query_params =
58
+ [
59
+ :customer_id,
60
+ :page_number,
61
+ :page_size,
62
+ :search_text,
63
+ :sort_by,
64
+ :sort_order,
65
+ :source,
66
+ :status,
67
+ :unblock_eligible
68
+ ]
43
69
  parsed, options = Straddle::PaykeyListParams.dump_request(params)
44
- query_params = [:customer_id, :page_number, :page_size, :sort_by, :sort_order, :source, :status]
70
+ query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
45
71
  @client.request(
46
72
  method: :get,
47
73
  path: "v1/paykeys",
48
- query: parsed.slice(*query_params),
74
+ query: query,
49
75
  headers: parsed.except(*query_params).transform_keys(
50
76
  correlation_id: "correlation-id",
51
77
  request_id: "request-id",
@@ -62,9 +88,9 @@ module Straddle
62
88
  #
63
89
  # @overload cancel(id, reason: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
64
90
  #
65
- # @param id [String] Path param:
91
+ # @param id [String] Path param
66
92
  #
67
- # @param reason [String, nil] Body param:
93
+ # @param reason [String, nil] Body param
68
94
  #
69
95
  # @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
70
96
  #
@@ -132,10 +158,9 @@ module Straddle
132
158
  )
133
159
  end
134
160
 
135
- # Retrieves the details of a paykey that has previously been created, including
136
- # unmasked bank account fields. Supply the unique paykey ID that was returned from
137
- # your previous request, and Straddle will return the corresponding paykey
138
- # information.
161
+ # Retrieves the details of a paykey that has previously been created. Supply the
162
+ # unique paykey ID that was returned from your previous request, and Straddle will
163
+ # return the corresponding paykey information including the unmasked token.
139
164
  #
140
165
  # @overload reveal(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
141
166
  #