stripe 14.1.0.pre.beta.1 → 15.1.0.pre.beta.1
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 +39 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/stripe/api_operations/save.rb +2 -1
- data/lib/stripe/api_operations/singleton_save.rb +2 -1
- data/lib/stripe/api_requestor.rb +3 -1
- data/lib/stripe/api_resource.rb +10 -3
- data/lib/stripe/object_types.rb +3 -0
- data/lib/stripe/request_options.rb +2 -1
- data/lib/stripe/resources/account.rb +10 -0
- data/lib/stripe/resources/account_session.rb +52 -0
- data/lib/stripe/resources/balance_settings.rb +1 -1
- data/lib/stripe/resources/checkout/session.rb +35 -3
- data/lib/stripe/resources/confirmation_token.rb +3 -3
- data/lib/stripe/resources/invoice.rb +1 -1
- data/lib/stripe/resources/login_link.rb +2 -1
- data/lib/stripe/resources/payment_attempt_record.rb +4 -4
- data/lib/stripe/resources/payment_intent.rb +9 -9
- data/lib/stripe/resources/payment_method.rb +3 -3
- data/lib/stripe/resources/payment_method_domain.rb +13 -0
- data/lib/stripe/resources/payment_record.rb +6 -6
- data/lib/stripe/resources/privacy/redaction_job.rb +251 -0
- data/lib/stripe/resources/privacy/redaction_job_root_objects.rb +35 -0
- data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +54 -0
- data/lib/stripe/resources/setup_intent.rb +9 -9
- data/lib/stripe/resources/subscription.rb +3 -3
- data/lib/stripe/resources/tax/registration.rb +20 -0
- data/lib/stripe/resources.rb +3 -0
- data/lib/stripe/services/account_service.rb +8 -0
- data/lib/stripe/services/account_session_service.rb +52 -0
- data/lib/stripe/services/checkout/session_service.rb +23 -2
- data/lib/stripe/services/external_account_service.rb +112 -0
- data/lib/stripe/services/invoice_service.rb +1 -1
- data/lib/stripe/services/payment_intent_service.rb +9 -9
- data/lib/stripe/services/payment_method_service.rb +3 -3
- data/lib/stripe/services/payment_record_service.rb +2 -2
- data/lib/stripe/services/privacy/redaction_job_service.rb +231 -0
- data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +57 -0
- data/lib/stripe/services/privacy_service.rb +13 -0
- data/lib/stripe/services/setup_intent_service.rb +9 -9
- data/lib/stripe/services/subscription_service.rb +2 -2
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +3 -3
- data/lib/stripe/services/v1_services.rb +2 -1
- data/lib/stripe/services/v2/core/event_service.rb +5 -3
- data/lib/stripe/services.rb +3 -0
- data/lib/stripe/stripe_object.rb +13 -3
- data/lib/stripe/util.rb +11 -0
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +973 -91
- metadata +8 -2
@@ -0,0 +1,57 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Privacy
|
6
|
+
class RedactionJobValidationErrorService < StripeService
|
7
|
+
class ListParams < Stripe::RequestParams
|
8
|
+
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
9
|
+
attr_accessor :ending_before
|
10
|
+
# Specifies which fields in the response should be expanded.
|
11
|
+
attr_accessor :expand
|
12
|
+
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
13
|
+
attr_accessor :limit
|
14
|
+
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
15
|
+
attr_accessor :starting_after
|
16
|
+
|
17
|
+
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
18
|
+
@ending_before = ending_before
|
19
|
+
@expand = expand
|
20
|
+
@limit = limit
|
21
|
+
@starting_after = starting_after
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class RetrieveParams < Stripe::RequestParams
|
26
|
+
# Specifies which fields in the response should be expanded.
|
27
|
+
attr_accessor :expand
|
28
|
+
|
29
|
+
def initialize(expand: nil)
|
30
|
+
@expand = expand
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# List validation errors method
|
35
|
+
def list(job, params = {}, opts = {})
|
36
|
+
request(
|
37
|
+
method: :get,
|
38
|
+
path: format("/v1/privacy/redaction_jobs/%<job>s/validation_errors", { job: CGI.escape(job) }),
|
39
|
+
params: params,
|
40
|
+
opts: opts,
|
41
|
+
base_address: :api
|
42
|
+
)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Retrieve validation error method
|
46
|
+
def retrieve(job, error, params = {}, opts = {})
|
47
|
+
request(
|
48
|
+
method: :get,
|
49
|
+
path: format("/v1/privacy/redaction_jobs/%<job>s/validation_errors/%<error>s", { job: CGI.escape(job), error: CGI.escape(error) }),
|
50
|
+
params: params,
|
51
|
+
opts: opts,
|
52
|
+
base_address: :api
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class PrivacyService < StripeService
|
6
|
+
attr_reader :redaction_jobs
|
7
|
+
|
8
|
+
def initialize(requestor)
|
9
|
+
super(requestor)
|
10
|
+
@redaction_jobs = Stripe::Privacy::RedactionJobService.new(@requestor)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -562,7 +562,7 @@ module Stripe
|
|
562
562
|
attr_accessor :bacs_debit
|
563
563
|
# If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
|
564
564
|
attr_accessor :bancontact
|
565
|
-
# If this is a `billie` PaymentMethod, this hash contains details about the
|
565
|
+
# If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
|
566
566
|
attr_accessor :billie
|
567
567
|
# Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
568
568
|
attr_accessor :billing_details
|
@@ -636,11 +636,11 @@ module Stripe
|
|
636
636
|
attr_accessor :radar_options
|
637
637
|
# If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
|
638
638
|
attr_accessor :rechnung
|
639
|
-
# If this is a `
|
639
|
+
# If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
|
640
640
|
attr_accessor :revolut_pay
|
641
641
|
# If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
|
642
642
|
attr_accessor :samsung_pay
|
643
|
-
# If this is a `satispay` PaymentMethod, this hash contains details about the
|
643
|
+
# If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
|
644
644
|
attr_accessor :satispay
|
645
645
|
# If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
|
646
646
|
attr_accessor :sepa_debit
|
@@ -1787,7 +1787,7 @@ module Stripe
|
|
1787
1787
|
attr_accessor :bacs_debit
|
1788
1788
|
# If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
|
1789
1789
|
attr_accessor :bancontact
|
1790
|
-
# If this is a `billie` PaymentMethod, this hash contains details about the
|
1790
|
+
# If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
|
1791
1791
|
attr_accessor :billie
|
1792
1792
|
# Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
1793
1793
|
attr_accessor :billing_details
|
@@ -1861,11 +1861,11 @@ module Stripe
|
|
1861
1861
|
attr_accessor :radar_options
|
1862
1862
|
# If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
|
1863
1863
|
attr_accessor :rechnung
|
1864
|
-
# If this is a `
|
1864
|
+
# If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
|
1865
1865
|
attr_accessor :revolut_pay
|
1866
1866
|
# If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
|
1867
1867
|
attr_accessor :samsung_pay
|
1868
|
-
# If this is a `satispay` PaymentMethod, this hash contains details about the
|
1868
|
+
# If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
|
1869
1869
|
attr_accessor :satispay
|
1870
1870
|
# If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
|
1871
1871
|
attr_accessor :sepa_debit
|
@@ -3000,7 +3000,7 @@ module Stripe
|
|
3000
3000
|
attr_accessor :bacs_debit
|
3001
3001
|
# If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
|
3002
3002
|
attr_accessor :bancontact
|
3003
|
-
# If this is a `billie` PaymentMethod, this hash contains details about the
|
3003
|
+
# If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
|
3004
3004
|
attr_accessor :billie
|
3005
3005
|
# Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
3006
3006
|
attr_accessor :billing_details
|
@@ -3074,11 +3074,11 @@ module Stripe
|
|
3074
3074
|
attr_accessor :radar_options
|
3075
3075
|
# If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
|
3076
3076
|
attr_accessor :rechnung
|
3077
|
-
# If this is a `
|
3077
|
+
# If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
|
3078
3078
|
attr_accessor :revolut_pay
|
3079
3079
|
# If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
|
3080
3080
|
attr_accessor :samsung_pay
|
3081
|
-
# If this is a `satispay` PaymentMethod, this hash contains details about the
|
3081
|
+
# If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
|
3082
3082
|
attr_accessor :satispay
|
3083
3083
|
# If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
|
3084
3084
|
attr_accessor :sepa_debit
|
@@ -833,7 +833,7 @@ module Stripe
|
|
833
833
|
attr_accessor :current_period_start
|
834
834
|
# The ID of the customer whose subscriptions will be retrieved.
|
835
835
|
attr_accessor :customer
|
836
|
-
#
|
836
|
+
# The ID of the account whose subscriptions will be retrieved.
|
837
837
|
attr_accessor :customer_account
|
838
838
|
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
839
839
|
attr_accessor :ending_before
|
@@ -1488,7 +1488,7 @@ module Stripe
|
|
1488
1488
|
attr_accessor :currency
|
1489
1489
|
# The identifier of the customer to subscribe.
|
1490
1490
|
attr_accessor :customer
|
1491
|
-
#
|
1491
|
+
# The identifier of the account to subscribe.
|
1492
1492
|
attr_accessor :customer_account
|
1493
1493
|
# Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
|
1494
1494
|
attr_accessor :days_until_due
|
@@ -542,6 +542,15 @@ module Stripe
|
|
542
542
|
end
|
543
543
|
end
|
544
544
|
|
545
|
+
class In < Stripe::RequestParams
|
546
|
+
# Type of registration to be created in `country`.
|
547
|
+
attr_accessor :type
|
548
|
+
|
549
|
+
def initialize(type: nil)
|
550
|
+
@type = type
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
545
554
|
class Is < Stripe::RequestParams
|
546
555
|
# Type of registration to be created in `country`.
|
547
556
|
attr_accessor :type
|
@@ -1243,6 +1252,8 @@ module Stripe
|
|
1243
1252
|
attr_accessor :id
|
1244
1253
|
# Options for the registration in IE.
|
1245
1254
|
attr_accessor :ie
|
1255
|
+
# Options for the registration in IN.
|
1256
|
+
attr_accessor :in
|
1246
1257
|
# Options for the registration in IS.
|
1247
1258
|
attr_accessor :is
|
1248
1259
|
# Options for the registration in IT.
|
@@ -1380,6 +1391,7 @@ module Stripe
|
|
1380
1391
|
hu: nil,
|
1381
1392
|
id: nil,
|
1382
1393
|
ie: nil,
|
1394
|
+
in_: nil,
|
1383
1395
|
is: nil,
|
1384
1396
|
it: nil,
|
1385
1397
|
jp: nil,
|
@@ -1467,6 +1479,7 @@ module Stripe
|
|
1467
1479
|
@hu = hu
|
1468
1480
|
@id = id
|
1469
1481
|
@ie = ie
|
1482
|
+
@in = in_
|
1470
1483
|
@is = is
|
1471
1484
|
@it = it
|
1472
1485
|
@jp = jp
|
@@ -447,7 +447,7 @@ module Stripe
|
|
447
447
|
attr_accessor :bacs_debit
|
448
448
|
# If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
|
449
449
|
attr_accessor :bancontact
|
450
|
-
# If this is a `billie` PaymentMethod, this hash contains details about the
|
450
|
+
# If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
|
451
451
|
attr_accessor :billie
|
452
452
|
# Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
453
453
|
attr_accessor :billing_details
|
@@ -521,11 +521,11 @@ module Stripe
|
|
521
521
|
attr_accessor :radar_options
|
522
522
|
# If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method.
|
523
523
|
attr_accessor :rechnung
|
524
|
-
# If this is a `
|
524
|
+
# If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
|
525
525
|
attr_accessor :revolut_pay
|
526
526
|
# If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
|
527
527
|
attr_accessor :samsung_pay
|
528
|
-
# If this is a `satispay` PaymentMethod, this hash contains details about the
|
528
|
+
# If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
|
529
529
|
attr_accessor :satispay
|
530
530
|
# If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
|
531
531
|
attr_accessor :sepa_debit
|
@@ -4,7 +4,7 @@ module Stripe
|
|
4
4
|
class V1Services < StripeService
|
5
5
|
# v1 accessors: The beginning of the section generated from our OpenAPI spec
|
6
6
|
attr_reader :accounts
|
7
|
-
attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_settings, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_attempt_records, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payment_records, :payouts, :plans, :prices, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints, :external_accounts
|
7
|
+
attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_settings, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_attempt_records, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payment_records, :payouts, :plans, :prices, :privacy, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints, :external_accounts
|
8
8
|
# v1 accessors: The end of the section generated from our OpenAPI spec
|
9
9
|
|
10
10
|
# OAuthService is manually maintained, as it has special behaviors
|
@@ -64,6 +64,7 @@ module Stripe
|
|
64
64
|
@payouts = Stripe::PayoutService.new(@requestor)
|
65
65
|
@plans = Stripe::PlanService.new(@requestor)
|
66
66
|
@prices = Stripe::PriceService.new(@requestor)
|
67
|
+
@privacy = Stripe::PrivacyService.new(@requestor)
|
67
68
|
@products = Stripe::ProductService.new(@requestor)
|
68
69
|
@promotion_codes = Stripe::PromotionCodeService.new(@requestor)
|
69
70
|
@quotes = Stripe::QuoteService.new(@requestor)
|
@@ -9,11 +9,13 @@ module Stripe
|
|
9
9
|
# The page size.
|
10
10
|
attr_accessor :limit
|
11
11
|
# Primary object ID used to retrieve related events.
|
12
|
-
|
12
|
+
#
|
13
|
+
# To avoid conflict with Ruby's ':object_id', this attribute has been renamed. If using a hash parameter map instead, please use the original name ':object_id' with NO trailing underscore as the provided param key.
|
14
|
+
attr_accessor :object_id_
|
13
15
|
|
14
|
-
def initialize(limit: nil,
|
16
|
+
def initialize(limit: nil, object_id_: nil)
|
15
17
|
@limit = limit
|
16
|
-
@
|
18
|
+
@object_id_ = object_id_
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
data/lib/stripe/services.rb
CHANGED
@@ -113,6 +113,9 @@ require "stripe/services/payment_record_service"
|
|
113
113
|
require "stripe/services/payout_service"
|
114
114
|
require "stripe/services/plan_service"
|
115
115
|
require "stripe/services/price_service"
|
116
|
+
require "stripe/services/privacy/redaction_job_service"
|
117
|
+
require "stripe/services/privacy/redaction_job_validation_error_service"
|
118
|
+
require "stripe/services/privacy_service"
|
116
119
|
require "stripe/services/product_feature_service"
|
117
120
|
require "stripe/services/product_service"
|
118
121
|
require "stripe/services/promotion_code_service"
|
data/lib/stripe/stripe_object.rb
CHANGED
@@ -372,7 +372,16 @@ module Stripe
|
|
372
372
|
end
|
373
373
|
|
374
374
|
keys.each do |k|
|
375
|
-
|
375
|
+
if Util.valid_variable_name?(k)
|
376
|
+
instance_variable_set(:"@#{k}", values[k])
|
377
|
+
else
|
378
|
+
Util.log_info(<<~LOG
|
379
|
+
The variable name '#{k}' is not a valid Ruby variable name.
|
380
|
+
Use ["#{k}"] to access this field, skipping instance variable instantiation...
|
381
|
+
LOG
|
382
|
+
)
|
383
|
+
|
384
|
+
end
|
376
385
|
end
|
377
386
|
end
|
378
387
|
|
@@ -473,13 +482,14 @@ module Stripe
|
|
473
482
|
|
474
483
|
# Should only be for v2 events and lists, for now.
|
475
484
|
protected def _request(method:, path:, base_address:, params: {}, opts: {})
|
476
|
-
req_opts = RequestOptions.
|
485
|
+
req_opts = RequestOptions.extract_opts_from_hash(opts)
|
486
|
+
req_opts = RequestOptions.combine_opts(@opts, req_opts)
|
477
487
|
@requestor.execute_request(
|
478
488
|
method,
|
479
489
|
path,
|
480
490
|
base_address,
|
481
491
|
params: params,
|
482
|
-
opts:
|
492
|
+
opts: req_opts
|
483
493
|
)
|
484
494
|
end
|
485
495
|
|
data/lib/stripe/util.rb
CHANGED
@@ -4,6 +4,9 @@ require "cgi"
|
|
4
4
|
|
5
5
|
module Stripe
|
6
6
|
module Util
|
7
|
+
LEGAL_FIRST_CHARACTER = /[a-zA-Z_]/.freeze
|
8
|
+
LEGAL_VARIABLE_CHARACTER = /[a-zA-Z0-9_]/.freeze
|
9
|
+
|
7
10
|
def self.objects_to_ids(obj)
|
8
11
|
case obj
|
9
12
|
when APIResource
|
@@ -315,6 +318,14 @@ module Stripe
|
|
315
318
|
end
|
316
319
|
end
|
317
320
|
|
321
|
+
# Return false for strings that are invalid variable names
|
322
|
+
# Does NOT expect there to be a preceding '@' for instance variables
|
323
|
+
def self.valid_variable_name?(key)
|
324
|
+
return false if key.empty? || key[0] !~ LEGAL_FIRST_CHARACTER
|
325
|
+
|
326
|
+
key[1..-1].chars.all? { |char| char =~ LEGAL_VARIABLE_CHARACTER }
|
327
|
+
end
|
328
|
+
|
318
329
|
def self.check_string_argument!(key)
|
319
330
|
raise TypeError, "argument must be a string" unless key.is_a?(String)
|
320
331
|
|
data/lib/stripe/version.rb
CHANGED