stripe 17.1.0.pre.alpha.3 → 17.1.0.pre.alpha.4
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/lib/stripe/events/v2_money_management_transaction_created_event.rb +18 -1
- data/lib/stripe/object_types.rb +2 -0
- data/lib/stripe/params/billing/meter_create_params.rb +5 -1
- data/lib/stripe/params/billing/meter_event_summary_list_params.rb +8 -0
- data/lib/stripe/params/delegated_checkout/requested_session_create_params.rb +230 -1
- data/lib/stripe/params/delegated_checkout/requested_session_update_params.rb +195 -1
- data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +2 -2
- data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +2 -2
- data/lib/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +33 -2
- data/lib/stripe/params/v2/core/account_list_params.rb +4 -1
- data/lib/stripe/params/v2/core/account_update_params.rb +33 -2
- data/lib/stripe/params/v2/core/event_list_params.rb +24 -1
- data/lib/stripe/params/v2/core/vault/gb_bank_account_list_params.rb +19 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_confirm_microdeposits_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_list_params.rb +22 -0
- data/lib/stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params.rb +12 -0
- data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +20 -0
- data/lib/stripe/params/v2/test_helpers/money_management_recipient_verifications_params.rb +1 -0
- data/lib/stripe/params.rb +6 -0
- data/lib/stripe/resources/billing/meter.rb +2 -0
- data/lib/stripe/resources/billing/meter_event_summary.rb +2 -0
- data/lib/stripe/resources/delegated_checkout/requested_session.rb +218 -2
- data/lib/stripe/resources/v2/billing/cadence.rb +2 -2
- data/lib/stripe/resources/v2/billing/collection_setting.rb +2 -2
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +2 -2
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription_components.rb +49 -0
- data/lib/stripe/resources/v2/core/account.rb +57 -2
- data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +35 -1
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +8 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rb +23 -0
- data/lib/stripe/services/v2/core/account_service.rb +1 -1
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +11 -0
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +33 -0
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +11 -0
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +1 -1
- data/lib/stripe/services.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +1407 -36
- metadata +10 -2
|
@@ -2560,11 +2560,44 @@ module Stripe
|
|
|
2560
2560
|
@field_remappings = {}
|
|
2561
2561
|
end
|
|
2562
2562
|
end
|
|
2563
|
+
|
|
2564
|
+
class Usd < ::Stripe::StripeObject
|
|
2565
|
+
class StatusDetail < ::Stripe::StripeObject
|
|
2566
|
+
# Machine-readable code explaining the reason for the Capability to be in its current status.
|
|
2567
|
+
attr_reader :code
|
|
2568
|
+
# Machine-readable code explaining how to make the Capability active.
|
|
2569
|
+
attr_reader :resolution
|
|
2570
|
+
|
|
2571
|
+
def self.inner_class_types
|
|
2572
|
+
@inner_class_types = {}
|
|
2573
|
+
end
|
|
2574
|
+
|
|
2575
|
+
def self.field_remappings
|
|
2576
|
+
@field_remappings = {}
|
|
2577
|
+
end
|
|
2578
|
+
end
|
|
2579
|
+
# Whether the Capability has been requested.
|
|
2580
|
+
attr_reader :requested
|
|
2581
|
+
# The status of the Capability.
|
|
2582
|
+
attr_reader :status
|
|
2583
|
+
# Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`.
|
|
2584
|
+
attr_reader :status_details
|
|
2585
|
+
|
|
2586
|
+
def self.inner_class_types
|
|
2587
|
+
@inner_class_types = { status_details: StatusDetail }
|
|
2588
|
+
end
|
|
2589
|
+
|
|
2590
|
+
def self.field_remappings
|
|
2591
|
+
@field_remappings = {}
|
|
2592
|
+
end
|
|
2593
|
+
end
|
|
2563
2594
|
# Can hold storage-type funds on Stripe in GBP.
|
|
2564
2595
|
attr_reader :gbp
|
|
2596
|
+
# Can hold storage-type funds on Stripe in USD.
|
|
2597
|
+
attr_reader :usd
|
|
2565
2598
|
|
|
2566
2599
|
def self.inner_class_types
|
|
2567
|
-
@inner_class_types = { gbp: Gbp }
|
|
2600
|
+
@inner_class_types = { gbp: Gbp, usd: Usd }
|
|
2568
2601
|
end
|
|
2569
2602
|
|
|
2570
2603
|
def self.field_remappings
|
|
@@ -2975,6 +3008,23 @@ module Stripe
|
|
|
2975
3008
|
end
|
|
2976
3009
|
end
|
|
2977
3010
|
|
|
3011
|
+
class RepresentativeDeclaration < ::Stripe::StripeObject
|
|
3012
|
+
# The time marking when the representative attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
|
3013
|
+
attr_reader :date
|
|
3014
|
+
# The IP address from which the representative attestation was made.
|
|
3015
|
+
attr_reader :ip
|
|
3016
|
+
# The user agent of the browser from which the representative attestation was made.
|
|
3017
|
+
attr_reader :user_agent
|
|
3018
|
+
|
|
3019
|
+
def self.inner_class_types
|
|
3020
|
+
@inner_class_types = {}
|
|
3021
|
+
end
|
|
3022
|
+
|
|
3023
|
+
def self.field_remappings
|
|
3024
|
+
@field_remappings = {}
|
|
3025
|
+
end
|
|
3026
|
+
end
|
|
3027
|
+
|
|
2978
3028
|
class TermsOfService < ::Stripe::StripeObject
|
|
2979
3029
|
class Account < ::Stripe::StripeObject
|
|
2980
3030
|
# The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
|
|
@@ -3420,6 +3470,8 @@ module Stripe
|
|
|
3420
3470
|
attr_reader :ownership_declaration
|
|
3421
3471
|
# Attestation that all Persons with a specific Relationship value have been provided.
|
|
3422
3472
|
attr_reader :persons_provided
|
|
3473
|
+
# This hash is used to attest that the representative is authorized to act as the representative of their legal entity.
|
|
3474
|
+
attr_reader :representative_declaration
|
|
3423
3475
|
# Attestations of accepted terms of service agreements.
|
|
3424
3476
|
attr_reader :terms_of_service
|
|
3425
3477
|
|
|
@@ -3428,6 +3480,7 @@ module Stripe
|
|
|
3428
3480
|
directorship_declaration: DirectorshipDeclaration,
|
|
3429
3481
|
ownership_declaration: OwnershipDeclaration,
|
|
3430
3482
|
persons_provided: PersonsProvided,
|
|
3483
|
+
representative_declaration: RepresentativeDeclaration,
|
|
3431
3484
|
terms_of_service: TermsOfService,
|
|
3432
3485
|
}
|
|
3433
3486
|
end
|
|
@@ -4314,7 +4367,7 @@ module Stripe
|
|
|
4314
4367
|
@field_remappings = {}
|
|
4315
4368
|
end
|
|
4316
4369
|
end
|
|
4317
|
-
# Attestations from the identity's key people, e.g. owners, executives, directors.
|
|
4370
|
+
# Attestations from the identity's key people, e.g. owners, executives, directors, representatives.
|
|
4318
4371
|
attr_reader :attestations
|
|
4319
4372
|
# Information about the company or business.
|
|
4320
4373
|
attr_reader :business_details
|
|
@@ -4511,6 +4564,8 @@ module Stripe
|
|
|
4511
4564
|
end
|
|
4512
4565
|
# Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have.
|
|
4513
4566
|
attr_reader :applied_configurations
|
|
4567
|
+
# A value indicating if the Account has been closed.
|
|
4568
|
+
attr_reader :closed
|
|
4514
4569
|
# An Account Configuration which allows the Account to take on a key persona across Stripe products.
|
|
4515
4570
|
attr_reader :configuration
|
|
4516
4571
|
# The default contact email address for the Account. Required when configuring the account as a merchant or recipient.
|
|
@@ -12,6 +12,38 @@ module Stripe
|
|
|
12
12
|
"v2.core.vault.us_bank_account"
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
class Verification < ::Stripe::StripeObject
|
|
16
|
+
class MicrodepositVerificationDetails < ::Stripe::StripeObject
|
|
17
|
+
# Time when microdeposits will expire and have to be re-sent.
|
|
18
|
+
attr_reader :expires
|
|
19
|
+
# Microdeposit type can be amounts or descriptor_type.
|
|
20
|
+
attr_reader :microdeposit_type
|
|
21
|
+
# Time when microdeposits were sent.
|
|
22
|
+
attr_reader :sent
|
|
23
|
+
|
|
24
|
+
def self.inner_class_types
|
|
25
|
+
@inner_class_types = {}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def self.field_remappings
|
|
29
|
+
@field_remappings = {}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
# The microdeposit verification details if the status is awaiting verification.
|
|
33
|
+
attr_reader :microdeposit_verification_details
|
|
34
|
+
# The bank account verification status.
|
|
35
|
+
attr_reader :status
|
|
36
|
+
|
|
37
|
+
def self.inner_class_types
|
|
38
|
+
@inner_class_types = {
|
|
39
|
+
microdeposit_verification_details: MicrodepositVerificationDetails,
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.field_remappings
|
|
44
|
+
@field_remappings = {}
|
|
45
|
+
end
|
|
46
|
+
end
|
|
15
47
|
# Whether this USBankAccount object was archived.
|
|
16
48
|
attr_reader :archived
|
|
17
49
|
# Closed Enum. The type of bank account (checking or savings).
|
|
@@ -30,11 +62,13 @@ module Stripe
|
|
|
30
62
|
attr_reader :object
|
|
31
63
|
# The ACH routing number of the bank account.
|
|
32
64
|
attr_reader :routing_number
|
|
65
|
+
# The bank account verification details.
|
|
66
|
+
attr_reader :verification
|
|
33
67
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
34
68
|
attr_reader :livemode
|
|
35
69
|
|
|
36
70
|
def self.inner_class_types
|
|
37
|
-
@inner_class_types = {}
|
|
71
|
+
@inner_class_types = { verification: Verification }
|
|
38
72
|
end
|
|
39
73
|
|
|
40
74
|
def self.field_remappings
|
data/lib/stripe/resources.rb
CHANGED
|
@@ -187,6 +187,7 @@ require "stripe/resources/v2/billing/metered_item"
|
|
|
187
187
|
require "stripe/resources/v2/billing/pricing_plan"
|
|
188
188
|
require "stripe/resources/v2/billing/pricing_plan_component"
|
|
189
189
|
require "stripe/resources/v2/billing/pricing_plan_subscription"
|
|
190
|
+
require "stripe/resources/v2/billing/pricing_plan_subscription_components"
|
|
190
191
|
require "stripe/resources/v2/billing/pricing_plan_version"
|
|
191
192
|
require "stripe/resources/v2/billing/profile"
|
|
192
193
|
require "stripe/resources/v2/billing/rate_card"
|
|
@@ -5,6 +5,14 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module Billing
|
|
7
7
|
class PricingPlanSubscriptionService < StripeService
|
|
8
|
+
attr_reader :components
|
|
9
|
+
|
|
10
|
+
def initialize(requestor)
|
|
11
|
+
super
|
|
12
|
+
@components = Stripe::V2::Billing::PricingPlanSubscriptions::ComponentService
|
|
13
|
+
.new(@requestor)
|
|
14
|
+
end
|
|
15
|
+
|
|
8
16
|
# List all Pricing Plan Subscription objects.
|
|
9
17
|
def list(params = {}, opts = {})
|
|
10
18
|
request(
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module V2
|
|
6
|
+
module Billing
|
|
7
|
+
module PricingPlanSubscriptions
|
|
8
|
+
class ComponentService < StripeService
|
|
9
|
+
# Retrieve a Pricing Plan Subscription's components.
|
|
10
|
+
def retrieve(id, params = {}, opts = {})
|
|
11
|
+
request(
|
|
12
|
+
method: :get,
|
|
13
|
+
path: format("/v2/billing/pricing_plan_subscriptions/%<id>s/components", { id: CGI.escape(id) }),
|
|
14
|
+
params: params,
|
|
15
|
+
opts: opts,
|
|
16
|
+
base_address: :api
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -12,7 +12,7 @@ module Stripe
|
|
|
12
12
|
@persons = Stripe::V2::Core::Accounts::PersonService.new(@requestor)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
# Removes access to the Account and its associated resources.
|
|
15
|
+
# Removes access to the Account and its associated resources. Closed Accounts can no longer be operated on, but limited information can still be retrieved through the API in order to be able to track their history.
|
|
16
16
|
def close(id, params = {}, opts = {})
|
|
17
17
|
request(
|
|
18
18
|
method: :post,
|
|
@@ -57,6 +57,17 @@ module Stripe
|
|
|
57
57
|
)
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
+
# List objects that can be used as destinations for outbound money movement via OutboundPayment.
|
|
61
|
+
def list(params = {}, opts = {})
|
|
62
|
+
request(
|
|
63
|
+
method: :get,
|
|
64
|
+
path: "/v2/core/vault/gb_bank_accounts",
|
|
65
|
+
params: params,
|
|
66
|
+
opts: opts,
|
|
67
|
+
base_address: :api
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
60
71
|
# Retrieve a GB bank account.
|
|
61
72
|
def retrieve(id, params = {}, opts = {})
|
|
62
73
|
request(
|
|
@@ -21,6 +21,17 @@ module Stripe
|
|
|
21
21
|
)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
# Confirm microdeposits amounts or descriptor code that you have received from the Send Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified and eligible to transfer funds with.
|
|
25
|
+
def confirm_microdeposits(id, params = {}, opts = {})
|
|
26
|
+
request(
|
|
27
|
+
method: :post,
|
|
28
|
+
path: format("/v2/core/vault/us_bank_accounts/%<id>s/confirm_microdeposits", { id: CGI.escape(id) }),
|
|
29
|
+
params: params,
|
|
30
|
+
opts: opts,
|
|
31
|
+
base_address: :api
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
24
35
|
# Create a USBankAccount object.
|
|
25
36
|
#
|
|
26
37
|
# ** raises BlockedByStripeError
|
|
@@ -36,6 +47,17 @@ module Stripe
|
|
|
36
47
|
)
|
|
37
48
|
end
|
|
38
49
|
|
|
50
|
+
# List USBankAccount objects. Optionally filter by verification status.
|
|
51
|
+
def list(params = {}, opts = {})
|
|
52
|
+
request(
|
|
53
|
+
method: :get,
|
|
54
|
+
path: "/v2/core/vault/us_bank_accounts",
|
|
55
|
+
params: params,
|
|
56
|
+
opts: opts,
|
|
57
|
+
base_address: :api
|
|
58
|
+
)
|
|
59
|
+
end
|
|
60
|
+
|
|
39
61
|
# Retrieve a USBankAccount object.
|
|
40
62
|
def retrieve(id, params = {}, opts = {})
|
|
41
63
|
request(
|
|
@@ -47,6 +69,17 @@ module Stripe
|
|
|
47
69
|
)
|
|
48
70
|
end
|
|
49
71
|
|
|
72
|
+
# Send microdeposits in order to verify your US Bank Account so it is eligible to transfer funds. This will start the verification process and you must Confirm Microdeposits to successfully verify your US Bank Account.
|
|
73
|
+
def send_microdeposits(id, params = {}, opts = {})
|
|
74
|
+
request(
|
|
75
|
+
method: :post,
|
|
76
|
+
path: format("/v2/core/vault/us_bank_accounts/%<id>s/send_microdeposits", { id: CGI.escape(id) }),
|
|
77
|
+
params: params,
|
|
78
|
+
opts: opts,
|
|
79
|
+
base_address: :api
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
50
83
|
# Update a USBankAccount object. This is limited to supplying a previously empty routing_number field.
|
|
51
84
|
#
|
|
52
85
|
# ** raises BlockedByStripeError
|
|
@@ -53,6 +53,17 @@ module Stripe
|
|
|
53
53
|
base_address: :api
|
|
54
54
|
)
|
|
55
55
|
end
|
|
56
|
+
|
|
57
|
+
# Updates an existing FinancialAccount.
|
|
58
|
+
def update(id, params = {}, opts = {})
|
|
59
|
+
request(
|
|
60
|
+
method: :post,
|
|
61
|
+
path: format("/v2/money_management/financial_accounts/%<id>s", { id: CGI.escape(id) }),
|
|
62
|
+
params: params,
|
|
63
|
+
opts: opts,
|
|
64
|
+
base_address: :api
|
|
65
|
+
)
|
|
66
|
+
end
|
|
56
67
|
end
|
|
57
68
|
end
|
|
58
69
|
end
|
|
@@ -22,9 +22,9 @@ module Stripe
|
|
|
22
22
|
# Creates an OutboundPayment.
|
|
23
23
|
#
|
|
24
24
|
# ** raises InsufficientFundsError
|
|
25
|
+
# ** raises FeatureNotEnabledError
|
|
25
26
|
# ** raises QuotaExceededError
|
|
26
27
|
# ** raises RecipientNotNotifiableError
|
|
27
|
-
# ** raises FeatureNotEnabledError
|
|
28
28
|
def create(params = {}, opts = {})
|
|
29
29
|
request(
|
|
30
30
|
method: :post,
|
data/lib/stripe/services.rb
CHANGED
|
@@ -221,6 +221,7 @@ require "stripe/services/v2/billing/meter_event_stream_service"
|
|
|
221
221
|
require "stripe/services/v2/billing/metered_item_service"
|
|
222
222
|
require "stripe/services/v2/billing/pricing_plan_service"
|
|
223
223
|
require "stripe/services/v2/billing/pricing_plan_subscription_service"
|
|
224
|
+
require "stripe/services/v2/billing/pricing_plan_subscriptions/component_service"
|
|
224
225
|
require "stripe/services/v2/billing/pricing_plans/component_service"
|
|
225
226
|
require "stripe/services/v2/billing/pricing_plans/version_service"
|
|
226
227
|
require "stripe/services/v2/billing/profile_service"
|
data/lib/stripe/version.rb
CHANGED