stripe 10.4.0 → 10.5.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 +4 -0
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/resources/account.rb +8 -0
- data/lib/stripe/resources/apps/secret.rb +2 -0
- data/lib/stripe/resources/charge.rb +10 -0
- data/lib/stripe/resources/checkout/session.rb +8 -0
- data/lib/stripe/resources/climate/order.rb +8 -0
- data/lib/stripe/resources/credit_note.rb +4 -0
- data/lib/stripe/resources/customer.rb +16 -0
- data/lib/stripe/resources/dispute.rb +6 -0
- data/lib/stripe/resources/financial_connections/account.rb +10 -0
- data/lib/stripe/resources/identity/verification_session.rb +44 -0
- data/lib/stripe/resources/invoice.rb +20 -0
- data/lib/stripe/resources/issuing/authorization.rb +17 -0
- data/lib/stripe/resources/issuing/card.rb +8 -0
- data/lib/stripe/resources/issuing/dispute.rb +2 -0
- data/lib/stripe/resources/issuing/transaction.rb +4 -0
- data/lib/stripe/resources/payment_intent.rb +118 -0
- data/lib/stripe/resources/payment_link.rb +2 -0
- data/lib/stripe/resources/payment_method.rb +28 -0
- data/lib/stripe/resources/payment_method_domain.rb +12 -0
- data/lib/stripe/resources/payout.rb +8 -0
- data/lib/stripe/resources/quote.rb +12 -0
- data/lib/stripe/resources/refund.rb +8 -0
- data/lib/stripe/resources/review.rb +2 -0
- data/lib/stripe/resources/setup_intent.rb +36 -0
- data/lib/stripe/resources/source.rb +2 -0
- data/lib/stripe/resources/subscription.rb +14 -0
- data/lib/stripe/resources/subscription_schedule.rb +4 -0
- data/lib/stripe/resources/tax/calculation.rb +2 -0
- data/lib/stripe/resources/tax/transaction.rb +4 -0
- data/lib/stripe/resources/terminal/reader.rb +12 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +2 -0
- data/lib/stripe/resources/topup.rb +2 -0
- data/lib/stripe/resources/treasury/financial_account.rb +4 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +8 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +8 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +8 -0
- data/lib/stripe/resources/treasury/received_credit.rb +1 -0
- data/lib/stripe/resources/treasury/received_debit.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35cb5568b5c580eb40e2b085b86fe4aaacf8acdbdd3279fe5298dbaf17b95686
|
4
|
+
data.tar.gz: '049a91783c7afab8e987f6e14cc659854b86c26d5434921c8b09afcc292e0b7d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85d1cf80fca4a8299e739bc41ab933f0b4ddcd0bce3d2adb52e7ab308838e96bd7bdf9627f8f1f1f56ed2a888c2cd963a17bebd9be86f290a52fd90e8f761d0b
|
7
|
+
data.tar.gz: e3fb60e7165b3b5592ef31c2c85d504eb4240e3ff63e68968c3bebe4200a5d3677db588de3c31e6d0e64b2ba52fe00d172c04ae1dade871f02e1b83add14680a
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
# Changelog
|
2
|
+
## 10.5.0 - 2024-01-04
|
3
|
+
* [#1306](https://github.com/stripe/stripe-ruby/pull/1306) Update generated code
|
4
|
+
* Add support for `retrieve` method on resource `Tax.Registration`
|
5
|
+
|
2
6
|
## 10.4.0 - 2023-12-22
|
3
7
|
* [#1303](https://github.com/stripe/stripe-ruby/pull/1303) Update generated code
|
4
8
|
* Add support for new resource `FinancialConnections.Transaction`
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v742
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
10.
|
1
|
+
10.5.0
|
@@ -25,6 +25,7 @@ module Stripe
|
|
25
25
|
resource_plural: "capabilities"
|
26
26
|
nested_resource_class_methods :person, operations: %i[create retrieve update delete list]
|
27
27
|
|
28
|
+
# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
|
28
29
|
def persons(params = {}, opts = {})
|
29
30
|
request_stripe_object(
|
30
31
|
method: :get,
|
@@ -34,6 +35,9 @@ module Stripe
|
|
34
35
|
)
|
35
36
|
end
|
36
37
|
|
38
|
+
# With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
|
39
|
+
#
|
40
|
+
# Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
|
37
41
|
def reject(params = {}, opts = {})
|
38
42
|
request_stripe_object(
|
39
43
|
method: :post,
|
@@ -43,6 +47,7 @@ module Stripe
|
|
43
47
|
)
|
44
48
|
end
|
45
49
|
|
50
|
+
# Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
|
46
51
|
def self.persons(account, params = {}, opts = {})
|
47
52
|
request_stripe_object(
|
48
53
|
method: :get,
|
@@ -52,6 +57,9 @@ module Stripe
|
|
52
57
|
)
|
53
58
|
end
|
54
59
|
|
60
|
+
# With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
|
61
|
+
#
|
62
|
+
# Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
|
55
63
|
def self.reject(account, params = {}, opts = {})
|
56
64
|
request_stripe_object(
|
57
65
|
method: :post,
|
@@ -18,6 +18,7 @@ module Stripe
|
|
18
18
|
|
19
19
|
OBJECT_NAME = "apps.secret"
|
20
20
|
|
21
|
+
# Deletes a secret from the secret store by name and scope.
|
21
22
|
def self.delete_where(params = {}, opts = {})
|
22
23
|
request_stripe_object(
|
23
24
|
method: :post,
|
@@ -27,6 +28,7 @@ module Stripe
|
|
27
28
|
)
|
28
29
|
end
|
29
30
|
|
31
|
+
# Finds a secret in the secret store by name and scope.
|
30
32
|
def self.find(params = {}, opts = {})
|
31
33
|
request_stripe_object(
|
32
34
|
method: :get,
|
@@ -14,6 +14,11 @@ module Stripe
|
|
14
14
|
|
15
15
|
OBJECT_NAME = "charge"
|
16
16
|
|
17
|
+
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
|
18
|
+
#
|
19
|
+
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
|
20
|
+
#
|
21
|
+
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
|
17
22
|
def capture(params = {}, opts = {})
|
18
23
|
request_stripe_object(
|
19
24
|
method: :post,
|
@@ -23,6 +28,11 @@ module Stripe
|
|
23
28
|
)
|
24
29
|
end
|
25
30
|
|
31
|
+
# Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
|
32
|
+
#
|
33
|
+
# Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
|
34
|
+
#
|
35
|
+
# Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
|
26
36
|
def self.capture(charge, params = {}, opts = {})
|
27
37
|
request_stripe_object(
|
28
38
|
method: :post,
|
@@ -23,6 +23,9 @@ module Stripe
|
|
23
23
|
|
24
24
|
OBJECT_NAME = "checkout.session"
|
25
25
|
|
26
|
+
# A Session can be expired when it is in one of these statuses: open
|
27
|
+
#
|
28
|
+
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
|
26
29
|
def expire(params = {}, opts = {})
|
27
30
|
request_stripe_object(
|
28
31
|
method: :post,
|
@@ -32,6 +35,7 @@ module Stripe
|
|
32
35
|
)
|
33
36
|
end
|
34
37
|
|
38
|
+
# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
35
39
|
def list_line_items(params = {}, opts = {})
|
36
40
|
request_stripe_object(
|
37
41
|
method: :get,
|
@@ -41,6 +45,9 @@ module Stripe
|
|
41
45
|
)
|
42
46
|
end
|
43
47
|
|
48
|
+
# A Session can be expired when it is in one of these statuses: open
|
49
|
+
#
|
50
|
+
# After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired.
|
44
51
|
def self.expire(session, params = {}, opts = {})
|
45
52
|
request_stripe_object(
|
46
53
|
method: :post,
|
@@ -50,6 +57,7 @@ module Stripe
|
|
50
57
|
)
|
51
58
|
end
|
52
59
|
|
60
|
+
# When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
53
61
|
def self.list_line_items(session, params = {}, opts = {})
|
54
62
|
request_stripe_object(
|
55
63
|
method: :get,
|
@@ -12,6 +12,10 @@ module Stripe
|
|
12
12
|
|
13
13
|
OBJECT_NAME = "climate.order"
|
14
14
|
|
15
|
+
# Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the
|
16
|
+
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
|
17
|
+
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
|
18
|
+
# provides 90 days advance notice and refunds the amount_total.
|
15
19
|
def cancel(params = {}, opts = {})
|
16
20
|
request_stripe_object(
|
17
21
|
method: :post,
|
@@ -21,6 +25,10 @@ module Stripe
|
|
21
25
|
)
|
22
26
|
end
|
23
27
|
|
28
|
+
# Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the
|
29
|
+
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
|
30
|
+
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
|
31
|
+
# provides 90 days advance notice and refunds the amount_total.
|
24
32
|
def self.cancel(order, params = {}, opts = {})
|
25
33
|
request_stripe_object(
|
26
34
|
method: :post,
|
@@ -12,6 +12,7 @@ module Stripe
|
|
12
12
|
|
13
13
|
OBJECT_NAME = "credit_note"
|
14
14
|
|
15
|
+
# Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
|
15
16
|
def void_credit_note(params = {}, opts = {})
|
16
17
|
request_stripe_object(
|
17
18
|
method: :post,
|
@@ -21,6 +22,7 @@ module Stripe
|
|
21
22
|
)
|
22
23
|
end
|
23
24
|
|
25
|
+
# When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.
|
24
26
|
def self.list_preview_line_items(params = {}, opts = {})
|
25
27
|
request_stripe_object(
|
26
28
|
method: :get,
|
@@ -30,6 +32,7 @@ module Stripe
|
|
30
32
|
)
|
31
33
|
end
|
32
34
|
|
35
|
+
# Get a preview of a credit note without creating it.
|
33
36
|
def self.preview(params = {}, opts = {})
|
34
37
|
request_stripe_object(
|
35
38
|
method: :get,
|
@@ -39,6 +42,7 @@ module Stripe
|
|
39
42
|
)
|
40
43
|
end
|
41
44
|
|
45
|
+
# Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
|
42
46
|
def self.void_credit_note(id, params = {}, opts = {})
|
43
47
|
request_stripe_object(
|
44
48
|
method: :post,
|
@@ -19,6 +19,9 @@ module Stripe
|
|
19
19
|
nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
|
20
20
|
nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
|
21
21
|
|
22
|
+
# Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
|
23
|
+
# funding instructions will be created. If funding instructions have already been created for a given customer, the same
|
24
|
+
# funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
|
22
25
|
def create_funding_instructions(params = {}, opts = {})
|
23
26
|
request_stripe_object(
|
24
27
|
method: :post,
|
@@ -28,6 +31,7 @@ module Stripe
|
|
28
31
|
)
|
29
32
|
end
|
30
33
|
|
34
|
+
# Removes the currently applied discount on a customer.
|
31
35
|
def delete_discount(params = {}, opts = {})
|
32
36
|
request_stripe_object(
|
33
37
|
method: :delete,
|
@@ -37,6 +41,7 @@ module Stripe
|
|
37
41
|
)
|
38
42
|
end
|
39
43
|
|
44
|
+
# Returns a list of PaymentMethods for a given Customer
|
40
45
|
def list_payment_methods(params = {}, opts = {})
|
41
46
|
request_stripe_object(
|
42
47
|
method: :get,
|
@@ -46,6 +51,7 @@ module Stripe
|
|
46
51
|
)
|
47
52
|
end
|
48
53
|
|
54
|
+
# Retrieves a PaymentMethod object for a given Customer.
|
49
55
|
def retrieve_payment_method(payment_method, params = {}, opts = {})
|
50
56
|
request_stripe_object(
|
51
57
|
method: :get,
|
@@ -55,6 +61,9 @@ module Stripe
|
|
55
61
|
)
|
56
62
|
end
|
57
63
|
|
64
|
+
# Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
|
65
|
+
# funding instructions will be created. If funding instructions have already been created for a given customer, the same
|
66
|
+
# funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
|
58
67
|
def self.create_funding_instructions(customer, params = {}, opts = {})
|
59
68
|
request_stripe_object(
|
60
69
|
method: :post,
|
@@ -64,6 +73,7 @@ module Stripe
|
|
64
73
|
)
|
65
74
|
end
|
66
75
|
|
76
|
+
# Removes the currently applied discount on a customer.
|
67
77
|
def self.delete_discount(customer, params = {}, opts = {})
|
68
78
|
request_stripe_object(
|
69
79
|
method: :delete,
|
@@ -73,6 +83,7 @@ module Stripe
|
|
73
83
|
)
|
74
84
|
end
|
75
85
|
|
86
|
+
# Returns a list of PaymentMethods for a given Customer
|
76
87
|
def self.list_payment_methods(customer, params = {}, opts = {})
|
77
88
|
request_stripe_object(
|
78
89
|
method: :get,
|
@@ -82,6 +93,7 @@ module Stripe
|
|
82
93
|
)
|
83
94
|
end
|
84
95
|
|
96
|
+
# Retrieves a PaymentMethod object for a given Customer.
|
85
97
|
def self.retrieve_payment_method(customer, payment_method, params = {}, opts = {})
|
86
98
|
request_stripe_object(
|
87
99
|
method: :get,
|
@@ -109,6 +121,7 @@ module Stripe
|
|
109
121
|
search(params, opts).auto_paging_each(&blk)
|
110
122
|
end
|
111
123
|
|
124
|
+
# Retrieves a customer's cash balance.
|
112
125
|
def self.retrieve_cash_balance(customer, params = {}, opts = {})
|
113
126
|
request_stripe_object(
|
114
127
|
method: :get,
|
@@ -118,6 +131,7 @@ module Stripe
|
|
118
131
|
)
|
119
132
|
end
|
120
133
|
|
134
|
+
# Changes the settings on a customer's cash balance.
|
121
135
|
def self.update_cash_balance(customer, params = {}, opts = {})
|
122
136
|
request_stripe_object(
|
123
137
|
method: :post,
|
@@ -134,6 +148,7 @@ module Stripe
|
|
134
148
|
class TestHelpers < APIResourceTestHelpers
|
135
149
|
RESOURCE_CLASS = Customer
|
136
150
|
|
151
|
+
# Create an incoming testmode bank transfer
|
137
152
|
def self.fund_cash_balance(customer, params = {}, opts = {})
|
138
153
|
request_stripe_object(
|
139
154
|
method: :post,
|
@@ -143,6 +158,7 @@ module Stripe
|
|
143
158
|
)
|
144
159
|
end
|
145
160
|
|
161
|
+
# Create an incoming testmode bank transfer
|
146
162
|
def fund_cash_balance(params = {}, opts = {})
|
147
163
|
@resource.request_stripe_object(
|
148
164
|
method: :post,
|
@@ -13,6 +13,9 @@ module Stripe
|
|
13
13
|
|
14
14
|
OBJECT_NAME = "dispute"
|
15
15
|
|
16
|
+
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
|
17
|
+
#
|
18
|
+
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
|
16
19
|
def close(params = {}, opts = {})
|
17
20
|
request_stripe_object(
|
18
21
|
method: :post,
|
@@ -22,6 +25,9 @@ module Stripe
|
|
22
25
|
)
|
23
26
|
end
|
24
27
|
|
28
|
+
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
|
29
|
+
#
|
30
|
+
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
|
25
31
|
def self.close(dispute, params = {}, opts = {})
|
26
32
|
request_stripe_object(
|
27
33
|
method: :post,
|
@@ -9,6 +9,7 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "financial_connections.account"
|
11
11
|
|
12
|
+
# 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).
|
12
13
|
def disconnect(params = {}, opts = {})
|
13
14
|
request_stripe_object(
|
14
15
|
method: :post,
|
@@ -18,6 +19,7 @@ module Stripe
|
|
18
19
|
)
|
19
20
|
end
|
20
21
|
|
22
|
+
# Lists all owners for a given Account
|
21
23
|
def list_owners(params = {}, opts = {})
|
22
24
|
request_stripe_object(
|
23
25
|
method: :get,
|
@@ -27,6 +29,7 @@ module Stripe
|
|
27
29
|
)
|
28
30
|
end
|
29
31
|
|
32
|
+
# Refreshes the data associated with a Financial Connections Account.
|
30
33
|
def refresh_account(params = {}, opts = {})
|
31
34
|
request_stripe_object(
|
32
35
|
method: :post,
|
@@ -36,6 +39,7 @@ module Stripe
|
|
36
39
|
)
|
37
40
|
end
|
38
41
|
|
42
|
+
# Subscribes to periodic refreshes of data associated with a Financial Connections Account.
|
39
43
|
def subscribe(params = {}, opts = {})
|
40
44
|
request_stripe_object(
|
41
45
|
method: :post,
|
@@ -45,6 +49,7 @@ module Stripe
|
|
45
49
|
)
|
46
50
|
end
|
47
51
|
|
52
|
+
# Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
|
48
53
|
def unsubscribe(params = {}, opts = {})
|
49
54
|
request_stripe_object(
|
50
55
|
method: :post,
|
@@ -54,6 +59,7 @@ module Stripe
|
|
54
59
|
)
|
55
60
|
end
|
56
61
|
|
62
|
+
# 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).
|
57
63
|
def self.disconnect(account, params = {}, opts = {})
|
58
64
|
request_stripe_object(
|
59
65
|
method: :post,
|
@@ -63,6 +69,7 @@ module Stripe
|
|
63
69
|
)
|
64
70
|
end
|
65
71
|
|
72
|
+
# Lists all owners for a given Account
|
66
73
|
def self.list_owners(account, params = {}, opts = {})
|
67
74
|
request_stripe_object(
|
68
75
|
method: :get,
|
@@ -72,6 +79,7 @@ module Stripe
|
|
72
79
|
)
|
73
80
|
end
|
74
81
|
|
82
|
+
# Refreshes the data associated with a Financial Connections Account.
|
75
83
|
def self.refresh_account(account, params = {}, opts = {})
|
76
84
|
request_stripe_object(
|
77
85
|
method: :post,
|
@@ -81,6 +89,7 @@ module Stripe
|
|
81
89
|
)
|
82
90
|
end
|
83
91
|
|
92
|
+
# Subscribes to periodic refreshes of data associated with a Financial Connections Account.
|
84
93
|
def self.subscribe(account, params = {}, opts = {})
|
85
94
|
request_stripe_object(
|
86
95
|
method: :post,
|
@@ -90,6 +99,7 @@ module Stripe
|
|
90
99
|
)
|
91
100
|
end
|
92
101
|
|
102
|
+
# Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
|
93
103
|
def self.unsubscribe(account, params = {}, opts = {})
|
94
104
|
request_stripe_object(
|
95
105
|
method: :post,
|
@@ -21,6 +21,9 @@ module Stripe
|
|
21
21
|
|
22
22
|
OBJECT_NAME = "identity.verification_session"
|
23
23
|
|
24
|
+
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
|
25
|
+
#
|
26
|
+
# Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
|
24
27
|
def cancel(params = {}, opts = {})
|
25
28
|
request_stripe_object(
|
26
29
|
method: :post,
|
@@ -30,6 +33,25 @@ module Stripe
|
|
30
33
|
)
|
31
34
|
end
|
32
35
|
|
36
|
+
# Redact a VerificationSession to remove all collected information from Stripe. This will redact
|
37
|
+
# the VerificationSession and all objects related to it, including VerificationReports, Events,
|
38
|
+
# request logs, etc.
|
39
|
+
#
|
40
|
+
# A VerificationSession object can be redacted when it is in requires_input or verified
|
41
|
+
# [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
|
42
|
+
# state will automatically cancel it.
|
43
|
+
#
|
44
|
+
# The redaction process may take up to four days. When the redaction process is in progress, the
|
45
|
+
# VerificationSession's redaction.status field will be set to processing; when the process is
|
46
|
+
# finished, it will change to redacted and an identity.verification_session.redacted event
|
47
|
+
# will be emitted.
|
48
|
+
#
|
49
|
+
# Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
|
50
|
+
# fields that contain personal data will be replaced by the string [redacted] or a similar
|
51
|
+
# placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
|
52
|
+
# used for any purpose.
|
53
|
+
#
|
54
|
+
# [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
|
33
55
|
def redact(params = {}, opts = {})
|
34
56
|
request_stripe_object(
|
35
57
|
method: :post,
|
@@ -39,6 +61,9 @@ module Stripe
|
|
39
61
|
)
|
40
62
|
end
|
41
63
|
|
64
|
+
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
|
65
|
+
#
|
66
|
+
# Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
|
42
67
|
def self.cancel(session, params = {}, opts = {})
|
43
68
|
request_stripe_object(
|
44
69
|
method: :post,
|
@@ -48,6 +73,25 @@ module Stripe
|
|
48
73
|
)
|
49
74
|
end
|
50
75
|
|
76
|
+
# Redact a VerificationSession to remove all collected information from Stripe. This will redact
|
77
|
+
# the VerificationSession and all objects related to it, including VerificationReports, Events,
|
78
|
+
# request logs, etc.
|
79
|
+
#
|
80
|
+
# A VerificationSession object can be redacted when it is in requires_input or verified
|
81
|
+
# [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action
|
82
|
+
# state will automatically cancel it.
|
83
|
+
#
|
84
|
+
# The redaction process may take up to four days. When the redaction process is in progress, the
|
85
|
+
# VerificationSession's redaction.status field will be set to processing; when the process is
|
86
|
+
# finished, it will change to redacted and an identity.verification_session.redacted event
|
87
|
+
# will be emitted.
|
88
|
+
#
|
89
|
+
# Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the
|
90
|
+
# fields that contain personal data will be replaced by the string [redacted] or a similar
|
91
|
+
# placeholder. The metadata field will also be erased. Redacted objects cannot be updated or
|
92
|
+
# used for any purpose.
|
93
|
+
#
|
94
|
+
# [Learn more](https://stripe.com/docs/identity/verification-sessions#redact).
|
51
95
|
def self.redact(session, params = {}, opts = {})
|
52
96
|
request_stripe_object(
|
53
97
|
method: :post,
|
@@ -43,6 +43,7 @@ module Stripe
|
|
43
43
|
|
44
44
|
OBJECT_NAME = "invoice"
|
45
45
|
|
46
|
+
# 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.
|
46
47
|
def finalize_invoice(params = {}, opts = {})
|
47
48
|
request_stripe_object(
|
48
49
|
method: :post,
|
@@ -52,6 +53,7 @@ module Stripe
|
|
52
53
|
)
|
53
54
|
end
|
54
55
|
|
56
|
+
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
|
55
57
|
def mark_uncollectible(params = {}, opts = {})
|
56
58
|
request_stripe_object(
|
57
59
|
method: :post,
|
@@ -61,6 +63,7 @@ module Stripe
|
|
61
63
|
)
|
62
64
|
end
|
63
65
|
|
66
|
+
# 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.
|
64
67
|
def pay(params = {}, opts = {})
|
65
68
|
request_stripe_object(
|
66
69
|
method: :post,
|
@@ -70,6 +73,9 @@ module Stripe
|
|
70
73
|
)
|
71
74
|
end
|
72
75
|
|
76
|
+
# 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.
|
77
|
+
#
|
78
|
+
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
|
73
79
|
def send_invoice(params = {}, opts = {})
|
74
80
|
request_stripe_object(
|
75
81
|
method: :post,
|
@@ -79,6 +85,7 @@ module Stripe
|
|
79
85
|
)
|
80
86
|
end
|
81
87
|
|
88
|
+
# 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.
|
82
89
|
def void_invoice(params = {}, opts = {})
|
83
90
|
request_stripe_object(
|
84
91
|
method: :post,
|
@@ -88,6 +95,7 @@ module Stripe
|
|
88
95
|
)
|
89
96
|
end
|
90
97
|
|
98
|
+
# 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.
|
91
99
|
def self.finalize_invoice(invoice, params = {}, opts = {})
|
92
100
|
request_stripe_object(
|
93
101
|
method: :post,
|
@@ -97,6 +105,7 @@ module Stripe
|
|
97
105
|
)
|
98
106
|
end
|
99
107
|
|
108
|
+
# 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
109
|
def self.list_upcoming_line_items(params = {}, opts = {})
|
101
110
|
request_stripe_object(
|
102
111
|
method: :get,
|
@@ -106,6 +115,7 @@ module Stripe
|
|
106
115
|
)
|
107
116
|
end
|
108
117
|
|
118
|
+
# Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
|
109
119
|
def self.mark_uncollectible(invoice, params = {}, opts = {})
|
110
120
|
request_stripe_object(
|
111
121
|
method: :post,
|
@@ -115,6 +125,7 @@ module Stripe
|
|
115
125
|
)
|
116
126
|
end
|
117
127
|
|
128
|
+
# 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.
|
118
129
|
def self.pay(invoice, params = {}, opts = {})
|
119
130
|
request_stripe_object(
|
120
131
|
method: :post,
|
@@ -124,6 +135,9 @@ module Stripe
|
|
124
135
|
)
|
125
136
|
end
|
126
137
|
|
138
|
+
# 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.
|
139
|
+
#
|
140
|
+
# Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
|
127
141
|
def self.send_invoice(invoice, params = {}, opts = {})
|
128
142
|
request_stripe_object(
|
129
143
|
method: :post,
|
@@ -133,10 +147,16 @@ module Stripe
|
|
133
147
|
)
|
134
148
|
end
|
135
149
|
|
150
|
+
# 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.
|
151
|
+
#
|
152
|
+
# 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.
|
153
|
+
#
|
154
|
+
# 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.
|
136
155
|
def self.upcoming(params = {}, opts = {})
|
137
156
|
request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
|
138
157
|
end
|
139
158
|
|
159
|
+
# 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.
|
140
160
|
def self.void_invoice(invoice, params = {}, opts = {})
|
141
161
|
request_stripe_object(
|
142
162
|
method: :post,
|
@@ -14,6 +14,8 @@ module Stripe
|
|
14
14
|
|
15
15
|
OBJECT_NAME = "issuing.authorization"
|
16
16
|
|
17
|
+
# [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.
|
18
|
+
# 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).
|
17
19
|
def approve(params = {}, opts = {})
|
18
20
|
request_stripe_object(
|
19
21
|
method: :post,
|
@@ -23,6 +25,8 @@ module Stripe
|
|
23
25
|
)
|
24
26
|
end
|
25
27
|
|
28
|
+
# [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.
|
29
|
+
# 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).
|
26
30
|
def decline(params = {}, opts = {})
|
27
31
|
request_stripe_object(
|
28
32
|
method: :post,
|
@@ -32,6 +36,8 @@ module Stripe
|
|
32
36
|
)
|
33
37
|
end
|
34
38
|
|
39
|
+
# [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.
|
40
|
+
# 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).
|
35
41
|
def self.approve(authorization, params = {}, opts = {})
|
36
42
|
request_stripe_object(
|
37
43
|
method: :post,
|
@@ -41,6 +47,8 @@ module Stripe
|
|
41
47
|
)
|
42
48
|
end
|
43
49
|
|
50
|
+
# [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.
|
51
|
+
# 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
52
|
def self.decline(authorization, params = {}, opts = {})
|
45
53
|
request_stripe_object(
|
46
54
|
method: :post,
|
@@ -57,6 +65,7 @@ module Stripe
|
|
57
65
|
class TestHelpers < APIResourceTestHelpers
|
58
66
|
RESOURCE_CLASS = Authorization
|
59
67
|
|
68
|
+
# Capture a test-mode authorization.
|
60
69
|
def self.capture(authorization, params = {}, opts = {})
|
61
70
|
request_stripe_object(
|
62
71
|
method: :post,
|
@@ -66,6 +75,7 @@ module Stripe
|
|
66
75
|
)
|
67
76
|
end
|
68
77
|
|
78
|
+
# Create a test-mode authorization.
|
69
79
|
def self.create(params = {}, opts = {})
|
70
80
|
request_stripe_object(
|
71
81
|
method: :post,
|
@@ -75,6 +85,7 @@ module Stripe
|
|
75
85
|
)
|
76
86
|
end
|
77
87
|
|
88
|
+
# Expire a test-mode Authorization.
|
78
89
|
def self.expire(authorization, params = {}, opts = {})
|
79
90
|
request_stripe_object(
|
80
91
|
method: :post,
|
@@ -84,6 +95,7 @@ module Stripe
|
|
84
95
|
)
|
85
96
|
end
|
86
97
|
|
98
|
+
# Increment a test-mode Authorization.
|
87
99
|
def self.increment(authorization, params = {}, opts = {})
|
88
100
|
request_stripe_object(
|
89
101
|
method: :post,
|
@@ -93,6 +105,7 @@ module Stripe
|
|
93
105
|
)
|
94
106
|
end
|
95
107
|
|
108
|
+
# Reverse a test-mode Authorization.
|
96
109
|
def self.reverse(authorization, params = {}, opts = {})
|
97
110
|
request_stripe_object(
|
98
111
|
method: :post,
|
@@ -102,6 +115,7 @@ module Stripe
|
|
102
115
|
)
|
103
116
|
end
|
104
117
|
|
118
|
+
# Capture a test-mode authorization.
|
105
119
|
def capture(params = {}, opts = {})
|
106
120
|
@resource.request_stripe_object(
|
107
121
|
method: :post,
|
@@ -111,6 +125,7 @@ module Stripe
|
|
111
125
|
)
|
112
126
|
end
|
113
127
|
|
128
|
+
# Expire a test-mode Authorization.
|
114
129
|
def expire(params = {}, opts = {})
|
115
130
|
@resource.request_stripe_object(
|
116
131
|
method: :post,
|
@@ -120,6 +135,7 @@ module Stripe
|
|
120
135
|
)
|
121
136
|
end
|
122
137
|
|
138
|
+
# Increment a test-mode Authorization.
|
123
139
|
def increment(params = {}, opts = {})
|
124
140
|
@resource.request_stripe_object(
|
125
141
|
method: :post,
|
@@ -129,6 +145,7 @@ module Stripe
|
|
129
145
|
)
|
130
146
|
end
|
131
147
|
|
148
|
+
# Reverse a test-mode Authorization.
|
132
149
|
def reverse(params = {}, opts = {})
|
133
150
|
@resource.request_stripe_object(
|
134
151
|
method: :post,
|