stripe 6.3.0 → 6.4.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 +11 -0
- data/Makefile +1 -1
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_operations/create.rb +6 -2
- data/lib/stripe/api_operations/delete.rb +12 -7
- data/lib/stripe/api_operations/list.rb +6 -9
- data/lib/stripe/api_operations/nested_resource.rb +62 -34
- data/lib/stripe/api_operations/request.rb +10 -0
- data/lib/stripe/api_operations/save.rb +6 -3
- data/lib/stripe/api_operations/search.rb +6 -9
- data/lib/stripe/api_resource.rb +1 -1
- data/lib/stripe/resources/account.rb +28 -8
- data/lib/stripe/resources/apps/secret.rb +10 -12
- data/lib/stripe/resources/charge.rb +10 -3
- data/lib/stripe/resources/checkout/session.rb +10 -3
- data/lib/stripe/resources/credit_note.rb +22 -7
- data/lib/stripe/resources/customer.rb +66 -25
- data/lib/stripe/resources/dispute.rb +10 -3
- data/lib/stripe/resources/financial_connections/account.rb +30 -7
- data/lib/stripe/resources/identity/verification_session.rb +20 -5
- data/lib/stripe/resources/invoice.rb +62 -15
- data/lib/stripe/resources/issuing/authorization.rb +20 -5
- data/lib/stripe/resources/issuing/card.rb +10 -3
- data/lib/stripe/resources/issuing/dispute.rb +10 -3
- data/lib/stripe/resources/order.rb +40 -9
- data/lib/stripe/resources/payment_intent.rb +60 -13
- data/lib/stripe/resources/payment_link.rb +10 -3
- data/lib/stripe/resources/payment_method.rb +20 -5
- data/lib/stripe/resources/payout.rb +20 -5
- data/lib/stripe/resources/quote.rb +50 -11
- data/lib/stripe/resources/refund.rb +19 -5
- data/lib/stripe/resources/review.rb +10 -3
- data/lib/stripe/resources/setup_intent.rb +30 -7
- data/lib/stripe/resources/source.rb +16 -6
- data/lib/stripe/resources/subscription.rb +10 -3
- data/lib/stripe/resources/subscription_item.rb +6 -2
- data/lib/stripe/resources/subscription_schedule.rb +20 -5
- data/lib/stripe/resources/terminal/reader.rb +49 -11
- data/lib/stripe/resources/test_helpers/test_clock.rb +10 -3
- data/lib/stripe/resources/topup.rb +10 -3
- data/lib/stripe/resources/transfer.rb +10 -3
- data/lib/stripe/resources/treasury/financial_account.rb +20 -5
- data/lib/stripe/resources/treasury/inbound_transfer.rb +39 -9
- data/lib/stripe/resources/treasury/outbound_payment.rb +39 -9
- data/lib/stripe/resources/treasury/outbound_transfer.rb +43 -9
- data/lib/stripe/resources/treasury/received_credit.rb +5 -6
- data/lib/stripe/resources/treasury/received_debit.rb +5 -6
- data/lib/stripe/util.rb +29 -3
- data/lib/stripe/version.rb +1 -1
- metadata +2 -2
@@ -9,16 +9,10 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "quote"
|
11
11
|
|
12
|
-
custom_method :accept, http_verb: :post
|
13
|
-
custom_method :cancel, http_verb: :post
|
14
|
-
custom_method :finalize_quote, http_verb: :post, http_path: "finalize"
|
15
|
-
custom_method :list_computed_upfront_line_items, http_verb: :get, http_path: "computed_upfront_line_items"
|
16
|
-
custom_method :list_line_items, http_verb: :get, http_path: "line_items"
|
17
|
-
|
18
12
|
def accept(params = {}, opts = {})
|
19
13
|
request_stripe_object(
|
20
14
|
method: :post,
|
21
|
-
path:
|
15
|
+
path: format("/v1/quotes/%<quote>s/accept", { quote: CGI.escape(self["id"]) }),
|
22
16
|
params: params,
|
23
17
|
opts: opts
|
24
18
|
)
|
@@ -27,7 +21,7 @@ module Stripe
|
|
27
21
|
def cancel(params = {}, opts = {})
|
28
22
|
request_stripe_object(
|
29
23
|
method: :post,
|
30
|
-
path:
|
24
|
+
path: format("/v1/quotes/%<quote>s/cancel", { quote: CGI.escape(self["id"]) }),
|
31
25
|
params: params,
|
32
26
|
opts: opts
|
33
27
|
)
|
@@ -36,7 +30,7 @@ module Stripe
|
|
36
30
|
def finalize_quote(params = {}, opts = {})
|
37
31
|
request_stripe_object(
|
38
32
|
method: :post,
|
39
|
-
path:
|
33
|
+
path: format("/v1/quotes/%<quote>s/finalize", { quote: CGI.escape(self["id"]) }),
|
40
34
|
params: params,
|
41
35
|
opts: opts
|
42
36
|
)
|
@@ -45,7 +39,7 @@ module Stripe
|
|
45
39
|
def list_computed_upfront_line_items(params = {}, opts = {})
|
46
40
|
request_stripe_object(
|
47
41
|
method: :get,
|
48
|
-
path:
|
42
|
+
path: format("/v1/quotes/%<quote>s/computed_upfront_line_items", { quote: CGI.escape(self["id"]) }),
|
49
43
|
params: params,
|
50
44
|
opts: opts
|
51
45
|
)
|
@@ -54,7 +48,52 @@ module Stripe
|
|
54
48
|
def list_line_items(params = {}, opts = {})
|
55
49
|
request_stripe_object(
|
56
50
|
method: :get,
|
57
|
-
path:
|
51
|
+
path: format("/v1/quotes/%<quote>s/line_items", { quote: CGI.escape(self["id"]) }),
|
52
|
+
params: params,
|
53
|
+
opts: opts
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.accept(quote, params = {}, opts = {})
|
58
|
+
request_stripe_object(
|
59
|
+
method: :post,
|
60
|
+
path: format("/v1/quotes/%<quote>s/accept", { quote: CGI.escape(quote) }),
|
61
|
+
params: params,
|
62
|
+
opts: opts
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
66
|
+
def self.cancel(quote, params = {}, opts = {})
|
67
|
+
request_stripe_object(
|
68
|
+
method: :post,
|
69
|
+
path: format("/v1/quotes/%<quote>s/cancel", { quote: CGI.escape(quote) }),
|
70
|
+
params: params,
|
71
|
+
opts: opts
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.finalize_quote(quote, params = {}, opts = {})
|
76
|
+
request_stripe_object(
|
77
|
+
method: :post,
|
78
|
+
path: format("/v1/quotes/%<quote>s/finalize", { quote: CGI.escape(quote) }),
|
79
|
+
params: params,
|
80
|
+
opts: opts
|
81
|
+
)
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.list_computed_upfront_line_items(quote, params = {}, opts = {})
|
85
|
+
request_stripe_object(
|
86
|
+
method: :get,
|
87
|
+
path: format("/v1/quotes/%<quote>s/computed_upfront_line_items", { quote: CGI.escape(quote) }),
|
88
|
+
params: params,
|
89
|
+
opts: opts
|
90
|
+
)
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.list_line_items(quote, params = {}, opts = {})
|
94
|
+
request_stripe_object(
|
95
|
+
method: :get,
|
96
|
+
path: format("/v1/quotes/%<quote>s/line_items", { quote: CGI.escape(quote) }),
|
58
97
|
params: params,
|
59
98
|
opts: opts
|
60
99
|
)
|
@@ -9,12 +9,19 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "refund"
|
11
11
|
|
12
|
-
custom_method :cancel, http_verb: :post
|
13
|
-
|
14
12
|
def cancel(params = {}, opts = {})
|
15
13
|
request_stripe_object(
|
16
14
|
method: :post,
|
17
|
-
path:
|
15
|
+
path: format("/v1/refunds/%<refund>s/cancel", { refund: CGI.escape(self["id"]) }),
|
16
|
+
params: params,
|
17
|
+
opts: opts
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.cancel(refund, params = {}, opts = {})
|
22
|
+
request_stripe_object(
|
23
|
+
method: :post,
|
24
|
+
path: format("/v1/refunds/%<refund>s/cancel", { refund: CGI.escape(refund) }),
|
18
25
|
params: params,
|
19
26
|
opts: opts
|
20
27
|
)
|
@@ -27,12 +34,19 @@ module Stripe
|
|
27
34
|
class TestHelpers < APIResourceTestHelpers
|
28
35
|
RESOURCE_CLASS = Refund
|
29
36
|
|
30
|
-
|
37
|
+
def self.expire(refund, params = {}, opts = {})
|
38
|
+
request_stripe_object(
|
39
|
+
method: :post,
|
40
|
+
path: format("/v1/test_helpers/refunds/%<refund>s/expire", { refund: CGI.escape(refund) }),
|
41
|
+
params: params,
|
42
|
+
opts: opts
|
43
|
+
)
|
44
|
+
end
|
31
45
|
|
32
46
|
def expire(params = {}, opts = {})
|
33
47
|
@resource.request_stripe_object(
|
34
48
|
method: :post,
|
35
|
-
path:
|
49
|
+
path: format("/v1/test_helpers/refunds/%<refund>s/expire", { refund: CGI.escape(@resource["id"]) }),
|
36
50
|
params: params,
|
37
51
|
opts: opts
|
38
52
|
)
|
@@ -7,12 +7,19 @@ module Stripe
|
|
7
7
|
|
8
8
|
OBJECT_NAME = "review"
|
9
9
|
|
10
|
-
custom_method :approve, http_verb: :post
|
11
|
-
|
12
10
|
def approve(params = {}, opts = {})
|
13
11
|
request_stripe_object(
|
14
12
|
method: :post,
|
15
|
-
path:
|
13
|
+
path: format("/v1/reviews/%<review>s/approve", { review: CGI.escape(self["id"]) }),
|
14
|
+
params: params,
|
15
|
+
opts: opts
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.approve(review, params = {}, opts = {})
|
20
|
+
request_stripe_object(
|
21
|
+
method: :post,
|
22
|
+
path: format("/v1/reviews/%<review>s/approve", { review: CGI.escape(review) }),
|
16
23
|
params: params,
|
17
24
|
opts: opts
|
18
25
|
)
|
@@ -9,14 +9,10 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "setup_intent"
|
11
11
|
|
12
|
-
custom_method :cancel, http_verb: :post
|
13
|
-
custom_method :confirm, http_verb: :post
|
14
|
-
custom_method :verify_microdeposits, http_verb: :post
|
15
|
-
|
16
12
|
def cancel(params = {}, opts = {})
|
17
13
|
request_stripe_object(
|
18
14
|
method: :post,
|
19
|
-
path:
|
15
|
+
path: format("/v1/setup_intents/%<intent>s/cancel", { intent: CGI.escape(self["id"]) }),
|
20
16
|
params: params,
|
21
17
|
opts: opts
|
22
18
|
)
|
@@ -25,7 +21,7 @@ module Stripe
|
|
25
21
|
def confirm(params = {}, opts = {})
|
26
22
|
request_stripe_object(
|
27
23
|
method: :post,
|
28
|
-
path:
|
24
|
+
path: format("/v1/setup_intents/%<intent>s/confirm", { intent: CGI.escape(self["id"]) }),
|
29
25
|
params: params,
|
30
26
|
opts: opts
|
31
27
|
)
|
@@ -34,7 +30,34 @@ module Stripe
|
|
34
30
|
def verify_microdeposits(params = {}, opts = {})
|
35
31
|
request_stripe_object(
|
36
32
|
method: :post,
|
37
|
-
path:
|
33
|
+
path: format("/v1/setup_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(self["id"]) }),
|
34
|
+
params: params,
|
35
|
+
opts: opts
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.cancel(intent, params = {}, opts = {})
|
40
|
+
request_stripe_object(
|
41
|
+
method: :post,
|
42
|
+
path: format("/v1/setup_intents/%<intent>s/cancel", { intent: CGI.escape(intent) }),
|
43
|
+
params: params,
|
44
|
+
opts: opts
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.confirm(intent, params = {}, opts = {})
|
49
|
+
request_stripe_object(
|
50
|
+
method: :post,
|
51
|
+
path: format("/v1/setup_intents/%<intent>s/confirm", { intent: CGI.escape(intent) }),
|
52
|
+
params: params,
|
53
|
+
opts: opts
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.verify_microdeposits(intent, params = {}, opts = {})
|
58
|
+
request_stripe_object(
|
59
|
+
method: :post,
|
60
|
+
path: format("/v1/setup_intents/%<intent>s/verify_microdeposits", { intent: CGI.escape(intent) }),
|
38
61
|
params: params,
|
39
62
|
opts: opts
|
40
63
|
)
|
@@ -9,15 +9,22 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "source"
|
11
11
|
|
12
|
-
custom_method :verify, http_verb: :post
|
13
|
-
|
14
12
|
nested_resource_class_methods :source_transaction,
|
15
13
|
operations: %i[retrieve list]
|
16
14
|
|
17
15
|
def verify(params = {}, opts = {})
|
18
16
|
request_stripe_object(
|
19
17
|
method: :post,
|
20
|
-
path:
|
18
|
+
path: format("/v1/sources/%<source>s/verify", { source: CGI.escape(self["id"]) }),
|
19
|
+
params: params,
|
20
|
+
opts: opts
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.verify(source, params = {}, opts = {})
|
25
|
+
request_stripe_object(
|
26
|
+
method: :post,
|
27
|
+
path: format("/v1/sources/%<source>s/verify", { source: CGI.escape(source) }),
|
21
28
|
params: params,
|
22
29
|
opts: opts
|
23
30
|
)
|
@@ -37,9 +44,12 @@ module Stripe
|
|
37
44
|
end
|
38
45
|
|
39
46
|
def source_transactions(params = {}, opts = {})
|
40
|
-
|
41
|
-
|
42
|
-
|
47
|
+
request_stripe_object(
|
48
|
+
method: :get,
|
49
|
+
path: resource_url + "/source_transactions",
|
50
|
+
params: params,
|
51
|
+
opts: opts
|
52
|
+
)
|
43
53
|
end
|
44
54
|
extend Gem::Deprecate
|
45
55
|
deprecate :source_transactions, :"Source.list_source_transactions", 2020, 1
|
@@ -11,12 +11,19 @@ module Stripe
|
|
11
11
|
|
12
12
|
OBJECT_NAME = "subscription"
|
13
13
|
|
14
|
-
custom_method :delete_discount, http_verb: :delete, http_path: "discount"
|
15
|
-
|
16
14
|
def delete_discount(params = {}, opts = {})
|
17
15
|
request_stripe_object(
|
18
16
|
method: :delete,
|
19
|
-
path:
|
17
|
+
path: format("/v1/subscriptions/%<subscription_exposed_id>s/discount", { subscription_exposed_id: CGI.escape(self["id"]) }),
|
18
|
+
params: params,
|
19
|
+
opts: opts
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.delete_discount(subscription_exposed_id, params = {}, opts = {})
|
24
|
+
request_stripe_object(
|
25
|
+
method: :delete,
|
26
|
+
path: format("/v1/subscriptions/%<subscription_exposed_id>s/discount", { subscription_exposed_id: CGI.escape(subscription_exposed_id) }),
|
20
27
|
params: params,
|
21
28
|
opts: opts
|
22
29
|
)
|
@@ -17,8 +17,12 @@ module Stripe
|
|
17
17
|
resource_plural: "usage_record_summaries"
|
18
18
|
|
19
19
|
def usage_record_summaries(params = {}, opts = {})
|
20
|
-
|
21
|
-
|
20
|
+
request_stripe_object(
|
21
|
+
method: :get,
|
22
|
+
path: resource_url + "/usage_record_summaries",
|
23
|
+
params: params,
|
24
|
+
opts: opts
|
25
|
+
)
|
22
26
|
end
|
23
27
|
extend Gem::Deprecate
|
24
28
|
deprecate :usage_record_summaries, :"SubscriptionItem.list_usage_record_summaries", 2020, 1
|
@@ -9,13 +9,10 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "subscription_schedule"
|
11
11
|
|
12
|
-
custom_method :cancel, http_verb: :post
|
13
|
-
custom_method :release, http_verb: :post
|
14
|
-
|
15
12
|
def cancel(params = {}, opts = {})
|
16
13
|
request_stripe_object(
|
17
14
|
method: :post,
|
18
|
-
path:
|
15
|
+
path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(self["id"]) }),
|
19
16
|
params: params,
|
20
17
|
opts: opts
|
21
18
|
)
|
@@ -24,7 +21,25 @@ module Stripe
|
|
24
21
|
def release(params = {}, opts = {})
|
25
22
|
request_stripe_object(
|
26
23
|
method: :post,
|
27
|
-
path:
|
24
|
+
path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(self["id"]) }),
|
25
|
+
params: params,
|
26
|
+
opts: opts
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.cancel(schedule, params = {}, opts = {})
|
31
|
+
request_stripe_object(
|
32
|
+
method: :post,
|
33
|
+
path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(schedule) }),
|
34
|
+
params: params,
|
35
|
+
opts: opts
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.release(schedule, params = {}, opts = {})
|
40
|
+
request_stripe_object(
|
41
|
+
method: :post,
|
42
|
+
path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(schedule) }),
|
28
43
|
params: params,
|
29
44
|
opts: opts
|
30
45
|
)
|
@@ -11,15 +11,10 @@ module Stripe
|
|
11
11
|
|
12
12
|
OBJECT_NAME = "terminal.reader"
|
13
13
|
|
14
|
-
custom_method :cancel_action, http_verb: :post
|
15
|
-
custom_method :process_payment_intent, http_verb: :post
|
16
|
-
custom_method :process_setup_intent, http_verb: :post
|
17
|
-
custom_method :set_reader_display, http_verb: :post
|
18
|
-
|
19
14
|
def cancel_action(params = {}, opts = {})
|
20
15
|
request_stripe_object(
|
21
16
|
method: :post,
|
22
|
-
path:
|
17
|
+
path: format("/v1/terminal/readers/%<reader>s/cancel_action", { reader: CGI.escape(self["id"]) }),
|
23
18
|
params: params,
|
24
19
|
opts: opts
|
25
20
|
)
|
@@ -28,7 +23,7 @@ module Stripe
|
|
28
23
|
def process_payment_intent(params = {}, opts = {})
|
29
24
|
request_stripe_object(
|
30
25
|
method: :post,
|
31
|
-
path:
|
26
|
+
path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(self["id"]) }),
|
32
27
|
params: params,
|
33
28
|
opts: opts
|
34
29
|
)
|
@@ -37,7 +32,7 @@ module Stripe
|
|
37
32
|
def process_setup_intent(params = {}, opts = {})
|
38
33
|
request_stripe_object(
|
39
34
|
method: :post,
|
40
|
-
path:
|
35
|
+
path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(self["id"]) }),
|
41
36
|
params: params,
|
42
37
|
opts: opts
|
43
38
|
)
|
@@ -46,7 +41,43 @@ module Stripe
|
|
46
41
|
def set_reader_display(params = {}, opts = {})
|
47
42
|
request_stripe_object(
|
48
43
|
method: :post,
|
49
|
-
path:
|
44
|
+
path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(self["id"]) }),
|
45
|
+
params: params,
|
46
|
+
opts: opts
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.cancel_action(reader, params = {}, opts = {})
|
51
|
+
request_stripe_object(
|
52
|
+
method: :post,
|
53
|
+
path: format("/v1/terminal/readers/%<reader>s/cancel_action", { reader: CGI.escape(reader) }),
|
54
|
+
params: params,
|
55
|
+
opts: opts
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.process_payment_intent(reader, params = {}, opts = {})
|
60
|
+
request_stripe_object(
|
61
|
+
method: :post,
|
62
|
+
path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(reader) }),
|
63
|
+
params: params,
|
64
|
+
opts: opts
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.process_setup_intent(reader, params = {}, opts = {})
|
69
|
+
request_stripe_object(
|
70
|
+
method: :post,
|
71
|
+
path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(reader) }),
|
72
|
+
params: params,
|
73
|
+
opts: opts
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.set_reader_display(reader, params = {}, opts = {})
|
78
|
+
request_stripe_object(
|
79
|
+
method: :post,
|
80
|
+
path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(reader) }),
|
50
81
|
params: params,
|
51
82
|
opts: opts
|
52
83
|
)
|
@@ -59,12 +90,19 @@ module Stripe
|
|
59
90
|
class TestHelpers < APIResourceTestHelpers
|
60
91
|
RESOURCE_CLASS = Reader
|
61
92
|
|
62
|
-
|
93
|
+
def self.present_payment_method(reader, params = {}, opts = {})
|
94
|
+
request_stripe_object(
|
95
|
+
method: :post,
|
96
|
+
path: format("/v1/test_helpers/terminal/readers/%<reader>s/present_payment_method", { reader: CGI.escape(reader) }),
|
97
|
+
params: params,
|
98
|
+
opts: opts
|
99
|
+
)
|
100
|
+
end
|
63
101
|
|
64
102
|
def present_payment_method(params = {}, opts = {})
|
65
103
|
@resource.request_stripe_object(
|
66
104
|
method: :post,
|
67
|
-
path:
|
105
|
+
path: format("/v1/test_helpers/terminal/readers/%<reader>s/present_payment_method", { reader: CGI.escape(@resource["id"]) }),
|
68
106
|
params: params,
|
69
107
|
opts: opts
|
70
108
|
)
|
@@ -10,12 +10,19 @@ module Stripe
|
|
10
10
|
|
11
11
|
OBJECT_NAME = "test_helpers.test_clock"
|
12
12
|
|
13
|
-
custom_method :advance, http_verb: :post
|
14
|
-
|
15
13
|
def advance(params = {}, opts = {})
|
16
14
|
request_stripe_object(
|
17
15
|
method: :post,
|
18
|
-
path:
|
16
|
+
path: format("/v1/test_helpers/test_clocks/%<test_clock>s/advance", { test_clock: CGI.escape(self["id"]) }),
|
17
|
+
params: params,
|
18
|
+
opts: opts
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.advance(test_clock, params = {}, opts = {})
|
23
|
+
request_stripe_object(
|
24
|
+
method: :post,
|
25
|
+
path: format("/v1/test_helpers/test_clocks/%<test_clock>s/advance", { test_clock: CGI.escape(test_clock) }),
|
19
26
|
params: params,
|
20
27
|
opts: opts
|
21
28
|
)
|
@@ -9,12 +9,19 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "topup"
|
11
11
|
|
12
|
-
custom_method :cancel, http_verb: :post
|
13
|
-
|
14
12
|
def cancel(params = {}, opts = {})
|
15
13
|
request_stripe_object(
|
16
14
|
method: :post,
|
17
|
-
path:
|
15
|
+
path: format("/v1/topups/%<topup>s/cancel", { topup: CGI.escape(self["id"]) }),
|
16
|
+
params: params,
|
17
|
+
opts: opts
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.cancel(topup, params = {}, opts = {})
|
22
|
+
request_stripe_object(
|
23
|
+
method: :post,
|
24
|
+
path: format("/v1/topups/%<topup>s/cancel", { topup: CGI.escape(topup) }),
|
18
25
|
params: params,
|
19
26
|
opts: opts
|
20
27
|
)
|
@@ -10,15 +10,22 @@ module Stripe
|
|
10
10
|
|
11
11
|
OBJECT_NAME = "transfer"
|
12
12
|
|
13
|
-
custom_method :cancel, http_verb: :post
|
14
|
-
|
15
13
|
nested_resource_class_methods :reversal,
|
16
14
|
operations: %i[create retrieve update list]
|
17
15
|
|
18
16
|
def cancel(params = {}, opts = {})
|
19
17
|
request_stripe_object(
|
20
18
|
method: :post,
|
21
|
-
path:
|
19
|
+
path: format("/v1/transfers/%<id>s/cancel", { id: CGI.escape(self["id"]) }),
|
20
|
+
params: params,
|
21
|
+
opts: opts
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.cancel(id, params = {}, opts = {})
|
26
|
+
request_stripe_object(
|
27
|
+
method: :post,
|
28
|
+
path: format("/v1/transfers/%<id>s/cancel", { id: CGI.escape(id) }),
|
22
29
|
params: params,
|
23
30
|
opts: opts
|
24
31
|
)
|
@@ -10,13 +10,10 @@ module Stripe
|
|
10
10
|
|
11
11
|
OBJECT_NAME = "treasury.financial_account"
|
12
12
|
|
13
|
-
custom_method :retrieve_features, http_verb: :get, http_path: "features"
|
14
|
-
custom_method :update_features, http_verb: :post, http_path: "features"
|
15
|
-
|
16
13
|
def retrieve_features(params = {}, opts = {})
|
17
14
|
request_stripe_object(
|
18
15
|
method: :get,
|
19
|
-
path:
|
16
|
+
path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }),
|
20
17
|
params: params,
|
21
18
|
opts: opts
|
22
19
|
)
|
@@ -25,7 +22,25 @@ module Stripe
|
|
25
22
|
def update_features(params = {}, opts = {})
|
26
23
|
request_stripe_object(
|
27
24
|
method: :post,
|
28
|
-
path:
|
25
|
+
path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }),
|
26
|
+
params: params,
|
27
|
+
opts: opts
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.retrieve_features(financial_account, params = {}, opts = {})
|
32
|
+
request_stripe_object(
|
33
|
+
method: :get,
|
34
|
+
path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(financial_account) }),
|
35
|
+
params: params,
|
36
|
+
opts: opts
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.update_features(financial_account, params = {}, opts = {})
|
41
|
+
request_stripe_object(
|
42
|
+
method: :post,
|
43
|
+
path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(financial_account) }),
|
29
44
|
params: params,
|
30
45
|
opts: opts
|
31
46
|
)
|
@@ -9,12 +9,19 @@ module Stripe
|
|
9
9
|
|
10
10
|
OBJECT_NAME = "treasury.inbound_transfer"
|
11
11
|
|
12
|
-
custom_method :cancel, http_verb: :post
|
13
|
-
|
14
12
|
def cancel(params = {}, opts = {})
|
15
13
|
request_stripe_object(
|
16
14
|
method: :post,
|
17
|
-
path:
|
15
|
+
path: format("/v1/treasury/inbound_transfers/%<inbound_transfer>s/cancel", { inbound_transfer: CGI.escape(self["id"]) }),
|
16
|
+
params: params,
|
17
|
+
opts: opts
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.cancel(inbound_transfer, params = {}, opts = {})
|
22
|
+
request_stripe_object(
|
23
|
+
method: :post,
|
24
|
+
path: format("/v1/treasury/inbound_transfers/%<inbound_transfer>s/cancel", { inbound_transfer: CGI.escape(inbound_transfer) }),
|
18
25
|
params: params,
|
19
26
|
opts: opts
|
20
27
|
)
|
@@ -27,14 +34,37 @@ module Stripe
|
|
27
34
|
class TestHelpers < APIResourceTestHelpers
|
28
35
|
RESOURCE_CLASS = InboundTransfer
|
29
36
|
|
30
|
-
|
31
|
-
|
32
|
-
|
37
|
+
def self.fail(id, params = {}, opts = {})
|
38
|
+
request_stripe_object(
|
39
|
+
method: :post,
|
40
|
+
path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/fail", { id: CGI.escape(id) }),
|
41
|
+
params: params,
|
42
|
+
opts: opts
|
43
|
+
)
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.return_inbound_transfer(id, params = {}, opts = {})
|
47
|
+
request_stripe_object(
|
48
|
+
method: :post,
|
49
|
+
path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(id) }),
|
50
|
+
params: params,
|
51
|
+
opts: opts
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.succeed(id, params = {}, opts = {})
|
56
|
+
request_stripe_object(
|
57
|
+
method: :post,
|
58
|
+
path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/succeed", { id: CGI.escape(id) }),
|
59
|
+
params: params,
|
60
|
+
opts: opts
|
61
|
+
)
|
62
|
+
end
|
33
63
|
|
34
64
|
def fail(params = {}, opts = {})
|
35
65
|
@resource.request_stripe_object(
|
36
66
|
method: :post,
|
37
|
-
path:
|
67
|
+
path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/fail", { id: CGI.escape(@resource["id"]) }),
|
38
68
|
params: params,
|
39
69
|
opts: opts
|
40
70
|
)
|
@@ -43,7 +73,7 @@ module Stripe
|
|
43
73
|
def return_inbound_transfer(params = {}, opts = {})
|
44
74
|
@resource.request_stripe_object(
|
45
75
|
method: :post,
|
46
|
-
path:
|
76
|
+
path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/return", { id: CGI.escape(@resource["id"]) }),
|
47
77
|
params: params,
|
48
78
|
opts: opts
|
49
79
|
)
|
@@ -52,7 +82,7 @@ module Stripe
|
|
52
82
|
def succeed(params = {}, opts = {})
|
53
83
|
@resource.request_stripe_object(
|
54
84
|
method: :post,
|
55
|
-
path:
|
85
|
+
path: format("/v1/test_helpers/treasury/inbound_transfers/%<id>s/succeed", { id: CGI.escape(@resource["id"]) }),
|
56
86
|
params: params,
|
57
87
|
opts: opts
|
58
88
|
)
|