stripe 18.2.0.pre.alpha.1 → 18.2.0.pre.alpha.3
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 +1 -1
- data/lib/stripe/event_types.rb +4 -0
- data/lib/stripe/events/v2_core_account_including_future_requirements_updated_event.rb +44 -0
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/params/checkout/session_create_params.rb +4 -1
- data/lib/stripe/params/checkout/session_update_params.rb +4 -1
- data/lib/stripe/params/invoice_add_lines_params.rb +4 -1
- data/lib/stripe/params/invoice_create_preview_params.rb +2 -2
- data/lib/stripe/params/invoice_line_item_update_params.rb +4 -1
- data/lib/stripe/params/invoice_update_lines_params.rb +4 -1
- data/lib/stripe/params/payment_link_create_params.rb +4 -1
- data/lib/stripe/params/plan_create_params.rb +16 -1
- data/lib/stripe/params/price_create_params.rb +16 -1
- data/lib/stripe/params/product_catalog/trial_offer_create_params.rb +4 -1
- data/lib/stripe/params/product_create_params.rb +4 -1
- data/lib/stripe/params/product_update_params.rb +4 -1
- data/lib/stripe/params/quote_create_params.rb +3 -3
- data/lib/stripe/params/quote_update_params.rb +3 -3
- data/lib/stripe/params/radar/account_evaluation_update_params.rb +24 -1
- data/lib/stripe/params/shared_payment/{granted_token_update_params.rb → granted_token_revoke_params.rb} +1 -1
- data/lib/stripe/params/subscription_pause_params.rb +33 -0
- data/lib/stripe/params/subscription_schedule_amend_params.rb +1 -1
- data/lib/stripe/params/subscription_schedule_create_params.rb +2 -2
- data/lib/stripe/params/subscription_schedule_update_params.rb +2 -2
- data/lib/stripe/params/tax/calculation_create_params.rb +5 -1
- data/lib/stripe/params/tax/location_create_params.rb +54 -0
- data/lib/stripe/params/tax/location_list_params.rb +27 -0
- data/lib/stripe/params/tax/location_retrieve_params.rb +15 -0
- data/lib/stripe/params/test_helpers/shared_payment/{granted_token_update_params.rb → granted_token_revoke_params.rb} +1 -1
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +21 -4
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +4 -4
- data/lib/stripe/params.rb +6 -2
- data/lib/stripe/resources/delegated_checkout/requested_session.rb +36 -6
- data/lib/stripe/resources/invoice.rb +2 -0
- data/lib/stripe/resources/plan.rb +2 -0
- data/lib/stripe/resources/price.rb +2 -0
- data/lib/stripe/resources/product_catalog/trial_offer.rb +2 -0
- data/lib/stripe/resources/quote.rb +2 -2
- data/lib/stripe/resources/quote_line.rb +1 -1
- data/lib/stripe/resources/quote_preview_invoice.rb +2 -0
- data/lib/stripe/resources/radar/account_evaluation.rb +30 -1
- data/lib/stripe/resources/shared_payment/granted_token.rb +2 -2
- data/lib/stripe/resources/subscription.rb +20 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
- data/lib/stripe/resources/tax/location.rb +72 -0
- data/lib/stripe/resources/tax/registration.rb +128 -0
- data/lib/stripe/resources/tax_code.rb +15 -1
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +85 -3
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +2 -2
- data/lib/stripe/resources.rb +2 -0
- data/lib/stripe/services/subscription_service.rb +11 -0
- data/lib/stripe/services/tax/location_service.rb +45 -0
- data/lib/stripe/services/tax_service.rb +2 -1
- data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +1 -1
- data/lib/stripe/services/v2/core/account_link_service.rb +2 -0
- data/lib/stripe/services/v2/core/account_service.rb +10 -0
- data/lib/stripe/services/v2/core/account_token_service.rb +4 -0
- data/lib/stripe/services/v2/core/accounts/person_service.rb +10 -0
- data/lib/stripe/services/v2/core/accounts/person_token_service.rb +4 -0
- data/lib/stripe/services/v2/iam/api_key_service.rb +5 -5
- data/lib/stripe/services.rb +1 -0
- data/lib/stripe/util.rb +9 -3
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +896 -107
- metadata +11 -4
|
@@ -11,6 +11,18 @@ module Stripe
|
|
|
11
11
|
"tax_code"
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
class Requirements < ::Stripe::StripeObject
|
|
15
|
+
# Describes whether a performance location is required for a successful tax calculation with a tax code.
|
|
16
|
+
attr_reader :performance_location
|
|
17
|
+
|
|
18
|
+
def self.inner_class_types
|
|
19
|
+
@inner_class_types = {}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def self.field_remappings
|
|
23
|
+
@field_remappings = {}
|
|
24
|
+
end
|
|
25
|
+
end
|
|
14
26
|
# A detailed description of which types of products the tax code represents.
|
|
15
27
|
attr_reader :description
|
|
16
28
|
# Unique identifier for the object.
|
|
@@ -19,6 +31,8 @@ module Stripe
|
|
|
19
31
|
attr_reader :name
|
|
20
32
|
# String representing the object's type. Objects of the same type share the same value.
|
|
21
33
|
attr_reader :object
|
|
34
|
+
# An object that describes more information about the tax location required for this tax code. Some [tax codes](/tax/tax-for-tickets/integration-guide#types-of-products) require a tax location of type `performance` to calculate tax correctly.
|
|
35
|
+
attr_reader :requirements
|
|
22
36
|
|
|
23
37
|
# A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
|
|
24
38
|
def self.list(params = {}, opts = {})
|
|
@@ -26,7 +40,7 @@ module Stripe
|
|
|
26
40
|
end
|
|
27
41
|
|
|
28
42
|
def self.inner_class_types
|
|
29
|
-
@inner_class_types = {}
|
|
43
|
+
@inner_class_types = { requirements: Requirements }
|
|
30
44
|
end
|
|
31
45
|
|
|
32
46
|
def self.field_remappings
|
|
@@ -27,13 +27,31 @@ module Stripe
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
class DeliveryOptions < ::Stripe::StripeObject
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
class PaperCheck < ::Stripe::StripeObject
|
|
31
|
+
# Memo printed on the memo field of the check.
|
|
32
|
+
attr_reader :memo
|
|
33
|
+
# Open Enum. Shipping speed of the paper check.
|
|
34
|
+
attr_reader :shipping_speed
|
|
35
|
+
# Signature for the paper check.
|
|
36
|
+
attr_reader :signature
|
|
37
|
+
|
|
38
|
+
def self.inner_class_types
|
|
39
|
+
@inner_class_types = {}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def self.field_remappings
|
|
43
|
+
@field_remappings = {}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
32
46
|
# Open Enum. Speed of the payout.
|
|
33
47
|
attr_reader :speed
|
|
48
|
+
# Open Enum. Method for bank account.
|
|
49
|
+
attr_reader :bank_account
|
|
50
|
+
# Delivery options for paper check.
|
|
51
|
+
attr_reader :paper_check
|
|
34
52
|
|
|
35
53
|
def self.inner_class_types
|
|
36
|
-
@inner_class_types = {}
|
|
54
|
+
@inner_class_types = { paper_check: PaperCheck }
|
|
37
55
|
end
|
|
38
56
|
|
|
39
57
|
def self.field_remappings
|
|
@@ -195,6 +213,67 @@ module Stripe
|
|
|
195
213
|
@field_remappings = {}
|
|
196
214
|
end
|
|
197
215
|
end
|
|
216
|
+
|
|
217
|
+
class TrackingDetails < ::Stripe::StripeObject
|
|
218
|
+
class PaperCheck < ::Stripe::StripeObject
|
|
219
|
+
class MailingAddress < ::Stripe::StripeObject
|
|
220
|
+
# City, district, suburb, town, or village.
|
|
221
|
+
attr_reader :city
|
|
222
|
+
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
223
|
+
attr_reader :country
|
|
224
|
+
# Address line 1 (e.g., street, PO Box, or company name).
|
|
225
|
+
attr_reader :line1
|
|
226
|
+
# Address line 2 (e.g., apartment, suite, unit, or building).
|
|
227
|
+
attr_reader :line2
|
|
228
|
+
# ZIP or postal code.
|
|
229
|
+
attr_reader :postal_code
|
|
230
|
+
# State, county, province, or region.
|
|
231
|
+
attr_reader :state
|
|
232
|
+
# Town or district.
|
|
233
|
+
attr_reader :town
|
|
234
|
+
|
|
235
|
+
def self.inner_class_types
|
|
236
|
+
@inner_class_types = {}
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
def self.field_remappings
|
|
240
|
+
@field_remappings = {}
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
# Open Enum. Carrier of the paper check.
|
|
244
|
+
attr_reader :carrier
|
|
245
|
+
# Check number.
|
|
246
|
+
attr_reader :check_number
|
|
247
|
+
# Postal code of the latest tracking update.
|
|
248
|
+
attr_reader :current_postal_code
|
|
249
|
+
# Mailing address of the paper check.
|
|
250
|
+
attr_reader :mailing_address
|
|
251
|
+
# Tracking number for the check.
|
|
252
|
+
attr_reader :tracking_number
|
|
253
|
+
# Open Enum. Tracking status of the paper check.
|
|
254
|
+
attr_reader :tracking_status
|
|
255
|
+
# When the tracking details were last updated.
|
|
256
|
+
attr_reader :updated_at
|
|
257
|
+
|
|
258
|
+
def self.inner_class_types
|
|
259
|
+
@inner_class_types = { mailing_address: MailingAddress }
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
def self.field_remappings
|
|
263
|
+
@field_remappings = {}
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
# Paper check tracking details.
|
|
267
|
+
attr_reader :paper_check
|
|
268
|
+
|
|
269
|
+
def self.inner_class_types
|
|
270
|
+
@inner_class_types = { paper_check: PaperCheck }
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
def self.field_remappings
|
|
274
|
+
@field_remappings = {}
|
|
275
|
+
end
|
|
276
|
+
end
|
|
198
277
|
# The "presentment amount" for the OutboundPayment.
|
|
199
278
|
attr_reader :amount
|
|
200
279
|
# Returns true if the OutboundPayment can be canceled, and false otherwise.
|
|
@@ -240,6 +319,8 @@ module Stripe
|
|
|
240
319
|
attr_reader :to
|
|
241
320
|
# A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a “reference number” or something similar.
|
|
242
321
|
attr_reader :trace_id
|
|
322
|
+
# Information to track this OutboundPayment with the recipient bank.
|
|
323
|
+
attr_reader :tracking_details
|
|
243
324
|
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
244
325
|
attr_reader :livemode
|
|
245
326
|
|
|
@@ -253,6 +334,7 @@ module Stripe
|
|
|
253
334
|
status_transitions: StatusTransitions,
|
|
254
335
|
to: To,
|
|
255
336
|
trace_id: TraceId,
|
|
337
|
+
tracking_details: TrackingDetails,
|
|
256
338
|
}
|
|
257
339
|
end
|
|
258
340
|
|
|
@@ -27,10 +27,10 @@ module Stripe
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
class DeliveryOptions < ::Stripe::StripeObject
|
|
30
|
-
# Open Enum. Method for bank account.
|
|
31
|
-
attr_reader :bank_account
|
|
32
30
|
# Open Enum. Speed of the payout.
|
|
33
31
|
attr_reader :speed
|
|
32
|
+
# Open Enum. Method for bank account.
|
|
33
|
+
attr_reader :bank_account
|
|
34
34
|
|
|
35
35
|
def self.inner_class_types
|
|
36
36
|
@inner_class_types = {}
|
data/lib/stripe/resources.rb
CHANGED
|
@@ -144,6 +144,7 @@ require "stripe/resources/tax/association"
|
|
|
144
144
|
require "stripe/resources/tax/calculation"
|
|
145
145
|
require "stripe/resources/tax/calculation_line_item"
|
|
146
146
|
require "stripe/resources/tax/form"
|
|
147
|
+
require "stripe/resources/tax/location"
|
|
147
148
|
require "stripe/resources/tax/registration"
|
|
148
149
|
require "stripe/resources/tax/settings"
|
|
149
150
|
require "stripe/resources/tax/transaction"
|
|
@@ -290,6 +291,7 @@ require "stripe/events/v2_core_account_including_configuration_recipient_updated
|
|
|
290
291
|
require "stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event"
|
|
291
292
|
require "stripe/events/v2_core_account_including_configuration_storer_updated_event"
|
|
292
293
|
require "stripe/events/v2_core_account_including_defaults_updated_event"
|
|
294
|
+
require "stripe/events/v2_core_account_including_future_requirements_updated_event"
|
|
293
295
|
require "stripe/events/v2_core_account_including_identity_updated_event"
|
|
294
296
|
require "stripe/events/v2_core_account_including_requirements_updated_event"
|
|
295
297
|
require "stripe/events/v2_core_account_link_returned_event"
|
|
@@ -79,6 +79,17 @@ module Stripe
|
|
|
79
79
|
)
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
+
# Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules.
|
|
83
|
+
def pause(subscription, params = {}, opts = {})
|
|
84
|
+
request(
|
|
85
|
+
method: :post,
|
|
86
|
+
path: format("/v1/subscriptions/%<subscription>s/pause", { subscription: CGI.escape(subscription) }),
|
|
87
|
+
params: params,
|
|
88
|
+
opts: opts,
|
|
89
|
+
base_address: :api
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
82
93
|
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
|
|
83
94
|
def resume(subscription, params = {}, opts = {})
|
|
84
95
|
request(
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module Tax
|
|
6
|
+
class LocationService < StripeService
|
|
7
|
+
# Create a tax location to use in calculating taxes for a service, ticket, or other type of product. The resulting object contains the id, address, name, description, and current operational status of the tax location.
|
|
8
|
+
def create(params = {}, opts = {})
|
|
9
|
+
request(
|
|
10
|
+
method: :post,
|
|
11
|
+
path: "/v1/tax/locations",
|
|
12
|
+
params: params,
|
|
13
|
+
opts: opts,
|
|
14
|
+
base_address: :api
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Retrieve a list of all tax locations. Tax locations can represent the venues for services, tickets, or other product types.
|
|
19
|
+
#
|
|
20
|
+
# The response includes detailed information for each tax location, such as its address, name, description, and current operational status.
|
|
21
|
+
#
|
|
22
|
+
# You can paginate through the list by using the limit parameter to control the number of results returned in each request.
|
|
23
|
+
def list(params = {}, opts = {})
|
|
24
|
+
request(
|
|
25
|
+
method: :get,
|
|
26
|
+
path: "/v1/tax/locations",
|
|
27
|
+
params: params,
|
|
28
|
+
opts: opts,
|
|
29
|
+
base_address: :api
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Fetch the details of a specific tax location using its unique identifier. Use a tax location to calculate taxes based on the location of the end product, such as a performance, instead of the customer address. For more details, check the [integration guide](https://docs.stripe.com/tax/tax-for-tickets/integration-guide).
|
|
34
|
+
def retrieve(location, params = {}, opts = {})
|
|
35
|
+
request(
|
|
36
|
+
method: :get,
|
|
37
|
+
path: format("/v1/tax/locations/%<location>s", { location: CGI.escape(location) }),
|
|
38
|
+
params: params,
|
|
39
|
+
opts: opts,
|
|
40
|
+
base_address: :api
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
module Stripe
|
|
5
5
|
class TaxService < StripeService
|
|
6
|
-
attr_reader :associations, :calculations, :forms, :registrations, :settings, :transactions
|
|
6
|
+
attr_reader :associations, :calculations, :forms, :locations, :registrations, :settings, :transactions
|
|
7
7
|
|
|
8
8
|
def initialize(requestor)
|
|
9
9
|
super
|
|
10
10
|
@associations = Stripe::Tax::AssociationService.new(@requestor)
|
|
11
11
|
@calculations = Stripe::Tax::CalculationService.new(@requestor)
|
|
12
12
|
@forms = Stripe::Tax::FormService.new(@requestor)
|
|
13
|
+
@locations = Stripe::Tax::LocationService.new(@requestor)
|
|
13
14
|
@registrations = Stripe::Tax::RegistrationService.new(@requestor)
|
|
14
15
|
@settings = Stripe::Tax::SettingsService.new(@requestor)
|
|
15
16
|
@transactions = Stripe::Tax::TransactionService.new(@requestor)
|
|
@@ -17,7 +17,7 @@ module Stripe
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
# Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
|
|
20
|
-
def
|
|
20
|
+
def revoke(shared_payment_granted_token, params = {}, opts = {})
|
|
21
21
|
request(
|
|
22
22
|
method: :post,
|
|
23
23
|
path: format("/v1/test_helpers/shared_payment/granted_tokens/%<shared_payment_granted_token>s/revoke", { shared_payment_granted_token: CGI.escape(shared_payment_granted_token) }),
|
|
@@ -6,6 +6,8 @@ module Stripe
|
|
|
6
6
|
module Core
|
|
7
7
|
class AccountLinkService < StripeService
|
|
8
8
|
# Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information.
|
|
9
|
+
#
|
|
10
|
+
# ** raises RateLimitError
|
|
9
11
|
def create(params = {}, opts = {})
|
|
10
12
|
request(
|
|
11
13
|
method: :post,
|
|
@@ -14,6 +14,8 @@ module Stripe
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# 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.
|
|
17
|
+
#
|
|
18
|
+
# ** raises RateLimitError
|
|
17
19
|
def close(id, params = {}, opts = {})
|
|
18
20
|
request(
|
|
19
21
|
method: :post,
|
|
@@ -25,6 +27,8 @@ module Stripe
|
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
# An Account is a representation of a company, individual or other entity that a user 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
|
+
#
|
|
31
|
+
# ** raises RateLimitError
|
|
28
32
|
def create(params = {}, opts = {})
|
|
29
33
|
request(
|
|
30
34
|
method: :post,
|
|
@@ -36,6 +40,8 @@ module Stripe
|
|
|
36
40
|
end
|
|
37
41
|
|
|
38
42
|
# Returns a list of Accounts.
|
|
43
|
+
#
|
|
44
|
+
# ** raises RateLimitError
|
|
39
45
|
def list(params = {}, opts = {})
|
|
40
46
|
request(
|
|
41
47
|
method: :get,
|
|
@@ -47,6 +53,8 @@ module Stripe
|
|
|
47
53
|
end
|
|
48
54
|
|
|
49
55
|
# Retrieves the details of an Account.
|
|
56
|
+
#
|
|
57
|
+
# ** raises RateLimitError
|
|
50
58
|
def retrieve(id, params = {}, opts = {})
|
|
51
59
|
request(
|
|
52
60
|
method: :get,
|
|
@@ -58,6 +66,8 @@ module Stripe
|
|
|
58
66
|
end
|
|
59
67
|
|
|
60
68
|
# Updates the details of an Account.
|
|
69
|
+
#
|
|
70
|
+
# ** raises RateLimitError
|
|
61
71
|
def update(id, params = {}, opts = {})
|
|
62
72
|
request(
|
|
63
73
|
method: :post,
|
|
@@ -6,6 +6,8 @@ module Stripe
|
|
|
6
6
|
module Core
|
|
7
7
|
class AccountTokenService < StripeService
|
|
8
8
|
# Creates an Account Token.
|
|
9
|
+
#
|
|
10
|
+
# ** raises RateLimitError
|
|
9
11
|
def create(params = {}, opts = {})
|
|
10
12
|
request(
|
|
11
13
|
method: :post,
|
|
@@ -17,6 +19,8 @@ module Stripe
|
|
|
17
19
|
end
|
|
18
20
|
|
|
19
21
|
# Retrieves an Account Token.
|
|
22
|
+
#
|
|
23
|
+
# ** raises RateLimitError
|
|
20
24
|
def retrieve(id, params = {}, opts = {})
|
|
21
25
|
request(
|
|
22
26
|
method: :get,
|
|
@@ -7,6 +7,8 @@ module Stripe
|
|
|
7
7
|
module Accounts
|
|
8
8
|
class PersonService < StripeService
|
|
9
9
|
# Create a Person. Adds an individual to an Account's identity. You can set relationship attributes and identity information at creation.
|
|
10
|
+
#
|
|
11
|
+
# ** raises RateLimitError
|
|
10
12
|
def create(account_id, params = {}, opts = {})
|
|
11
13
|
request(
|
|
12
14
|
method: :post,
|
|
@@ -18,6 +20,8 @@ module Stripe
|
|
|
18
20
|
end
|
|
19
21
|
|
|
20
22
|
# Delete a Person associated with an Account.
|
|
23
|
+
#
|
|
24
|
+
# ** raises RateLimitError
|
|
21
25
|
def delete(account_id, id, params = {}, opts = {})
|
|
22
26
|
request(
|
|
23
27
|
method: :delete,
|
|
@@ -29,6 +33,8 @@ module Stripe
|
|
|
29
33
|
end
|
|
30
34
|
|
|
31
35
|
# Returns a paginated list of Persons associated with an Account.
|
|
36
|
+
#
|
|
37
|
+
# ** raises RateLimitError
|
|
32
38
|
def list(account_id, params = {}, opts = {})
|
|
33
39
|
request(
|
|
34
40
|
method: :get,
|
|
@@ -40,6 +46,8 @@ module Stripe
|
|
|
40
46
|
end
|
|
41
47
|
|
|
42
48
|
# Retrieves a Person associated with an Account.
|
|
49
|
+
#
|
|
50
|
+
# ** raises RateLimitError
|
|
43
51
|
def retrieve(account_id, id, params = {}, opts = {})
|
|
44
52
|
request(
|
|
45
53
|
method: :get,
|
|
@@ -51,6 +59,8 @@ module Stripe
|
|
|
51
59
|
end
|
|
52
60
|
|
|
53
61
|
# Updates a Person associated with an Account.
|
|
62
|
+
#
|
|
63
|
+
# ** raises RateLimitError
|
|
54
64
|
def update(account_id, id, params = {}, opts = {})
|
|
55
65
|
request(
|
|
56
66
|
method: :post,
|
|
@@ -7,6 +7,8 @@ module Stripe
|
|
|
7
7
|
module Accounts
|
|
8
8
|
class PersonTokenService < StripeService
|
|
9
9
|
# Creates a Person Token associated with an Account.
|
|
10
|
+
#
|
|
11
|
+
# ** raises RateLimitError
|
|
10
12
|
def create(account_id, params = {}, opts = {})
|
|
11
13
|
request(
|
|
12
14
|
method: :post,
|
|
@@ -18,6 +20,8 @@ module Stripe
|
|
|
18
20
|
end
|
|
19
21
|
|
|
20
22
|
# Retrieves a Person Token associated with an Account.
|
|
23
|
+
#
|
|
24
|
+
# ** raises RateLimitError
|
|
21
25
|
def retrieve(account_id, id, params = {}, opts = {})
|
|
22
26
|
request(
|
|
23
27
|
method: :get,
|
|
@@ -5,7 +5,7 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module Iam
|
|
7
7
|
class ApiKeyService < StripeService
|
|
8
|
-
# Create an API key.
|
|
8
|
+
# Create an API key. To create a secret key in livemode, a public key for encryption must be provided.
|
|
9
9
|
def create(params = {}, opts = {})
|
|
10
10
|
request(
|
|
11
11
|
method: :post,
|
|
@@ -16,7 +16,7 @@ module Stripe
|
|
|
16
16
|
)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
# Expire an API key.
|
|
19
|
+
# Expire an API key. The specified key becomes invalid immediately.
|
|
20
20
|
def expire(id, params = {}, opts = {})
|
|
21
21
|
request(
|
|
22
22
|
method: :post,
|
|
@@ -38,7 +38,7 @@ module Stripe
|
|
|
38
38
|
)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
# Retrieve an API key.
|
|
41
|
+
# Retrieve an API key. For livemode secret keys, secret tokens are only returned on creation, and never returned here.
|
|
42
42
|
def retrieve(id, params = {}, opts = {})
|
|
43
43
|
request(
|
|
44
44
|
method: :get,
|
|
@@ -49,7 +49,7 @@ module Stripe
|
|
|
49
49
|
)
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
# Rotate an API key.
|
|
52
|
+
# Rotate an API key. A new key with the same properties is created and returned. The existing key is expired immediately, unless an expiry time is specified.
|
|
53
53
|
def rotate(id, params = {}, opts = {})
|
|
54
54
|
request(
|
|
55
55
|
method: :post,
|
|
@@ -60,7 +60,7 @@ module Stripe
|
|
|
60
60
|
)
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
# Update an API key.
|
|
63
|
+
# Update an API key. Only parameters that are specified in the request will be updated.
|
|
64
64
|
def update(id, params = {}, opts = {})
|
|
65
65
|
request(
|
|
66
66
|
method: :post,
|
data/lib/stripe/services.rb
CHANGED
|
@@ -159,6 +159,7 @@ require "stripe/services/tax/association_service"
|
|
|
159
159
|
require "stripe/services/tax/calculation_line_item_service"
|
|
160
160
|
require "stripe/services/tax/calculation_service"
|
|
161
161
|
require "stripe/services/tax/form_service"
|
|
162
|
+
require "stripe/services/tax/location_service"
|
|
162
163
|
require "stripe/services/tax/registration_service"
|
|
163
164
|
require "stripe/services/tax/settings_service"
|
|
164
165
|
require "stripe/services/tax/transaction_line_item_service"
|
data/lib/stripe/util.rb
CHANGED
|
@@ -7,16 +7,22 @@ module Stripe
|
|
|
7
7
|
LEGAL_FIRST_CHARACTER = /[a-zA-Z_]/.freeze
|
|
8
8
|
LEGAL_VARIABLE_CHARACTER = /[a-zA-Z0-9_]/.freeze
|
|
9
9
|
|
|
10
|
-
def self.objects_to_ids(obj)
|
|
10
|
+
def self.objects_to_ids(obj, semantics)
|
|
11
11
|
case obj
|
|
12
12
|
when APIResource
|
|
13
13
|
obj.id
|
|
14
14
|
when Hash
|
|
15
15
|
res = {}
|
|
16
|
-
obj.each
|
|
16
|
+
obj.each do |k, v|
|
|
17
|
+
if !v.nil?
|
|
18
|
+
res[k] = objects_to_ids(v, semantics)
|
|
19
|
+
elsif semantics == :v2
|
|
20
|
+
res[k] = nil
|
|
21
|
+
end
|
|
22
|
+
end
|
|
17
23
|
res
|
|
18
24
|
when Array
|
|
19
|
-
obj.map { |v| objects_to_ids(v) }
|
|
25
|
+
obj.map { |v| objects_to_ids(v, semantics) }
|
|
20
26
|
else
|
|
21
27
|
obj
|
|
22
28
|
end
|
data/lib/stripe/version.rb
CHANGED