stripe 10.5.0.pre.beta.1 → 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 +43 -249
- 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 +0 -20
- 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 -3
- data/lib/stripe/resources/identity/verification_session.rb +44 -0
- data/lib/stripe/resources/invoice.rb +20 -21
- 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 -94
- 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 -18
- 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 -54
- 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/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 -46
- metadata +4 -24
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -14
- data/lib/stripe/resources/capital/financing_offer.rb +0 -32
- data/lib/stripe/resources/capital/financing_summary.rb +0 -12
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -13
- data/lib/stripe/resources/confirmation_token.rb +0 -13
- data/lib/stripe/resources/customer_session.rb +0 -12
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -13
- data/lib/stripe/resources/gift_cards/card.rb +0 -25
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -56
- data/lib/stripe/resources/invoice_payment.rb +0 -11
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -69
- data/lib/stripe/resources/issuing/personalization_design.rb +0 -77
- data/lib/stripe/resources/issuing/physical_bundle.rb +0 -13
- data/lib/stripe/resources/margin.rb +0 -14
- data/lib/stripe/resources/order.rb +0 -89
- data/lib/stripe/resources/quote_phase.rb +0 -29
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -42
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -10
- data/lib/stripe/resources/tax/form.rb +0 -39
@@ -30,6 +30,9 @@ module Stripe
|
|
30
30
|
|
31
31
|
OBJECT_NAME = "setup_intent"
|
32
32
|
|
33
|
+
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
|
34
|
+
#
|
35
|
+
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
|
33
36
|
def cancel(params = {}, opts = {})
|
34
37
|
request_stripe_object(
|
35
38
|
method: :post,
|
@@ -39,6 +42,20 @@ module Stripe
|
|
39
42
|
)
|
40
43
|
end
|
41
44
|
|
45
|
+
# Confirm that your customer intends to set up the current or
|
46
|
+
# provided payment method. For example, you would confirm a SetupIntent
|
47
|
+
# when a customer hits the “Save” button on a payment method management
|
48
|
+
# page on your website.
|
49
|
+
#
|
50
|
+
# If the selected payment method does not require any additional
|
51
|
+
# steps from the customer, the SetupIntent will transition to the
|
52
|
+
# succeeded status.
|
53
|
+
#
|
54
|
+
# Otherwise, it will transition to the requires_action status and
|
55
|
+
# suggest additional actions via next_action. If setup fails,
|
56
|
+
# the SetupIntent will transition to the
|
57
|
+
# requires_payment_method status or the canceled status if the
|
58
|
+
# confirmation limit is reached.
|
42
59
|
def confirm(params = {}, opts = {})
|
43
60
|
request_stripe_object(
|
44
61
|
method: :post,
|
@@ -48,6 +65,7 @@ module Stripe
|
|
48
65
|
)
|
49
66
|
end
|
50
67
|
|
68
|
+
# Verifies microdeposits on a SetupIntent object.
|
51
69
|
def verify_microdeposits(params = {}, opts = {})
|
52
70
|
request_stripe_object(
|
53
71
|
method: :post,
|
@@ -57,6 +75,9 @@ module Stripe
|
|
57
75
|
)
|
58
76
|
end
|
59
77
|
|
78
|
+
# You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
|
79
|
+
#
|
80
|
+
# After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error.
|
60
81
|
def self.cancel(intent, params = {}, opts = {})
|
61
82
|
request_stripe_object(
|
62
83
|
method: :post,
|
@@ -66,6 +87,20 @@ module Stripe
|
|
66
87
|
)
|
67
88
|
end
|
68
89
|
|
90
|
+
# Confirm that your customer intends to set up the current or
|
91
|
+
# provided payment method. For example, you would confirm a SetupIntent
|
92
|
+
# when a customer hits the “Save” button on a payment method management
|
93
|
+
# page on your website.
|
94
|
+
#
|
95
|
+
# If the selected payment method does not require any additional
|
96
|
+
# steps from the customer, the SetupIntent will transition to the
|
97
|
+
# succeeded status.
|
98
|
+
#
|
99
|
+
# Otherwise, it will transition to the requires_action status and
|
100
|
+
# suggest additional actions via next_action. If setup fails,
|
101
|
+
# the SetupIntent will transition to the
|
102
|
+
# requires_payment_method status or the canceled status if the
|
103
|
+
# confirmation limit is reached.
|
69
104
|
def self.confirm(intent, params = {}, opts = {})
|
70
105
|
request_stripe_object(
|
71
106
|
method: :post,
|
@@ -75,6 +110,7 @@ module Stripe
|
|
75
110
|
)
|
76
111
|
end
|
77
112
|
|
113
|
+
# Verifies microdeposits on a SetupIntent object.
|
78
114
|
def self.verify_microdeposits(intent, params = {}, opts = {})
|
79
115
|
request_stripe_object(
|
80
116
|
method: :post,
|
@@ -21,6 +21,7 @@ module Stripe
|
|
21
21
|
|
22
22
|
nested_resource_class_methods :source_transaction, operations: %i[retrieve list]
|
23
23
|
|
24
|
+
# Verify a given source.
|
24
25
|
def verify(params = {}, opts = {})
|
25
26
|
request_stripe_object(
|
26
27
|
method: :post,
|
@@ -30,6 +31,7 @@ module Stripe
|
|
30
31
|
)
|
31
32
|
end
|
32
33
|
|
34
|
+
# Verify a given source.
|
33
35
|
def self.verify(source, params = {}, opts = {})
|
34
36
|
request_stripe_object(
|
35
37
|
method: :post,
|
@@ -13,6 +13,11 @@ module Stripe
|
|
13
13
|
|
14
14
|
OBJECT_NAME = "subscription"
|
15
15
|
|
16
|
+
# Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.
|
17
|
+
#
|
18
|
+
# Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
|
19
|
+
#
|
20
|
+
# By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
|
16
21
|
def cancel(params = {}, opts = {})
|
17
22
|
request_stripe_object(
|
18
23
|
method: :delete,
|
@@ -22,6 +27,7 @@ module Stripe
|
|
22
27
|
)
|
23
28
|
end
|
24
29
|
|
30
|
+
# Removes the currently applied discount on a subscription.
|
25
31
|
def delete_discount(params = {}, opts = {})
|
26
32
|
request_stripe_object(
|
27
33
|
method: :delete,
|
@@ -31,6 +37,7 @@ module Stripe
|
|
31
37
|
)
|
32
38
|
end
|
33
39
|
|
40
|
+
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
|
34
41
|
def resume(params = {}, opts = {})
|
35
42
|
request_stripe_object(
|
36
43
|
method: :post,
|
@@ -40,6 +47,11 @@ module Stripe
|
|
40
47
|
)
|
41
48
|
end
|
42
49
|
|
50
|
+
# Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.
|
51
|
+
#
|
52
|
+
# Note, however, that any pending invoice items that you've created will still be charged for at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.
|
53
|
+
#
|
54
|
+
# By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
|
43
55
|
def self.cancel(subscription_exposed_id, params = {}, opts = {})
|
44
56
|
request_stripe_object(
|
45
57
|
method: :delete,
|
@@ -49,6 +61,7 @@ module Stripe
|
|
49
61
|
)
|
50
62
|
end
|
51
63
|
|
64
|
+
# Removes the currently applied discount on a subscription.
|
52
65
|
def self.delete_discount(subscription_exposed_id, params = {}, opts = {})
|
53
66
|
request_stripe_object(
|
54
67
|
method: :delete,
|
@@ -58,6 +71,7 @@ module Stripe
|
|
58
71
|
)
|
59
72
|
end
|
60
73
|
|
74
|
+
# Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
|
61
75
|
def self.resume(subscription, params = {}, opts = {})
|
62
76
|
request_stripe_object(
|
63
77
|
method: :post,
|
@@ -12,15 +12,7 @@ module Stripe
|
|
12
12
|
|
13
13
|
OBJECT_NAME = "subscription_schedule"
|
14
14
|
|
15
|
-
|
16
|
-
request_stripe_object(
|
17
|
-
method: :post,
|
18
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
19
|
-
params: params,
|
20
|
-
opts: opts
|
21
|
-
)
|
22
|
-
end
|
23
|
-
|
15
|
+
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
24
16
|
def cancel(params = {}, opts = {})
|
25
17
|
request_stripe_object(
|
26
18
|
method: :post,
|
@@ -30,6 +22,7 @@ module Stripe
|
|
30
22
|
)
|
31
23
|
end
|
32
24
|
|
25
|
+
# Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
|
33
26
|
def release(params = {}, opts = {})
|
34
27
|
request_stripe_object(
|
35
28
|
method: :post,
|
@@ -39,15 +32,7 @@ module Stripe
|
|
39
32
|
)
|
40
33
|
end
|
41
34
|
|
42
|
-
|
43
|
-
request_stripe_object(
|
44
|
-
method: :post,
|
45
|
-
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
46
|
-
params: params,
|
47
|
-
opts: opts
|
48
|
-
)
|
49
|
-
end
|
50
|
-
|
35
|
+
# Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
|
51
36
|
def self.cancel(schedule, params = {}, opts = {})
|
52
37
|
request_stripe_object(
|
53
38
|
method: :post,
|
@@ -57,6 +42,7 @@ module Stripe
|
|
57
42
|
)
|
58
43
|
end
|
59
44
|
|
45
|
+
# Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
|
60
46
|
def self.release(schedule, params = {}, opts = {})
|
61
47
|
request_stripe_object(
|
62
48
|
method: :post,
|
@@ -11,6 +11,7 @@ module Stripe
|
|
11
11
|
|
12
12
|
OBJECT_NAME = "tax.calculation"
|
13
13
|
|
14
|
+
# Retrieves the line items of a persisted tax calculation as a collection.
|
14
15
|
def list_line_items(params = {}, opts = {})
|
15
16
|
request_stripe_object(
|
16
17
|
method: :get,
|
@@ -20,6 +21,7 @@ module Stripe
|
|
20
21
|
)
|
21
22
|
end
|
22
23
|
|
24
|
+
# Retrieves the line items of a persisted tax calculation as a collection.
|
23
25
|
def self.list_line_items(calculation, params = {}, opts = {})
|
24
26
|
request_stripe_object(
|
25
27
|
method: :get,
|
@@ -9,6 +9,7 @@ module Stripe
|
|
9
9
|
class Transaction < APIResource
|
10
10
|
OBJECT_NAME = "tax.transaction"
|
11
11
|
|
12
|
+
# Retrieves the line items of a committed standalone transaction as a collection.
|
12
13
|
def list_line_items(params = {}, opts = {})
|
13
14
|
request_stripe_object(
|
14
15
|
method: :get,
|
@@ -18,6 +19,7 @@ module Stripe
|
|
18
19
|
)
|
19
20
|
end
|
20
21
|
|
22
|
+
# Creates a Tax Transaction from a calculation.
|
21
23
|
def self.create_from_calculation(params = {}, opts = {})
|
22
24
|
request_stripe_object(
|
23
25
|
method: :post,
|
@@ -27,6 +29,7 @@ module Stripe
|
|
27
29
|
)
|
28
30
|
end
|
29
31
|
|
32
|
+
# Partially or fully reverses a previously created Transaction.
|
30
33
|
def self.create_reversal(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
|
+
# Retrieves the line items of a committed standalone transaction as a collection.
|
39
43
|
def self.list_line_items(transaction, params = {}, opts = {})
|
40
44
|
request_stripe_object(
|
41
45
|
method: :get,
|
@@ -14,6 +14,7 @@ module Stripe
|
|
14
14
|
|
15
15
|
OBJECT_NAME = "terminal.reader"
|
16
16
|
|
17
|
+
# Cancels the current reader action.
|
17
18
|
def cancel_action(params = {}, opts = {})
|
18
19
|
request_stripe_object(
|
19
20
|
method: :post,
|
@@ -23,33 +24,7 @@ module Stripe
|
|
23
24
|
)
|
24
25
|
end
|
25
26
|
|
26
|
-
|
27
|
-
request_stripe_object(
|
28
|
-
method: :post,
|
29
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
|
30
|
-
params: params,
|
31
|
-
opts: opts
|
32
|
-
)
|
33
|
-
end
|
34
|
-
|
35
|
-
def collect_payment_method(params = {}, opts = {})
|
36
|
-
request_stripe_object(
|
37
|
-
method: :post,
|
38
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
|
39
|
-
params: params,
|
40
|
-
opts: opts
|
41
|
-
)
|
42
|
-
end
|
43
|
-
|
44
|
-
def confirm_payment_intent(params = {}, opts = {})
|
45
|
-
request_stripe_object(
|
46
|
-
method: :post,
|
47
|
-
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
|
48
|
-
params: params,
|
49
|
-
opts: opts
|
50
|
-
)
|
51
|
-
end
|
52
|
-
|
27
|
+
# Initiates a payment flow on a Reader.
|
53
28
|
def process_payment_intent(params = {}, opts = {})
|
54
29
|
request_stripe_object(
|
55
30
|
method: :post,
|
@@ -59,6 +34,7 @@ module Stripe
|
|
59
34
|
)
|
60
35
|
end
|
61
36
|
|
37
|
+
# Initiates a setup intent flow on a Reader.
|
62
38
|
def process_setup_intent(params = {}, opts = {})
|
63
39
|
request_stripe_object(
|
64
40
|
method: :post,
|
@@ -68,6 +44,7 @@ module Stripe
|
|
68
44
|
)
|
69
45
|
end
|
70
46
|
|
47
|
+
# Initiates a refund on a Reader
|
71
48
|
def refund_payment(params = {}, opts = {})
|
72
49
|
request_stripe_object(
|
73
50
|
method: :post,
|
@@ -77,6 +54,7 @@ module Stripe
|
|
77
54
|
)
|
78
55
|
end
|
79
56
|
|
57
|
+
# Sets reader display to show cart details.
|
80
58
|
def set_reader_display(params = {}, opts = {})
|
81
59
|
request_stripe_object(
|
82
60
|
method: :post,
|
@@ -86,6 +64,7 @@ module Stripe
|
|
86
64
|
)
|
87
65
|
end
|
88
66
|
|
67
|
+
# Cancels the current reader action.
|
89
68
|
def self.cancel_action(reader, params = {}, opts = {})
|
90
69
|
request_stripe_object(
|
91
70
|
method: :post,
|
@@ -95,33 +74,7 @@ module Stripe
|
|
95
74
|
)
|
96
75
|
end
|
97
76
|
|
98
|
-
|
99
|
-
request_stripe_object(
|
100
|
-
method: :post,
|
101
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
|
102
|
-
params: params,
|
103
|
-
opts: opts
|
104
|
-
)
|
105
|
-
end
|
106
|
-
|
107
|
-
def self.collect_payment_method(reader, params = {}, opts = {})
|
108
|
-
request_stripe_object(
|
109
|
-
method: :post,
|
110
|
-
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
|
111
|
-
params: params,
|
112
|
-
opts: opts
|
113
|
-
)
|
114
|
-
end
|
115
|
-
|
116
|
-
def self.confirm_payment_intent(reader, params = {}, opts = {})
|
117
|
-
request_stripe_object(
|
118
|
-
method: :post,
|
119
|
-
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
|
120
|
-
params: params,
|
121
|
-
opts: opts
|
122
|
-
)
|
123
|
-
end
|
124
|
-
|
77
|
+
# Initiates a payment flow on a Reader.
|
125
78
|
def self.process_payment_intent(reader, params = {}, opts = {})
|
126
79
|
request_stripe_object(
|
127
80
|
method: :post,
|
@@ -131,6 +84,7 @@ module Stripe
|
|
131
84
|
)
|
132
85
|
end
|
133
86
|
|
87
|
+
# Initiates a setup intent flow on a Reader.
|
134
88
|
def self.process_setup_intent(reader, params = {}, opts = {})
|
135
89
|
request_stripe_object(
|
136
90
|
method: :post,
|
@@ -140,6 +94,7 @@ module Stripe
|
|
140
94
|
)
|
141
95
|
end
|
142
96
|
|
97
|
+
# Initiates a refund on a Reader
|
143
98
|
def self.refund_payment(reader, params = {}, opts = {})
|
144
99
|
request_stripe_object(
|
145
100
|
method: :post,
|
@@ -149,6 +104,7 @@ module Stripe
|
|
149
104
|
)
|
150
105
|
end
|
151
106
|
|
107
|
+
# Sets reader display to show cart details.
|
152
108
|
def self.set_reader_display(reader, params = {}, opts = {})
|
153
109
|
request_stripe_object(
|
154
110
|
method: :post,
|
@@ -165,6 +121,7 @@ module Stripe
|
|
165
121
|
class TestHelpers < APIResourceTestHelpers
|
166
122
|
RESOURCE_CLASS = Reader
|
167
123
|
|
124
|
+
# Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
|
168
125
|
def self.present_payment_method(reader, params = {}, opts = {})
|
169
126
|
request_stripe_object(
|
170
127
|
method: :post,
|
@@ -174,6 +131,7 @@ module Stripe
|
|
174
131
|
)
|
175
132
|
end
|
176
133
|
|
134
|
+
# Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
|
177
135
|
def present_payment_method(params = {}, opts = {})
|
178
136
|
@resource.request_stripe_object(
|
179
137
|
method: :post,
|
@@ -13,6 +13,7 @@ module Stripe
|
|
13
13
|
|
14
14
|
OBJECT_NAME = "test_helpers.test_clock"
|
15
15
|
|
16
|
+
# Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
|
16
17
|
def advance(params = {}, opts = {})
|
17
18
|
request_stripe_object(
|
18
19
|
method: :post,
|
@@ -22,6 +23,7 @@ module Stripe
|
|
22
23
|
)
|
23
24
|
end
|
24
25
|
|
26
|
+
# Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
|
25
27
|
def self.advance(test_clock, params = {}, opts = {})
|
26
28
|
request_stripe_object(
|
27
29
|
method: :post,
|
@@ -14,6 +14,7 @@ module Stripe
|
|
14
14
|
|
15
15
|
OBJECT_NAME = "topup"
|
16
16
|
|
17
|
+
# Cancels a top-up. Only pending top-ups can be canceled.
|
17
18
|
def cancel(params = {}, opts = {})
|
18
19
|
request_stripe_object(
|
19
20
|
method: :post,
|
@@ -23,6 +24,7 @@ module Stripe
|
|
23
24
|
)
|
24
25
|
end
|
25
26
|
|
27
|
+
# Cancels a top-up. Only pending top-ups can be canceled.
|
26
28
|
def self.cancel(topup, params = {}, opts = {})
|
27
29
|
request_stripe_object(
|
28
30
|
method: :post,
|
@@ -12,6 +12,7 @@ module Stripe
|
|
12
12
|
|
13
13
|
OBJECT_NAME = "treasury.financial_account"
|
14
14
|
|
15
|
+
# Retrieves Features information associated with the FinancialAccount.
|
15
16
|
def retrieve_features(params = {}, opts = {})
|
16
17
|
request_stripe_object(
|
17
18
|
method: :get,
|
@@ -21,6 +22,7 @@ module Stripe
|
|
21
22
|
)
|
22
23
|
end
|
23
24
|
|
25
|
+
# Updates the Features associated with a FinancialAccount.
|
24
26
|
def update_features(params = {}, opts = {})
|
25
27
|
request_stripe_object(
|
26
28
|
method: :post,
|
@@ -30,6 +32,7 @@ module Stripe
|
|
30
32
|
)
|
31
33
|
end
|
32
34
|
|
35
|
+
# Retrieves Features information associated with the FinancialAccount.
|
33
36
|
def self.retrieve_features(financial_account, 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
|
+
# Updates the Features associated with a FinancialAccount.
|
42
46
|
def self.update_features(financial_account, params = {}, opts = {})
|
43
47
|
request_stripe_object(
|
44
48
|
method: :post,
|
@@ -10,6 +10,7 @@ module Stripe
|
|
10
10
|
|
11
11
|
OBJECT_NAME = "treasury.inbound_transfer"
|
12
12
|
|
13
|
+
# Cancels an InboundTransfer.
|
13
14
|
def cancel(params = {}, opts = {})
|
14
15
|
request_stripe_object(
|
15
16
|
method: :post,
|
@@ -19,6 +20,7 @@ module Stripe
|
|
19
20
|
)
|
20
21
|
end
|
21
22
|
|
23
|
+
# Cancels an InboundTransfer.
|
22
24
|
def self.cancel(inbound_transfer, params = {}, opts = {})
|
23
25
|
request_stripe_object(
|
24
26
|
method: :post,
|
@@ -35,6 +37,7 @@ module Stripe
|
|
35
37
|
class TestHelpers < APIResourceTestHelpers
|
36
38
|
RESOURCE_CLASS = InboundTransfer
|
37
39
|
|
40
|
+
# Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
|
38
41
|
def self.fail(id, params = {}, opts = {})
|
39
42
|
request_stripe_object(
|
40
43
|
method: :post,
|
@@ -44,6 +47,7 @@ module Stripe
|
|
44
47
|
)
|
45
48
|
end
|
46
49
|
|
50
|
+
# Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
|
47
51
|
def self.return_inbound_transfer(id, params = {}, opts = {})
|
48
52
|
request_stripe_object(
|
49
53
|
method: :post,
|
@@ -53,6 +57,7 @@ module Stripe
|
|
53
57
|
)
|
54
58
|
end
|
55
59
|
|
60
|
+
# Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
|
56
61
|
def self.succeed(id, params = {}, opts = {})
|
57
62
|
request_stripe_object(
|
58
63
|
method: :post,
|
@@ -62,6 +67,7 @@ module Stripe
|
|
62
67
|
)
|
63
68
|
end
|
64
69
|
|
70
|
+
# Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
|
65
71
|
def fail(params = {}, opts = {})
|
66
72
|
@resource.request_stripe_object(
|
67
73
|
method: :post,
|
@@ -71,6 +77,7 @@ module Stripe
|
|
71
77
|
)
|
72
78
|
end
|
73
79
|
|
80
|
+
# Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
|
74
81
|
def return_inbound_transfer(params = {}, opts = {})
|
75
82
|
@resource.request_stripe_object(
|
76
83
|
method: :post,
|
@@ -80,6 +87,7 @@ module Stripe
|
|
80
87
|
)
|
81
88
|
end
|
82
89
|
|
90
|
+
# Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
|
83
91
|
def succeed(params = {}, opts = {})
|
84
92
|
@resource.request_stripe_object(
|
85
93
|
method: :post,
|
@@ -12,6 +12,7 @@ module Stripe
|
|
12
12
|
|
13
13
|
OBJECT_NAME = "treasury.outbound_payment"
|
14
14
|
|
15
|
+
# Cancel an OutboundPayment.
|
15
16
|
def cancel(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
|
+
# Cancel an OutboundPayment.
|
24
26
|
def self.cancel(id, params = {}, opts = {})
|
25
27
|
request_stripe_object(
|
26
28
|
method: :post,
|
@@ -37,6 +39,7 @@ module Stripe
|
|
37
39
|
class TestHelpers < APIResourceTestHelpers
|
38
40
|
RESOURCE_CLASS = OutboundPayment
|
39
41
|
|
42
|
+
# Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
|
40
43
|
def self.fail(id, params = {}, opts = {})
|
41
44
|
request_stripe_object(
|
42
45
|
method: :post,
|
@@ -46,6 +49,7 @@ module Stripe
|
|
46
49
|
)
|
47
50
|
end
|
48
51
|
|
52
|
+
# Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
|
49
53
|
def self.post(id, params = {}, opts = {})
|
50
54
|
request_stripe_object(
|
51
55
|
method: :post,
|
@@ -55,6 +59,7 @@ module Stripe
|
|
55
59
|
)
|
56
60
|
end
|
57
61
|
|
62
|
+
# Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
|
58
63
|
def self.return_outbound_payment(id, params = {}, opts = {})
|
59
64
|
request_stripe_object(
|
60
65
|
method: :post,
|
@@ -64,6 +69,7 @@ module Stripe
|
|
64
69
|
)
|
65
70
|
end
|
66
71
|
|
72
|
+
# Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
|
67
73
|
def fail(params = {}, opts = {})
|
68
74
|
@resource.request_stripe_object(
|
69
75
|
method: :post,
|
@@ -73,6 +79,7 @@ module Stripe
|
|
73
79
|
)
|
74
80
|
end
|
75
81
|
|
82
|
+
# Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
|
76
83
|
def post(params = {}, opts = {})
|
77
84
|
@resource.request_stripe_object(
|
78
85
|
method: :post,
|
@@ -82,6 +89,7 @@ module Stripe
|
|
82
89
|
)
|
83
90
|
end
|
84
91
|
|
92
|
+
# Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
|
85
93
|
def return_outbound_payment(params = {}, opts = {})
|
86
94
|
@resource.request_stripe_object(
|
87
95
|
method: :post,
|
@@ -12,6 +12,7 @@ module Stripe
|
|
12
12
|
|
13
13
|
OBJECT_NAME = "treasury.outbound_transfer"
|
14
14
|
|
15
|
+
# An OutboundTransfer can be canceled if the funds have not yet been paid out.
|
15
16
|
def cancel(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
|
+
# An OutboundTransfer can be canceled if the funds have not yet been paid out.
|
24
26
|
def self.cancel(outbound_transfer, params = {}, opts = {})
|
25
27
|
request_stripe_object(
|
26
28
|
method: :post,
|
@@ -37,6 +39,7 @@ module Stripe
|
|
37
39
|
class TestHelpers < APIResourceTestHelpers
|
38
40
|
RESOURCE_CLASS = OutboundTransfer
|
39
41
|
|
42
|
+
# Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
|
40
43
|
def self.fail(outbound_transfer, params = {}, opts = {})
|
41
44
|
request_stripe_object(
|
42
45
|
method: :post,
|
@@ -46,6 +49,7 @@ module Stripe
|
|
46
49
|
)
|
47
50
|
end
|
48
51
|
|
52
|
+
# Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
|
49
53
|
def self.post(outbound_transfer, params = {}, opts = {})
|
50
54
|
request_stripe_object(
|
51
55
|
method: :post,
|
@@ -55,6 +59,7 @@ module Stripe
|
|
55
59
|
)
|
56
60
|
end
|
57
61
|
|
62
|
+
# Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
|
58
63
|
def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {})
|
59
64
|
request_stripe_object(
|
60
65
|
method: :post,
|
@@ -64,6 +69,7 @@ module Stripe
|
|
64
69
|
)
|
65
70
|
end
|
66
71
|
|
72
|
+
# Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
|
67
73
|
def fail(params = {}, opts = {})
|
68
74
|
@resource.request_stripe_object(
|
69
75
|
method: :post,
|
@@ -73,6 +79,7 @@ module Stripe
|
|
73
79
|
)
|
74
80
|
end
|
75
81
|
|
82
|
+
# Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
|
76
83
|
def post(params = {}, opts = {})
|
77
84
|
@resource.request_stripe_object(
|
78
85
|
method: :post,
|
@@ -82,6 +89,7 @@ module Stripe
|
|
82
89
|
)
|
83
90
|
end
|
84
91
|
|
92
|
+
# Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
|
85
93
|
def return_outbound_transfer(params = {}, opts = {})
|
86
94
|
@resource.request_stripe_object(
|
87
95
|
method: :post,
|
@@ -16,6 +16,7 @@ module Stripe
|
|
16
16
|
class TestHelpers < APIResourceTestHelpers
|
17
17
|
RESOURCE_CLASS = ReceivedCredit
|
18
18
|
|
19
|
+
# Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
|
19
20
|
def self.create(params = {}, opts = {})
|
20
21
|
request_stripe_object(
|
21
22
|
method: :post,
|
@@ -16,6 +16,7 @@ module Stripe
|
|
16
16
|
class TestHelpers < APIResourceTestHelpers
|
17
17
|
RESOURCE_CLASS = ReceivedDebit
|
18
18
|
|
19
|
+
# Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
|
19
20
|
def self.create(params = {}, opts = {})
|
20
21
|
request_stripe_object(
|
21
22
|
method: :post,
|