stripe 10.11.0 → 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 +10 -9
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +6 -5
- data/lib/stripe/resources/account.rb +70 -70
- data/lib/stripe/resources/apple_pay_domain.rb +4 -4
- data/lib/stripe/resources/apps/secret.rb +5 -5
- data/lib/stripe/resources/charge.rb +1 -1
- data/lib/stripe/resources/checkout/session.rb +21 -21
- data/lib/stripe/resources/credit_note.rb +35 -35
- data/lib/stripe/resources/customer.rb +58 -58
- data/lib/stripe/resources/ephemeral_key.rb +9 -9
- data/lib/stripe/resources/file.rb +5 -5
- data/lib/stripe/resources/financial_connections/account.rb +34 -34
- data/lib/stripe/resources/identity/verification_session.rb +38 -38
- data/lib/stripe/resources/invoice.rb +72 -72
- data/lib/stripe/resources/issuing/authorization.rb +32 -32
- data/lib/stripe/resources/issuing/card.rb +22 -22
- data/lib/stripe/resources/issuing/dispute.rb +16 -16
- data/lib/stripe/resources/issuing/personalization_design.rb +119 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +26 -0
- data/lib/stripe/resources/payment_intent.rb +100 -100
- data/lib/stripe/resources/payment_link.rb +10 -10
- data/lib/stripe/resources/payment_method.rb +17 -17
- data/lib/stripe/resources/payment_method_domain.rb +29 -29
- data/lib/stripe/resources/payout.rb +22 -22
- data/lib/stripe/resources/quote.rb +51 -51
- data/lib/stripe/resources/setup_intent.rb +32 -32
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +4 -4
- data/lib/stripe/resources/source.rb +18 -18
- data/lib/stripe/resources/subscription.rb +36 -36
- data/lib/stripe/resources/subscription_item.rb +1 -1
- data/lib/stripe/resources/subscription_schedule.rb +19 -19
- data/lib/stripe/resources/tax/calculation.rb +10 -10
- data/lib/stripe/resources/tax/settings.rb +0 -1
- data/lib/stripe/resources/tax/transaction.rb +10 -10
- data/lib/stripe/resources/terminal/reader.rb +46 -46
- data/lib/stripe/resources/transfer.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +25 -25
- 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/treasury/transaction_entry.rb +4 -4
- data/lib/stripe/resources.rb +2 -0
- data/lib/stripe/version.rb +1 -1
- metadata +4 -2
@@ -46,83 +46,91 @@ module Stripe
|
|
46
46
|
"invoice"
|
47
47
|
end
|
48
48
|
|
49
|
-
#
|
50
|
-
def
|
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.
|
50
|
+
def self.create(params = {}, opts = {})
|
51
|
+
request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
|
52
|
+
end
|
53
|
+
|
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).
|
55
|
+
def self.delete(id, params = {}, opts = {})
|
51
56
|
request_stripe_object(
|
52
|
-
method: :
|
53
|
-
path: format("/v1/invoices/%<
|
57
|
+
method: :delete,
|
58
|
+
path: format("/v1/invoices/%<id>s", { id: CGI.escape(id) }),
|
54
59
|
params: params,
|
55
60
|
opts: opts
|
56
61
|
)
|
57
62
|
end
|
58
63
|
|
59
|
-
#
|
60
|
-
def
|
64
|
+
# 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).
|
65
|
+
def delete(params = {}, opts = {})
|
61
66
|
request_stripe_object(
|
62
|
-
method: :
|
63
|
-
path: format("/v1/invoices/%<invoice>s
|
67
|
+
method: :delete,
|
68
|
+
path: format("/v1/invoices/%<invoice>s", { invoice: CGI.escape(self["id"]) }),
|
64
69
|
params: params,
|
65
70
|
opts: opts
|
66
71
|
)
|
67
72
|
end
|
68
73
|
|
69
|
-
# Stripe automatically
|
70
|
-
def
|
74
|
+
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
|
75
|
+
def finalize_invoice(params = {}, opts = {})
|
71
76
|
request_stripe_object(
|
72
77
|
method: :post,
|
73
|
-
path: format("/v1/invoices/%<invoice>s/
|
78
|
+
path: format("/v1/invoices/%<invoice>s/finalize", { invoice: CGI.escape(self["id"]) }),
|
74
79
|
params: params,
|
75
80
|
opts: opts
|
76
81
|
)
|
77
82
|
end
|
78
83
|
|
79
|
-
# Stripe
|
80
|
-
|
81
|
-
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
|
82
|
-
def send_invoice(params = {}, opts = {})
|
84
|
+
# Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method.
|
85
|
+
def self.finalize_invoice(invoice, params = {}, opts = {})
|
83
86
|
request_stripe_object(
|
84
87
|
method: :post,
|
85
|
-
path: format("/v1/invoices/%<invoice>s/
|
88
|
+
path: format("/v1/invoices/%<invoice>s/finalize", { invoice: CGI.escape(invoice) }),
|
86
89
|
params: params,
|
87
90
|
opts: opts
|
88
91
|
)
|
89
92
|
end
|
90
93
|
|
91
|
-
#
|
92
|
-
def
|
94
|
+
# You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
|
95
|
+
def self.list(filters = {}, opts = {})
|
96
|
+
request_stripe_object(method: :get, path: "/v1/invoices", params: filters, opts: opts)
|
97
|
+
end
|
98
|
+
|
99
|
+
# When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
100
|
+
def self.list_upcoming_line_items(params = {}, opts = {})
|
93
101
|
request_stripe_object(
|
94
|
-
method: :
|
95
|
-
path:
|
102
|
+
method: :get,
|
103
|
+
path: "/v1/invoices/upcoming/lines",
|
96
104
|
params: params,
|
97
105
|
opts: opts
|
98
106
|
)
|
99
107
|
end
|
100
108
|
|
101
|
-
#
|
102
|
-
def
|
109
|
+
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
|
110
|
+
def mark_uncollectible(params = {}, opts = {})
|
103
111
|
request_stripe_object(
|
104
112
|
method: :post,
|
105
|
-
path: format("/v1/invoices/%<invoice>s/
|
113
|
+
path: format("/v1/invoices/%<invoice>s/mark_uncollectible", { invoice: CGI.escape(self["id"]) }),
|
106
114
|
params: params,
|
107
115
|
opts: opts
|
108
116
|
)
|
109
117
|
end
|
110
118
|
|
111
|
-
#
|
112
|
-
def self.
|
119
|
+
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
|
120
|
+
def self.mark_uncollectible(invoice, params = {}, opts = {})
|
113
121
|
request_stripe_object(
|
114
|
-
method: :
|
115
|
-
path: "/v1/invoices/
|
122
|
+
method: :post,
|
123
|
+
path: format("/v1/invoices/%<invoice>s/mark_uncollectible", { invoice: CGI.escape(invoice) }),
|
116
124
|
params: params,
|
117
125
|
opts: opts
|
118
126
|
)
|
119
127
|
end
|
120
128
|
|
121
|
-
#
|
122
|
-
def
|
129
|
+
# Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
|
130
|
+
def pay(params = {}, opts = {})
|
123
131
|
request_stripe_object(
|
124
132
|
method: :post,
|
125
|
-
path: format("/v1/invoices/%<invoice>s/
|
133
|
+
path: format("/v1/invoices/%<invoice>s/pay", { invoice: CGI.escape(self["id"]) }),
|
126
134
|
params: params,
|
127
135
|
opts: opts
|
128
136
|
)
|
@@ -138,6 +146,26 @@ module Stripe
|
|
138
146
|
)
|
139
147
|
end
|
140
148
|
|
149
|
+
def self.search(params = {}, opts = {})
|
150
|
+
request_stripe_object(method: :get, path: "/v1/invoices/search", params: params, opts: opts)
|
151
|
+
end
|
152
|
+
|
153
|
+
def self.search_auto_paging_each(params = {}, opts = {}, &blk)
|
154
|
+
search(params, opts).auto_paging_each(&blk)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
|
158
|
+
#
|
159
|
+
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
|
160
|
+
def send_invoice(params = {}, opts = {})
|
161
|
+
request_stripe_object(
|
162
|
+
method: :post,
|
163
|
+
path: format("/v1/invoices/%<invoice>s/send", { invoice: CGI.escape(self["id"]) }),
|
164
|
+
params: params,
|
165
|
+
opts: opts
|
166
|
+
)
|
167
|
+
end
|
168
|
+
|
141
169
|
# Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email.
|
142
170
|
#
|
143
171
|
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
|
@@ -159,64 +187,36 @@ module Stripe
|
|
159
187
|
request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
|
160
188
|
end
|
161
189
|
|
162
|
-
#
|
163
|
-
|
190
|
+
# Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
|
191
|
+
# monetary values, as well as collection_method, become uneditable.
|
192
|
+
#
|
193
|
+
# If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
|
194
|
+
# sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
195
|
+
# auto_advance=false.
|
196
|
+
def self.update(id, params = {}, opts = {})
|
164
197
|
request_stripe_object(
|
165
198
|
method: :post,
|
166
|
-
path: format("/v1/invoices/%<invoice>s/void", { invoice: CGI.escape(invoice) }),
|
167
|
-
params: params,
|
168
|
-
opts: opts
|
169
|
-
)
|
170
|
-
end
|
171
|
-
|
172
|
-
# 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.
|
173
|
-
def self.create(params = {}, opts = {})
|
174
|
-
request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
|
175
|
-
end
|
176
|
-
|
177
|
-
# 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).
|
178
|
-
def self.delete(id, params = {}, opts = {})
|
179
|
-
request_stripe_object(
|
180
|
-
method: :delete,
|
181
199
|
path: format("/v1/invoices/%<id>s", { id: CGI.escape(id) }),
|
182
200
|
params: params,
|
183
201
|
opts: opts
|
184
202
|
)
|
185
203
|
end
|
186
204
|
|
187
|
-
#
|
188
|
-
def
|
205
|
+
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
|
206
|
+
def void_invoice(params = {}, opts = {})
|
189
207
|
request_stripe_object(
|
190
|
-
method: :
|
191
|
-
path: format("/v1/invoices/%<invoice>s", { invoice: CGI.escape(self["id"]) }),
|
208
|
+
method: :post,
|
209
|
+
path: format("/v1/invoices/%<invoice>s/void", { invoice: CGI.escape(self["id"]) }),
|
192
210
|
params: params,
|
193
211
|
opts: opts
|
194
212
|
)
|
195
213
|
end
|
196
214
|
|
197
|
-
#
|
198
|
-
def self.
|
199
|
-
request_stripe_object(method: :get, path: "/v1/invoices", params: filters, opts: opts)
|
200
|
-
end
|
201
|
-
|
202
|
-
def self.search(params = {}, opts = {})
|
203
|
-
request_stripe_object(method: :get, path: "/v1/invoices/search", params: params, opts: opts)
|
204
|
-
end
|
205
|
-
|
206
|
-
def self.search_auto_paging_each(params = {}, opts = {}, &blk)
|
207
|
-
search(params, opts).auto_paging_each(&blk)
|
208
|
-
end
|
209
|
-
|
210
|
-
# Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
|
211
|
-
# monetary values, as well as collection_method, become uneditable.
|
212
|
-
#
|
213
|
-
# If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
|
214
|
-
# sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
|
215
|
-
# auto_advance=false.
|
216
|
-
def self.update(id, params = {}, opts = {})
|
215
|
+
# Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
|
216
|
+
def self.void_invoice(invoice, params = {}, opts = {})
|
217
217
|
request_stripe_object(
|
218
218
|
method: :post,
|
219
|
-
path: format("/v1/invoices/%<
|
219
|
+
path: format("/v1/invoices/%<invoice>s/void", { invoice: CGI.escape(invoice) }),
|
220
220
|
params: params,
|
221
221
|
opts: opts
|
222
222
|
)
|
@@ -28,23 +28,23 @@ module Stripe
|
|
28
28
|
)
|
29
29
|
end
|
30
30
|
|
31
|
-
# [Deprecated]
|
32
|
-
# This method is deprecated. Instead, [respond directly to the webhook request to
|
33
|
-
def
|
31
|
+
# [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
32
|
+
# This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
33
|
+
def self.approve(authorization, params = {}, opts = {})
|
34
34
|
request_stripe_object(
|
35
35
|
method: :post,
|
36
|
-
path: format("/v1/issuing/authorizations/%<authorization>s/
|
36
|
+
path: format("/v1/issuing/authorizations/%<authorization>s/approve", { authorization: CGI.escape(authorization) }),
|
37
37
|
params: params,
|
38
38
|
opts: opts
|
39
39
|
)
|
40
40
|
end
|
41
41
|
|
42
|
-
# [Deprecated]
|
43
|
-
# This method is deprecated. Instead, [respond directly to the webhook request to
|
44
|
-
def
|
42
|
+
# [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
|
43
|
+
# This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
|
44
|
+
def decline(params = {}, opts = {})
|
45
45
|
request_stripe_object(
|
46
46
|
method: :post,
|
47
|
-
path: format("/v1/issuing/authorizations/%<authorization>s/
|
47
|
+
path: format("/v1/issuing/authorizations/%<authorization>s/decline", { authorization: CGI.escape(self["id"]) }),
|
48
48
|
params: params,
|
49
49
|
opts: opts
|
50
50
|
)
|
@@ -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
|
)
|
@@ -16,42 +16,42 @@ module Stripe
|
|
16
16
|
"issuing.dispute"
|
17
17
|
end
|
18
18
|
|
19
|
-
#
|
20
|
-
def
|
19
|
+
# 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.
|
20
|
+
def self.create(params = {}, opts = {})
|
21
21
|
request_stripe_object(
|
22
22
|
method: :post,
|
23
|
-
path:
|
23
|
+
path: "/v1/issuing/disputes",
|
24
24
|
params: params,
|
25
25
|
opts: opts
|
26
26
|
)
|
27
27
|
end
|
28
28
|
|
29
|
-
#
|
30
|
-
def self.
|
29
|
+
# 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.
|
30
|
+
def self.list(filters = {}, opts = {})
|
31
31
|
request_stripe_object(
|
32
|
-
method: :
|
33
|
-
path:
|
34
|
-
params:
|
32
|
+
method: :get,
|
33
|
+
path: "/v1/issuing/disputes",
|
34
|
+
params: filters,
|
35
35
|
opts: opts
|
36
36
|
)
|
37
37
|
end
|
38
38
|
|
39
|
-
#
|
40
|
-
def
|
39
|
+
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
40
|
+
def submit(params = {}, opts = {})
|
41
41
|
request_stripe_object(
|
42
42
|
method: :post,
|
43
|
-
path: "/v1/issuing/disputes",
|
43
|
+
path: format("/v1/issuing/disputes/%<dispute>s/submit", { dispute: CGI.escape(self["id"]) }),
|
44
44
|
params: params,
|
45
45
|
opts: opts
|
46
46
|
)
|
47
47
|
end
|
48
48
|
|
49
|
-
#
|
50
|
-
def self.
|
49
|
+
# Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence).
|
50
|
+
def self.submit(dispute, params = {}, opts = {})
|
51
51
|
request_stripe_object(
|
52
|
-
method: :
|
53
|
-
path: "/v1/issuing/disputes",
|
54
|
-
params:
|
52
|
+
method: :post,
|
53
|
+
path: format("/v1/issuing/disputes/%<dispute>s/submit", { dispute: CGI.escape(dispute) }),
|
54
|
+
params: params,
|
55
55
|
opts: opts
|
56
56
|
)
|
57
57
|
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Issuing
|
6
|
+
# A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line.
|
7
|
+
class PersonalizationDesign < APIResource
|
8
|
+
extend Stripe::APIOperations::Create
|
9
|
+
extend Stripe::APIOperations::List
|
10
|
+
include Stripe::APIOperations::Save
|
11
|
+
|
12
|
+
OBJECT_NAME = "issuing.personalization_design"
|
13
|
+
def self.object_name
|
14
|
+
"issuing.personalization_design"
|
15
|
+
end
|
16
|
+
|
17
|
+
# Creates a personalization design object.
|
18
|
+
def self.create(params = {}, opts = {})
|
19
|
+
request_stripe_object(
|
20
|
+
method: :post,
|
21
|
+
path: "/v1/issuing/personalization_designs",
|
22
|
+
params: params,
|
23
|
+
opts: opts
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
# 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.
|
28
|
+
def self.list(filters = {}, opts = {})
|
29
|
+
request_stripe_object(
|
30
|
+
method: :get,
|
31
|
+
path: "/v1/issuing/personalization_designs",
|
32
|
+
params: filters,
|
33
|
+
opts: opts
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Updates a card personalization object.
|
38
|
+
def self.update(id, params = {}, opts = {})
|
39
|
+
request_stripe_object(
|
40
|
+
method: :post,
|
41
|
+
path: format("/v1/issuing/personalization_designs/%<id>s", { id: CGI.escape(id) }),
|
42
|
+
params: params,
|
43
|
+
opts: opts
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_helpers
|
48
|
+
TestHelpers.new(self)
|
49
|
+
end
|
50
|
+
|
51
|
+
class TestHelpers < APIResourceTestHelpers
|
52
|
+
RESOURCE_CLASS = PersonalizationDesign
|
53
|
+
def self.resource_class
|
54
|
+
"PersonalizationDesign"
|
55
|
+
end
|
56
|
+
|
57
|
+
# Updates the status of the specified testmode personalization design object to active.
|
58
|
+
def self.activate(personalization_design, params = {}, opts = {})
|
59
|
+
request_stripe_object(
|
60
|
+
method: :post,
|
61
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(personalization_design) }),
|
62
|
+
params: params,
|
63
|
+
opts: opts
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Updates the status of the specified testmode personalization design object to active.
|
68
|
+
def activate(params = {}, opts = {})
|
69
|
+
@resource.request_stripe_object(
|
70
|
+
method: :post,
|
71
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/activate", { personalization_design: CGI.escape(@resource["id"]) }),
|
72
|
+
params: params,
|
73
|
+
opts: opts
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Updates the status of the specified testmode personalization design object to inactive.
|
78
|
+
def self.deactivate(personalization_design, params = {}, opts = {})
|
79
|
+
request_stripe_object(
|
80
|
+
method: :post,
|
81
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(personalization_design) }),
|
82
|
+
params: params,
|
83
|
+
opts: opts
|
84
|
+
)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Updates the status of the specified testmode personalization design object to inactive.
|
88
|
+
def deactivate(params = {}, opts = {})
|
89
|
+
@resource.request_stripe_object(
|
90
|
+
method: :post,
|
91
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/deactivate", { personalization_design: CGI.escape(@resource["id"]) }),
|
92
|
+
params: params,
|
93
|
+
opts: opts
|
94
|
+
)
|
95
|
+
end
|
96
|
+
|
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
|
+
method: :post,
|
101
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(personalization_design) }),
|
102
|
+
params: params,
|
103
|
+
opts: opts
|
104
|
+
)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Updates the status of the specified testmode personalization design object to rejected.
|
108
|
+
def reject(params = {}, opts = {})
|
109
|
+
@resource.request_stripe_object(
|
110
|
+
method: :post,
|
111
|
+
path: format("/v1/test_helpers/issuing/personalization_designs/%<personalization_design>s/reject", { personalization_design: CGI.escape(@resource["id"]) }),
|
112
|
+
params: params,
|
113
|
+
opts: opts
|
114
|
+
)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|