stripe 12.7.0.pre.beta.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 +96 -9
- data/OPENAPI_VERSION +1 -1
- data/README.md +4 -3
- data/VERSION +1 -1
- data/examples/README.md +11 -0
- data/examples/meter_event_stream.rb +47 -0
- data/examples/new_example.rb +24 -0
- data/examples/stripe_webhook_handler.rb +28 -0
- data/lib/stripe/api_operations/nested_resource.rb +1 -21
- data/lib/stripe/api_operations/request.rb +19 -70
- data/lib/stripe/api_operations/save.rb +4 -3
- data/lib/stripe/api_operations/singleton_save.rb +5 -2
- data/lib/stripe/api_requestor.rb +1131 -0
- data/lib/stripe/api_resource.rb +22 -14
- data/lib/stripe/api_version.rb +1 -2
- data/lib/stripe/connection_manager.rb +1 -1
- data/lib/stripe/errors.rb +8 -2
- data/lib/stripe/event_types.rb +14 -0
- data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +23 -0
- data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +13 -0
- data/lib/stripe/list_object.rb +2 -3
- data/lib/stripe/oauth.rb +8 -15
- data/lib/stripe/object_types.rb +16 -1
- data/lib/stripe/request_options.rb +128 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +14 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +26 -0
- data/lib/stripe/resources/billing/credit_grant.rb +88 -0
- data/lib/stripe/resources/billing/meter.rb +2 -0
- data/lib/stripe/resources/customer.rb +2 -3
- data/lib/stripe/resources/file.rb +7 -5
- data/lib/stripe/resources/issuing/card.rb +20 -0
- data/lib/stripe/resources/quote.rb +4 -4
- data/lib/stripe/resources/source.rb +3 -2
- data/lib/stripe/resources/subscription.rb +6 -6
- data/lib/stripe/resources/tax/form.rb +4 -4
- data/lib/stripe/resources/usage_record_summary.rb +1 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +16 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +15 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +15 -0
- data/lib/stripe/resources/v2/event.rb +13 -0
- data/lib/stripe/resources.rb +9 -0
- data/lib/stripe/search_result_object.rb +1 -1
- data/lib/stripe/services/account_capability_service.rb +39 -0
- data/lib/stripe/services/account_external_account_service.rb +68 -0
- data/lib/stripe/services/account_link_service.rb +17 -0
- data/lib/stripe/services/account_login_link_service.rb +19 -0
- data/lib/stripe/services/account_notice_service.rb +39 -0
- data/lib/stripe/services/account_person_service.rb +61 -0
- data/lib/stripe/services/account_service.rb +100 -0
- data/lib/stripe/services/account_session_service.rb +17 -0
- data/lib/stripe/services/apple_pay_domain_service.rb +50 -0
- data/lib/stripe/services/application_fee_refund_service.rb +60 -0
- data/lib/stripe/services/application_fee_service.rb +35 -0
- data/lib/stripe/services/apps/secret_service.rb +52 -0
- data/lib/stripe/services/apps_service.rb +13 -0
- data/lib/stripe/services/balance_service.rb +12 -0
- data/lib/stripe/services/balance_transaction_service.rb +32 -0
- data/lib/stripe/services/billing/alert_service.rb +74 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +19 -0
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +30 -0
- data/lib/stripe/services/billing/credit_grant_service.rb +74 -0
- data/lib/stripe/services/billing/meter_event_adjustment_service.rb +19 -0
- data/lib/stripe/services/billing/meter_event_service.rb +19 -0
- data/lib/stripe/services/billing/meter_event_summary_service.rb +19 -0
- data/lib/stripe/services/billing/meter_service.rb +81 -0
- data/lib/stripe/services/billing_portal/configuration_service.rb +52 -0
- data/lib/stripe/services/billing_portal/session_service.rb +19 -0
- data/lib/stripe/services/billing_portal_service.rb +14 -0
- data/lib/stripe/services/billing_service.rb +20 -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/charge_service.rb +69 -0
- data/lib/stripe/services/checkout/session_line_item_service.rb +19 -0
- data/lib/stripe/services/checkout/session_service.rb +72 -0
- data/lib/stripe/services/checkout_service.rb +13 -0
- data/lib/stripe/services/climate/order_service.rb +68 -0
- data/lib/stripe/services/climate/product_service.rb +30 -0
- data/lib/stripe/services/climate/supplier_service.rb +30 -0
- data/lib/stripe/services/climate_service.rb +15 -0
- data/lib/stripe/services/confirmation_token_service.rb +17 -0
- data/lib/stripe/services/country_spec_service.rb +28 -0
- data/lib/stripe/services/coupon_service.rb +51 -0
- data/lib/stripe/services/credit_note_line_item_service.rb +17 -0
- data/lib/stripe/services/credit_note_preview_lines_service.rb +17 -0
- data/lib/stripe/services/credit_note_service.rb +93 -0
- data/lib/stripe/services/customer_balance_transaction_service.rb +50 -0
- data/lib/stripe/services/customer_cash_balance_service.rb +28 -0
- data/lib/stripe/services/customer_cash_balance_transaction_service.rb +28 -0
- data/lib/stripe/services/customer_funding_instructions_service.rb +19 -0
- data/lib/stripe/services/customer_payment_method_service.rb +28 -0
- data/lib/stripe/services/customer_payment_source_service.rb +76 -0
- data/lib/stripe/services/customer_service.rb +89 -0
- data/lib/stripe/services/customer_session_service.rb +17 -0
- data/lib/stripe/services/customer_tax_id_service.rb +50 -0
- data/lib/stripe/services/dispute_service.rb +48 -0
- data/lib/stripe/services/entitlements/active_entitlement_service.rb +30 -0
- data/lib/stripe/services/entitlements/feature_service.rb +52 -0
- data/lib/stripe/services/entitlements_service.rb +14 -0
- data/lib/stripe/services/ephemeral_key_service.rb +28 -0
- data/lib/stripe/services/event_service.rb +22 -0
- data/lib/stripe/services/exchange_rate_service.rb +28 -0
- data/lib/stripe/services/file_link_service.rb +38 -0
- data/lib/stripe/services/file_service.rb +35 -0
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_owner_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +83 -0
- data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
- data/lib/stripe/services/financial_connections/session_service.rb +30 -0
- data/lib/stripe/services/financial_connections/transaction_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +16 -0
- data/lib/stripe/services/forwarding/request_service.rb +41 -0
- data/lib/stripe/services/forwarding_service.rb +13 -0
- 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/identity/verification_report_service.rb +30 -0
- data/lib/stripe/services/identity/verification_session_service.rb +106 -0
- data/lib/stripe/services/identity_service.rb +14 -0
- data/lib/stripe/services/invoice_item_service.rb +61 -0
- data/lib/stripe/services/invoice_line_item_service.rb +31 -0
- data/lib/stripe/services/invoice_payment_service.rb +28 -0
- data/lib/stripe/services/invoice_rendering_template_service.rb +50 -0
- data/lib/stripe/services/invoice_service.rb +245 -0
- data/lib/stripe/services/invoice_upcoming_lines_service.rb +17 -0
- data/lib/stripe/services/issuing/authorization_service.rb +65 -0
- data/lib/stripe/services/issuing/card_service.rb +52 -0
- data/lib/stripe/services/issuing/cardholder_service.rb +52 -0
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
- data/lib/stripe/services/issuing/dispute_service.rb +63 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
- data/lib/stripe/services/issuing/personalization_design_service.rb +52 -0
- data/lib/stripe/services/issuing/physical_bundle_service.rb +30 -0
- data/lib/stripe/services/issuing/token_service.rb +41 -0
- data/lib/stripe/services/issuing/transaction_service.rb +41 -0
- data/lib/stripe/services/issuing_service.rb +23 -0
- data/lib/stripe/services/mandate_service.rb +17 -0
- data/lib/stripe/services/margin_service.rb +50 -0
- data/lib/stripe/services/oauth_service.rb +63 -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 +230 -0
- data/lib/stripe/services/payment_link_line_item_service.rb +17 -0
- data/lib/stripe/services/payment_link_service.rb +57 -0
- data/lib/stripe/services/payment_method_configuration_service.rb +50 -0
- data/lib/stripe/services/payment_method_domain_service.rb +66 -0
- data/lib/stripe/services/payment_method_service.rb +86 -0
- data/lib/stripe/services/payout_service.rb +66 -0
- data/lib/stripe/services/plan_service.rb +49 -0
- data/lib/stripe/services/price_service.rb +52 -0
- data/lib/stripe/services/product_feature_service.rb +50 -0
- data/lib/stripe/services/product_service.rb +70 -0
- data/lib/stripe/services/promotion_code_service.rb +50 -0
- data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +17 -0
- data/lib/stripe/services/quote_line_item_service.rb +17 -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 +140 -0
- data/lib/stripe/services/radar/early_fraud_warning_service.rb +32 -0
- data/lib/stripe/services/radar/value_list_item_service.rb +52 -0
- data/lib/stripe/services/radar/value_list_service.rb +63 -0
- data/lib/stripe/services/radar_service.rb +15 -0
- data/lib/stripe/services/refund_service.rb +63 -0
- data/lib/stripe/services/reporting/report_run_service.rb +41 -0
- data/lib/stripe/services/reporting/report_type_service.rb +30 -0
- data/lib/stripe/services/reporting_service.rb +14 -0
- data/lib/stripe/services/review_service.rb +33 -0
- data/lib/stripe/services/setup_attempt_service.rb +17 -0
- data/lib/stripe/services/setup_intent_service.rb +105 -0
- data/lib/stripe/services/shipping_rate_service.rb +50 -0
- data/lib/stripe/services/sigma/scheduled_query_run_service.rb +30 -0
- data/lib/stripe/services/sigma_service.rb +13 -0
- data/lib/stripe/services/source_service.rb +64 -0
- data/lib/stripe/services/source_transaction_service.rb +17 -0
- data/lib/stripe/services/subscription_item_service.rb +69 -0
- data/lib/stripe/services/subscription_item_usage_record_service.rb +23 -0
- data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +19 -0
- data/lib/stripe/services/subscription_schedule_service.rb +83 -0
- data/lib/stripe/services/subscription_service.rb +127 -0
- data/lib/stripe/services/tax/association_service.rb +19 -0
- data/lib/stripe/services/tax/calculation_line_item_service.rb +19 -0
- data/lib/stripe/services/tax/calculation_service.rb +37 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax/registration_service.rb +54 -0
- data/lib/stripe/services/tax/settings_service.rb +30 -0
- data/lib/stripe/services/tax/transaction_line_item_service.rb +19 -0
- data/lib/stripe/services/tax/transaction_service.rb +48 -0
- data/lib/stripe/services/tax_code_service.rb +22 -0
- data/lib/stripe/services/tax_id_service.rb +38 -0
- data/lib/stripe/services/tax_rate_service.rb +38 -0
- data/lib/stripe/services/tax_service.rb +18 -0
- data/lib/stripe/services/terminal/configuration_service.rb +63 -0
- data/lib/stripe/services/terminal/connection_token_service.rb +19 -0
- data/lib/stripe/services/terminal/location_service.rb +64 -0
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
- data/lib/stripe/services/terminal/reader_service.rb +151 -0
- data/lib/stripe/services/terminal_service.rb +17 -0
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +19 -0
- data/lib/stripe/services/test_helpers/customer_service.rb +19 -0
- data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +76 -0
- data/lib/stripe/services/test_helpers/issuing/card_service.rb +65 -0
- data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +43 -0
- data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +43 -0
- data/lib/stripe/services/test_helpers/issuing_service.rb +19 -0
- data/lib/stripe/services/test_helpers/refund_service.rb +19 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +21 -0
- data/lib/stripe/services/test_helpers/terminal_service.rb +15 -0
- data/lib/stripe/services/test_helpers/test_clock_service.rb +63 -0
- data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +43 -0
- data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +54 -0
- data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +54 -0
- data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +21 -0
- data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +21 -0
- data/lib/stripe/services/test_helpers/treasury_service.rb +19 -0
- data/lib/stripe/services/test_helpers_service.rb +19 -0
- data/lib/stripe/services/token_service.rb +23 -0
- data/lib/stripe/services/topup_service.rb +49 -0
- data/lib/stripe/services/transfer_reversal_service.rb +56 -0
- data/lib/stripe/services/transfer_service.rb +47 -0
- data/lib/stripe/services/treasury/credit_reversal_service.rb +41 -0
- data/lib/stripe/services/treasury/debit_reversal_service.rb +41 -0
- data/lib/stripe/services/treasury/financial_account_features_service.rb +30 -0
- data/lib/stripe/services/treasury/financial_account_service.rb +59 -0
- data/lib/stripe/services/treasury/inbound_transfer_service.rb +52 -0
- data/lib/stripe/services/treasury/outbound_payment_service.rb +52 -0
- data/lib/stripe/services/treasury/outbound_transfer_service.rb +52 -0
- data/lib/stripe/services/treasury/received_credit_service.rb +30 -0
- data/lib/stripe/services/treasury/received_debit_service.rb +30 -0
- data/lib/stripe/services/treasury/transaction_entry_service.rb +30 -0
- data/lib/stripe/services/treasury/transaction_service.rb +30 -0
- data/lib/stripe/services/treasury_service.rb +22 -0
- data/lib/stripe/services/v1_services.rb +94 -0
- data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +21 -0
- data/lib/stripe/services/v2/billing/meter_event_service.rb +21 -0
- data/lib/stripe/services/v2/billing/meter_event_session_service.rb +21 -0
- data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +23 -0
- data/lib/stripe/services/v2/billing_service.rb +18 -0
- data/lib/stripe/services/v2/core/event_service.rb +32 -0
- data/lib/stripe/services/v2/core_service.rb +15 -0
- data/lib/stripe/services/v2_services.rb +14 -0
- data/lib/stripe/services/webhook_endpoint_service.rb +61 -0
- data/lib/stripe/services.rb +203 -0
- data/lib/stripe/singleton_api_resource.rb +1 -18
- data/lib/stripe/stripe_client.rb +51 -1067
- data/lib/stripe/stripe_configuration.rb +33 -19
- data/lib/stripe/stripe_object.rb +37 -18
- data/lib/stripe/stripe_service.rb +32 -0
- data/lib/stripe/thin_event.rb +17 -0
- data/lib/stripe/util.rb +68 -39
- data/lib/stripe/v2_list_object.rb +84 -0
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -1
- data/lib/stripe.rb +33 -27
- metadata +223 -2
@@ -0,0 +1,18 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module V2
|
6
|
+
class BillingService < StripeService
|
7
|
+
attr_reader :meter_event_session, :meter_event_adjustments, :meter_event_stream, :meter_events
|
8
|
+
|
9
|
+
def initialize(requestor)
|
10
|
+
super(requestor)
|
11
|
+
@meter_event_session = Stripe::V2::Billing::MeterEventSessionService.new(@requestor)
|
12
|
+
@meter_event_adjustments = Stripe::V2::Billing::MeterEventAdjustmentService.new(@requestor)
|
13
|
+
@meter_event_stream = Stripe::V2::Billing::MeterEventStreamService.new(@requestor)
|
14
|
+
@meter_events = Stripe::V2::Billing::MeterEventService.new(@requestor)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module V2
|
6
|
+
module Core
|
7
|
+
class EventService < StripeService
|
8
|
+
# List events, going back up to 30 days.
|
9
|
+
def list(params = {}, opts = {})
|
10
|
+
request(
|
11
|
+
method: :get,
|
12
|
+
path: "/v2/core/events",
|
13
|
+
params: params,
|
14
|
+
opts: opts,
|
15
|
+
base_address: :api
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Retrieves the details of an event.
|
20
|
+
def retrieve(id, params = {}, opts = {})
|
21
|
+
request(
|
22
|
+
method: :get,
|
23
|
+
path: format("/v2/core/events/%<id>s", { id: CGI.escape(id) }),
|
24
|
+
params: params,
|
25
|
+
opts: opts,
|
26
|
+
base_address: :api
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module V2
|
6
|
+
class CoreService < StripeService
|
7
|
+
attr_reader :events
|
8
|
+
|
9
|
+
def initialize(requestor)
|
10
|
+
super(requestor)
|
11
|
+
@events = Stripe::V2::Core::EventService.new(@requestor)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class V2Services < StripeService
|
6
|
+
attr_reader :billing, :core
|
7
|
+
|
8
|
+
def initialize(requestor)
|
9
|
+
super(requestor)
|
10
|
+
@billing = Stripe::V2::BillingService.new(@requestor)
|
11
|
+
@core = Stripe::V2::CoreService.new(@requestor)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class WebhookEndpointService < StripeService
|
6
|
+
# A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
|
7
|
+
def create(params = {}, opts = {})
|
8
|
+
request(
|
9
|
+
method: :post,
|
10
|
+
path: "/v1/webhook_endpoints",
|
11
|
+
params: params,
|
12
|
+
opts: opts,
|
13
|
+
base_address: :api
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
# You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard.
|
18
|
+
def delete(webhook_endpoint, params = {}, opts = {})
|
19
|
+
request(
|
20
|
+
method: :delete,
|
21
|
+
path: format("/v1/webhook_endpoints/%<webhook_endpoint>s", { webhook_endpoint: CGI.escape(webhook_endpoint) }),
|
22
|
+
params: params,
|
23
|
+
opts: opts,
|
24
|
+
base_address: :api
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns a list of your webhook endpoints.
|
29
|
+
def list(params = {}, opts = {})
|
30
|
+
request(
|
31
|
+
method: :get,
|
32
|
+
path: "/v1/webhook_endpoints",
|
33
|
+
params: params,
|
34
|
+
opts: opts,
|
35
|
+
base_address: :api
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Retrieves the webhook endpoint with the given ID.
|
40
|
+
def retrieve(webhook_endpoint, params = {}, opts = {})
|
41
|
+
request(
|
42
|
+
method: :get,
|
43
|
+
path: format("/v1/webhook_endpoints/%<webhook_endpoint>s", { webhook_endpoint: CGI.escape(webhook_endpoint) }),
|
44
|
+
params: params,
|
45
|
+
opts: opts,
|
46
|
+
base_address: :api
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.
|
51
|
+
def update(webhook_endpoint, params = {}, opts = {})
|
52
|
+
request(
|
53
|
+
method: :post,
|
54
|
+
path: format("/v1/webhook_endpoints/%<webhook_endpoint>s", { webhook_endpoint: CGI.escape(webhook_endpoint) }),
|
55
|
+
params: params,
|
56
|
+
opts: opts,
|
57
|
+
base_address: :api
|
58
|
+
)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,203 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "stripe/services/account_capability_service"
|
5
|
+
require "stripe/services/account_external_account_service"
|
6
|
+
require "stripe/services/account_link_service"
|
7
|
+
require "stripe/services/account_login_link_service"
|
8
|
+
require "stripe/services/account_notice_service"
|
9
|
+
require "stripe/services/account_person_service"
|
10
|
+
require "stripe/services/account_service"
|
11
|
+
require "stripe/services/account_session_service"
|
12
|
+
require "stripe/services/apple_pay_domain_service"
|
13
|
+
require "stripe/services/application_fee_refund_service"
|
14
|
+
require "stripe/services/application_fee_service"
|
15
|
+
require "stripe/services/apps/secret_service"
|
16
|
+
require "stripe/services/apps_service"
|
17
|
+
require "stripe/services/balance_service"
|
18
|
+
require "stripe/services/balance_transaction_service"
|
19
|
+
require "stripe/services/billing/alert_service"
|
20
|
+
require "stripe/services/billing/credit_balance_summary_service"
|
21
|
+
require "stripe/services/billing/credit_balance_transaction_service"
|
22
|
+
require "stripe/services/billing/credit_grant_service"
|
23
|
+
require "stripe/services/billing/meter_event_adjustment_service"
|
24
|
+
require "stripe/services/billing/meter_event_service"
|
25
|
+
require "stripe/services/billing/meter_event_summary_service"
|
26
|
+
require "stripe/services/billing/meter_service"
|
27
|
+
require "stripe/services/billing_portal/configuration_service"
|
28
|
+
require "stripe/services/billing_portal/session_service"
|
29
|
+
require "stripe/services/billing_portal_service"
|
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"
|
35
|
+
require "stripe/services/charge_service"
|
36
|
+
require "stripe/services/checkout/session_line_item_service"
|
37
|
+
require "stripe/services/checkout/session_service"
|
38
|
+
require "stripe/services/checkout_service"
|
39
|
+
require "stripe/services/climate/order_service"
|
40
|
+
require "stripe/services/climate/product_service"
|
41
|
+
require "stripe/services/climate/supplier_service"
|
42
|
+
require "stripe/services/climate_service"
|
43
|
+
require "stripe/services/confirmation_token_service"
|
44
|
+
require "stripe/services/country_spec_service"
|
45
|
+
require "stripe/services/coupon_service"
|
46
|
+
require "stripe/services/credit_note_line_item_service"
|
47
|
+
require "stripe/services/credit_note_preview_lines_service"
|
48
|
+
require "stripe/services/credit_note_service"
|
49
|
+
require "stripe/services/customer_balance_transaction_service"
|
50
|
+
require "stripe/services/customer_cash_balance_service"
|
51
|
+
require "stripe/services/customer_cash_balance_transaction_service"
|
52
|
+
require "stripe/services/customer_funding_instructions_service"
|
53
|
+
require "stripe/services/customer_payment_method_service"
|
54
|
+
require "stripe/services/customer_payment_source_service"
|
55
|
+
require "stripe/services/customer_service"
|
56
|
+
require "stripe/services/customer_session_service"
|
57
|
+
require "stripe/services/customer_tax_id_service"
|
58
|
+
require "stripe/services/dispute_service"
|
59
|
+
require "stripe/services/entitlements/active_entitlement_service"
|
60
|
+
require "stripe/services/entitlements/feature_service"
|
61
|
+
require "stripe/services/entitlements_service"
|
62
|
+
require "stripe/services/ephemeral_key_service"
|
63
|
+
require "stripe/services/event_service"
|
64
|
+
require "stripe/services/exchange_rate_service"
|
65
|
+
require "stripe/services/file_link_service"
|
66
|
+
require "stripe/services/file_service"
|
67
|
+
require "stripe/services/financial_connections/account_inferred_balance_service"
|
68
|
+
require "stripe/services/financial_connections/account_owner_service"
|
69
|
+
require "stripe/services/financial_connections/account_service"
|
70
|
+
require "stripe/services/financial_connections/institution_service"
|
71
|
+
require "stripe/services/financial_connections/session_service"
|
72
|
+
require "stripe/services/financial_connections/transaction_service"
|
73
|
+
require "stripe/services/financial_connections_service"
|
74
|
+
require "stripe/services/forwarding/request_service"
|
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"
|
79
|
+
require "stripe/services/identity/verification_report_service"
|
80
|
+
require "stripe/services/identity/verification_session_service"
|
81
|
+
require "stripe/services/identity_service"
|
82
|
+
require "stripe/services/invoice_item_service"
|
83
|
+
require "stripe/services/invoice_line_item_service"
|
84
|
+
require "stripe/services/invoice_payment_service"
|
85
|
+
require "stripe/services/invoice_rendering_template_service"
|
86
|
+
require "stripe/services/invoice_service"
|
87
|
+
require "stripe/services/invoice_upcoming_lines_service"
|
88
|
+
require "stripe/services/issuing/authorization_service"
|
89
|
+
require "stripe/services/issuing/card_service"
|
90
|
+
require "stripe/services/issuing/cardholder_service"
|
91
|
+
require "stripe/services/issuing/credit_underwriting_record_service"
|
92
|
+
require "stripe/services/issuing/dispute_service"
|
93
|
+
require "stripe/services/issuing/dispute_settlement_detail_service"
|
94
|
+
require "stripe/services/issuing/personalization_design_service"
|
95
|
+
require "stripe/services/issuing/physical_bundle_service"
|
96
|
+
require "stripe/services/issuing/token_service"
|
97
|
+
require "stripe/services/issuing/transaction_service"
|
98
|
+
require "stripe/services/issuing_service"
|
99
|
+
require "stripe/services/mandate_service"
|
100
|
+
require "stripe/services/margin_service"
|
101
|
+
require "stripe/services/order_line_item_service"
|
102
|
+
require "stripe/services/order_service"
|
103
|
+
require "stripe/services/payment_intent_service"
|
104
|
+
require "stripe/services/payment_link_line_item_service"
|
105
|
+
require "stripe/services/payment_link_service"
|
106
|
+
require "stripe/services/payment_method_configuration_service"
|
107
|
+
require "stripe/services/payment_method_domain_service"
|
108
|
+
require "stripe/services/payment_method_service"
|
109
|
+
require "stripe/services/payout_service"
|
110
|
+
require "stripe/services/plan_service"
|
111
|
+
require "stripe/services/price_service"
|
112
|
+
require "stripe/services/product_feature_service"
|
113
|
+
require "stripe/services/product_service"
|
114
|
+
require "stripe/services/promotion_code_service"
|
115
|
+
require "stripe/services/quote_computed_upfront_line_items_service"
|
116
|
+
require "stripe/services/quote_line_item_service"
|
117
|
+
require "stripe/services/quote_line_service"
|
118
|
+
require "stripe/services/quote_preview_invoice_service"
|
119
|
+
require "stripe/services/quote_preview_subscription_schedule_service"
|
120
|
+
require "stripe/services/quote_service"
|
121
|
+
require "stripe/services/radar/early_fraud_warning_service"
|
122
|
+
require "stripe/services/radar/value_list_item_service"
|
123
|
+
require "stripe/services/radar/value_list_service"
|
124
|
+
require "stripe/services/radar_service"
|
125
|
+
require "stripe/services/refund_service"
|
126
|
+
require "stripe/services/reporting/report_run_service"
|
127
|
+
require "stripe/services/reporting/report_type_service"
|
128
|
+
require "stripe/services/reporting_service"
|
129
|
+
require "stripe/services/review_service"
|
130
|
+
require "stripe/services/setup_attempt_service"
|
131
|
+
require "stripe/services/setup_intent_service"
|
132
|
+
require "stripe/services/shipping_rate_service"
|
133
|
+
require "stripe/services/sigma/scheduled_query_run_service"
|
134
|
+
require "stripe/services/sigma_service"
|
135
|
+
require "stripe/services/source_service"
|
136
|
+
require "stripe/services/source_transaction_service"
|
137
|
+
require "stripe/services/subscription_item_service"
|
138
|
+
require "stripe/services/subscription_item_usage_record_service"
|
139
|
+
require "stripe/services/subscription_item_usage_record_summary_service"
|
140
|
+
require "stripe/services/subscription_schedule_service"
|
141
|
+
require "stripe/services/subscription_service"
|
142
|
+
require "stripe/services/tax/association_service"
|
143
|
+
require "stripe/services/tax/calculation_line_item_service"
|
144
|
+
require "stripe/services/tax/calculation_service"
|
145
|
+
require "stripe/services/tax/form_service"
|
146
|
+
require "stripe/services/tax/registration_service"
|
147
|
+
require "stripe/services/tax/settings_service"
|
148
|
+
require "stripe/services/tax/transaction_line_item_service"
|
149
|
+
require "stripe/services/tax/transaction_service"
|
150
|
+
require "stripe/services/tax_code_service"
|
151
|
+
require "stripe/services/tax_id_service"
|
152
|
+
require "stripe/services/tax_rate_service"
|
153
|
+
require "stripe/services/tax_service"
|
154
|
+
require "stripe/services/terminal/configuration_service"
|
155
|
+
require "stripe/services/terminal/connection_token_service"
|
156
|
+
require "stripe/services/terminal/location_service"
|
157
|
+
require "stripe/services/terminal/reader_collected_data_service"
|
158
|
+
require "stripe/services/terminal/reader_service"
|
159
|
+
require "stripe/services/terminal_service"
|
160
|
+
require "stripe/services/test_helpers/confirmation_token_service"
|
161
|
+
require "stripe/services/test_helpers/customer_service"
|
162
|
+
require "stripe/services/test_helpers/issuing/authorization_service"
|
163
|
+
require "stripe/services/test_helpers/issuing/card_service"
|
164
|
+
require "stripe/services/test_helpers/issuing/personalization_design_service"
|
165
|
+
require "stripe/services/test_helpers/issuing/transaction_service"
|
166
|
+
require "stripe/services/test_helpers/issuing_service"
|
167
|
+
require "stripe/services/test_helpers/refund_service"
|
168
|
+
require "stripe/services/test_helpers/terminal/reader_service"
|
169
|
+
require "stripe/services/test_helpers/terminal_service"
|
170
|
+
require "stripe/services/test_helpers/test_clock_service"
|
171
|
+
require "stripe/services/test_helpers/treasury/inbound_transfer_service"
|
172
|
+
require "stripe/services/test_helpers/treasury/outbound_payment_service"
|
173
|
+
require "stripe/services/test_helpers/treasury/outbound_transfer_service"
|
174
|
+
require "stripe/services/test_helpers/treasury/received_credit_service"
|
175
|
+
require "stripe/services/test_helpers/treasury/received_debit_service"
|
176
|
+
require "stripe/services/test_helpers/treasury_service"
|
177
|
+
require "stripe/services/test_helpers_service"
|
178
|
+
require "stripe/services/token_service"
|
179
|
+
require "stripe/services/topup_service"
|
180
|
+
require "stripe/services/transfer_reversal_service"
|
181
|
+
require "stripe/services/transfer_service"
|
182
|
+
require "stripe/services/treasury/credit_reversal_service"
|
183
|
+
require "stripe/services/treasury/debit_reversal_service"
|
184
|
+
require "stripe/services/treasury/financial_account_features_service"
|
185
|
+
require "stripe/services/treasury/financial_account_service"
|
186
|
+
require "stripe/services/treasury/inbound_transfer_service"
|
187
|
+
require "stripe/services/treasury/outbound_payment_service"
|
188
|
+
require "stripe/services/treasury/outbound_transfer_service"
|
189
|
+
require "stripe/services/treasury/received_credit_service"
|
190
|
+
require "stripe/services/treasury/received_debit_service"
|
191
|
+
require "stripe/services/treasury/transaction_entry_service"
|
192
|
+
require "stripe/services/treasury/transaction_service"
|
193
|
+
require "stripe/services/treasury_service"
|
194
|
+
require "stripe/services/v1_services"
|
195
|
+
require "stripe/services/v2/billing/meter_event_adjustment_service"
|
196
|
+
require "stripe/services/v2/billing/meter_event_service"
|
197
|
+
require "stripe/services/v2/billing/meter_event_session_service"
|
198
|
+
require "stripe/services/v2/billing/meter_event_stream_service"
|
199
|
+
require "stripe/services/v2/billing_service"
|
200
|
+
require "stripe/services/v2/core/event_service"
|
201
|
+
require "stripe/services/v2/core_service"
|
202
|
+
require "stripe/services/v2_services"
|
203
|
+
require "stripe/services/webhook_endpoint_service"
|
@@ -17,24 +17,7 @@ module Stripe
|
|
17
17
|
self.class.resource_url
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.retrieve(
|
21
|
-
opts = nil
|
22
|
-
params = nil
|
23
|
-
if definitely_opts.nil?
|
24
|
-
unrecognized_key = params_or_opts.keys.find { |k| !Util::OPTS_USER_SPECIFIED.include?(k) }
|
25
|
-
if unrecognized_key
|
26
|
-
raise ArgumentError,
|
27
|
-
"Unrecognized request option: #{unrecognized_key}. Did you mean to specify this as retrieve params? " \
|
28
|
-
"If so, you must explicitly pass an opts hash as a second argument. " \
|
29
|
-
"For example: .retrieve({#{unrecognized_key}: 'foo'}, {})"
|
30
|
-
end
|
31
|
-
|
32
|
-
opts = params_or_opts
|
33
|
-
else
|
34
|
-
opts = definitely_opts
|
35
|
-
params = params_or_opts
|
36
|
-
end
|
37
|
-
|
20
|
+
def self.retrieve(params = {}, opts = {})
|
38
21
|
instance = new(params, Util.normalize_opts(opts))
|
39
22
|
instance.refresh
|
40
23
|
instance
|