stripe 10.12.0.pre.beta.1 → 10.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +49 -292
- data/OPENAPI_VERSION +1 -1
- data/README.md +0 -11
- data/VERSION +1 -1
- data/lib/stripe/api_operations/request.rb +1 -2
- data/lib/stripe/api_version.rb +0 -1
- data/lib/stripe/object_types.rb +4 -25
- data/lib/stripe/resources/account.rb +1 -1
- data/lib/stripe/resources/charge.rb +1 -1
- data/lib/stripe/resources/customer.rb +1 -12
- data/lib/stripe/resources/financial_connections/account.rb +0 -3
- data/lib/stripe/resources/invoice.rb +0 -53
- data/lib/stripe/resources/issuing/authorization.rb +24 -24
- data/lib/stripe/resources/issuing/card.rb +22 -22
- data/lib/stripe/resources/issuing/personalization_design.rb +14 -14
- data/lib/stripe/resources/payment_intent.rb +0 -50
- data/lib/stripe/resources/quote.rb +0 -104
- data/lib/stripe/resources/source.rb +1 -1
- data/lib/stripe/resources/subscription_item.rb +1 -1
- data/lib/stripe/resources/subscription_schedule.rb +0 -20
- data/lib/stripe/resources/tax/settings.rb +0 -1
- data/lib/stripe/resources/terminal/reader.rb +0 -60
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/treasury/inbound_transfer.rb +14 -14
- data/lib/stripe/resources/treasury/outbound_payment.rb +14 -14
- data/lib/stripe/resources/treasury/outbound_transfer.rb +14 -14
- data/lib/stripe/resources.rb +0 -19
- data/lib/stripe/stripe_client.rb +28 -62
- data/lib/stripe/stripe_configuration.rb +1 -2
- data/lib/stripe/util.rb +1 -8
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -54
- metadata +4 -24
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -32
- data/lib/stripe/resources/capital/financing_offer.rb +0 -49
- data/lib/stripe/resources/capital/financing_summary.rb +0 -15
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -27
- data/lib/stripe/resources/confirmation_token.rb +0 -16
- data/lib/stripe/resources/customer_entitlement.rb +0 -12
- data/lib/stripe/resources/customer_entitlement_summary.rb +0 -12
- data/lib/stripe/resources/entitlements/feature.rb +0 -38
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -14
- data/lib/stripe/resources/gift_cards/card.rb +0 -59
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -93
- data/lib/stripe/resources/invoice_payment.rb +0 -12
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -88
- data/lib/stripe/resources/margin.rb +0 -37
- data/lib/stripe/resources/order.rb +0 -120
- data/lib/stripe/resources/quote_phase.rb +0 -39
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -43
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -11
- data/lib/stripe/resources/tax/form.rb +0 -49
data/lib/stripe/object_types.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
1
|
# frozen_string_literal: true
|
3
2
|
|
4
3
|
# rubocop:disable Metrics/MethodLength
|
@@ -11,12 +10,11 @@ module Stripe
|
|
11
10
|
# data structures
|
12
11
|
ListObject.object_name => ListObject,
|
13
12
|
SearchResultObject.object_name => SearchResultObject,
|
14
|
-
|
15
|
-
# business objects
|
16
13
|
File.object_name_alt => File,
|
14
|
+
|
15
|
+
# The beginning of the section generated from our OpenAPI spec
|
17
16
|
Account.object_name => Account,
|
18
17
|
AccountLink.object_name => AccountLink,
|
19
|
-
AccountNotice.object_name => AccountNotice,
|
20
18
|
AccountSession.object_name => AccountSession,
|
21
19
|
ApplePayDomain.object_name => ApplePayDomain,
|
22
20
|
ApplicationFee.object_name => ApplicationFee,
|
@@ -28,9 +26,6 @@ module Stripe
|
|
28
26
|
BillingPortal::Configuration.object_name => BillingPortal::Configuration,
|
29
27
|
BillingPortal::Session.object_name => BillingPortal::Session,
|
30
28
|
Capability.object_name => Capability,
|
31
|
-
Capital::FinancingOffer.object_name => Capital::FinancingOffer,
|
32
|
-
Capital::FinancingSummary.object_name => Capital::FinancingSummary,
|
33
|
-
Capital::FinancingTransaction.object_name => Capital::FinancingTransaction,
|
34
29
|
Card.object_name => Card,
|
35
30
|
CashBalance.object_name => CashBalance,
|
36
31
|
Charge.object_name => Charge,
|
@@ -38,7 +33,6 @@ module Stripe
|
|
38
33
|
Climate::Order.object_name => Climate::Order,
|
39
34
|
Climate::Product.object_name => Climate::Product,
|
40
35
|
Climate::Supplier.object_name => Climate::Supplier,
|
41
|
-
ConfirmationToken.object_name => ConfirmationToken,
|
42
36
|
CountrySpec.object_name => CountrySpec,
|
43
37
|
Coupon.object_name => Coupon,
|
44
38
|
CreditNote.object_name => CreditNote,
|
@@ -46,38 +40,28 @@ module Stripe
|
|
46
40
|
Customer.object_name => Customer,
|
47
41
|
CustomerBalanceTransaction.object_name => CustomerBalanceTransaction,
|
48
42
|
CustomerCashBalanceTransaction.object_name => CustomerCashBalanceTransaction,
|
49
|
-
CustomerEntitlement.object_name => CustomerEntitlement,
|
50
|
-
CustomerEntitlementSummary.object_name => CustomerEntitlementSummary,
|
51
43
|
CustomerSession.object_name => CustomerSession,
|
52
44
|
Discount.object_name => Discount,
|
53
45
|
Dispute.object_name => Dispute,
|
54
|
-
Entitlements::Feature.object_name => Entitlements::Feature,
|
55
46
|
EphemeralKey.object_name => EphemeralKey,
|
56
47
|
Event.object_name => Event,
|
57
48
|
ExchangeRate.object_name => ExchangeRate,
|
58
49
|
File.object_name => File,
|
59
50
|
FileLink.object_name => FileLink,
|
60
51
|
FinancialConnections::Account.object_name => FinancialConnections::Account,
|
61
|
-
FinancialConnections::AccountInferredBalance.object_name =>
|
62
|
-
FinancialConnections::AccountInferredBalance,
|
63
52
|
FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
|
64
|
-
FinancialConnections::AccountOwnership.object_name =>
|
65
|
-
FinancialConnections::AccountOwnership,
|
53
|
+
FinancialConnections::AccountOwnership.object_name => FinancialConnections::AccountOwnership,
|
66
54
|
FinancialConnections::Session.object_name => FinancialConnections::Session,
|
67
55
|
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
|
68
56
|
FundingInstructions.object_name => FundingInstructions,
|
69
|
-
GiftCards::Card.object_name => GiftCards::Card,
|
70
|
-
GiftCards::Transaction.object_name => GiftCards::Transaction,
|
71
57
|
Identity::VerificationReport.object_name => Identity::VerificationReport,
|
72
58
|
Identity::VerificationSession.object_name => Identity::VerificationSession,
|
73
59
|
Invoice.object_name => Invoice,
|
74
60
|
InvoiceItem.object_name => InvoiceItem,
|
75
61
|
InvoiceLineItem.object_name => InvoiceLineItem,
|
76
|
-
InvoicePayment.object_name => InvoicePayment,
|
77
62
|
Issuing::Authorization.object_name => Issuing::Authorization,
|
78
63
|
Issuing::Card.object_name => Issuing::Card,
|
79
64
|
Issuing::Cardholder.object_name => Issuing::Cardholder,
|
80
|
-
Issuing::CreditUnderwritingRecord.object_name => Issuing::CreditUnderwritingRecord,
|
81
65
|
Issuing::Dispute.object_name => Issuing::Dispute,
|
82
66
|
Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign,
|
83
67
|
Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle,
|
@@ -86,8 +70,6 @@ module Stripe
|
|
86
70
|
LineItem.object_name => LineItem,
|
87
71
|
LoginLink.object_name => LoginLink,
|
88
72
|
Mandate.object_name => Mandate,
|
89
|
-
Margin.object_name => Margin,
|
90
|
-
Order.object_name => Order,
|
91
73
|
PaymentIntent.object_name => PaymentIntent,
|
92
74
|
PaymentLink.object_name => PaymentLink,
|
93
75
|
PaymentMethod.object_name => PaymentMethod,
|
@@ -100,9 +82,6 @@ module Stripe
|
|
100
82
|
Product.object_name => Product,
|
101
83
|
PromotionCode.object_name => PromotionCode,
|
102
84
|
Quote.object_name => Quote,
|
103
|
-
QuotePhase.object_name => QuotePhase,
|
104
|
-
QuotePreviewInvoice.object_name => QuotePreviewInvoice,
|
105
|
-
QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
|
106
85
|
Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
|
107
86
|
Radar::ValueList.object_name => Radar::ValueList,
|
108
87
|
Radar::ValueListItem.object_name => Radar::ValueListItem,
|
@@ -122,7 +101,6 @@ module Stripe
|
|
122
101
|
SubscriptionSchedule.object_name => SubscriptionSchedule,
|
123
102
|
Tax::Calculation.object_name => Tax::Calculation,
|
124
103
|
Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
|
125
|
-
Tax::Form.object_name => Tax::Form,
|
126
104
|
Tax::Registration.object_name => Tax::Registration,
|
127
105
|
Tax::Settings.object_name => Tax::Settings,
|
128
106
|
Tax::Transaction.object_name => Tax::Transaction,
|
@@ -152,6 +130,7 @@ module Stripe
|
|
152
130
|
UsageRecord.object_name => UsageRecord,
|
153
131
|
UsageRecordSummary.object_name => UsageRecordSummary,
|
154
132
|
WebhookEndpoint.object_name => WebhookEndpoint,
|
133
|
+
# The end of the section generated from our OpenAPI spec
|
155
134
|
}
|
156
135
|
end
|
157
136
|
end
|
@@ -13,8 +13,8 @@ module Stripe
|
|
13
13
|
extend Stripe::APIOperations::Create
|
14
14
|
include Stripe::APIOperations::Delete
|
15
15
|
extend Stripe::APIOperations::List
|
16
|
-
include Stripe::APIOperations::Save
|
17
16
|
extend Stripe::APIOperations::NestedResource
|
17
|
+
include Stripe::APIOperations::Save
|
18
18
|
|
19
19
|
OBJECT_NAME = "account"
|
20
20
|
def self.object_name
|
@@ -9,9 +9,9 @@ module Stripe
|
|
9
9
|
class Charge < APIResource
|
10
10
|
extend Stripe::APIOperations::Create
|
11
11
|
extend Stripe::APIOperations::List
|
12
|
+
extend Stripe::APIOperations::NestedResource
|
12
13
|
extend Stripe::APIOperations::Search
|
13
14
|
include Stripe::APIOperations::Save
|
14
|
-
extend Stripe::APIOperations::NestedResource
|
15
15
|
|
16
16
|
OBJECT_NAME = "charge"
|
17
17
|
def self.object_name
|
@@ -9,9 +9,9 @@ module Stripe
|
|
9
9
|
extend Stripe::APIOperations::Create
|
10
10
|
include Stripe::APIOperations::Delete
|
11
11
|
extend Stripe::APIOperations::List
|
12
|
+
extend Stripe::APIOperations::NestedResource
|
12
13
|
extend Stripe::APIOperations::Search
|
13
14
|
include Stripe::APIOperations::Save
|
14
|
-
extend Stripe::APIOperations::NestedResource
|
15
15
|
|
16
16
|
OBJECT_NAME = "customer"
|
17
17
|
def self.object_name
|
@@ -22,7 +22,6 @@ module Stripe
|
|
22
22
|
nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
|
23
23
|
nested_resource_class_methods :source, operations: %i[create retrieve update delete list]
|
24
24
|
nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
|
25
|
-
nested_resource_class_methods :entitlement, operations: %i[list]
|
26
25
|
|
27
26
|
# Creates a new customer object.
|
28
27
|
def self.create(params = {}, opts = {})
|
@@ -128,16 +127,6 @@ module Stripe
|
|
128
127
|
)
|
129
128
|
end
|
130
129
|
|
131
|
-
# Retrieve the entitlement summary for a customer
|
132
|
-
def self.retrieve_entitlement_summary(customer, params = {}, opts = {})
|
133
|
-
request_stripe_object(
|
134
|
-
method: :get,
|
135
|
-
path: format("/v1/customers/%<customer>s/entitlement_summary", { customer: CGI.escape(customer) }),
|
136
|
-
params: params,
|
137
|
-
opts: opts
|
138
|
-
)
|
139
|
-
end
|
140
|
-
|
141
130
|
# Retrieves a PaymentMethod object for a given Customer.
|
142
131
|
def retrieve_payment_method(payment_method, params = {}, opts = {})
|
143
132
|
request_stripe_object(
|
@@ -6,15 +6,12 @@ module Stripe
|
|
6
6
|
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
|
7
7
|
class Account < APIResource
|
8
8
|
extend Stripe::APIOperations::List
|
9
|
-
extend Stripe::APIOperations::NestedResource
|
10
9
|
|
11
10
|
OBJECT_NAME = "financial_connections.account"
|
12
11
|
def self.object_name
|
13
12
|
"financial_connections.account"
|
14
13
|
end
|
15
14
|
|
16
|
-
nested_resource_class_methods :inferred_balance, operations: %i[list]
|
17
|
-
|
18
15
|
# Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
|
19
16
|
def disconnect(params = {}, opts = {})
|
20
17
|
request_stripe_object(
|
@@ -40,70 +40,17 @@ module Stripe
|
|
40
40
|
extend Stripe::APIOperations::List
|
41
41
|
extend Stripe::APIOperations::Search
|
42
42
|
include Stripe::APIOperations::Save
|
43
|
-
extend Stripe::APIOperations::NestedResource
|
44
43
|
|
45
44
|
OBJECT_NAME = "invoice"
|
46
45
|
def self.object_name
|
47
46
|
"invoice"
|
48
47
|
end
|
49
48
|
|
50
|
-
nested_resource_class_methods :payment, operations: %i[retrieve list]
|
51
|
-
|
52
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
53
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
54
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
55
|
-
# invoice's status becomes paid.
|
56
|
-
#
|
57
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
58
|
-
# credited to the invoice immediately.
|
59
|
-
#
|
60
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
61
|
-
def attach_payment_intent(params = {}, opts = {})
|
62
|
-
request_stripe_object(
|
63
|
-
method: :post,
|
64
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(self["id"]) }),
|
65
|
-
params: params,
|
66
|
-
opts: opts
|
67
|
-
)
|
68
|
-
end
|
69
|
-
|
70
|
-
# Attaches a PaymentIntent to the invoice, adding it to the list of payments.
|
71
|
-
# When the PaymentIntent's status changes to succeeded, the payment is credited
|
72
|
-
# to the invoice, increasing its amount_paid. When the invoice is fully paid, the
|
73
|
-
# invoice's status becomes paid.
|
74
|
-
#
|
75
|
-
# If the PaymentIntent's status is already succeeded when it is attached, it is
|
76
|
-
# credited to the invoice immediately.
|
77
|
-
#
|
78
|
-
# Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
|
79
|
-
def self.attach_payment_intent(invoice, params = {}, opts = {})
|
80
|
-
request_stripe_object(
|
81
|
-
method: :post,
|
82
|
-
path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
|
83
|
-
params: params,
|
84
|
-
opts: opts
|
85
|
-
)
|
86
|
-
end
|
87
|
-
|
88
49
|
# This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
|
89
50
|
def self.create(params = {}, opts = {})
|
90
51
|
request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
|
91
52
|
end
|
92
53
|
|
93
|
-
# At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
|
94
|
-
#
|
95
|
-
# Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
|
96
|
-
#
|
97
|
-
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.
|
98
|
-
def self.create_preview(params = {}, opts = {})
|
99
|
-
request_stripe_object(
|
100
|
-
method: :post,
|
101
|
-
path: "/v1/invoices/create_preview",
|
102
|
-
params: params,
|
103
|
-
opts: opts
|
104
|
-
)
|
105
|
-
end
|
106
|
-
|
107
54
|
# Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
|
108
55
|
def self.delete(id, params = {}, opts = {})
|
109
56
|
request_stripe_object(
|
@@ -101,6 +101,16 @@ module Stripe
|
|
101
101
|
)
|
102
102
|
end
|
103
103
|
|
104
|
+
# Capture a test-mode authorization.
|
105
|
+
def capture(params = {}, opts = {})
|
106
|
+
@resource.request_stripe_object(
|
107
|
+
method: :post,
|
108
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }),
|
109
|
+
params: params,
|
110
|
+
opts: opts
|
111
|
+
)
|
112
|
+
end
|
113
|
+
|
104
114
|
# Create a test-mode authorization.
|
105
115
|
def self.create(params = {}, opts = {})
|
106
116
|
request_stripe_object(
|
@@ -121,51 +131,41 @@ module Stripe
|
|
121
131
|
)
|
122
132
|
end
|
123
133
|
|
124
|
-
#
|
125
|
-
def
|
126
|
-
request_stripe_object(
|
134
|
+
# Expire a test-mode Authorization.
|
135
|
+
def expire(params = {}, opts = {})
|
136
|
+
@resource.request_stripe_object(
|
127
137
|
method: :post,
|
128
|
-
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/
|
138
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }),
|
129
139
|
params: params,
|
130
140
|
opts: opts
|
131
141
|
)
|
132
142
|
end
|
133
143
|
|
134
|
-
#
|
135
|
-
def self.
|
144
|
+
# Increment a test-mode Authorization.
|
145
|
+
def self.increment(authorization, params = {}, opts = {})
|
136
146
|
request_stripe_object(
|
137
147
|
method: :post,
|
138
|
-
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/
|
139
|
-
params: params,
|
140
|
-
opts: opts
|
141
|
-
)
|
142
|
-
end
|
143
|
-
|
144
|
-
# Capture a test-mode authorization.
|
145
|
-
def capture(params = {}, opts = {})
|
146
|
-
@resource.request_stripe_object(
|
147
|
-
method: :post,
|
148
|
-
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }),
|
148
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(authorization) }),
|
149
149
|
params: params,
|
150
150
|
opts: opts
|
151
151
|
)
|
152
152
|
end
|
153
153
|
|
154
|
-
#
|
155
|
-
def
|
154
|
+
# Increment a test-mode Authorization.
|
155
|
+
def increment(params = {}, opts = {})
|
156
156
|
@resource.request_stripe_object(
|
157
157
|
method: :post,
|
158
|
-
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/
|
158
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }),
|
159
159
|
params: params,
|
160
160
|
opts: opts
|
161
161
|
)
|
162
162
|
end
|
163
163
|
|
164
|
-
#
|
165
|
-
def
|
166
|
-
|
164
|
+
# Reverse a test-mode Authorization.
|
165
|
+
def self.reverse(authorization, params = {}, opts = {})
|
166
|
+
request_stripe_object(
|
167
167
|
method: :post,
|
168
|
-
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/
|
168
|
+
path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(authorization) }),
|
169
169
|
params: params,
|
170
170
|
opts: opts
|
171
171
|
)
|
@@ -54,61 +54,61 @@ module Stripe
|
|
54
54
|
)
|
55
55
|
end
|
56
56
|
|
57
|
-
# Updates the shipping status of the specified Issuing Card object to
|
58
|
-
def
|
59
|
-
request_stripe_object(
|
57
|
+
# Updates the shipping status of the specified Issuing Card object to delivered.
|
58
|
+
def deliver_card(params = {}, opts = {})
|
59
|
+
@resource.request_stripe_object(
|
60
60
|
method: :post,
|
61
|
-
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/
|
61
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(@resource["id"]) }),
|
62
62
|
params: params,
|
63
63
|
opts: opts
|
64
64
|
)
|
65
65
|
end
|
66
66
|
|
67
|
-
# Updates the shipping status of the specified Issuing Card object to
|
68
|
-
def self.
|
67
|
+
# Updates the shipping status of the specified Issuing Card object to failure.
|
68
|
+
def self.fail_card(card, params = {}, opts = {})
|
69
69
|
request_stripe_object(
|
70
70
|
method: :post,
|
71
|
-
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/
|
71
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(card) }),
|
72
72
|
params: params,
|
73
73
|
opts: opts
|
74
74
|
)
|
75
75
|
end
|
76
76
|
|
77
|
-
# Updates the shipping status of the specified Issuing Card object to
|
78
|
-
def
|
79
|
-
request_stripe_object(
|
77
|
+
# Updates the shipping status of the specified Issuing Card object to failure.
|
78
|
+
def fail_card(params = {}, opts = {})
|
79
|
+
@resource.request_stripe_object(
|
80
80
|
method: :post,
|
81
|
-
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/
|
81
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(@resource["id"]) }),
|
82
82
|
params: params,
|
83
83
|
opts: opts
|
84
84
|
)
|
85
85
|
end
|
86
86
|
|
87
|
-
# Updates the shipping status of the specified Issuing Card object to
|
88
|
-
def
|
89
|
-
|
87
|
+
# Updates the shipping status of the specified Issuing Card object to returned.
|
88
|
+
def self.return_card(card, params = {}, opts = {})
|
89
|
+
request_stripe_object(
|
90
90
|
method: :post,
|
91
|
-
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/
|
91
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(card) }),
|
92
92
|
params: params,
|
93
93
|
opts: opts
|
94
94
|
)
|
95
95
|
end
|
96
96
|
|
97
|
-
# Updates the shipping status of the specified Issuing Card object to
|
98
|
-
def
|
97
|
+
# Updates the shipping status of the specified Issuing Card object to returned.
|
98
|
+
def return_card(params = {}, opts = {})
|
99
99
|
@resource.request_stripe_object(
|
100
100
|
method: :post,
|
101
|
-
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/
|
101
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(@resource["id"]) }),
|
102
102
|
params: params,
|
103
103
|
opts: opts
|
104
104
|
)
|
105
105
|
end
|
106
106
|
|
107
|
-
# Updates the shipping status of the specified Issuing Card object to
|
108
|
-
def
|
109
|
-
|
107
|
+
# Updates the shipping status of the specified Issuing Card object to shipped.
|
108
|
+
def self.ship_card(card, params = {}, opts = {})
|
109
|
+
request_stripe_object(
|
110
110
|
method: :post,
|
111
|
-
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/
|
111
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
|
112
112
|
params: params,
|
113
113
|
opts: opts
|
114
114
|
)
|
@@ -64,41 +64,41 @@ module Stripe
|
|
64
64
|
)
|
65
65
|
end
|
66
66
|
|
67
|
-
# Updates the status of the specified testmode personalization design object to
|
68
|
-
def
|
69
|
-
request_stripe_object(
|
67
|
+
# Updates the status of the specified testmode personalization design object to active.
|
68
|
+
def activate(params = {}, opts = {})
|
69
|
+
@resource.request_stripe_object(
|
70
70
|
method: :post,
|
71
|
-
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/
|
71
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(@resource["id"]) }),
|
72
72
|
params: params,
|
73
73
|
opts: opts
|
74
74
|
)
|
75
75
|
end
|
76
76
|
|
77
|
-
# Updates the status of the specified testmode personalization design object to
|
78
|
-
def self.
|
77
|
+
# Updates the status of the specified testmode personalization design object to inactive.
|
78
|
+
def self.deactivate(personalization_design, params = {}, opts = {})
|
79
79
|
request_stripe_object(
|
80
80
|
method: :post,
|
81
|
-
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/
|
81
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(personalization_design) }),
|
82
82
|
params: params,
|
83
83
|
opts: opts
|
84
84
|
)
|
85
85
|
end
|
86
86
|
|
87
|
-
# Updates the status of the specified testmode personalization design object to
|
88
|
-
def
|
87
|
+
# Updates the status of the specified testmode personalization design object to inactive.
|
88
|
+
def deactivate(params = {}, opts = {})
|
89
89
|
@resource.request_stripe_object(
|
90
90
|
method: :post,
|
91
|
-
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/
|
91
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(@resource["id"]) }),
|
92
92
|
params: params,
|
93
93
|
opts: opts
|
94
94
|
)
|
95
95
|
end
|
96
96
|
|
97
|
-
# Updates the status of the specified testmode personalization design object to
|
98
|
-
def
|
99
|
-
|
97
|
+
# Updates the status of the specified testmode personalization design object to rejected.
|
98
|
+
def self.reject(personalization_design, params = {}, opts = {})
|
99
|
+
request_stripe_object(
|
100
100
|
method: :post,
|
101
|
-
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/
|
101
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(personalization_design) }),
|
102
102
|
params: params,
|
103
103
|
opts: opts
|
104
104
|
)
|
@@ -176,56 +176,6 @@ module Stripe
|
|
176
176
|
request_stripe_object(method: :post, path: "/v1/payment_intents", params: params, opts: opts)
|
177
177
|
end
|
178
178
|
|
179
|
-
# Perform an decremental authorization on an eligible
|
180
|
-
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
181
|
-
# PaymentIntent's status must be requires_capture and
|
182
|
-
# [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
|
183
|
-
# must be available.
|
184
|
-
#
|
185
|
-
# Decremental authorizations decrease the authorized amount on your customer's card
|
186
|
-
# to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
|
187
|
-
#
|
188
|
-
# After decrement, the PaymentIntent object
|
189
|
-
# returns with the updated
|
190
|
-
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
|
191
|
-
# The PaymentIntent will now be capturable up to the new authorized amount.
|
192
|
-
#
|
193
|
-
# Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
|
194
|
-
# After it's captured, a PaymentIntent can no longer be decremented.
|
195
|
-
def decrement_authorization(params = {}, opts = {})
|
196
|
-
request_stripe_object(
|
197
|
-
method: :post,
|
198
|
-
path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(self["id"]) }),
|
199
|
-
params: params,
|
200
|
-
opts: opts
|
201
|
-
)
|
202
|
-
end
|
203
|
-
|
204
|
-
# Perform an decremental authorization on an eligible
|
205
|
-
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
206
|
-
# PaymentIntent's status must be requires_capture and
|
207
|
-
# [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
|
208
|
-
# must be available.
|
209
|
-
#
|
210
|
-
# Decremental authorizations decrease the authorized amount on your customer's card
|
211
|
-
# to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
|
212
|
-
#
|
213
|
-
# After decrement, the PaymentIntent object
|
214
|
-
# returns with the updated
|
215
|
-
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
|
216
|
-
# The PaymentIntent will now be capturable up to the new authorized amount.
|
217
|
-
#
|
218
|
-
# Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
|
219
|
-
# After it's captured, a PaymentIntent can no longer be decremented.
|
220
|
-
def self.decrement_authorization(intent, params = {}, opts = {})
|
221
|
-
request_stripe_object(
|
222
|
-
method: :post,
|
223
|
-
path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(intent) }),
|
224
|
-
params: params,
|
225
|
-
opts: opts
|
226
|
-
)
|
227
|
-
end
|
228
|
-
|
229
179
|
# Perform an incremental authorization on an eligible
|
230
180
|
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
231
181
|
# PaymentIntent's status must be requires_capture and
|