stripe 13.0.2 → 13.1.0.pre.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1370 -654
- data/OPENAPI_VERSION +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/examples/README.md +2 -7
- data/examples/meter_event_stream.rb +0 -10
- data/examples/new_example.rb +24 -0
- data/examples/{thinevent_webhook_handler.rb → stripe_webhook_handler.rb} +0 -11
- data/lib/stripe/api_resource.rb +1 -0
- data/lib/stripe/object_types.rb +19 -0
- data/lib/stripe/request_signing_authenticator.rb +79 -0
- data/lib/stripe/resources/account_notice.rb +32 -0
- data/lib/stripe/resources/billing/meter.rb +2 -0
- data/lib/stripe/resources/capital/financing_offer.rb +49 -0
- data/lib/stripe/resources/capital/financing_summary.rb +15 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +27 -0
- data/lib/stripe/resources/financial_connections/account.rb +3 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +14 -0
- data/lib/stripe/resources/financial_connections/institution.rb +26 -0
- data/lib/stripe/resources/gift_cards/card.rb +59 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +93 -0
- data/lib/stripe/resources/invoice.rb +81 -0
- data/lib/stripe/resources/invoice_payment.rb +12 -0
- data/lib/stripe/resources/issuing/card.rb +20 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +88 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +26 -0
- data/lib/stripe/resources/margin.rb +37 -0
- data/lib/stripe/resources/order.rb +120 -0
- data/lib/stripe/resources/payment_intent.rb +50 -0
- data/lib/stripe/resources/quote.rb +104 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +43 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +11 -0
- data/lib/stripe/resources/subscription_schedule.rb +20 -0
- data/lib/stripe/resources/tax/association.rb +24 -0
- data/lib/stripe/resources/tax/form.rb +49 -0
- data/lib/stripe/resources/terminal/reader.rb +60 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +14 -0
- data/lib/stripe/resources/usage_record_summary.rb +1 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
- data/lib/stripe/resources.rb +18 -0
- data/lib/stripe/services/account_notice_service.rb +39 -0
- data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +3 -1
- data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/gift_cards/card_service.rb +63 -0
- data/lib/stripe/services/gift_cards/transaction_service.rb +74 -0
- data/lib/stripe/services/gift_cards_service.rb +14 -0
- data/lib/stripe/services/invoice_payment_service.rb +28 -0
- data/lib/stripe/services/invoice_service.rb +44 -1
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
- data/lib/stripe/services/issuing_service.rb +4 -1
- data/lib/stripe/services/margin_service.rb +50 -0
- data/lib/stripe/services/order_line_item_service.rb +17 -0
- data/lib/stripe/services/order_service.rb +78 -0
- data/lib/stripe/services/payment_intent_service.rb +26 -0
- data/lib/stripe/services/quote_line_service.rb +17 -0
- data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
- data/lib/stripe/services/quote_service.rb +49 -1
- data/lib/stripe/services/subscription_schedule_service.rb +11 -0
- data/lib/stripe/services/tax/association_service.rb +19 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
- data/lib/stripe/services/terminal/reader_service.rb +33 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/test_helpers/issuing/card_service.rb +11 -0
- data/lib/stripe/services/v1_services.rb +6 -1
- data/lib/stripe/services.rb +22 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +45 -0
- metadata +47 -6
- data/examples/example_template.rb +0 -36
@@ -15,6 +15,26 @@ module Stripe
|
|
15
15
|
"subscription_schedule"
|
16
16
|
end
|
17
17
|
|
18
|
+
# Amends an existing subscription schedule.
|
19
|
+
def amend(params = {}, opts = {})
|
20
|
+
request_stripe_object(
|
21
|
+
method: :post,
|
22
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Amends an existing subscription schedule.
|
29
|
+
def self.amend(schedule, params = {}, opts = {})
|
30
|
+
request_stripe_object(
|
31
|
+
method: :post,
|
32
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
33
|
+
params: params,
|
34
|
+
opts: opts
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
18
38
|
# 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.
|
19
39
|
def cancel(params = {}, opts = {})
|
20
40
|
request_stripe_object(
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Tax
|
6
|
+
# A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input
|
7
|
+
class Association < APIResource
|
8
|
+
OBJECT_NAME = "tax.association"
|
9
|
+
def self.object_name
|
10
|
+
"tax.association"
|
11
|
+
end
|
12
|
+
|
13
|
+
# Finds a tax association object by PaymentIntent id.
|
14
|
+
def self.find(params = {}, opts = {})
|
15
|
+
request_stripe_object(
|
16
|
+
method: :get,
|
17
|
+
path: "/v1/tax/associations/find",
|
18
|
+
params: params,
|
19
|
+
opts: opts
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Tax
|
6
|
+
# Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.
|
7
|
+
#
|
8
|
+
# Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)
|
9
|
+
class Form < APIResource
|
10
|
+
extend Stripe::APIOperations::List
|
11
|
+
|
12
|
+
OBJECT_NAME = "tax.form"
|
13
|
+
def self.object_name
|
14
|
+
"tax.form"
|
15
|
+
end
|
16
|
+
|
17
|
+
# Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
|
18
|
+
def self.list(filters = {}, opts = {})
|
19
|
+
request_stripe_object(method: :get, path: "/v1/tax/forms", params: filters, opts: opts)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Download the PDF for a tax form.
|
23
|
+
def pdf(params = {}, opts = {}, &read_body_chunk_block)
|
24
|
+
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
25
|
+
request_stream(
|
26
|
+
method: :get,
|
27
|
+
path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(self["id"]) }),
|
28
|
+
params: params,
|
29
|
+
opts: opts,
|
30
|
+
base_address: :files,
|
31
|
+
&read_body_chunk_block
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Download the PDF for a tax form.
|
36
|
+
def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
|
37
|
+
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
38
|
+
execute_resource_request_stream(
|
39
|
+
:get,
|
40
|
+
format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
|
41
|
+
:files,
|
42
|
+
params,
|
43
|
+
opts,
|
44
|
+
&read_body_chunk_block
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -37,6 +37,66 @@ module Stripe
|
|
37
37
|
)
|
38
38
|
end
|
39
39
|
|
40
|
+
# Initiates an input collection flow on a Reader.
|
41
|
+
def collect_inputs(params = {}, opts = {})
|
42
|
+
request_stripe_object(
|
43
|
+
method: :post,
|
44
|
+
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
|
45
|
+
params: params,
|
46
|
+
opts: opts
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initiates an input collection flow on a Reader.
|
51
|
+
def self.collect_inputs(reader, params = {}, opts = {})
|
52
|
+
request_stripe_object(
|
53
|
+
method: :post,
|
54
|
+
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
|
55
|
+
params: params,
|
56
|
+
opts: opts
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
|
61
|
+
def collect_payment_method(params = {}, opts = {})
|
62
|
+
request_stripe_object(
|
63
|
+
method: :post,
|
64
|
+
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
|
65
|
+
params: params,
|
66
|
+
opts: opts
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
|
71
|
+
def self.collect_payment_method(reader, params = {}, opts = {})
|
72
|
+
request_stripe_object(
|
73
|
+
method: :post,
|
74
|
+
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
|
75
|
+
params: params,
|
76
|
+
opts: opts
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Finalizes a payment on a Reader.
|
81
|
+
def confirm_payment_intent(params = {}, opts = {})
|
82
|
+
request_stripe_object(
|
83
|
+
method: :post,
|
84
|
+
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
|
85
|
+
params: params,
|
86
|
+
opts: opts
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Finalizes a payment on a Reader.
|
91
|
+
def self.confirm_payment_intent(reader, params = {}, opts = {})
|
92
|
+
request_stripe_object(
|
93
|
+
method: :post,
|
94
|
+
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
|
95
|
+
params: params,
|
96
|
+
opts: opts
|
97
|
+
)
|
98
|
+
end
|
99
|
+
|
40
100
|
# Creates a new Reader object.
|
41
101
|
def self.create(params = {}, opts = {})
|
42
102
|
request_stripe_object(
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Terminal
|
6
|
+
# Returns data collected by Terminal readers. This data is only stored for 24 hours.
|
7
|
+
class ReaderCollectedData < APIResource
|
8
|
+
OBJECT_NAME = "terminal.reader_collected_data"
|
9
|
+
def self.object_name
|
10
|
+
"terminal.reader_collected_data"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Stripe
|
5
|
+
# A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period.
|
5
6
|
class UsageRecordSummary < StripeObject
|
6
7
|
OBJECT_NAME = "usage_record_summary"
|
7
8
|
def self.object_name
|
@@ -6,9 +6,9 @@ module Stripe
|
|
6
6
|
module Billing
|
7
7
|
# Fix me empty_doc_string.
|
8
8
|
class MeterEvent < APIResource
|
9
|
-
OBJECT_NAME = "
|
9
|
+
OBJECT_NAME = "billing.meter_event"
|
10
10
|
def self.object_name
|
11
|
-
"
|
11
|
+
"billing.meter_event"
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -5,9 +5,9 @@ module Stripe
|
|
5
5
|
module V2
|
6
6
|
module Billing
|
7
7
|
class MeterEventAdjustment < APIResource
|
8
|
-
OBJECT_NAME = "
|
8
|
+
OBJECT_NAME = "billing.meter_event_adjustment"
|
9
9
|
def self.object_name
|
10
|
-
"
|
10
|
+
"billing.meter_event_adjustment"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -5,9 +5,9 @@ module Stripe
|
|
5
5
|
module V2
|
6
6
|
module Billing
|
7
7
|
class MeterEventSession < APIResource
|
8
|
-
OBJECT_NAME = "
|
8
|
+
OBJECT_NAME = "billing.meter_event_session"
|
9
9
|
def self.object_name
|
10
|
-
"
|
10
|
+
"billing.meter_event_session"
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/stripe/resources.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
require "stripe/resources/account"
|
5
5
|
require "stripe/resources/account_link"
|
6
|
+
require "stripe/resources/account_notice"
|
6
7
|
require "stripe/resources/account_session"
|
7
8
|
require "stripe/resources/apple_pay_domain"
|
8
9
|
require "stripe/resources/application_fee"
|
@@ -22,6 +23,9 @@ require "stripe/resources/billing/meter_event_summary"
|
|
22
23
|
require "stripe/resources/billing_portal/configuration"
|
23
24
|
require "stripe/resources/billing_portal/session"
|
24
25
|
require "stripe/resources/capability"
|
26
|
+
require "stripe/resources/capital/financing_offer"
|
27
|
+
require "stripe/resources/capital/financing_summary"
|
28
|
+
require "stripe/resources/capital/financing_transaction"
|
25
29
|
require "stripe/resources/card"
|
26
30
|
require "stripe/resources/cash_balance"
|
27
31
|
require "stripe/resources/charge"
|
@@ -48,22 +52,29 @@ require "stripe/resources/exchange_rate"
|
|
48
52
|
require "stripe/resources/file"
|
49
53
|
require "stripe/resources/file_link"
|
50
54
|
require "stripe/resources/financial_connections/account"
|
55
|
+
require "stripe/resources/financial_connections/account_inferred_balance"
|
51
56
|
require "stripe/resources/financial_connections/account_owner"
|
52
57
|
require "stripe/resources/financial_connections/account_ownership"
|
58
|
+
require "stripe/resources/financial_connections/institution"
|
53
59
|
require "stripe/resources/financial_connections/session"
|
54
60
|
require "stripe/resources/financial_connections/transaction"
|
55
61
|
require "stripe/resources/forwarding/request"
|
56
62
|
require "stripe/resources/funding_instructions"
|
63
|
+
require "stripe/resources/gift_cards/card"
|
64
|
+
require "stripe/resources/gift_cards/transaction"
|
57
65
|
require "stripe/resources/identity/verification_report"
|
58
66
|
require "stripe/resources/identity/verification_session"
|
59
67
|
require "stripe/resources/invoice"
|
60
68
|
require "stripe/resources/invoice_item"
|
61
69
|
require "stripe/resources/invoice_line_item"
|
70
|
+
require "stripe/resources/invoice_payment"
|
62
71
|
require "stripe/resources/invoice_rendering_template"
|
63
72
|
require "stripe/resources/issuing/authorization"
|
64
73
|
require "stripe/resources/issuing/card"
|
65
74
|
require "stripe/resources/issuing/cardholder"
|
75
|
+
require "stripe/resources/issuing/credit_underwriting_record"
|
66
76
|
require "stripe/resources/issuing/dispute"
|
77
|
+
require "stripe/resources/issuing/dispute_settlement_detail"
|
67
78
|
require "stripe/resources/issuing/personalization_design"
|
68
79
|
require "stripe/resources/issuing/physical_bundle"
|
69
80
|
require "stripe/resources/issuing/token"
|
@@ -71,6 +82,8 @@ require "stripe/resources/issuing/transaction"
|
|
71
82
|
require "stripe/resources/line_item"
|
72
83
|
require "stripe/resources/login_link"
|
73
84
|
require "stripe/resources/mandate"
|
85
|
+
require "stripe/resources/margin"
|
86
|
+
require "stripe/resources/order"
|
74
87
|
require "stripe/resources/payment_intent"
|
75
88
|
require "stripe/resources/payment_link"
|
76
89
|
require "stripe/resources/payment_method"
|
@@ -84,6 +97,8 @@ require "stripe/resources/product"
|
|
84
97
|
require "stripe/resources/product_feature"
|
85
98
|
require "stripe/resources/promotion_code"
|
86
99
|
require "stripe/resources/quote"
|
100
|
+
require "stripe/resources/quote_preview_invoice"
|
101
|
+
require "stripe/resources/quote_preview_subscription_schedule"
|
87
102
|
require "stripe/resources/radar/early_fraud_warning"
|
88
103
|
require "stripe/resources/radar/value_list"
|
89
104
|
require "stripe/resources/radar/value_list_item"
|
@@ -101,8 +116,10 @@ require "stripe/resources/source_transaction"
|
|
101
116
|
require "stripe/resources/subscription"
|
102
117
|
require "stripe/resources/subscription_item"
|
103
118
|
require "stripe/resources/subscription_schedule"
|
119
|
+
require "stripe/resources/tax/association"
|
104
120
|
require "stripe/resources/tax/calculation"
|
105
121
|
require "stripe/resources/tax/calculation_line_item"
|
122
|
+
require "stripe/resources/tax/form"
|
106
123
|
require "stripe/resources/tax/registration"
|
107
124
|
require "stripe/resources/tax/settings"
|
108
125
|
require "stripe/resources/tax/transaction"
|
@@ -114,6 +131,7 @@ require "stripe/resources/terminal/configuration"
|
|
114
131
|
require "stripe/resources/terminal/connection_token"
|
115
132
|
require "stripe/resources/terminal/location"
|
116
133
|
require "stripe/resources/terminal/reader"
|
134
|
+
require "stripe/resources/terminal/reader_collected_data"
|
117
135
|
require "stripe/resources/test_helpers/test_clock"
|
118
136
|
require "stripe/resources/token"
|
119
137
|
require "stripe/resources/topup"
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class AccountNoticeService < StripeService
|
6
|
+
# Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
|
7
|
+
def list(params = {}, opts = {})
|
8
|
+
request(
|
9
|
+
method: :get,
|
10
|
+
path: "/v1/account_notices",
|
11
|
+
params: params,
|
12
|
+
opts: opts,
|
13
|
+
base_address: :api
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Retrieves an AccountNotice object.
|
18
|
+
def retrieve(account_notice, params = {}, opts = {})
|
19
|
+
request(
|
20
|
+
method: :get,
|
21
|
+
path: format("/v1/account_notices/%<account_notice>s", { account_notice: CGI.escape(account_notice) }),
|
22
|
+
params: params,
|
23
|
+
opts: opts,
|
24
|
+
base_address: :api
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Updates an AccountNotice object.
|
29
|
+
def update(account_notice, params = {}, opts = {})
|
30
|
+
request(
|
31
|
+
method: :post,
|
32
|
+
path: format("/v1/account_notices/%<account_notice>s", { account_notice: CGI.escape(account_notice) }),
|
33
|
+
params: params,
|
34
|
+
opts: opts,
|
35
|
+
base_address: :api
|
36
|
+
)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Capital
|
6
|
+
class FinancingOfferService < StripeService
|
7
|
+
# Retrieves the financing offers available for Connected accounts that belong to your platform.
|
8
|
+
def list(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: "/v1/capital/financing_offers",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Acknowledges that platform has received and delivered the financing_offer to
|
19
|
+
# the intended merchant recipient.
|
20
|
+
def mark_delivered(financing_offer, params = {}, opts = {})
|
21
|
+
request(
|
22
|
+
method: :post,
|
23
|
+
path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(financing_offer) }),
|
24
|
+
params: params,
|
25
|
+
opts: opts,
|
26
|
+
base_address: :api
|
27
|
+
)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Get the details of the financing offer
|
31
|
+
def retrieve(financing_offer, params = {}, opts = {})
|
32
|
+
request(
|
33
|
+
method: :get,
|
34
|
+
path: format("/v1/capital/financing_offers/%<financing_offer>s", { financing_offer: CGI.escape(financing_offer) }),
|
35
|
+
params: params,
|
36
|
+
opts: opts,
|
37
|
+
base_address: :api
|
38
|
+
)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Capital
|
6
|
+
class FinancingSummaryService < StripeService
|
7
|
+
# Retrieve the financing state for the account that was authenticated in the request.
|
8
|
+
def retrieve(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: "/v1/capital/financing_summary",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Capital
|
6
|
+
class FinancingTransactionService < StripeService
|
7
|
+
# Returns a list of financing transactions. The transactions are returned in sorted order,
|
8
|
+
# with the most recent transactions appearing first.
|
9
|
+
def list(params = {}, opts = {})
|
10
|
+
request(
|
11
|
+
method: :get,
|
12
|
+
path: "/v1/capital/financing_transactions",
|
13
|
+
params: params,
|
14
|
+
opts: opts,
|
15
|
+
base_address: :api
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Retrieves a financing transaction for a financing offer.
|
20
|
+
def retrieve(financing_transaction, params = {}, opts = {})
|
21
|
+
request(
|
22
|
+
method: :get,
|
23
|
+
path: format("/v1/capital/financing_transactions/%<financing_transaction>s", { financing_transaction: CGI.escape(financing_transaction) }),
|
24
|
+
params: params,
|
25
|
+
opts: opts,
|
26
|
+
base_address: :api
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class CapitalService < StripeService
|
6
|
+
attr_reader :financing_offers, :financing_summary, :financing_transactions
|
7
|
+
|
8
|
+
def initialize(requestor)
|
9
|
+
super(requestor)
|
10
|
+
@financing_offers = Stripe::Capital::FinancingOfferService.new(@requestor)
|
11
|
+
@financing_summary = Stripe::Capital::FinancingSummaryService.new(@requestor)
|
12
|
+
@financing_transactions = Stripe::Capital::FinancingTransactionService.new(@requestor)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module FinancialConnections
|
6
|
+
class AccountInferredBalanceService < StripeService
|
7
|
+
# Lists the recorded inferred balances for a Financial Connections Account.
|
8
|
+
def list(account, params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: format("/v1/financial_connections/accounts/%<account>s/inferred_balances", { account: CGI.escape(account) }),
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -4,10 +4,12 @@
|
|
4
4
|
module Stripe
|
5
5
|
module FinancialConnections
|
6
6
|
class AccountService < StripeService
|
7
|
-
attr_reader :owners
|
7
|
+
attr_reader :inferred_balances, :owners
|
8
8
|
|
9
9
|
def initialize(requestor)
|
10
10
|
super(requestor)
|
11
|
+
@inferred_balances = Stripe::FinancialConnections::AccountInferredBalanceService
|
12
|
+
.new(@requestor)
|
11
13
|
@owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)
|
12
14
|
end
|
13
15
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module FinancialConnections
|
6
|
+
class InstitutionService < StripeService
|
7
|
+
# Returns a list of Financial Connections Institution objects.
|
8
|
+
def list(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: "/v1/financial_connections/institutions",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Retrieves the details of a Financial Connections Institution.
|
19
|
+
def retrieve(institution, params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :get,
|
22
|
+
path: format("/v1/financial_connections/institutions/%<institution>s", { institution: CGI.escape(institution) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -3,11 +3,12 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class FinancialConnectionsService < StripeService
|
6
|
-
attr_reader :accounts, :sessions, :transactions
|
6
|
+
attr_reader :accounts, :institutions, :sessions, :transactions
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
10
10
|
@accounts = Stripe::FinancialConnections::AccountService.new(@requestor)
|
11
|
+
@institutions = Stripe::FinancialConnections::InstitutionService.new(@requestor)
|
11
12
|
@sessions = Stripe::FinancialConnections::SessionService.new(@requestor)
|
12
13
|
@transactions = Stripe::FinancialConnections::TransactionService.new(@requestor)
|
13
14
|
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module GiftCards
|
6
|
+
class CardService < StripeService
|
7
|
+
# Creates a new gift card object.
|
8
|
+
def create(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: "/v1/gift_cards/cards",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# List gift cards for an account
|
19
|
+
def list(params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :get,
|
22
|
+
path: "/v1/gift_cards/cards",
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Retrieve a gift card by id
|
30
|
+
def retrieve(id, params = {}, opts = {})
|
31
|
+
request(
|
32
|
+
method: :get,
|
33
|
+
path: format("/v1/gift_cards/cards/%<id>s", { id: CGI.escape(id) }),
|
34
|
+
params: params,
|
35
|
+
opts: opts,
|
36
|
+
base_address: :api
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Update a gift card
|
41
|
+
def update(id, params = {}, opts = {})
|
42
|
+
request(
|
43
|
+
method: :post,
|
44
|
+
path: format("/v1/gift_cards/cards/%<id>s", { id: CGI.escape(id) }),
|
45
|
+
params: params,
|
46
|
+
opts: opts,
|
47
|
+
base_address: :api
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Validates a gift card code, returning the matching gift card object if it exists.
|
52
|
+
def validate(params = {}, opts = {})
|
53
|
+
request(
|
54
|
+
method: :post,
|
55
|
+
path: "/v1/gift_cards/cards/validate",
|
56
|
+
params: params,
|
57
|
+
opts: opts,
|
58
|
+
base_address: :api
|
59
|
+
)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|