stripe 19.1.0 → 19.2.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/lib/stripe/api_requestor.rb +3 -0
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/event_types.rb +16 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_failed_event.rb +44 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_processing_event.rb +44 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_event.rb +44 -0
- data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_with_errors_event.rb +44 -0
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/params/account_create_params.rb +26 -0
- data/lib/stripe/params/account_update_params.rb +26 -0
- data/lib/stripe/params/balance_settings_update_params.rb +42 -2
- data/lib/stripe/params/charge_create_params.rb +4 -1
- data/lib/stripe/params/checkout/session_create_params.rb +28 -15
- data/lib/stripe/params/confirmation_token_create_params.rb +11 -1
- data/lib/stripe/params/invoice_create_preview_params.rb +60 -0
- data/lib/stripe/params/payment_intent_capture_params.rb +2 -2
- data/lib/stripe/params/payment_intent_confirm_params.rb +38 -5
- data/lib/stripe/params/payment_intent_create_params.rb +65 -6
- data/lib/stripe/params/payment_intent_increment_authorization_params.rb +2 -2
- data/lib/stripe/params/payment_intent_update_params.rb +58 -5
- data/lib/stripe/params/payment_link_create_params.rb +30 -1
- data/lib/stripe/params/payment_link_update_params.rb +29 -0
- data/lib/stripe/params/payment_method_configuration_create_params.rb +43 -1
- data/lib/stripe/params/payment_method_configuration_list_params.rb +4 -0
- data/lib/stripe/params/payment_method_configuration_update_params.rb +43 -1
- data/lib/stripe/params/payment_method_create_params.rb +11 -1
- data/lib/stripe/params/payout_create_params.rb +1 -1
- data/lib/stripe/params/setup_intent_confirm_params.rb +18 -2
- data/lib/stripe/params/setup_intent_create_params.rb +18 -2
- data/lib/stripe/params/setup_intent_update_params.rb +18 -2
- data/lib/stripe/params/subscription_create_params.rb +61 -11
- data/lib/stripe/params/subscription_item_create_params.rb +1 -7
- data/lib/stripe/params/subscription_item_delete_params.rb +1 -7
- data/lib/stripe/params/subscription_item_update_params.rb +1 -7
- data/lib/stripe/params/subscription_schedule_create_params.rb +4 -0
- data/lib/stripe/params/subscription_schedule_update_params.rb +4 -0
- data/lib/stripe/params/subscription_update_params.rb +62 -8
- data/lib/stripe/params/terminal/configuration_create_params.rb +52 -0
- data/lib/stripe/params/terminal/configuration_update_params.rb +52 -0
- data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +11 -1
- data/lib/stripe/params/test_helpers/test_clock_create_params.rb +4 -1
- data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +2 -2
- data/lib/stripe/params/v2/commerce/product_catalog/import_create_params.rb +25 -0
- data/lib/stripe/params/v2/commerce/product_catalog/import_list_params.rb +54 -0
- data/lib/stripe/params/v2/commerce/product_catalog/import_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +28 -6
- data/lib/stripe/params/v2/core/account_token_create_params.rb +27 -5
- data/lib/stripe/params/v2/core/account_update_params.rb +29 -7
- data/lib/stripe/params/v2/core/event_destination_create_params.rb +23 -0
- data/lib/stripe/params.rb +1342 -614
- data/lib/stripe/railtie.rb +8 -0
- data/lib/stripe/resources/account.rb +4 -0
- data/lib/stripe/resources/balance_settings.rb +42 -2
- data/lib/stripe/resources/charge.rb +35 -0
- data/lib/stripe/resources/checkout/session.rb +23 -7
- data/lib/stripe/resources/confirmation_token.rb +26 -0
- data/lib/stripe/resources/discount.rb +2 -2
- data/lib/stripe/resources/invoice.rb +2 -0
- data/lib/stripe/resources/invoice_item.rb +34 -1
- data/lib/stripe/resources/issuing/dispute.rb +1 -1
- data/lib/stripe/resources/issuing/personalization_design.rb +1 -1
- data/lib/stripe/resources/mandate.rb +13 -0
- data/lib/stripe/resources/payment_attempt_record.rb +40 -10
- data/lib/stripe/resources/payment_intent.rb +71 -5
- data/lib/stripe/resources/payment_link.rb +40 -0
- data/lib/stripe/resources/payment_method.rb +26 -0
- data/lib/stripe/resources/payment_method_configuration.rb +68 -0
- data/lib/stripe/resources/payment_record.rb +40 -10
- data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
- data/lib/stripe/resources/refund.rb +13 -0
- data/lib/stripe/resources/setup_attempt.rb +13 -0
- data/lib/stripe/resources/setup_intent.rb +26 -0
- data/lib/stripe/resources/subscription.rb +77 -4
- data/lib/stripe/resources/subscription_item.rb +2 -0
- data/lib/stripe/resources/subscription_schedule.rb +2 -0
- data/lib/stripe/resources/terminal/configuration.rb +64 -0
- data/lib/stripe/resources/terminal/reader.rb +116 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +3 -3
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +3 -3
- data/lib/stripe/resources/v2/commerce/product_catalog_import.rb +274 -0
- data/lib/stripe/resources/v2/core/account.rb +37 -10
- data/lib/stripe/resources/v2/core/account_token.rb +1 -1
- data/lib/stripe/resources/v2/core/event.rb +1 -0
- data/lib/stripe/resources/v2/core/event_destination.rb +24 -0
- data/lib/stripe/resources.rb +500 -178
- data/lib/stripe/services/payment_intent_service.rb +3 -1
- data/lib/stripe/services/subscription_service.rb +2 -2
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -1
- data/lib/stripe/services/v2/commerce/product_catalog/import_service.rb +45 -0
- data/lib/stripe/services/v2/commerce/product_catalog_service.rb +17 -0
- data/lib/stripe/services/v2/commerce_service.rb +15 -0
- data/lib/stripe/services/v2/core/account_service.rb +1 -1
- data/lib/stripe/services/v2/core/account_token_service.rb +5 -1
- data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
- data/lib/stripe/services/v2/core/event_service.rb +2 -1
- data/lib/stripe/services/v2_services.rb +2 -1
- data/lib/stripe/services.rb +469 -189
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +25 -4
- data/rbi/stripe.rbi +2785 -253
- metadata +14 -2
|
@@ -134,7 +134,9 @@ module Stripe
|
|
|
134
134
|
# Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines.
|
|
135
135
|
# After it's captured, a PaymentIntent can no longer be incremented.
|
|
136
136
|
#
|
|
137
|
-
# Learn more about
|
|
137
|
+
# Learn more about incremental authorizations with
|
|
138
|
+
# [in-person payments](https://docs.stripe.com/docs/terminal/features/incremental-authorizations) and
|
|
139
|
+
# [online payments](https://docs.stripe.com/docs/payments/incremental-authorization?platform=web&ui=elements).
|
|
138
140
|
def increment_authorization(intent, params = {}, opts = {})
|
|
139
141
|
request(
|
|
140
142
|
method: :post,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
module Stripe
|
|
5
5
|
class SubscriptionService < StripeService
|
|
6
|
-
# Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled,
|
|
6
|
+
# Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details.
|
|
7
7
|
#
|
|
8
8
|
# Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true.
|
|
9
9
|
#
|
|
@@ -70,7 +70,7 @@ module Stripe
|
|
|
70
70
|
)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If
|
|
73
|
+
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. Resume is only available for subscriptions that use charge_automatically collection. If Stripe doesn't generate a resumption invoice, the subscription becomes active immediately. When a resumption invoice is generated, Stripe finalizes it immediately. If the invoice is paid or marked uncollectible, the subscription becomes active. If the invoice is manually voided, the subscription stays paused. If there is no payment attempt within 23 hours, Stripe voids the invoice and the subscription stays paused. Learn more about [resuming subscriptions](https://docs.stripe.com/docs/billing/subscriptions/pause#resume-subscriptions).
|
|
74
74
|
def resume(subscription, params = {}, opts = {})
|
|
75
75
|
request(
|
|
76
76
|
method: :post,
|
|
@@ -5,7 +5,7 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module Billing
|
|
7
7
|
class MeterEventSessionService < StripeService
|
|
8
|
-
# Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you
|
|
8
|
+
# Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you need to create a new meter event session when your token expires.
|
|
9
9
|
def create(params = {}, opts = {})
|
|
10
10
|
request(
|
|
11
11
|
method: :post,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module V2
|
|
6
|
+
module Commerce
|
|
7
|
+
module ProductCatalog
|
|
8
|
+
class ImportService < StripeService
|
|
9
|
+
# Creates a ProductCatalogImport.
|
|
10
|
+
def create(params = {}, opts = {})
|
|
11
|
+
request(
|
|
12
|
+
method: :post,
|
|
13
|
+
path: "/v2/commerce/product_catalog/imports",
|
|
14
|
+
params: params,
|
|
15
|
+
opts: opts,
|
|
16
|
+
base_address: :api
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Returns a list of ProductCatalogImport objects.
|
|
21
|
+
def list(params = {}, opts = {})
|
|
22
|
+
request(
|
|
23
|
+
method: :get,
|
|
24
|
+
path: "/v2/commerce/product_catalog/imports",
|
|
25
|
+
params: params,
|
|
26
|
+
opts: opts,
|
|
27
|
+
base_address: :api
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Retrieves a ProductCatalogImport by ID.
|
|
32
|
+
def retrieve(id, params = {}, opts = {})
|
|
33
|
+
request(
|
|
34
|
+
method: :get,
|
|
35
|
+
path: format("/v2/commerce/product_catalog/imports/%<id>s", { id: CGI.escape(id) }),
|
|
36
|
+
params: params,
|
|
37
|
+
opts: opts,
|
|
38
|
+
base_address: :api
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module V2
|
|
6
|
+
module Commerce
|
|
7
|
+
class ProductCatalogService < StripeService
|
|
8
|
+
attr_reader :imports
|
|
9
|
+
|
|
10
|
+
def initialize(requestor)
|
|
11
|
+
super
|
|
12
|
+
@imports = Stripe::V2::Commerce::ProductCatalog::ImportService.new(@requestor)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module V2
|
|
6
|
+
class CommerceService < StripeService
|
|
7
|
+
attr_reader :product_catalog
|
|
8
|
+
|
|
9
|
+
def initialize(requestor)
|
|
10
|
+
super
|
|
11
|
+
@product_catalog = Stripe::V2::Commerce::ProductCatalogService.new(@requestor)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -26,7 +26,7 @@ module Stripe
|
|
|
26
26
|
)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
#
|
|
29
|
+
# Create an Account that represents a company, individual, or other entity that your business interacts with. Accounts contain identifying information about the entity, and configurations that store the features an account has access to. An account can be configured as any or all of the following configurations: Customer, Merchant and/or Recipient.
|
|
30
30
|
#
|
|
31
31
|
# ** raises RateLimitError
|
|
32
32
|
def create(params = {}, opts = {})
|
|
@@ -5,7 +5,11 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module Core
|
|
7
7
|
class AccountTokenService < StripeService
|
|
8
|
-
#
|
|
8
|
+
# Create an account token with a publishable key and pass it to the Accounts v2 API to
|
|
9
|
+
# create or update an account without its data touching your server.
|
|
10
|
+
# Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens).
|
|
11
|
+
# In live mode, you can only create account tokens with your application's publishable key.
|
|
12
|
+
# In test mode, you can create account tokens with your secret key or publishable key.
|
|
9
13
|
#
|
|
10
14
|
# ** raises RateLimitError
|
|
11
15
|
def create(params = {}, opts = {})
|
|
@@ -6,7 +6,8 @@ module Stripe
|
|
|
6
6
|
module Core
|
|
7
7
|
module Accounts
|
|
8
8
|
class PersonTokenService < StripeService
|
|
9
|
-
# Creates a
|
|
9
|
+
# Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with an Account v2. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens).
|
|
10
|
+
# You can only create person tokens with your application's publishable key and in live mode. You can use your application's secret key to create person tokens only in test mode.
|
|
10
11
|
#
|
|
11
12
|
# ** raises RateLimitError
|
|
12
13
|
def create(account_id, params = {}, opts = {})
|
|
@@ -16,7 +16,8 @@ module Stripe
|
|
|
16
16
|
)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
# Retrieves the details of an event.
|
|
19
|
+
# Retrieves the details of an event if it was created in the last 30 days. Supply the unique
|
|
20
|
+
# identifier of the event, which might have been delivered to your event destination.
|
|
20
21
|
def retrieve(id, params = {}, opts = {})
|
|
21
22
|
request(
|
|
22
23
|
method: :get,
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
module Stripe
|
|
5
5
|
class V2Services < StripeService
|
|
6
|
-
attr_reader :billing, :core
|
|
6
|
+
attr_reader :billing, :commerce, :core
|
|
7
7
|
|
|
8
8
|
def initialize(requestor)
|
|
9
9
|
super
|
|
10
10
|
@billing = Stripe::V2::BillingService.new(@requestor)
|
|
11
|
+
@commerce = Stripe::V2::CommerceService.new(@requestor)
|
|
11
12
|
@core = Stripe::V2::CoreService.new(@requestor)
|
|
12
13
|
end
|
|
13
14
|
end
|