straddle 0.3.0 → 0.5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +127 -0
- data/README.md +32 -1
- data/lib/straddle/client.rb +49 -1
- data/lib/straddle/internal/transport/base_client.rb +5 -0
- data/lib/straddle/internal/transport/pooled_net_requester.rb +13 -11
- data/lib/straddle/internal/util.rb +61 -10
- data/lib/straddle/models/bridge/link_create_paykey_response.rb +8 -0
- data/lib/straddle/models/bridge/link_create_tan_response.rb +8 -0
- data/lib/straddle/models/charge_cancel_params.rb +8 -1
- data/lib/straddle/models/charge_create_params.rb +22 -4
- data/lib/straddle/models/charge_get_params.rb +7 -1
- data/lib/straddle/models/charge_hold_params.rb +8 -1
- data/lib/straddle/models/charge_release_params.rb +8 -1
- data/lib/straddle/models/charge_unmask_params.rb +7 -1
- data/lib/straddle/models/charge_unmask_response.rb +190 -5
- data/lib/straddle/models/charge_update_params.rb +11 -4
- data/lib/straddle/models/charge_v1.rb +188 -5
- data/lib/straddle/models/customer_delete_params.rb +7 -1
- data/lib/straddle/models/customer_get_params.rb +7 -1
- data/lib/straddle/models/customer_unmasked_params.rb +7 -1
- data/lib/straddle/models/customer_update_params.rb +8 -1
- data/lib/straddle/models/customers/review_decision_params.rb +8 -1
- data/lib/straddle/models/customers/review_get_params.rb +7 -1
- data/lib/straddle/models/customers/review_refresh_review_params.rb +7 -1
- data/lib/straddle/models/embed/account_get_params.rb +11 -1
- data/lib/straddle/models/embed/account_list_params.rb +8 -1
- data/lib/straddle/models/embed/account_onboard_params.rb +7 -1
- data/lib/straddle/models/embed/account_paged_v1.rb +4 -0
- data/lib/straddle/models/embed/account_simulate_params.rb +7 -1
- data/lib/straddle/models/embed/account_update_params.rb +8 -1
- data/lib/straddle/models/embed/account_v1.rb +4 -0
- data/lib/straddle/models/embed/accounts/capability_request_create_params.rb +8 -1
- data/lib/straddle/models/embed/accounts/capability_request_list_params.rb +8 -1
- data/lib/straddle/models/embed/accounts/capability_request_paged_v1.rb +9 -1
- data/lib/straddle/models/embed/address_v1.rb +14 -38
- data/lib/straddle/models/embed/linked_bank_account_cancel_params.rb +7 -1
- data/lib/straddle/models/embed/linked_bank_account_get_params.rb +7 -1
- data/lib/straddle/models/embed/linked_bank_account_unmask_params.rb +7 -1
- data/lib/straddle/models/embed/linked_bank_account_update_params.rb +8 -1
- data/lib/straddle/models/embed/organization_get_params.rb +7 -1
- data/lib/straddle/models/embed/representative.rb +2 -2
- data/lib/straddle/models/embed/representative_create_params.rb +2 -2
- data/lib/straddle/models/embed/representative_get_params.rb +7 -1
- data/lib/straddle/models/embed/representative_paged.rb +2 -2
- data/lib/straddle/models/embed/representative_unmask_params.rb +7 -1
- data/lib/straddle/models/embed/representative_update_params.rb +10 -3
- data/lib/straddle/models/funding_event_get_params.rb +7 -1
- data/lib/straddle/models/funding_event_list_params.rb +105 -1
- data/lib/straddle/models/funding_event_summary_item_v1.rb +128 -1
- data/lib/straddle/models/funding_event_summary_paged_v1.rb +128 -1
- data/lib/straddle/models/paykey_cancel_params.rb +7 -1
- data/lib/straddle/models/paykey_get_params.rb +7 -1
- data/lib/straddle/models/paykey_list_params.rb +40 -1
- data/lib/straddle/models/paykey_reveal_params.rb +7 -1
- data/lib/straddle/models/paykey_reveal_response.rb +8 -0
- data/lib/straddle/models/paykey_summary_paged_v1.rb +19 -1
- data/lib/straddle/models/paykey_unmasked_params.rb +7 -1
- data/lib/straddle/models/paykey_unmasked_v1.rb +8 -0
- data/lib/straddle/models/paykey_update_balance_params.rb +7 -1
- data/lib/straddle/models/paykey_v1.rb +19 -1
- data/lib/straddle/models/paykeys/review_decision_params.rb +7 -1
- data/lib/straddle/models/paykeys/review_get_params.rb +7 -1
- data/lib/straddle/models/paykeys/review_get_response.rb +19 -4
- data/lib/straddle/models/paykeys/review_refresh_review_params.rb +7 -1
- data/lib/straddle/models/payment_list_params.rb +71 -1
- data/lib/straddle/models/payment_summary_paged_v1.rb +110 -4
- data/lib/straddle/models/payout_cancel_params.rb +8 -1
- data/lib/straddle/models/payout_create_params.rb +22 -4
- data/lib/straddle/models/payout_get_params.rb +7 -1
- data/lib/straddle/models/payout_hold_params.rb +8 -1
- data/lib/straddle/models/payout_release_params.rb +8 -1
- data/lib/straddle/models/payout_unmask_params.rb +7 -1
- data/lib/straddle/models/payout_unmask_response.rb +193 -5
- data/lib/straddle/models/payout_update_params.rb +11 -4
- data/lib/straddle/models/payout_upload_authorization_document_params.rb +57 -0
- data/lib/straddle/models/payout_v1.rb +188 -5
- data/lib/straddle/models/status_details_v1.rb +7 -0
- data/lib/straddle/models.rb +2 -0
- data/lib/straddle/resources/bridge/link.rb +12 -6
- data/lib/straddle/resources/bridge.rb +13 -1
- data/lib/straddle/resources/charges.rb +13 -8
- data/lib/straddle/resources/customers/review.rb +7 -1
- data/lib/straddle/resources/customers.rb +23 -10
- data/lib/straddle/resources/embed/accounts/capability_requests.rb +9 -4
- data/lib/straddle/resources/embed/accounts.rb +29 -15
- data/lib/straddle/resources/embed/linked_bank_accounts.rb +11 -6
- data/lib/straddle/resources/embed/organizations.rb +7 -2
- data/lib/straddle/resources/embed/representatives.rb +15 -8
- data/lib/straddle/resources/embed.rb +19 -0
- data/lib/straddle/resources/funding_events.rb +22 -3
- data/lib/straddle/resources/paykeys/review.rb +7 -2
- data/lib/straddle/resources/paykeys.rb +42 -11
- data/lib/straddle/resources/payments.rb +30 -6
- data/lib/straddle/resources/payouts.rb +60 -7
- data/lib/straddle/version.rb +1 -1
- data/lib/straddle.rb +2 -0
- data/manifest.yaml +1 -0
- data/rbi/straddle/client.rbi +34 -0
- data/rbi/straddle/internal/util.rbi +29 -1
- data/rbi/straddle/models/bridge/link_create_paykey_response.rbi +40 -0
- data/rbi/straddle/models/bridge/link_create_tan_response.rbi +40 -0
- data/rbi/straddle/models/charge_cancel_params.rbi +6 -0
- data/rbi/straddle/models/charge_create_params.rbi +29 -3
- data/rbi/straddle/models/charge_get_params.rbi +6 -0
- data/rbi/straddle/models/charge_hold_params.rbi +6 -0
- data/rbi/straddle/models/charge_release_params.rbi +6 -0
- data/rbi/straddle/models/charge_unmask_params.rbi +6 -0
- data/rbi/straddle/models/charge_unmask_response.rbi +396 -6
- data/rbi/straddle/models/charge_update_params.rbi +9 -3
- data/rbi/straddle/models/charge_v1.rbi +364 -6
- data/rbi/straddle/models/customer_delete_params.rbi +6 -0
- data/rbi/straddle/models/customer_get_params.rbi +6 -0
- data/rbi/straddle/models/customer_unmasked_params.rbi +6 -0
- data/rbi/straddle/models/customer_update_params.rbi +6 -0
- data/rbi/straddle/models/customers/review_decision_params.rbi +6 -0
- data/rbi/straddle/models/customers/review_get_params.rbi +6 -0
- data/rbi/straddle/models/customers/review_refresh_review_params.rbi +6 -0
- data/rbi/straddle/models/embed/account_get_params.rbi +13 -1
- data/rbi/straddle/models/embed/account_list_params.rbi +9 -0
- data/rbi/straddle/models/embed/account_onboard_params.rbi +6 -0
- data/rbi/straddle/models/embed/account_paged_v1.rbi +20 -0
- data/rbi/straddle/models/embed/account_simulate_params.rbi +6 -0
- data/rbi/straddle/models/embed/account_update_params.rbi +6 -0
- data/rbi/straddle/models/embed/account_v1.rbi +20 -0
- data/rbi/straddle/models/embed/accounts/capability_request_create_params.rbi +6 -0
- data/rbi/straddle/models/embed/accounts/capability_request_list_params.rbi +6 -0
- data/rbi/straddle/models/embed/accounts/capability_request_paged_v1.rbi +8 -0
- data/rbi/straddle/models/embed/address_v1.rbi +18 -42
- data/rbi/straddle/models/embed/linked_bank_account_cancel_params.rbi +6 -0
- data/rbi/straddle/models/embed/linked_bank_account_get_params.rbi +11 -1
- data/rbi/straddle/models/embed/linked_bank_account_unmask_params.rbi +11 -1
- data/rbi/straddle/models/embed/linked_bank_account_update_params.rbi +6 -0
- data/rbi/straddle/models/embed/organization_get_params.rbi +11 -1
- data/rbi/straddle/models/embed/representative.rbi +2 -2
- data/rbi/straddle/models/embed/representative_create_params.rbi +2 -2
- data/rbi/straddle/models/embed/representative_get_params.rbi +11 -1
- data/rbi/straddle/models/embed/representative_paged.rbi +2 -2
- data/rbi/straddle/models/embed/representative_unmask_params.rbi +11 -1
- data/rbi/straddle/models/embed/representative_update_params.rbi +8 -2
- data/rbi/straddle/models/funding_event_get_params.rbi +6 -0
- data/rbi/straddle/models/funding_event_list_params.rbi +333 -0
- data/rbi/straddle/models/funding_event_summary_item_v1.rbi +392 -0
- data/rbi/straddle/models/funding_event_summary_paged_v1.rbi +393 -0
- data/rbi/straddle/models/paykey_cancel_params.rbi +6 -0
- data/rbi/straddle/models/paykey_get_params.rbi +6 -0
- data/rbi/straddle/models/paykey_list_params.rbi +52 -0
- data/rbi/straddle/models/paykey_reveal_params.rbi +6 -0
- data/rbi/straddle/models/paykey_reveal_response.rbi +40 -0
- data/rbi/straddle/models/paykey_summary_paged_v1.rbi +55 -3
- data/rbi/straddle/models/paykey_unmasked_params.rbi +6 -0
- data/rbi/straddle/models/paykey_unmasked_v1.rbi +40 -0
- data/rbi/straddle/models/paykey_update_balance_params.rbi +6 -0
- data/rbi/straddle/models/paykey_v1.rbi +52 -3
- data/rbi/straddle/models/paykeys/review_decision_params.rbi +6 -0
- data/rbi/straddle/models/paykeys/review_get_params.rbi +6 -0
- data/rbi/straddle/models/paykeys/review_get_response.rbi +55 -18
- data/rbi/straddle/models/paykeys/review_refresh_review_params.rbi +6 -0
- data/rbi/straddle/models/payment_list_params.rbi +126 -0
- data/rbi/straddle/models/payment_summary_paged_v1.rbi +214 -6
- data/rbi/straddle/models/payout_cancel_params.rbi +6 -0
- data/rbi/straddle/models/payout_create_params.rbi +29 -3
- data/rbi/straddle/models/payout_get_params.rbi +6 -0
- data/rbi/straddle/models/payout_hold_params.rbi +6 -0
- data/rbi/straddle/models/payout_release_params.rbi +6 -0
- data/rbi/straddle/models/payout_unmask_params.rbi +6 -0
- data/rbi/straddle/models/payout_unmask_response.rbi +393 -3
- data/rbi/straddle/models/payout_update_params.rbi +9 -3
- data/rbi/straddle/models/payout_upload_authorization_document_params.rbi +88 -0
- data/rbi/straddle/models/payout_v1.rbi +361 -3
- data/rbi/straddle/models/status_details_v1.rbi +29 -0
- data/rbi/straddle/models.rbi +3 -0
- data/rbi/straddle/resources/bridge/link.rbi +12 -6
- data/rbi/straddle/resources/bridge.rbi +13 -1
- data/rbi/straddle/resources/charges.rbi +13 -8
- data/rbi/straddle/resources/customers/review.rbi +7 -1
- data/rbi/straddle/resources/customers.rbi +20 -8
- data/rbi/straddle/resources/embed/accounts/capability_requests.rbi +6 -2
- data/rbi/straddle/resources/embed/accounts.rbi +22 -10
- data/rbi/straddle/resources/embed/linked_bank_accounts.rbi +8 -4
- data/rbi/straddle/resources/embed/organizations.rbi +4 -0
- data/rbi/straddle/resources/embed/representatives.rbi +12 -6
- data/rbi/straddle/resources/embed.rbi +19 -0
- data/rbi/straddle/resources/funding_events.rbi +27 -0
- data/rbi/straddle/resources/paykeys/review.rbi +7 -2
- data/rbi/straddle/resources/paykeys.rbi +32 -8
- data/rbi/straddle/resources/payments.rbi +28 -3
- data/rbi/straddle/resources/payouts.rbi +44 -7
- data/sig/straddle/internal/util.rbs +14 -0
- data/sig/straddle/models/bridge/link_create_paykey_response.rbs +17 -1
- data/sig/straddle/models/bridge/link_create_tan_response.rbs +17 -1
- data/sig/straddle/models/charge_cancel_params.rbs +5 -0
- data/sig/straddle/models/charge_create_params.rbs +18 -4
- data/sig/straddle/models/charge_get_params.rbs +5 -0
- data/sig/straddle/models/charge_hold_params.rbs +5 -0
- data/sig/straddle/models/charge_release_params.rbs +5 -0
- data/sig/straddle/models/charge_unmask_params.rbs +5 -0
- data/sig/straddle/models/charge_unmask_response.rbs +166 -7
- data/sig/straddle/models/charge_update_params.rbs +9 -4
- data/sig/straddle/models/charge_v1.rbs +166 -7
- data/sig/straddle/models/customer_delete_params.rbs +5 -0
- data/sig/straddle/models/customer_get_params.rbs +5 -0
- data/sig/straddle/models/customer_unmasked_params.rbs +5 -0
- data/sig/straddle/models/customer_update_params.rbs +5 -0
- data/sig/straddle/models/customers/review_decision_params.rbs +5 -0
- data/sig/straddle/models/customers/review_get_params.rbs +5 -0
- data/sig/straddle/models/customers/review_refresh_review_params.rbs +5 -0
- data/sig/straddle/models/embed/account_get_params.rbs +5 -1
- data/sig/straddle/models/embed/account_list_params.rbs +7 -0
- data/sig/straddle/models/embed/account_onboard_params.rbs +5 -0
- data/sig/straddle/models/embed/account_paged_v1.rbs +18 -2
- data/sig/straddle/models/embed/account_simulate_params.rbs +5 -0
- data/sig/straddle/models/embed/account_update_params.rbs +5 -0
- data/sig/straddle/models/embed/account_v1.rbs +18 -2
- data/sig/straddle/models/embed/accounts/capability_request_create_params.rbs +5 -0
- data/sig/straddle/models/embed/accounts/capability_request_list_params.rbs +5 -0
- data/sig/straddle/models/embed/accounts/capability_request_paged_v1.rbs +5 -0
- data/sig/straddle/models/embed/address_v1.rbs +12 -27
- data/sig/straddle/models/embed/linked_bank_account_cancel_params.rbs +10 -1
- data/sig/straddle/models/embed/linked_bank_account_get_params.rbs +9 -1
- data/sig/straddle/models/embed/linked_bank_account_unmask_params.rbs +9 -1
- data/sig/straddle/models/embed/linked_bank_account_update_params.rbs +5 -0
- data/sig/straddle/models/embed/organization_get_params.rbs +5 -1
- data/sig/straddle/models/embed/representative_get_params.rbs +9 -1
- data/sig/straddle/models/embed/representative_unmask_params.rbs +9 -1
- data/sig/straddle/models/embed/representative_update_params.rbs +5 -0
- data/sig/straddle/models/funding_event_get_params.rbs +5 -0
- data/sig/straddle/models/funding_event_list_params.rbs +125 -0
- data/sig/straddle/models/funding_event_summary_item_v1.rbs +164 -0
- data/sig/straddle/models/funding_event_summary_paged_v1.rbs +164 -0
- data/sig/straddle/models/paykey_cancel_params.rbs +5 -0
- data/sig/straddle/models/paykey_get_params.rbs +5 -0
- data/sig/straddle/models/paykey_list_params.rbs +31 -1
- data/sig/straddle/models/paykey_reveal_params.rbs +5 -0
- data/sig/straddle/models/paykey_reveal_response.rbs +17 -1
- data/sig/straddle/models/paykey_summary_paged_v1.rbs +25 -4
- data/sig/straddle/models/paykey_unmasked_params.rbs +5 -0
- data/sig/straddle/models/paykey_unmasked_v1.rbs +17 -1
- data/sig/straddle/models/paykey_update_balance_params.rbs +5 -0
- data/sig/straddle/models/paykey_v1.rbs +25 -4
- data/sig/straddle/models/paykeys/review_decision_params.rbs +5 -0
- data/sig/straddle/models/paykeys/review_get_params.rbs +5 -0
- data/sig/straddle/models/paykeys/review_get_response.rbs +28 -10
- data/sig/straddle/models/paykeys/review_refresh_review_params.rbs +5 -0
- data/sig/straddle/models/payment_list_params.rbs +80 -2
- data/sig/straddle/models/payment_summary_paged_v1.rbs +89 -7
- data/sig/straddle/models/payout_cancel_params.rbs +5 -0
- data/sig/straddle/models/payout_create_params.rbs +18 -4
- data/sig/straddle/models/payout_get_params.rbs +5 -0
- data/sig/straddle/models/payout_hold_params.rbs +5 -0
- data/sig/straddle/models/payout_release_params.rbs +5 -0
- data/sig/straddle/models/payout_unmask_params.rbs +5 -0
- data/sig/straddle/models/payout_unmask_response.rbs +163 -4
- data/sig/straddle/models/payout_update_params.rbs +9 -4
- data/sig/straddle/models/payout_upload_authorization_document_params.rbs +59 -0
- data/sig/straddle/models/payout_v1.rbs +163 -4
- data/sig/straddle/models/status_details_v1.rbs +14 -0
- data/sig/straddle/models.rbs +2 -0
- data/sig/straddle/resources/charges.rbs +2 -2
- data/sig/straddle/resources/embed/accounts.rbs +1 -0
- data/sig/straddle/resources/funding_events.rbs +4 -0
- data/sig/straddle/resources/paykeys.rbs +4 -0
- data/sig/straddle/resources/payments.rbs +7 -0
- data/sig/straddle/resources/payouts.rbs +12 -2
- metadata +19 -2
|
@@ -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
|
#
|
|
@@ -102,21 +111,23 @@ module Straddle
|
|
|
102
111
|
# created accounts appearing first. This endpoint supports advanced sorting and
|
|
103
112
|
# filtering options.
|
|
104
113
|
#
|
|
105
|
-
# @overload list(page_number: nil, page_size: nil, search_text: nil, sort_by: nil, sort_order: nil, status: nil, type: nil, correlation_id: nil, request_id: nil, request_options: {})
|
|
114
|
+
# @overload list(external_id: nil, page_number: nil, page_size: nil, search_text: nil, sort_by: nil, sort_order: nil, status: nil, type: nil, correlation_id: nil, request_id: nil, request_options: {})
|
|
115
|
+
#
|
|
116
|
+
# @param external_id [String] Query param
|
|
106
117
|
#
|
|
107
118
|
# @param page_number [Integer] Query param: Results page number. Starts at page 1. Default value: 1
|
|
108
119
|
#
|
|
109
120
|
# @param page_size [Integer] Query param: Page size. Default value: 100. Max value: 1000
|
|
110
121
|
#
|
|
111
|
-
# @param search_text [String] Query param
|
|
122
|
+
# @param search_text [String] Query param
|
|
112
123
|
#
|
|
113
124
|
# @param sort_by [String] Query param: Sort By. Default value: 'id'.
|
|
114
125
|
#
|
|
115
126
|
# @param sort_order [Symbol, Straddle::Models::Embed::AccountListParams::SortOrder] Query param: Sort Order. Default value: 'asc'.
|
|
116
127
|
#
|
|
117
|
-
# @param status [Symbol, Straddle::Models::Embed::AccountListParams::Status] Query param
|
|
128
|
+
# @param status [Symbol, Straddle::Models::Embed::AccountListParams::Status] Query param
|
|
118
129
|
#
|
|
119
|
-
# @param type [Symbol, Straddle::Models::Embed::AccountListParams::Type] Query param
|
|
130
|
+
# @param type [Symbol, Straddle::Models::Embed::AccountListParams::Type] Query param
|
|
120
131
|
#
|
|
121
132
|
# @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
|
|
122
133
|
#
|
|
@@ -128,12 +139,14 @@ module Straddle
|
|
|
128
139
|
#
|
|
129
140
|
# @see Straddle::Models::Embed::AccountListParams
|
|
130
141
|
def list(params = {})
|
|
142
|
+
query_params =
|
|
143
|
+
[:external_id, :page_number, :page_size, :search_text, :sort_by, :sort_order, :status, :type]
|
|
131
144
|
parsed, options = Straddle::Embed::AccountListParams.dump_request(params)
|
|
132
|
-
|
|
145
|
+
query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
133
146
|
@client.request(
|
|
134
147
|
method: :get,
|
|
135
148
|
path: "v1/accounts",
|
|
136
|
-
query:
|
|
149
|
+
query: query,
|
|
137
150
|
headers: parsed.except(*query_params).transform_keys(
|
|
138
151
|
correlation_id: "correlation-id",
|
|
139
152
|
request_id: "request-id"
|
|
@@ -181,9 +194,9 @@ module Straddle
|
|
|
181
194
|
#
|
|
182
195
|
# @overload onboard(account_id, terms_of_service:, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
|
|
183
196
|
#
|
|
184
|
-
# @param account_id [String] Path param
|
|
197
|
+
# @param account_id [String] Path param
|
|
185
198
|
#
|
|
186
|
-
# @param terms_of_service [Straddle::Models::Embed::TermsOfServiceV1] Body param
|
|
199
|
+
# @param terms_of_service [Straddle::Models::Embed::TermsOfServiceV1] Body param
|
|
187
200
|
#
|
|
188
201
|
# @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
|
|
189
202
|
#
|
|
@@ -218,9 +231,9 @@ module Straddle
|
|
|
218
231
|
#
|
|
219
232
|
# @overload simulate(account_id, final_status: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, request_options: {})
|
|
220
233
|
#
|
|
221
|
-
# @param account_id [String] Path param
|
|
234
|
+
# @param account_id [String] Path param
|
|
222
235
|
#
|
|
223
|
-
# @param final_status [Symbol, Straddle::Models::Embed::AccountSimulateParams::FinalStatus] Query param
|
|
236
|
+
# @param final_status [Symbol, Straddle::Models::Embed::AccountSimulateParams::FinalStatus] Query param
|
|
224
237
|
#
|
|
225
238
|
# @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
|
|
226
239
|
#
|
|
@@ -234,12 +247,13 @@ module Straddle
|
|
|
234
247
|
#
|
|
235
248
|
# @see Straddle::Models::Embed::AccountSimulateParams
|
|
236
249
|
def simulate(account_id, params = {})
|
|
237
|
-
parsed, options = Straddle::Embed::AccountSimulateParams.dump_request(params)
|
|
238
250
|
query_params = [:final_status]
|
|
251
|
+
parsed, options = Straddle::Embed::AccountSimulateParams.dump_request(params)
|
|
252
|
+
query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
239
253
|
@client.request(
|
|
240
254
|
method: :post,
|
|
241
255
|
path: ["v1/accounts/%1$s/simulate", account_id],
|
|
242
|
-
query:
|
|
256
|
+
query: query,
|
|
243
257
|
headers: parsed.except(*query_params).transform_keys(
|
|
244
258
|
correlation_id: "correlation-id",
|
|
245
259
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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,11 @@ 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(created_from: nil, created_to: nil, 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: {})
|
|
26
|
+
#
|
|
27
|
+
# @param created_from [Time] Query param: Start date for filtering by creation date.
|
|
28
|
+
#
|
|
29
|
+
# @param created_to [Time] Query param: End date for filtering by creation date.
|
|
16
30
|
#
|
|
17
31
|
# @param customer_id [String] Query param: Filter paykeys by related customer ID.
|
|
18
32
|
#
|
|
@@ -20,14 +34,18 @@ module Straddle
|
|
|
20
34
|
#
|
|
21
35
|
# @param page_size [Integer] Query param: Number of results per page. Maximum: 1000.
|
|
22
36
|
#
|
|
23
|
-
# @param
|
|
37
|
+
# @param search_text [String] Query param: General search term to filter paykeys.
|
|
24
38
|
#
|
|
25
|
-
# @param
|
|
39
|
+
# @param sort_by [Symbol, Straddle::Models::PaykeyListParams::SortBy] Query param
|
|
40
|
+
#
|
|
41
|
+
# @param sort_order [Symbol, Straddle::Models::PaykeyListParams::SortOrder] Query param
|
|
26
42
|
#
|
|
27
43
|
# @param source [Array<Symbol, Straddle::Models::PaykeyListParams::Source>] Query param: Filter paykeys by their source.
|
|
28
44
|
#
|
|
29
45
|
# @param status [Array<Symbol, Straddle::Models::PaykeyListParams::Status>] Query param: Filter paykeys by their current status.
|
|
30
46
|
#
|
|
47
|
+
# @param unblock_eligible [Boolean] Query param: Filter paykeys by unblock eligibility. When true, returns only bloc
|
|
48
|
+
#
|
|
31
49
|
# @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
|
|
32
50
|
#
|
|
33
51
|
# @param request_id [String] Header param: Optional client generated identifier to trace and debug a request.
|
|
@@ -40,12 +58,26 @@ module Straddle
|
|
|
40
58
|
#
|
|
41
59
|
# @see Straddle::Models::PaykeyListParams
|
|
42
60
|
def list(params = {})
|
|
61
|
+
query_params =
|
|
62
|
+
[
|
|
63
|
+
:created_from,
|
|
64
|
+
:created_to,
|
|
65
|
+
:customer_id,
|
|
66
|
+
:page_number,
|
|
67
|
+
:page_size,
|
|
68
|
+
:search_text,
|
|
69
|
+
:sort_by,
|
|
70
|
+
:sort_order,
|
|
71
|
+
:source,
|
|
72
|
+
:status,
|
|
73
|
+
:unblock_eligible
|
|
74
|
+
]
|
|
43
75
|
parsed, options = Straddle::PaykeyListParams.dump_request(params)
|
|
44
|
-
|
|
76
|
+
query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
45
77
|
@client.request(
|
|
46
78
|
method: :get,
|
|
47
79
|
path: "v1/paykeys",
|
|
48
|
-
query:
|
|
80
|
+
query: query,
|
|
49
81
|
headers: parsed.except(*query_params).transform_keys(
|
|
50
82
|
correlation_id: "correlation-id",
|
|
51
83
|
request_id: "request-id",
|
|
@@ -62,9 +94,9 @@ module Straddle
|
|
|
62
94
|
#
|
|
63
95
|
# @overload cancel(id, reason: nil, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {})
|
|
64
96
|
#
|
|
65
|
-
# @param id [String] Path param
|
|
97
|
+
# @param id [String] Path param
|
|
66
98
|
#
|
|
67
|
-
# @param reason [String, nil] Body param
|
|
99
|
+
# @param reason [String, nil] Body param
|
|
68
100
|
#
|
|
69
101
|
# @param correlation_id [String] Header param: Optional client generated identifier to trace and debug a series o
|
|
70
102
|
#
|
|
@@ -132,10 +164,9 @@ module Straddle
|
|
|
132
164
|
)
|
|
133
165
|
end
|
|
134
166
|
|
|
135
|
-
# Retrieves the details of a paykey that has previously been created
|
|
136
|
-
#
|
|
137
|
-
#
|
|
138
|
-
# information.
|
|
167
|
+
# Retrieves the details of a paykey that has previously been created. Supply the
|
|
168
|
+
# unique paykey ID that was returned from your previous request, and Straddle will
|
|
169
|
+
# return the corresponding paykey information including the unmasked token.
|
|
139
170
|
#
|
|
140
171
|
# @overload reveal(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
|
|
141
172
|
#
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Straddle
|
|
4
4
|
module Resources
|
|
5
|
+
# Payments provide endpoints to filter both Charges and Payouts with multiple
|
|
6
|
+
# different parameters.
|
|
5
7
|
class Payments
|
|
6
8
|
# Some parameter documentations has been truncated, see
|
|
7
9
|
# {Straddle::Models::PaymentListParams} for more details.
|
|
@@ -9,20 +11,30 @@ module Straddle
|
|
|
9
11
|
# Search for payments, including `charges` and `payouts`, using a variety of
|
|
10
12
|
# criteria. This endpoint supports advanced sorting and filtering options.
|
|
11
13
|
#
|
|
12
|
-
# @overload list(customer_id: nil, default_page_size: nil, default_sort: nil, default_sort_order: nil, external_id: nil, funding_id: nil, max_amount: nil, max_created_at: nil, max_effective_at: nil, max_payment_date: nil, min_amount: nil, min_created_at: nil, min_effective_at: nil, min_payment_date: nil, page_number: nil, page_size: nil, paykey: nil, paykey_id: nil, payment_id: nil, payment_status: nil, payment_type: nil, search_text: nil, sort_by: nil, sort_order: nil, status_reason: nil, status_source: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
|
|
14
|
+
# @overload list(customer_id: nil, default_page_size: nil, default_sort: nil, default_sort_order: nil, external_id: nil, funding_id: nil, has_refund: nil, has_resubmit: nil, include_metadata: nil, is_refund: nil, is_resubmit: nil, max_amount: nil, max_created_at: nil, max_effective_at: nil, max_payment_date: nil, max_updated_at: nil, min_amount: nil, min_created_at: nil, min_effective_at: nil, min_payment_date: nil, min_updated_at: nil, page_number: nil, page_size: nil, paykey: nil, paykey_id: nil, payment_id: nil, payment_status: nil, payment_type: nil, search_text: nil, sort_by: nil, sort_order: nil, status_reason: nil, status_source: nil, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {})
|
|
13
15
|
#
|
|
14
16
|
# @param customer_id [String] Query param: Search using the `customer_id` of a `charge` or `payout`.
|
|
15
17
|
#
|
|
16
|
-
# @param default_page_size [Integer] Query param
|
|
18
|
+
# @param default_page_size [Integer] Query param
|
|
17
19
|
#
|
|
18
20
|
# @param default_sort [Symbol, Straddle::Models::PaymentListParams::DefaultSort] Query param: The field to sort the results by.
|
|
19
21
|
#
|
|
20
|
-
# @param default_sort_order [Symbol, Straddle::Models::PaymentListParams::DefaultSortOrder] Query param
|
|
22
|
+
# @param default_sort_order [Symbol, Straddle::Models::PaymentListParams::DefaultSortOrder] Query param
|
|
21
23
|
#
|
|
22
24
|
# @param external_id [String] Query param: Search using the `external_id` of a `charge` or `payout`.
|
|
23
25
|
#
|
|
24
26
|
# @param funding_id [String] Query param: Search using the `funding_id` of a `charge` or `payout`.
|
|
25
27
|
#
|
|
28
|
+
# @param has_refund [Boolean] Query param: Has the payment been refunded by an associated payout (only applica
|
|
29
|
+
#
|
|
30
|
+
# @param has_resubmit [Boolean] Query param: Has the payment been resubmitted.
|
|
31
|
+
#
|
|
32
|
+
# @param include_metadata [Boolean] Query param: Include the metadata for payments in the returned data.
|
|
33
|
+
#
|
|
34
|
+
# @param is_refund [Boolean] Query param: Is the payment a refund of an original charge (only applicable to p
|
|
35
|
+
#
|
|
36
|
+
# @param is_resubmit [Boolean] Query param: Is the payment a resubmit of an original payment.
|
|
37
|
+
#
|
|
26
38
|
# @param max_amount [Integer] Query param: Search using a maximum `amount` of a `charge` or `payout`.
|
|
27
39
|
#
|
|
28
40
|
# @param max_created_at [Time] Query param: Search using the latest `created_at` date of a `charge` or `payout`
|
|
@@ -31,6 +43,8 @@ module Straddle
|
|
|
31
43
|
#
|
|
32
44
|
# @param max_payment_date [Date] Query param: Search using the latest `payment_date` of a `charge` or `payout`.
|
|
33
45
|
#
|
|
46
|
+
# @param max_updated_at [Time] Query param: Filter to payments last updated on or before this timestamp.
|
|
47
|
+
#
|
|
34
48
|
# @param min_amount [Integer] Query param: Search using the minimum `amount of a `charge`or`payout`.
|
|
35
49
|
#
|
|
36
50
|
# @param min_created_at [Time] Query param: Search using the earliest `created_at` date of a `charge` or `payou
|
|
@@ -39,6 +53,8 @@ module Straddle
|
|
|
39
53
|
#
|
|
40
54
|
# @param min_payment_date [Date] Query param: Search using the earliest ` `of a `charge` or `payout`.
|
|
41
55
|
#
|
|
56
|
+
# @param min_updated_at [Time] Query param: Filter to payments last updated on or after this timestamp.
|
|
57
|
+
#
|
|
42
58
|
# @param page_number [Integer] Query param: Results page number. Starts at page 1.
|
|
43
59
|
#
|
|
44
60
|
# @param page_size [Integer] Query param: Results page size. Max value: 1000
|
|
@@ -57,7 +73,7 @@ module Straddle
|
|
|
57
73
|
#
|
|
58
74
|
# @param sort_by [Symbol, Straddle::Models::PaymentListParams::SortBy] Query param: The field to sort the results by.
|
|
59
75
|
#
|
|
60
|
-
# @param sort_order [Symbol, Straddle::Models::PaymentListParams::SortOrder] Query param
|
|
76
|
+
# @param sort_order [Symbol, Straddle::Models::PaymentListParams::SortOrder] Query param
|
|
61
77
|
#
|
|
62
78
|
# @param status_reason [Array<Symbol, Straddle::Models::PaymentListParams::StatusReason>] Query param: Reason for latest payment status change.
|
|
63
79
|
#
|
|
@@ -75,7 +91,6 @@ module Straddle
|
|
|
75
91
|
#
|
|
76
92
|
# @see Straddle::Models::PaymentListParams
|
|
77
93
|
def list(params = {})
|
|
78
|
-
parsed, options = Straddle::PaymentListParams.dump_request(params)
|
|
79
94
|
query_params =
|
|
80
95
|
[
|
|
81
96
|
:customer_id,
|
|
@@ -84,14 +99,21 @@ module Straddle
|
|
|
84
99
|
:default_sort_order,
|
|
85
100
|
:external_id,
|
|
86
101
|
:funding_id,
|
|
102
|
+
:has_refund,
|
|
103
|
+
:has_resubmit,
|
|
104
|
+
:include_metadata,
|
|
105
|
+
:is_refund,
|
|
106
|
+
:is_resubmit,
|
|
87
107
|
:max_amount,
|
|
88
108
|
:max_created_at,
|
|
89
109
|
:max_effective_at,
|
|
90
110
|
:max_payment_date,
|
|
111
|
+
:max_updated_at,
|
|
91
112
|
:min_amount,
|
|
92
113
|
:min_created_at,
|
|
93
114
|
:min_effective_at,
|
|
94
115
|
:min_payment_date,
|
|
116
|
+
:min_updated_at,
|
|
95
117
|
:page_number,
|
|
96
118
|
:page_size,
|
|
97
119
|
:paykey,
|
|
@@ -105,10 +127,12 @@ module Straddle
|
|
|
105
127
|
:status_reason,
|
|
106
128
|
:status_source
|
|
107
129
|
]
|
|
130
|
+
parsed, options = Straddle::PaymentListParams.dump_request(params)
|
|
131
|
+
query = Straddle::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
108
132
|
@client.request(
|
|
109
133
|
method: :get,
|
|
110
134
|
path: "v1/payments",
|
|
111
|
-
query:
|
|
135
|
+
query: query,
|
|
112
136
|
headers: parsed.except(*query_params).transform_keys(
|
|
113
137
|
correlation_id: "correlation-id",
|
|
114
138
|
request_id: "request-id",
|