stripe 10.8.0.pre.beta.1 → 10.9.0.pre.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/resources/account.rb +61 -1
- data/lib/stripe/resources/account_link.rb +5 -0
- data/lib/stripe/resources/account_notice.rb +15 -0
- data/lib/stripe/resources/account_session.rb +5 -0
- data/lib/stripe/resources/apple_pay_domain.rb +40 -0
- data/lib/stripe/resources/application_fee.rb +5 -0
- data/lib/stripe/resources/apps/secret.rb +10 -0
- data/lib/stripe/resources/balance_transaction.rb +12 -0
- data/lib/stripe/resources/bank_account.rb +27 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +30 -0
- data/lib/stripe/resources/billing_portal/session.rb +10 -0
- data/lib/stripe/resources/capital/financing_offer.rb +10 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +11 -0
- data/lib/stripe/resources/card.rb +27 -0
- data/lib/stripe/resources/charge.rb +22 -0
- data/lib/stripe/resources/checkout/session.rb +20 -0
- data/lib/stripe/resources/climate/order.rb +22 -0
- data/lib/stripe/resources/climate/product.rb +10 -0
- data/lib/stripe/resources/climate/supplier.rb +10 -0
- data/lib/stripe/resources/country_spec.rb +5 -0
- data/lib/stripe/resources/coupon.rb +42 -0
- data/lib/stripe/resources/credit_note.rb +33 -0
- data/lib/stripe/resources/customer.rb +42 -0
- data/lib/stripe/resources/customer_session.rb +10 -0
- data/lib/stripe/resources/dispute.rb +17 -0
- data/lib/stripe/resources/entitlements/event.rb +10 -0
- data/lib/stripe/resources/entitlements/feature.rb +20 -0
- data/lib/stripe/resources/ephemeral_key.rb +20 -0
- data/lib/stripe/resources/event.rb +5 -0
- data/lib/stripe/resources/exchange_rate.rb +5 -0
- data/lib/stripe/resources/file.rb +5 -0
- data/lib/stripe/resources/file_link.rb +20 -0
- data/lib/stripe/resources/financial_connections/account.rb +10 -0
- data/lib/stripe/resources/financial_connections/session.rb +10 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +10 -0
- data/lib/stripe/resources/gift_cards/card.rb +30 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +30 -0
- data/lib/stripe/resources/identity/verification_report.rb +10 -0
- data/lib/stripe/resources/identity/verification_session.rb +39 -0
- data/lib/stripe/resources/invoice.rb +45 -0
- data/lib/stripe/resources/invoice_item.rb +40 -0
- data/lib/stripe/resources/issuing/authorization.rb +20 -0
- data/lib/stripe/resources/issuing/card.rb +20 -0
- data/lib/stripe/resources/issuing/cardholder.rb +30 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +10 -0
- data/lib/stripe/resources/issuing/dispute.rb +30 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +30 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +10 -0
- data/lib/stripe/resources/issuing/token.rb +15 -0
- data/lib/stripe/resources/issuing/transaction.rb +20 -0
- data/lib/stripe/resources/margin.rb +20 -0
- data/lib/stripe/resources/order.rb +20 -0
- data/lib/stripe/resources/payment_intent.rb +35 -0
- data/lib/stripe/resources/payment_link.rb +20 -0
- data/lib/stripe/resources/payment_method.rb +22 -0
- data/lib/stripe/resources/payment_method_configuration.rb +30 -0
- data/lib/stripe/resources/payment_method_domain.rb +30 -0
- data/lib/stripe/resources/payout.rb +24 -0
- data/lib/stripe/resources/plan.rb +40 -0
- data/lib/stripe/resources/price.rb +20 -0
- data/lib/stripe/resources/product.rb +40 -0
- data/lib/stripe/resources/promotion_code.rb +20 -0
- data/lib/stripe/resources/quote.rb +20 -0
- data/lib/stripe/resources/quote_phase.rb +5 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +10 -0
- data/lib/stripe/resources/radar/value_list.rb +50 -0
- data/lib/stripe/resources/radar/value_list_item.rb +40 -0
- data/lib/stripe/resources/refund.rb +36 -0
- data/lib/stripe/resources/reporting/report_run.rb +20 -0
- data/lib/stripe/resources/reporting/report_type.rb +10 -0
- data/lib/stripe/resources/review.rb +5 -0
- data/lib/stripe/resources/setup_attempt.rb +5 -0
- data/lib/stripe/resources/setup_intent.rb +23 -0
- data/lib/stripe/resources/shipping_rate.rb +20 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +10 -0
- data/lib/stripe/resources/source.rb +17 -0
- data/lib/stripe/resources/subscription.rb +46 -0
- data/lib/stripe/resources/subscription_item.rb +50 -0
- data/lib/stripe/resources/subscription_schedule.rb +30 -0
- data/lib/stripe/resources/tax/calculation.rb +10 -0
- data/lib/stripe/resources/tax/form.rb +5 -0
- data/lib/stripe/resources/tax/registration.rb +32 -0
- data/lib/stripe/resources/tax_code.rb +5 -0
- data/lib/stripe/resources/tax_id.rb +20 -0
- data/lib/stripe/resources/tax_rate.rb +20 -0
- data/lib/stripe/resources/terminal/configuration.rb +50 -0
- data/lib/stripe/resources/terminal/connection_token.rb +10 -0
- data/lib/stripe/resources/terminal/location.rb +51 -0
- data/lib/stripe/resources/terminal/reader.rb +50 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +40 -0
- data/lib/stripe/resources/token.rb +6 -0
- data/lib/stripe/resources/topup.rb +20 -0
- data/lib/stripe/resources/transfer.rb +22 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +20 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +20 -0
- data/lib/stripe/resources/treasury/financial_account.rb +30 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +20 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +20 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +20 -0
- data/lib/stripe/resources/treasury/received_credit.rb +10 -0
- data/lib/stripe/resources/treasury/received_debit.rb +10 -0
- data/lib/stripe/resources/treasury/transaction.rb +10 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +10 -0
- data/lib/stripe/resources/webhook_endpoint.rb +50 -0
- data/lib/stripe/search_result_object.rb +1 -1
- data/lib/stripe/version.rb +1 -1
- metadata +2 -2
@@ -32,6 +32,36 @@ module Stripe
|
|
32
32
|
opts: opts
|
33
33
|
)
|
34
34
|
end
|
35
|
+
|
36
|
+
# Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
37
|
+
def self.create(params = {}, opts = {})
|
38
|
+
request_stripe_object(
|
39
|
+
method: :post,
|
40
|
+
path: "/v1/issuing/disputes",
|
41
|
+
params: params,
|
42
|
+
opts: opts
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
47
|
+
def self.list(filters = {}, opts = {})
|
48
|
+
request_stripe_object(
|
49
|
+
method: :get,
|
50
|
+
path: "/v1/issuing/disputes",
|
51
|
+
params: filters,
|
52
|
+
opts: opts
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
|
57
|
+
def self.update(id, params = {}, opts = {})
|
58
|
+
request_stripe_object(
|
59
|
+
method: :post,
|
60
|
+
path: format("/v1/issuing/disputes/%<id>s", { id: CGI.escape(id) }),
|
61
|
+
params: params,
|
62
|
+
opts: opts
|
63
|
+
)
|
64
|
+
end
|
35
65
|
end
|
36
66
|
end
|
37
67
|
end
|
@@ -11,6 +11,36 @@ module Stripe
|
|
11
11
|
|
12
12
|
OBJECT_NAME = "issuing.personalization_design"
|
13
13
|
|
14
|
+
# Creates a personalization design object.
|
15
|
+
def self.create(params = {}, opts = {})
|
16
|
+
request_stripe_object(
|
17
|
+
method: :post,
|
18
|
+
path: "/v1/issuing/personalization_designs",
|
19
|
+
params: params,
|
20
|
+
opts: opts
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
25
|
+
def self.list(filters = {}, opts = {})
|
26
|
+
request_stripe_object(
|
27
|
+
method: :get,
|
28
|
+
path: "/v1/issuing/personalization_designs",
|
29
|
+
params: filters,
|
30
|
+
opts: opts
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Updates a card personalization object.
|
35
|
+
def self.update(id, params = {}, opts = {})
|
36
|
+
request_stripe_object(
|
37
|
+
method: :post,
|
38
|
+
path: format("/v1/issuing/personalization_designs/%<id>s", { id: CGI.escape(id) }),
|
39
|
+
params: params,
|
40
|
+
opts: opts
|
41
|
+
)
|
42
|
+
end
|
43
|
+
|
14
44
|
def test_helpers
|
15
45
|
TestHelpers.new(self)
|
16
46
|
end
|
@@ -8,6 +8,16 @@ module Stripe
|
|
8
8
|
extend Stripe::APIOperations::List
|
9
9
|
|
10
10
|
OBJECT_NAME = "issuing.physical_bundle"
|
11
|
+
|
12
|
+
# Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
13
|
+
def self.list(filters = {}, opts = {})
|
14
|
+
request_stripe_object(
|
15
|
+
method: :get,
|
16
|
+
path: "/v1/issuing/physical_bundles",
|
17
|
+
params: filters,
|
18
|
+
opts: opts
|
19
|
+
)
|
20
|
+
end
|
11
21
|
end
|
12
22
|
end
|
13
23
|
end
|
@@ -9,6 +9,21 @@ module Stripe
|
|
9
9
|
include Stripe::APIOperations::Save
|
10
10
|
|
11
11
|
OBJECT_NAME = "issuing.token"
|
12
|
+
|
13
|
+
# Lists all Issuing Token objects for a given card.
|
14
|
+
def self.list(filters = {}, opts = {})
|
15
|
+
request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: filters, opts: opts)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Attempts to update the specified Issuing Token object to the status specified.
|
19
|
+
def self.update(id, params = {}, opts = {})
|
20
|
+
request_stripe_object(
|
21
|
+
method: :post,
|
22
|
+
path: format("/v1/issuing/tokens/%<id>s", { id: CGI.escape(id) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts
|
25
|
+
)
|
26
|
+
end
|
12
27
|
end
|
13
28
|
end
|
14
29
|
end
|
@@ -14,6 +14,26 @@ module Stripe
|
|
14
14
|
|
15
15
|
OBJECT_NAME = "issuing.transaction"
|
16
16
|
|
17
|
+
# Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
18
|
+
def self.list(filters = {}, opts = {})
|
19
|
+
request_stripe_object(
|
20
|
+
method: :get,
|
21
|
+
path: "/v1/issuing/transactions",
|
22
|
+
params: filters,
|
23
|
+
opts: opts
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
28
|
+
def self.update(id, params = {}, opts = {})
|
29
|
+
request_stripe_object(
|
30
|
+
method: :post,
|
31
|
+
path: format("/v1/issuing/transactions/%<id>s", { id: CGI.escape(id) }),
|
32
|
+
params: params,
|
33
|
+
opts: opts
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
17
37
|
def test_helpers
|
18
38
|
TestHelpers.new(self)
|
19
39
|
end
|
@@ -10,5 +10,25 @@ module Stripe
|
|
10
10
|
include Stripe::APIOperations::Save
|
11
11
|
|
12
12
|
OBJECT_NAME = "margin"
|
13
|
+
|
14
|
+
# Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount.A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
|
15
|
+
def self.create(params = {}, opts = {})
|
16
|
+
request_stripe_object(method: :post, path: "/v1/billing/margins", params: params, opts: opts)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Retrieve a list of your margins.
|
20
|
+
def self.list(filters = {}, opts = {})
|
21
|
+
request_stripe_object(method: :get, path: "/v1/billing/margins", params: filters, opts: opts)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Update the specified margin object. Certain fields of the margin object are not editable.
|
25
|
+
def self.update(id, params = {}, opts = {})
|
26
|
+
request_stripe_object(
|
27
|
+
method: :post,
|
28
|
+
path: format("/v1/billing/margins/%<id>s", { id: CGI.escape(id) }),
|
29
|
+
params: params,
|
30
|
+
opts: opts
|
31
|
+
)
|
32
|
+
end
|
13
33
|
end
|
14
34
|
end
|
@@ -93,5 +93,25 @@ module Stripe
|
|
93
93
|
opts: opts
|
94
94
|
)
|
95
95
|
end
|
96
|
+
|
97
|
+
# Creates a new open order object.
|
98
|
+
def self.create(params = {}, opts = {})
|
99
|
+
request_stripe_object(method: :post, path: "/v1/orders", params: params, opts: opts)
|
100
|
+
end
|
101
|
+
|
102
|
+
# Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.
|
103
|
+
def self.list(filters = {}, opts = {})
|
104
|
+
request_stripe_object(method: :get, path: "/v1/orders", params: filters, opts: opts)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
108
|
+
def self.update(id, params = {}, opts = {})
|
109
|
+
request_stripe_object(
|
110
|
+
method: :post,
|
111
|
+
path: format("/v1/orders/%<id>s", { id: CGI.escape(id) }),
|
112
|
+
params: params,
|
113
|
+
opts: opts
|
114
|
+
)
|
115
|
+
end
|
96
116
|
end
|
97
117
|
end
|
@@ -247,6 +247,25 @@ module Stripe
|
|
247
247
|
)
|
248
248
|
end
|
249
249
|
|
250
|
+
# Creates a PaymentIntent object.
|
251
|
+
#
|
252
|
+
# After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm)
|
253
|
+
# to continue the payment. Learn more about <a href="/docs/payments/payment-intents">the available payment flows
|
254
|
+
# with the Payment Intents API.
|
255
|
+
#
|
256
|
+
# When you use confirm=true during creation, it's equivalent to creating
|
257
|
+
# and confirming the PaymentIntent in the same call. You can use any parameters
|
258
|
+
# available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply
|
259
|
+
# confirm=true.
|
260
|
+
def self.create(params = {}, opts = {})
|
261
|
+
request_stripe_object(method: :post, path: "/v1/payment_intents", params: params, opts: opts)
|
262
|
+
end
|
263
|
+
|
264
|
+
# Returns a list of PaymentIntents.
|
265
|
+
def self.list(filters = {}, opts = {})
|
266
|
+
request_stripe_object(method: :get, path: "/v1/payment_intents", params: filters, opts: opts)
|
267
|
+
end
|
268
|
+
|
250
269
|
def self.search(params = {}, opts = {})
|
251
270
|
request_stripe_object(
|
252
271
|
method: :get,
|
@@ -259,5 +278,21 @@ module Stripe
|
|
259
278
|
def self.search_auto_paging_each(params = {}, opts = {}, &blk)
|
260
279
|
search(params, opts).auto_paging_each(&blk)
|
261
280
|
end
|
281
|
+
|
282
|
+
# Updates properties on a PaymentIntent object without confirming.
|
283
|
+
#
|
284
|
+
# Depending on which properties you update, you might need to confirm the
|
285
|
+
# PaymentIntent again. For example, updating the payment_method
|
286
|
+
# always requires you to confirm the PaymentIntent again. If you prefer to
|
287
|
+
# update and confirm at the same time, we recommend updating properties through
|
288
|
+
# the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead.
|
289
|
+
def self.update(id, params = {}, opts = {})
|
290
|
+
request_stripe_object(
|
291
|
+
method: :post,
|
292
|
+
path: format("/v1/payment_intents/%<id>s", { id: CGI.escape(id) }),
|
293
|
+
params: params,
|
294
|
+
opts: opts
|
295
|
+
)
|
296
|
+
end
|
262
297
|
end
|
263
298
|
end
|
@@ -33,5 +33,25 @@ module Stripe
|
|
33
33
|
opts: opts
|
34
34
|
)
|
35
35
|
end
|
36
|
+
|
37
|
+
# Creates a payment link.
|
38
|
+
def self.create(params = {}, opts = {})
|
39
|
+
request_stripe_object(method: :post, path: "/v1/payment_links", params: params, opts: opts)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Returns a list of your payment links.
|
43
|
+
def self.list(filters = {}, opts = {})
|
44
|
+
request_stripe_object(method: :get, path: "/v1/payment_links", params: filters, opts: opts)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Updates a payment link.
|
48
|
+
def self.update(id, params = {}, opts = {})
|
49
|
+
request_stripe_object(
|
50
|
+
method: :post,
|
51
|
+
path: format("/v1/payment_links/%<id>s", { id: CGI.escape(id) }),
|
52
|
+
params: params,
|
53
|
+
opts: opts
|
54
|
+
)
|
55
|
+
end
|
36
56
|
end
|
37
57
|
end
|
@@ -77,5 +77,27 @@ module Stripe
|
|
77
77
|
opts: opts
|
78
78
|
)
|
79
79
|
end
|
80
|
+
|
81
|
+
# Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
|
82
|
+
#
|
83
|
+
# Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
|
84
|
+
def self.create(params = {}, opts = {})
|
85
|
+
request_stripe_object(method: :post, path: "/v1/payment_methods", params: params, opts: opts)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead.
|
89
|
+
def self.list(filters = {}, opts = {})
|
90
|
+
request_stripe_object(method: :get, path: "/v1/payment_methods", params: filters, opts: opts)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
|
94
|
+
def self.update(id, params = {}, opts = {})
|
95
|
+
request_stripe_object(
|
96
|
+
method: :post,
|
97
|
+
path: format("/v1/payment_methods/%<id>s", { id: CGI.escape(id) }),
|
98
|
+
params: params,
|
99
|
+
opts: opts
|
100
|
+
)
|
101
|
+
end
|
80
102
|
end
|
81
103
|
end
|
@@ -22,5 +22,35 @@ module Stripe
|
|
22
22
|
include Stripe::APIOperations::Save
|
23
23
|
|
24
24
|
OBJECT_NAME = "payment_method_configuration"
|
25
|
+
|
26
|
+
# Creates a payment method configuration
|
27
|
+
def self.create(params = {}, opts = {})
|
28
|
+
request_stripe_object(
|
29
|
+
method: :post,
|
30
|
+
path: "/v1/payment_method_configurations",
|
31
|
+
params: params,
|
32
|
+
opts: opts
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
# List payment method configurations
|
37
|
+
def self.list(filters = {}, opts = {})
|
38
|
+
request_stripe_object(
|
39
|
+
method: :get,
|
40
|
+
path: "/v1/payment_method_configurations",
|
41
|
+
params: filters,
|
42
|
+
opts: opts
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Update payment method configuration
|
47
|
+
def self.update(id, params = {}, opts = {})
|
48
|
+
request_stripe_object(
|
49
|
+
method: :post,
|
50
|
+
path: format("/v1/payment_method_configurations/%<id>s", { id: CGI.escape(id) }),
|
51
|
+
params: params,
|
52
|
+
opts: opts
|
53
|
+
)
|
54
|
+
end
|
25
55
|
end
|
26
56
|
end
|
@@ -42,5 +42,35 @@ module Stripe
|
|
42
42
|
opts: opts
|
43
43
|
)
|
44
44
|
end
|
45
|
+
|
46
|
+
# Creates a payment method domain.
|
47
|
+
def self.create(params = {}, opts = {})
|
48
|
+
request_stripe_object(
|
49
|
+
method: :post,
|
50
|
+
path: "/v1/payment_method_domains",
|
51
|
+
params: params,
|
52
|
+
opts: opts
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Lists the details of existing payment method domains.
|
57
|
+
def self.list(filters = {}, opts = {})
|
58
|
+
request_stripe_object(
|
59
|
+
method: :get,
|
60
|
+
path: "/v1/payment_method_domains",
|
61
|
+
params: filters,
|
62
|
+
opts: opts
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Updates an existing payment method domain.
|
67
|
+
def self.update(id, params = {}, opts = {})
|
68
|
+
request_stripe_object(
|
69
|
+
method: :post,
|
70
|
+
path: format("/v1/payment_method_domains/%<id>s", { id: CGI.escape(id) }),
|
71
|
+
params: params,
|
72
|
+
opts: opts
|
73
|
+
)
|
74
|
+
end
|
45
75
|
end
|
46
76
|
end
|
@@ -60,5 +60,29 @@ module Stripe
|
|
60
60
|
opts: opts
|
61
61
|
)
|
62
62
|
end
|
63
|
+
|
64
|
+
# To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error.
|
65
|
+
#
|
66
|
+
# If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode.
|
67
|
+
#
|
68
|
+
# If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type.
|
69
|
+
def self.create(params = {}, opts = {})
|
70
|
+
request_stripe_object(method: :post, path: "/v1/payouts", params: params, opts: opts)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
|
74
|
+
def self.list(filters = {}, opts = {})
|
75
|
+
request_stripe_object(method: :get, path: "/v1/payouts", params: filters, opts: opts)
|
76
|
+
end
|
77
|
+
|
78
|
+
# Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments.
|
79
|
+
def self.update(id, params = {}, opts = {})
|
80
|
+
request_stripe_object(
|
81
|
+
method: :post,
|
82
|
+
path: format("/v1/payouts/%<id>s", { id: CGI.escape(id) }),
|
83
|
+
params: params,
|
84
|
+
opts: opts
|
85
|
+
)
|
86
|
+
end
|
63
87
|
end
|
64
88
|
end
|
@@ -17,5 +17,45 @@ module Stripe
|
|
17
17
|
include Stripe::APIOperations::Save
|
18
18
|
|
19
19
|
OBJECT_NAME = "plan"
|
20
|
+
|
21
|
+
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
|
22
|
+
def self.create(params = {}, opts = {})
|
23
|
+
request_stripe_object(method: :post, path: "/v1/plans", params: params, opts: opts)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Deleting plans means new subscribers can't be added. Existing subscribers aren't affected.
|
27
|
+
def self.delete(id, params = {}, opts = {})
|
28
|
+
request_stripe_object(
|
29
|
+
method: :delete,
|
30
|
+
path: format("/v1/plans/%<id>s", { id: CGI.escape(id) }),
|
31
|
+
params: params,
|
32
|
+
opts: opts
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Deleting plans means new subscribers can't be added. Existing subscribers aren't affected.
|
37
|
+
def delete(params = {}, opts = {})
|
38
|
+
request_stripe_object(
|
39
|
+
method: :delete,
|
40
|
+
path: format("/v1/plans/%<plan>s", { plan: CGI.escape(self["id"]) }),
|
41
|
+
params: params,
|
42
|
+
opts: opts
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Returns a list of your plans.
|
47
|
+
def self.list(filters = {}, opts = {})
|
48
|
+
request_stripe_object(method: :get, path: "/v1/plans", params: filters, opts: opts)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle.
|
52
|
+
def self.update(id, params = {}, opts = {})
|
53
|
+
request_stripe_object(
|
54
|
+
method: :post,
|
55
|
+
path: format("/v1/plans/%<id>s", { id: CGI.escape(id) }),
|
56
|
+
params: params,
|
57
|
+
opts: opts
|
58
|
+
)
|
59
|
+
end
|
20
60
|
end
|
21
61
|
end
|
@@ -16,6 +16,16 @@ module Stripe
|
|
16
16
|
|
17
17
|
OBJECT_NAME = "price"
|
18
18
|
|
19
|
+
# Creates a new price for an existing product. The price can be recurring or one-time.
|
20
|
+
def self.create(params = {}, opts = {})
|
21
|
+
request_stripe_object(method: :post, path: "/v1/prices", params: params, opts: opts)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
|
25
|
+
def self.list(filters = {}, opts = {})
|
26
|
+
request_stripe_object(method: :get, path: "/v1/prices", params: filters, opts: opts)
|
27
|
+
end
|
28
|
+
|
19
29
|
def self.search(params = {}, opts = {})
|
20
30
|
request_stripe_object(method: :get, path: "/v1/prices/search", params: params, opts: opts)
|
21
31
|
end
|
@@ -23,5 +33,15 @@ module Stripe
|
|
23
33
|
def self.search_auto_paging_each(params = {}, opts = {}, &blk)
|
24
34
|
search(params, opts).auto_paging_each(&blk)
|
25
35
|
end
|
36
|
+
|
37
|
+
# Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
|
38
|
+
def self.update(id, params = {}, opts = {})
|
39
|
+
request_stripe_object(
|
40
|
+
method: :post,
|
41
|
+
path: format("/v1/prices/%<id>s", { id: CGI.escape(id) }),
|
42
|
+
params: params,
|
43
|
+
opts: opts
|
44
|
+
)
|
45
|
+
end
|
26
46
|
end
|
27
47
|
end
|
@@ -19,6 +19,36 @@ module Stripe
|
|
19
19
|
|
20
20
|
OBJECT_NAME = "product"
|
21
21
|
|
22
|
+
# Creates a new product object.
|
23
|
+
def self.create(params = {}, opts = {})
|
24
|
+
request_stripe_object(method: :post, path: "/v1/products", params: params, opts: opts)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
|
28
|
+
def self.delete(id, params = {}, opts = {})
|
29
|
+
request_stripe_object(
|
30
|
+
method: :delete,
|
31
|
+
path: format("/v1/products/%<id>s", { id: CGI.escape(id) }),
|
32
|
+
params: params,
|
33
|
+
opts: opts
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
|
38
|
+
def delete(params = {}, opts = {})
|
39
|
+
request_stripe_object(
|
40
|
+
method: :delete,
|
41
|
+
path: format("/v1/products/%<id>s", { id: CGI.escape(self["id"]) }),
|
42
|
+
params: params,
|
43
|
+
opts: opts
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
|
48
|
+
def self.list(filters = {}, opts = {})
|
49
|
+
request_stripe_object(method: :get, path: "/v1/products", params: filters, opts: opts)
|
50
|
+
end
|
51
|
+
|
22
52
|
def self.search(params = {}, opts = {})
|
23
53
|
request_stripe_object(method: :get, path: "/v1/products/search", params: params, opts: opts)
|
24
54
|
end
|
@@ -26,5 +56,15 @@ module Stripe
|
|
26
56
|
def self.search_auto_paging_each(params = {}, opts = {}, &blk)
|
27
57
|
search(params, opts).auto_paging_each(&blk)
|
28
58
|
end
|
59
|
+
|
60
|
+
# Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
61
|
+
def self.update(id, params = {}, opts = {})
|
62
|
+
request_stripe_object(
|
63
|
+
method: :post,
|
64
|
+
path: format("/v1/products/%<id>s", { id: CGI.escape(id) }),
|
65
|
+
params: params,
|
66
|
+
opts: opts
|
67
|
+
)
|
68
|
+
end
|
29
69
|
end
|
30
70
|
end
|
@@ -10,5 +10,25 @@ module Stripe
|
|
10
10
|
include Stripe::APIOperations::Save
|
11
11
|
|
12
12
|
OBJECT_NAME = "promotion_code"
|
13
|
+
|
14
|
+
# A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
|
15
|
+
def self.create(params = {}, opts = {})
|
16
|
+
request_stripe_object(method: :post, path: "/v1/promotion_codes", params: params, opts: opts)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Returns a list of your promotion codes.
|
20
|
+
def self.list(filters = {}, opts = {})
|
21
|
+
request_stripe_object(method: :get, path: "/v1/promotion_codes", params: filters, opts: opts)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
|
25
|
+
def self.update(id, params = {}, opts = {})
|
26
|
+
request_stripe_object(
|
27
|
+
method: :post,
|
28
|
+
path: format("/v1/promotion_codes/%<id>s", { id: CGI.escape(id) }),
|
29
|
+
params: params,
|
30
|
+
opts: opts
|
31
|
+
)
|
32
|
+
end
|
13
33
|
end
|
14
34
|
end
|
@@ -240,5 +240,25 @@ module Stripe
|
|
240
240
|
opts: opts
|
241
241
|
)
|
242
242
|
end
|
243
|
+
|
244
|
+
# A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
|
245
|
+
def self.create(params = {}, opts = {})
|
246
|
+
request_stripe_object(method: :post, path: "/v1/quotes", params: params, opts: opts)
|
247
|
+
end
|
248
|
+
|
249
|
+
# Returns a list of your quotes.
|
250
|
+
def self.list(filters = {}, opts = {})
|
251
|
+
request_stripe_object(method: :get, path: "/v1/quotes", params: filters, opts: opts)
|
252
|
+
end
|
253
|
+
|
254
|
+
# A quote models prices and services for a customer.
|
255
|
+
def self.update(id, params = {}, opts = {})
|
256
|
+
request_stripe_object(
|
257
|
+
method: :post,
|
258
|
+
path: format("/v1/quotes/%<id>s", { id: CGI.escape(id) }),
|
259
|
+
params: params,
|
260
|
+
opts: opts
|
261
|
+
)
|
262
|
+
end
|
243
263
|
end
|
244
264
|
end
|
@@ -11,6 +11,16 @@ module Stripe
|
|
11
11
|
extend Stripe::APIOperations::List
|
12
12
|
|
13
13
|
OBJECT_NAME = "radar.early_fraud_warning"
|
14
|
+
|
15
|
+
# Returns a list of early fraud warnings.
|
16
|
+
def self.list(filters = {}, opts = {})
|
17
|
+
request_stripe_object(
|
18
|
+
method: :get,
|
19
|
+
path: "/v1/radar/early_fraud_warnings",
|
20
|
+
params: filters,
|
21
|
+
opts: opts
|
22
|
+
)
|
23
|
+
end
|
14
24
|
end
|
15
25
|
end
|
16
26
|
end
|
@@ -13,6 +13,56 @@ module Stripe
|
|
13
13
|
include Stripe::APIOperations::Save
|
14
14
|
|
15
15
|
OBJECT_NAME = "radar.value_list"
|
16
|
+
|
17
|
+
# Creates a new ValueList object, which can then be referenced in rules.
|
18
|
+
def self.create(params = {}, opts = {})
|
19
|
+
request_stripe_object(
|
20
|
+
method: :post,
|
21
|
+
path: "/v1/radar/value_lists",
|
22
|
+
params: params,
|
23
|
+
opts: opts
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
|
28
|
+
def self.delete(id, params = {}, opts = {})
|
29
|
+
request_stripe_object(
|
30
|
+
method: :delete,
|
31
|
+
path: format("/v1/radar/value_lists/%<id>s", { id: CGI.escape(id) }),
|
32
|
+
params: params,
|
33
|
+
opts: opts
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
|
38
|
+
def delete(params = {}, opts = {})
|
39
|
+
request_stripe_object(
|
40
|
+
method: :delete,
|
41
|
+
path: format("/v1/radar/value_lists/%<value_list>s", { value_list: CGI.escape(self["id"]) }),
|
42
|
+
params: params,
|
43
|
+
opts: opts
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
48
|
+
def self.list(filters = {}, opts = {})
|
49
|
+
request_stripe_object(
|
50
|
+
method: :get,
|
51
|
+
path: "/v1/radar/value_lists",
|
52
|
+
params: filters,
|
53
|
+
opts: opts
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.
|
58
|
+
def self.update(id, params = {}, opts = {})
|
59
|
+
request_stripe_object(
|
60
|
+
method: :post,
|
61
|
+
path: format("/v1/radar/value_lists/%<id>s", { id: CGI.escape(id) }),
|
62
|
+
params: params,
|
63
|
+
opts: opts
|
64
|
+
)
|
65
|
+
end
|
16
66
|
end
|
17
67
|
end
|
18
68
|
end
|