stripe 13.2.0 → 13.3.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 +1396 -645
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +32 -0
- data/lib/stripe/request_signing_authenticator.rb +79 -0
- data/lib/stripe/resources/account.rb +230 -0
- data/lib/stripe/resources/account_link.rb +9 -0
- data/lib/stripe/resources/account_notice.rb +60 -0
- data/lib/stripe/resources/account_session.rb +103 -0
- data/lib/stripe/resources/apple_pay_domain.rb +13 -0
- data/lib/stripe/resources/application.rb +20 -0
- data/lib/stripe/resources/application_fee.rb +34 -0
- data/lib/stripe/resources/application_fee_refund.rb +17 -0
- data/lib/stripe/resources/apps/secret.rb +22 -0
- data/lib/stripe/resources/balance.rb +59 -0
- data/lib/stripe/resources/balance_transaction.rb +34 -0
- data/lib/stripe/resources/bank_account.rb +60 -2
- data/lib/stripe/resources/billing/alert.rb +21 -0
- data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +25 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +45 -1
- data/lib/stripe/resources/billing/credit_grant.rb +46 -2
- data/lib/stripe/resources/billing/meter.rb +49 -7
- data/lib/stripe/resources/billing/meter_error_report.rb +44 -0
- data/lib/stripe/resources/billing/meter_event.rb +17 -3
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +17 -1
- data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +70 -0
- data/lib/stripe/resources/billing_portal/session.rb +61 -0
- data/lib/stripe/resources/capability.rb +38 -0
- data/lib/stripe/resources/capital/financing_offer.rb +94 -0
- data/lib/stripe/resources/capital/financing_summary.rb +32 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +56 -0
- data/lib/stripe/resources/card.rb +72 -0
- data/lib/stripe/resources/cash_balance.rb +14 -0
- data/lib/stripe/resources/charge.rb +469 -0
- data/lib/stripe/resources/checkout/session.rb +496 -0
- data/lib/stripe/resources/climate/order.rb +55 -0
- data/lib/stripe/resources/climate/product.rb +24 -0
- data/lib/stripe/resources/climate/supplier.rb +18 -0
- data/lib/stripe/resources/confirmation_token.rb +297 -0
- data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
- data/lib/stripe/resources/country_spec.rb +27 -0
- data/lib/stripe/resources/coupon.rb +44 -0
- data/lib/stripe/resources/credit_note.rb +91 -0
- data/lib/stripe/resources/credit_note_line_item.rb +46 -0
- data/lib/stripe/resources/customer.rb +93 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +72 -0
- data/lib/stripe/resources/customer_session.rb +34 -0
- data/lib/stripe/resources/discount.rb +29 -0
- data/lib/stripe/resources/dispute.rb +88 -0
- data/lib/stripe/resources/entitlements/active_entitlement.rb +11 -0
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
- data/lib/stripe/resources/entitlements/feature.rb +15 -0
- data/lib/stripe/resources/ephemeral_key.rb +13 -0
- data/lib/stripe/resources/event.rb +44 -0
- data/lib/stripe/resources/exchange_rate.rb +7 -0
- data/lib/stripe/resources/file.rb +23 -0
- data/lib/stripe/resources/file_link.rb +19 -0
- data/lib/stripe/resources/financial_connections/account.rb +87 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
- data/lib/stripe/resources/financial_connections/institution.rb +61 -0
- data/lib/stripe/resources/financial_connections/session.rb +49 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +28 -0
- data/lib/stripe/resources/forwarding/request.rb +40 -0
- data/lib/stripe/resources/funding_instructions.rb +82 -0
- data/lib/stripe/resources/gift_cards/card.rb +96 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +132 -0
- data/lib/stripe/resources/identity/verification_report.rb +92 -0
- data/lib/stripe/resources/identity/verification_session.rb +76 -0
- data/lib/stripe/resources/invoice.rb +418 -0
- data/lib/stripe/resources/invoice_item.rb +54 -0
- data/lib/stripe/resources/invoice_line_item.rb +83 -0
- data/lib/stripe/resources/invoice_payment.rb +46 -0
- data/lib/stripe/resources/invoice_rendering_template.rb +17 -0
- data/lib/stripe/resources/issuing/authorization.rb +129 -0
- data/lib/stripe/resources/issuing/card.rb +86 -0
- data/lib/stripe/resources/issuing/cardholder.rb +76 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +145 -0
- data/lib/stripe/resources/issuing/dispute.rb +65 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +49 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +43 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +38 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +18 -0
- data/lib/stripe/resources/issuing/settlement.rb +49 -0
- data/lib/stripe/resources/issuing/token.rb +46 -0
- data/lib/stripe/resources/issuing/transaction.rb +106 -0
- data/lib/stripe/resources/line_item.rb +50 -0
- data/lib/stripe/resources/login_link.rb +7 -0
- data/lib/stripe/resources/mandate.rb +78 -0
- data/lib/stripe/resources/margin.rb +56 -0
- data/lib/stripe/resources/order.rb +322 -0
- data/lib/stripe/resources/payment_attempt_record.rb +100 -0
- data/lib/stripe/resources/payment_intent.rb +712 -0
- data/lib/stripe/resources/payment_link.rb +198 -0
- data/lib/stripe/resources/payment_method.rb +368 -0
- data/lib/stripe/resources/payment_method_configuration.rb +430 -0
- data/lib/stripe/resources/payment_method_domain.rb +57 -0
- data/lib/stripe/resources/payment_record.rb +194 -0
- data/lib/stripe/resources/payout.rb +56 -0
- data/lib/stripe/resources/person.rb +128 -0
- data/lib/stripe/resources/plan.rb +52 -0
- data/lib/stripe/resources/price.rb +77 -0
- data/lib/stripe/resources/product.rb +60 -0
- data/lib/stripe/resources/product_feature.rb +12 -0
- data/lib/stripe/resources/promotion_code.rb +35 -0
- data/lib/stripe/resources/quote.rb +356 -0
- data/lib/stripe/resources/quote_line.rb +136 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +374 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +170 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +17 -0
- data/lib/stripe/resources/radar/value_list.rb +23 -0
- data/lib/stripe/resources/radar/value_list_item.rb +17 -0
- data/lib/stripe/resources/refund.rb +130 -0
- data/lib/stripe/resources/reporting/report_run.rb +29 -0
- data/lib/stripe/resources/reporting/report_type.rb +19 -0
- data/lib/stripe/resources/reserve_transaction.rb +22 -0
- data/lib/stripe/resources/reversal.rb +21 -0
- data/lib/stripe/resources/review.rb +36 -0
- data/lib/stripe/resources/setup_attempt.rb +101 -0
- data/lib/stripe/resources/setup_intent.rb +158 -0
- data/lib/stripe/resources/shipping_rate.rb +42 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +26 -0
- data/lib/stripe/resources/source.rb +195 -0
- data/lib/stripe/resources/source_mandate_notification.rb +59 -0
- data/lib/stripe/resources/source_transaction.rb +48 -0
- data/lib/stripe/resources/subscription.rb +214 -0
- data/lib/stripe/resources/subscription_item.rb +46 -0
- data/lib/stripe/resources/subscription_schedule.rb +173 -0
- data/lib/stripe/resources/tax/association.rb +60 -0
- data/lib/stripe/resources/tax/calculation.rb +72 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +33 -0
- data/lib/stripe/resources/tax/form.rb +124 -0
- data/lib/stripe/resources/tax/registration.rb +379 -0
- data/lib/stripe/resources/tax/settings.rb +33 -0
- data/lib/stripe/resources/tax/transaction.rb +68 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +30 -0
- data/lib/stripe/resources/tax_code.rb +9 -0
- data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
- data/lib/stripe/resources/tax_id.rb +30 -0
- data/lib/stripe/resources/tax_rate.rb +42 -0
- data/lib/stripe/resources/terminal/configuration.rb +107 -0
- data/lib/stripe/resources/terminal/connection_token.rb +7 -0
- data/lib/stripe/resources/terminal/location.rb +20 -0
- data/lib/stripe/resources/terminal/reader.rb +178 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +30 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +27 -0
- data/lib/stripe/resources/token.rb +29 -0
- data/lib/stripe/resources/topup.rb +33 -0
- data/lib/stripe/resources/transfer.rb +35 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +32 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +38 -0
- data/lib/stripe/resources/treasury/financial_account.rb +57 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +91 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +66 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +85 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +82 -0
- data/lib/stripe/resources/treasury/received_credit.rb +70 -0
- data/lib/stripe/resources/treasury/received_debit.rb +67 -0
- data/lib/stripe/resources/treasury/transaction.rb +42 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +34 -0
- data/lib/stripe/resources/usage_record.rb +13 -0
- data/lib/stripe/resources/usage_record_summary.rb +18 -0
- data/lib/stripe/resources/v2/amount.rb +9 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +20 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
- data/lib/stripe/resources/v2/event.rb +21 -0
- data/lib/stripe/resources/v2/event_destination.rb +49 -0
- data/lib/stripe/resources/webhook_endpoint.rb +27 -0
- data/lib/stripe/resources.rb +31 -0
- data/lib/stripe/services/account_notice_service.rb +39 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +2 -2
- data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
- data/lib/stripe/services/billing/meter_event_adjustment_service.rb +1 -1
- data/lib/stripe/services/billing/meter_event_service.rb +1 -1
- data/lib/stripe/services/billing/meter_service.rb +5 -5
- 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/fraud_liability_debit_service.rb +30 -0
- data/lib/stripe/services/issuing_service.rb +5 -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_attempt_record_service.rb +28 -0
- data/lib/stripe/services/payment_intent_service.rb +37 -0
- data/lib/stripe/services/payment_record_service.rb +78 -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/v1_services.rb +8 -1
- data/lib/stripe/services.rb +25 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +5 -0
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +45 -0
- data/stripe.gemspec +2 -1
- metadata +62 -4
@@ -99,6 +99,32 @@ module Stripe
|
|
99
99
|
)
|
100
100
|
end
|
101
101
|
|
102
|
+
# Perform a decremental authorization on an eligible
|
103
|
+
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
104
|
+
# PaymentIntent's status must be requires_capture and
|
105
|
+
# [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
|
106
|
+
# must be available.
|
107
|
+
#
|
108
|
+
# Decremental authorizations decrease the authorized amount on your customer's card
|
109
|
+
# to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
|
110
|
+
#
|
111
|
+
# After decrement, the PaymentIntent object
|
112
|
+
# returns with the updated
|
113
|
+
# [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
|
114
|
+
# The PaymentIntent will now be capturable up to the new authorized amount.
|
115
|
+
#
|
116
|
+
# Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
|
117
|
+
# After it's fully captured, a PaymentIntent can no longer be decremented.
|
118
|
+
def decrement_authorization(intent, params = {}, opts = {})
|
119
|
+
request(
|
120
|
+
method: :post,
|
121
|
+
path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(intent) }),
|
122
|
+
params: params,
|
123
|
+
opts: opts,
|
124
|
+
base_address: :api
|
125
|
+
)
|
126
|
+
end
|
127
|
+
|
102
128
|
# Perform an incremental authorization on an eligible
|
103
129
|
# [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
|
104
130
|
# PaymentIntent's status must be requires_capture and
|
@@ -173,6 +199,17 @@ module Stripe
|
|
173
199
|
)
|
174
200
|
end
|
175
201
|
|
202
|
+
# Trigger an external action on a PaymentIntent.
|
203
|
+
def trigger_action(intent, params = {}, opts = {})
|
204
|
+
request(
|
205
|
+
method: :post,
|
206
|
+
path: format("/v1/test/payment_intents/%<intent>s/trigger_action", { intent: CGI.escape(intent) }),
|
207
|
+
params: params,
|
208
|
+
opts: opts,
|
209
|
+
base_address: :api
|
210
|
+
)
|
211
|
+
end
|
212
|
+
|
176
213
|
# Updates properties on a PaymentIntent object without confirming.
|
177
214
|
#
|
178
215
|
# Depending on which properties you update, you might need to confirm the
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class PaymentRecordService < StripeService
|
6
|
+
# Report a new Payment Record. You may report a Payment Record as it is
|
7
|
+
# initialized and later report updates through the other report_* methods, or report Payment
|
8
|
+
# Records in a terminal state directly, through this method.
|
9
|
+
def report_payment(params = {}, opts = {})
|
10
|
+
request(
|
11
|
+
method: :post,
|
12
|
+
path: "/v1/payment_records/report_payment",
|
13
|
+
params: params,
|
14
|
+
opts: opts,
|
15
|
+
base_address: :api
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Report a new payment attempt on the specified Payment Record. A new payment
|
20
|
+
# attempt can only be specified if all other payment attempts are canceled or failed.
|
21
|
+
def report_payment_attempt(id, params = {}, opts = {})
|
22
|
+
request(
|
23
|
+
method: :post,
|
24
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }),
|
25
|
+
params: params,
|
26
|
+
opts: opts,
|
27
|
+
base_address: :api
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
32
|
+
# was canceled.
|
33
|
+
def report_payment_attempt_canceled(id, params = {}, opts = {})
|
34
|
+
request(
|
35
|
+
method: :post,
|
36
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }),
|
37
|
+
params: params,
|
38
|
+
opts: opts,
|
39
|
+
base_address: :api
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
44
|
+
# failed or errored.
|
45
|
+
def report_payment_attempt_failed(id, params = {}, opts = {})
|
46
|
+
request(
|
47
|
+
method: :post,
|
48
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }),
|
49
|
+
params: params,
|
50
|
+
opts: opts,
|
51
|
+
base_address: :api
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Report that the most recent payment attempt on the specified Payment Record
|
56
|
+
# was guaranteed.
|
57
|
+
def report_payment_attempt_guaranteed(id, params = {}, opts = {})
|
58
|
+
request(
|
59
|
+
method: :post,
|
60
|
+
path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }),
|
61
|
+
params: params,
|
62
|
+
opts: opts,
|
63
|
+
base_address: :api
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Retrieves a Payment Record with the given ID
|
68
|
+
def retrieve(id, params = {}, opts = {})
|
69
|
+
request(
|
70
|
+
method: :get,
|
71
|
+
path: format("/v1/payment_records/%<id>s", { id: CGI.escape(id) }),
|
72
|
+
params: params,
|
73
|
+
opts: opts,
|
74
|
+
base_address: :api
|
75
|
+
)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class QuoteLineService < StripeService
|
6
|
+
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
7
|
+
def list(quote, params = {}, opts = {})
|
8
|
+
request(
|
9
|
+
method: :get,
|
10
|
+
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
11
|
+
params: params,
|
12
|
+
opts: opts,
|
13
|
+
base_address: :api
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class QuotePreviewInvoiceService < StripeService
|
6
|
+
# Preview the invoices that would be generated by accepting the quote.
|
7
|
+
def list(quote, params = {}, opts = {})
|
8
|
+
request(
|
9
|
+
method: :get,
|
10
|
+
path: format("/v1/quotes/%<quote>s/preview_invoices", { quote: CGI.escape(quote) }),
|
11
|
+
params: params,
|
12
|
+
opts: opts,
|
13
|
+
base_address: :api
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class QuotePreviewSubscriptionScheduleService < StripeService
|
6
|
+
# Preview the schedules that would be generated by accepting the quote
|
7
|
+
def list(quote, params = {}, opts = {})
|
8
|
+
request(
|
9
|
+
method: :get,
|
10
|
+
path: format("/v1/quotes/%<quote>s/preview_subscription_schedules", { quote: CGI.escape(quote) }),
|
11
|
+
params: params,
|
12
|
+
opts: opts,
|
13
|
+
base_address: :api
|
14
|
+
)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -3,10 +3,14 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class QuoteService < StripeService
|
6
|
-
attr_reader :line_items, :computed_upfront_line_items
|
6
|
+
attr_reader :preview_invoices, :preview_subscription_schedules, :lines, :line_items, :computed_upfront_line_items
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
10
|
+
@preview_invoices = Stripe::QuotePreviewInvoiceService.new(@requestor)
|
11
|
+
@preview_subscription_schedules = Stripe::QuotePreviewSubscriptionScheduleService
|
12
|
+
.new(@requestor)
|
13
|
+
@lines = Stripe::QuoteLineService.new(@requestor)
|
10
14
|
@line_items = Stripe::QuoteLineItemService.new(@requestor)
|
11
15
|
@computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor)
|
12
16
|
end
|
@@ -54,6 +58,39 @@ module Stripe
|
|
54
58
|
request(method: :get, path: "/v1/quotes", params: params, opts: opts, base_address: :api)
|
55
59
|
end
|
56
60
|
|
61
|
+
# Preview the invoice line items that would be generated by accepting the quote.
|
62
|
+
def list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
|
63
|
+
request(
|
64
|
+
method: :get,
|
65
|
+
path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
|
66
|
+
params: params,
|
67
|
+
opts: opts,
|
68
|
+
base_address: :api
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Converts a stale quote to draft.
|
73
|
+
def mark_draft(quote, params = {}, opts = {})
|
74
|
+
request(
|
75
|
+
method: :post,
|
76
|
+
path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
|
77
|
+
params: params,
|
78
|
+
opts: opts,
|
79
|
+
base_address: :api
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Converts a draft or open quote to stale.
|
84
|
+
def mark_stale(quote, params = {}, opts = {})
|
85
|
+
request(
|
86
|
+
method: :post,
|
87
|
+
path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
|
88
|
+
params: params,
|
89
|
+
opts: opts,
|
90
|
+
base_address: :api
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
57
94
|
# Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
58
95
|
def pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
|
59
96
|
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
@@ -67,6 +104,17 @@ module Stripe
|
|
67
104
|
)
|
68
105
|
end
|
69
106
|
|
107
|
+
# Recompute the upcoming invoice estimate for the quote.
|
108
|
+
def reestimate(quote, params = {}, opts = {})
|
109
|
+
request(
|
110
|
+
method: :post,
|
111
|
+
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
|
112
|
+
params: params,
|
113
|
+
opts: opts,
|
114
|
+
base_address: :api
|
115
|
+
)
|
116
|
+
end
|
117
|
+
|
70
118
|
# Retrieves the quote with the given ID.
|
71
119
|
def retrieve(quote, params = {}, opts = {})
|
72
120
|
request(
|
@@ -3,6 +3,17 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class SubscriptionScheduleService < StripeService
|
6
|
+
# Amends an existing subscription schedule.
|
7
|
+
def amend(schedule, params = {}, opts = {})
|
8
|
+
request(
|
9
|
+
method: :post,
|
10
|
+
path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
|
11
|
+
params: params,
|
12
|
+
opts: opts,
|
13
|
+
base_address: :api
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
6
17
|
# 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.
|
7
18
|
def cancel(schedule, params = {}, opts = {})
|
8
19
|
request(
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Tax
|
6
|
+
class AssociationService < StripeService
|
7
|
+
# Finds a tax association object by PaymentIntent id.
|
8
|
+
def find(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: "/v1/tax/associations/find",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Tax
|
6
|
+
class FormService < StripeService
|
7
|
+
# 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.
|
8
|
+
def list(params = {}, opts = {})
|
9
|
+
request(method: :get, path: "/v1/tax/forms", params: params, opts: opts, base_address: :api)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Download the PDF for a tax form.
|
13
|
+
def pdf(id, params = {}, opts = {}, &read_body_chunk_block)
|
14
|
+
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
15
|
+
request_stream(
|
16
|
+
method: :get,
|
17
|
+
path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
|
18
|
+
params: params,
|
19
|
+
opts: opts,
|
20
|
+
base_address: :files,
|
21
|
+
&read_body_chunk_block
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information.
|
26
|
+
def retrieve(id, params = {}, opts = {})
|
27
|
+
request(
|
28
|
+
method: :get,
|
29
|
+
path: format("/v1/tax/forms/%<id>s", { id: CGI.escape(id) }),
|
30
|
+
params: params,
|
31
|
+
opts: opts,
|
32
|
+
base_address: :api
|
33
|
+
)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -3,11 +3,13 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class TaxService < StripeService
|
6
|
-
attr_reader :calculations, :registrations, :settings, :transactions
|
6
|
+
attr_reader :associations, :calculations, :forms, :registrations, :settings, :transactions
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
10
|
+
@associations = Stripe::Tax::AssociationService.new(@requestor)
|
10
11
|
@calculations = Stripe::Tax::CalculationService.new(@requestor)
|
12
|
+
@forms = Stripe::Tax::FormService.new(@requestor)
|
11
13
|
@registrations = Stripe::Tax::RegistrationService.new(@requestor)
|
12
14
|
@settings = Stripe::Tax::SettingsService.new(@requestor)
|
13
15
|
@transactions = Stripe::Tax::TransactionService.new(@requestor)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Terminal
|
6
|
+
class ReaderCollectedDataService < StripeService
|
7
|
+
# Retrieve data collected using Reader hardware.
|
8
|
+
def retrieve(reader_collected_data, params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: format("/v1/terminal/reader_collected_data/%<reader_collected_data>s", { reader_collected_data: CGI.escape(reader_collected_data) }),
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -15,6 +15,39 @@ module Stripe
|
|
15
15
|
)
|
16
16
|
end
|
17
17
|
|
18
|
+
# Initiates an input collection flow on a Reader.
|
19
|
+
def collect_inputs(reader, params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :post,
|
22
|
+
path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
|
30
|
+
def collect_payment_method(reader, params = {}, opts = {})
|
31
|
+
request(
|
32
|
+
method: :post,
|
33
|
+
path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
|
34
|
+
params: params,
|
35
|
+
opts: opts,
|
36
|
+
base_address: :api
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Finalizes a payment on a Reader.
|
41
|
+
def confirm_payment_intent(reader, params = {}, opts = {})
|
42
|
+
request(
|
43
|
+
method: :post,
|
44
|
+
path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
|
45
|
+
params: params,
|
46
|
+
opts: opts,
|
47
|
+
base_address: :api
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
18
51
|
# Creates a new Reader object.
|
19
52
|
def create(params = {}, opts = {})
|
20
53
|
request(
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
module Stripe
|
5
5
|
class TerminalService < StripeService
|
6
|
-
attr_reader :configurations, :connection_tokens, :locations, :readers
|
6
|
+
attr_reader :configurations, :connection_tokens, :locations, :readers, :reader_collected_data
|
7
7
|
|
8
8
|
def initialize(requestor)
|
9
9
|
super(requestor)
|
@@ -11,6 +11,7 @@ module Stripe
|
|
11
11
|
@connection_tokens = Stripe::Terminal::ConnectionTokenService.new(@requestor)
|
12
12
|
@locations = Stripe::Terminal::LocationService.new(@requestor)
|
13
13
|
@readers = Stripe::Terminal::ReaderService.new(@requestor)
|
14
|
+
@reader_collected_data = Stripe::Terminal::ReaderCollectedDataService.new(@requestor)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
@@ -4,7 +4,7 @@ module Stripe
|
|
4
4
|
class V1Services < StripeService
|
5
5
|
# v1 accessors: The beginning of the section generated from our OpenAPI spec
|
6
6
|
attr_reader :accounts
|
7
|
-
attr_reader :account_links, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_transactions, :billing, :billing_portal, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payouts, :plans, :prices, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints
|
7
|
+
attr_reader :account_links, :account_notices, :account_sessions, :apple_pay_domains, :application_fees, :apps, :balance, :balance_transactions, :billing, :billing_portal, :capital, :charges, :checkout, :climate, :confirmation_tokens, :test_helpers, :country_specs, :coupons, :credit_notes, :customers, :customer_sessions, :disputes, :entitlements, :ephemeral_keys, :events, :exchange_rates, :files, :file_links, :financial_connections, :forwarding, :gift_cards, :identity, :invoices, :invoice_rendering_templates, :invoice_items, :issuing, :mandates, :margins, :orders, :payment_attempt_records, :payment_intents, :payment_links, :payment_methods, :payment_method_configurations, :payment_method_domains, :payment_records, :payouts, :plans, :prices, :products, :promotion_codes, :quotes, :radar, :refunds, :reporting, :reviews, :sigma, :setup_attempts, :setup_intents, :shipping_rates, :sources, :subscriptions, :subscription_items, :subscription_schedules, :tax, :tax_codes, :tax_ids, :tax_rates, :terminal, :tokens, :topups, :transfers, :treasury, :webhook_endpoints
|
8
8
|
# v1 accessors: The end of the section generated from our OpenAPI spec
|
9
9
|
|
10
10
|
# OAuthService is manually maintained, as it has special behaviors
|
@@ -15,6 +15,7 @@ module Stripe
|
|
15
15
|
# v1 services: The beginning of the section generated from our OpenAPI spec
|
16
16
|
@accounts = Stripe::AccountService.new(@requestor)
|
17
17
|
@account_links = Stripe::AccountLinkService.new(@requestor)
|
18
|
+
@account_notices = Stripe::AccountNoticeService.new(@requestor)
|
18
19
|
@account_sessions = Stripe::AccountSessionService.new(@requestor)
|
19
20
|
@apple_pay_domains = Stripe::ApplePayDomainService.new(@requestor)
|
20
21
|
@application_fees = Stripe::ApplicationFeeService.new(@requestor)
|
@@ -23,6 +24,7 @@ module Stripe
|
|
23
24
|
@balance_transactions = Stripe::BalanceTransactionService.new(@requestor)
|
24
25
|
@billing = Stripe::BillingService.new(@requestor)
|
25
26
|
@billing_portal = Stripe::BillingPortalService.new(@requestor)
|
27
|
+
@capital = Stripe::CapitalService.new(@requestor)
|
26
28
|
@charges = Stripe::ChargeService.new(@requestor)
|
27
29
|
@checkout = Stripe::CheckoutService.new(@requestor)
|
28
30
|
@climate = Stripe::ClimateService.new(@requestor)
|
@@ -42,17 +44,22 @@ module Stripe
|
|
42
44
|
@file_links = Stripe::FileLinkService.new(@requestor)
|
43
45
|
@financial_connections = Stripe::FinancialConnectionsService.new(@requestor)
|
44
46
|
@forwarding = Stripe::ForwardingService.new(@requestor)
|
47
|
+
@gift_cards = Stripe::GiftCardsService.new(@requestor)
|
45
48
|
@identity = Stripe::IdentityService.new(@requestor)
|
46
49
|
@invoices = Stripe::InvoiceService.new(@requestor)
|
47
50
|
@invoice_rendering_templates = Stripe::InvoiceRenderingTemplateService.new(@requestor)
|
48
51
|
@invoice_items = Stripe::InvoiceItemService.new(@requestor)
|
49
52
|
@issuing = Stripe::IssuingService.new(@requestor)
|
50
53
|
@mandates = Stripe::MandateService.new(@requestor)
|
54
|
+
@margins = Stripe::MarginService.new(@requestor)
|
55
|
+
@orders = Stripe::OrderService.new(@requestor)
|
56
|
+
@payment_attempt_records = Stripe::PaymentAttemptRecordService.new(@requestor)
|
51
57
|
@payment_intents = Stripe::PaymentIntentService.new(@requestor)
|
52
58
|
@payment_links = Stripe::PaymentLinkService.new(@requestor)
|
53
59
|
@payment_methods = Stripe::PaymentMethodService.new(@requestor)
|
54
60
|
@payment_method_configurations = Stripe::PaymentMethodConfigurationService.new(@requestor)
|
55
61
|
@payment_method_domains = Stripe::PaymentMethodDomainService.new(@requestor)
|
62
|
+
@payment_records = Stripe::PaymentRecordService.new(@requestor)
|
56
63
|
@payouts = Stripe::PayoutService.new(@requestor)
|
57
64
|
@plans = Stripe::PlanService.new(@requestor)
|
58
65
|
@prices = Stripe::PriceService.new(@requestor)
|
data/lib/stripe/services.rb
CHANGED
@@ -5,6 +5,7 @@ require "stripe/services/account_capability_service"
|
|
5
5
|
require "stripe/services/account_external_account_service"
|
6
6
|
require "stripe/services/account_link_service"
|
7
7
|
require "stripe/services/account_login_link_service"
|
8
|
+
require "stripe/services/account_notice_service"
|
8
9
|
require "stripe/services/account_person_service"
|
9
10
|
require "stripe/services/account_service"
|
10
11
|
require "stripe/services/account_session_service"
|
@@ -27,6 +28,10 @@ require "stripe/services/billing_portal/configuration_service"
|
|
27
28
|
require "stripe/services/billing_portal/session_service"
|
28
29
|
require "stripe/services/billing_portal_service"
|
29
30
|
require "stripe/services/billing_service"
|
31
|
+
require "stripe/services/capital/financing_offer_service"
|
32
|
+
require "stripe/services/capital/financing_summary_service"
|
33
|
+
require "stripe/services/capital/financing_transaction_service"
|
34
|
+
require "stripe/services/capital_service"
|
30
35
|
require "stripe/services/charge_service"
|
31
36
|
require "stripe/services/checkout/session_line_item_service"
|
32
37
|
require "stripe/services/checkout/session_service"
|
@@ -59,37 +64,51 @@ require "stripe/services/event_service"
|
|
59
64
|
require "stripe/services/exchange_rate_service"
|
60
65
|
require "stripe/services/file_link_service"
|
61
66
|
require "stripe/services/file_service"
|
67
|
+
require "stripe/services/financial_connections/account_inferred_balance_service"
|
62
68
|
require "stripe/services/financial_connections/account_owner_service"
|
63
69
|
require "stripe/services/financial_connections/account_service"
|
70
|
+
require "stripe/services/financial_connections/institution_service"
|
64
71
|
require "stripe/services/financial_connections/session_service"
|
65
72
|
require "stripe/services/financial_connections/transaction_service"
|
66
73
|
require "stripe/services/financial_connections_service"
|
67
74
|
require "stripe/services/forwarding/request_service"
|
68
75
|
require "stripe/services/forwarding_service"
|
76
|
+
require "stripe/services/gift_cards/card_service"
|
77
|
+
require "stripe/services/gift_cards/transaction_service"
|
78
|
+
require "stripe/services/gift_cards_service"
|
69
79
|
require "stripe/services/identity/verification_report_service"
|
70
80
|
require "stripe/services/identity/verification_session_service"
|
71
81
|
require "stripe/services/identity_service"
|
72
82
|
require "stripe/services/invoice_item_service"
|
73
83
|
require "stripe/services/invoice_line_item_service"
|
84
|
+
require "stripe/services/invoice_payment_service"
|
74
85
|
require "stripe/services/invoice_rendering_template_service"
|
75
86
|
require "stripe/services/invoice_service"
|
76
87
|
require "stripe/services/invoice_upcoming_lines_service"
|
77
88
|
require "stripe/services/issuing/authorization_service"
|
78
89
|
require "stripe/services/issuing/card_service"
|
79
90
|
require "stripe/services/issuing/cardholder_service"
|
91
|
+
require "stripe/services/issuing/credit_underwriting_record_service"
|
80
92
|
require "stripe/services/issuing/dispute_service"
|
93
|
+
require "stripe/services/issuing/dispute_settlement_detail_service"
|
94
|
+
require "stripe/services/issuing/fraud_liability_debit_service"
|
81
95
|
require "stripe/services/issuing/personalization_design_service"
|
82
96
|
require "stripe/services/issuing/physical_bundle_service"
|
83
97
|
require "stripe/services/issuing/token_service"
|
84
98
|
require "stripe/services/issuing/transaction_service"
|
85
99
|
require "stripe/services/issuing_service"
|
86
100
|
require "stripe/services/mandate_service"
|
101
|
+
require "stripe/services/margin_service"
|
102
|
+
require "stripe/services/order_line_item_service"
|
103
|
+
require "stripe/services/order_service"
|
104
|
+
require "stripe/services/payment_attempt_record_service"
|
87
105
|
require "stripe/services/payment_intent_service"
|
88
106
|
require "stripe/services/payment_link_line_item_service"
|
89
107
|
require "stripe/services/payment_link_service"
|
90
108
|
require "stripe/services/payment_method_configuration_service"
|
91
109
|
require "stripe/services/payment_method_domain_service"
|
92
110
|
require "stripe/services/payment_method_service"
|
111
|
+
require "stripe/services/payment_record_service"
|
93
112
|
require "stripe/services/payout_service"
|
94
113
|
require "stripe/services/plan_service"
|
95
114
|
require "stripe/services/price_service"
|
@@ -98,6 +117,9 @@ require "stripe/services/product_service"
|
|
98
117
|
require "stripe/services/promotion_code_service"
|
99
118
|
require "stripe/services/quote_computed_upfront_line_items_service"
|
100
119
|
require "stripe/services/quote_line_item_service"
|
120
|
+
require "stripe/services/quote_line_service"
|
121
|
+
require "stripe/services/quote_preview_invoice_service"
|
122
|
+
require "stripe/services/quote_preview_subscription_schedule_service"
|
101
123
|
require "stripe/services/quote_service"
|
102
124
|
require "stripe/services/radar/early_fraud_warning_service"
|
103
125
|
require "stripe/services/radar/value_list_item_service"
|
@@ -120,8 +142,10 @@ require "stripe/services/subscription_item_usage_record_service"
|
|
120
142
|
require "stripe/services/subscription_item_usage_record_summary_service"
|
121
143
|
require "stripe/services/subscription_schedule_service"
|
122
144
|
require "stripe/services/subscription_service"
|
145
|
+
require "stripe/services/tax/association_service"
|
123
146
|
require "stripe/services/tax/calculation_line_item_service"
|
124
147
|
require "stripe/services/tax/calculation_service"
|
148
|
+
require "stripe/services/tax/form_service"
|
125
149
|
require "stripe/services/tax/registration_service"
|
126
150
|
require "stripe/services/tax/settings_service"
|
127
151
|
require "stripe/services/tax/transaction_line_item_service"
|
@@ -133,6 +157,7 @@ require "stripe/services/tax_service"
|
|
133
157
|
require "stripe/services/terminal/configuration_service"
|
134
158
|
require "stripe/services/terminal/connection_token_service"
|
135
159
|
require "stripe/services/terminal/location_service"
|
160
|
+
require "stripe/services/terminal/reader_collected_data_service"
|
136
161
|
require "stripe/services/terminal/reader_service"
|
137
162
|
require "stripe/services/terminal_service"
|
138
163
|
require "stripe/services/test_helpers/confirmation_token_service"
|
@@ -25,7 +25,8 @@ module Stripe
|
|
25
25
|
# If `.logger` is set, the value of `.log_level` is ignored. The decision on
|
26
26
|
# what levels to print is entirely deferred to the logger.
|
27
27
|
class StripeConfiguration
|
28
|
-
attr_accessor :api_key, :api_version, :client_id, :enable_telemetry, :logger,
|
28
|
+
attr_accessor :api_key, :api_version, :authenticator, :client_id, :enable_telemetry, :logger,
|
29
|
+
:stripe_account, :stripe_context
|
29
30
|
|
30
31
|
attr_reader :api_base, :uploads_base, :connect_base, :meter_events_base, :base_addresses, :ca_bundle_path,
|
31
32
|
:log_level, :initial_network_retry_delay, :max_network_retries, :max_network_retry_delay,
|
@@ -52,6 +53,7 @@ module Stripe
|
|
52
53
|
|
53
54
|
def initialize
|
54
55
|
@api_version = ApiVersion::CURRENT
|
56
|
+
|
55
57
|
@ca_bundle_path = Stripe::DEFAULT_CA_BUNDLE_PATH
|
56
58
|
@enable_telemetry = true
|
57
59
|
@verify_ssl_certs = true
|
data/lib/stripe/stripe_object.rb
CHANGED
@@ -83,6 +83,7 @@ module Stripe
|
|
83
83
|
@unsaved_values = Set.new
|
84
84
|
@transient_values = Set.new
|
85
85
|
@values[:id] = id if id
|
86
|
+
@id = id
|
86
87
|
@last_response = nil
|
87
88
|
@requestor = requestor || APIRequestor.active_requestor
|
88
89
|
end
|
@@ -369,6 +370,10 @@ module Stripe
|
|
369
370
|
define_method(:"#{k}?") { @values[k] } if [FalseClass, TrueClass].include?(values[k].class)
|
370
371
|
end
|
371
372
|
end
|
373
|
+
|
374
|
+
keys.each do |k|
|
375
|
+
instance_variable_set(:"@#{k}", values[k])
|
376
|
+
end
|
372
377
|
end
|
373
378
|
|
374
379
|
# Disabling the cop because it's confused by the fact that the methods are
|
data/lib/stripe/util.rb
CHANGED
@@ -300,7 +300,13 @@ module Stripe
|
|
300
300
|
when String
|
301
301
|
{ api_key: opts }
|
302
302
|
when Hash
|
303
|
-
|
303
|
+
# If the user is using request signing for authentication,
|
304
|
+
# no need to check the api_key per request.
|
305
|
+
if !(opts.key?(:client) &&
|
306
|
+
opts.fetch(:client).config.authenticator) &&
|
307
|
+
opts.key?(:api_key)
|
308
|
+
check_api_key!(opts.fetch(:api_key))
|
309
|
+
end
|
304
310
|
# Explicitly use dup here instead of clone to avoid preserving freeze
|
305
311
|
# state on input params.
|
306
312
|
opts.dup
|
data/lib/stripe/version.rb
CHANGED