stripe 5.55.0 → 13.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +567 -4
- data/Gemfile +12 -4
- data/Makefile +18 -3
- data/OPENAPI_VERSION +1 -0
- data/README.md +93 -21
- data/Rakefile +3 -6
- data/VERSION +1 -1
- data/examples/README.md +16 -0
- data/examples/example_template.rb +36 -0
- data/examples/meter_event_stream.rb +57 -0
- data/examples/thinevent_webhook_handler.rb +39 -0
- data/{bin → exe}/stripe-console +1 -1
- data/justfile +43 -0
- data/lib/data/ca-certificates.crt +1241 -1937
- data/lib/stripe/api_operations/create.rb +6 -2
- data/lib/stripe/api_operations/delete.rb +12 -7
- data/lib/stripe/api_operations/list.rb +6 -9
- data/lib/stripe/api_operations/nested_resource.rb +63 -35
- data/lib/stripe/api_operations/request.rb +29 -65
- data/lib/stripe/api_operations/save.rb +20 -10
- data/lib/stripe/api_operations/search.rb +11 -9
- data/lib/stripe/api_operations/singleton_save.rb +90 -0
- data/lib/stripe/api_requestor.rb +1131 -0
- data/lib/stripe/api_resource.rb +48 -18
- data/lib/stripe/api_resource_test_helpers.rb +9 -3
- data/lib/stripe/api_version.rb +8 -0
- data/lib/stripe/connection_manager.rb +5 -7
- data/lib/stripe/errors.rb +11 -13
- 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/instrumentation.rb +37 -15
- data/lib/stripe/list_object.rb +5 -3
- data/lib/stripe/multipart_encoder.rb +7 -7
- data/lib/stripe/oauth.rb +14 -21
- data/lib/stripe/object_types.rb +151 -103
- data/lib/stripe/request_options.rb +129 -0
- data/lib/stripe/resources/account.rb +129 -25
- data/lib/stripe/resources/account_link.rb +12 -0
- data/lib/stripe/resources/account_session.rb +25 -0
- data/lib/stripe/resources/alipay_account.rb +1 -1
- data/lib/stripe/resources/apple_pay_domain.rb +38 -0
- data/lib/stripe/resources/application_fee.rb +9 -2
- data/lib/stripe/resources/application_fee_refund.rb +9 -2
- data/lib/stripe/resources/apps/secret.rb +55 -0
- data/lib/stripe/resources/balance.rb +14 -0
- data/lib/stripe/resources/balance_transaction.rb +19 -0
- data/lib/stripe/resources/bank_account.rb +53 -4
- data/lib/stripe/resources/billing/alert.rb +87 -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 +90 -0
- data/lib/stripe/resources/billing/meter.rb +85 -0
- data/lib/stripe/resources/billing/meter_event.rb +26 -0
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +26 -0
- data/lib/stripe/resources/billing/meter_event_summary.rb +17 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +34 -0
- data/lib/stripe/resources/billing_portal/session.rb +27 -0
- data/lib/stripe/resources/capability.rb +7 -2
- data/lib/stripe/resources/card.rb +34 -3
- data/lib/stripe/resources/cash_balance.rb +4 -0
- data/lib/stripe/resources/charge.rb +52 -3
- data/lib/stripe/resources/checkout/session.rb +83 -5
- data/lib/stripe/resources/climate/order.rb +67 -0
- data/lib/stripe/resources/climate/product.rb +27 -0
- data/lib/stripe/resources/climate/supplier.rb +26 -0
- data/lib/stripe/resources/confirmation_token.rb +39 -0
- data/lib/stripe/resources/country_spec.rb +14 -0
- data/lib/stripe/resources/coupon.rb +48 -0
- data/lib/stripe/resources/credit_note.rb +67 -9
- data/lib/stripe/resources/credit_note_line_item.rb +4 -0
- data/lib/stripe/resources/customer.rb +172 -28
- data/lib/stripe/resources/customer_balance_transaction.rb +9 -1
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +15 -0
- data/lib/stripe/resources/customer_session.rb +29 -0
- data/lib/stripe/resources/discount.rb +7 -0
- data/lib/stripe/resources/dispute.rb +41 -3
- data/lib/stripe/resources/entitlements/active_entitlement.rb +26 -0
- data/lib/stripe/resources/entitlements/feature.rb +49 -0
- data/lib/stripe/resources/ephemeral_key.rb +23 -0
- data/lib/stripe/resources/event.rb +38 -0
- data/lib/stripe/resources/exchange_rate.rb +34 -0
- data/lib/stripe/resources/file.rb +37 -15
- data/lib/stripe/resources/file_link.rb +26 -0
- data/lib/stripe/resources/financial_connections/account.rb +101 -6
- data/lib/stripe/resources/financial_connections/account_owner.rb +4 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +4 -0
- data/lib/stripe/resources/financial_connections/session.rb +14 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +26 -0
- data/lib/stripe/resources/forwarding/request.rb +52 -0
- data/lib/stripe/resources/funding_instructions.rb +8 -0
- data/lib/stripe/resources/identity/verification_report.rb +24 -0
- data/lib/stripe/resources/identity/verification_session.rb +117 -5
- data/lib/stripe/resources/invoice.rb +247 -20
- data/lib/stripe/resources/invoice_item.rb +54 -0
- data/lib/stripe/resources/invoice_line_item.rb +22 -1
- data/lib/stripe/resources/invoice_rendering_template.rb +65 -0
- data/lib/stripe/resources/issuing/authorization.rb +210 -5
- data/lib/stripe/resources/issuing/card.rb +128 -4
- data/lib/stripe/resources/issuing/cardholder.rb +36 -0
- data/lib/stripe/resources/issuing/dispute.rb +47 -2
- data/lib/stripe/resources/issuing/personalization_design.rb +119 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +26 -0
- data/lib/stripe/resources/issuing/token.rb +32 -0
- data/lib/stripe/resources/issuing/transaction.rb +79 -0
- data/lib/stripe/resources/line_item.rb +4 -0
- data/lib/stripe/resources/login_link.rb +4 -0
- data/lib/stripe/resources/mandate.rb +4 -0
- data/lib/stripe/resources/payment_intent.rb +238 -15
- data/lib/stripe/resources/payment_link.rb +39 -2
- data/lib/stripe/resources/payment_method.rb +78 -5
- data/lib/stripe/resources/payment_method_configuration.rb +59 -0
- data/lib/stripe/resources/payment_method_domain.rb +79 -0
- data/lib/stripe/resources/payout.rb +63 -5
- data/lib/stripe/resources/person.rb +8 -1
- data/lib/stripe/resources/plan.rb +51 -0
- data/lib/stripe/resources/price.rb +30 -1
- data/lib/stripe/resources/product.rb +55 -1
- data/lib/stripe/resources/product_feature.rb +13 -0
- data/lib/stripe/resources/promotion_code.rb +25 -0
- data/lib/stripe/resources/quote.rb +97 -39
- data/lib/stripe/resources/radar/early_fraud_warning.rb +17 -0
- data/lib/stripe/resources/radar/value_list.rb +56 -0
- data/lib/stripe/resources/radar/value_list_item.rb +46 -0
- data/lib/stripe/resources/refund.rb +70 -5
- data/lib/stripe/resources/reporting/report_run.rb +31 -0
- data/lib/stripe/resources/reporting/report_type.rb +21 -1
- data/lib/stripe/resources/reversal.rb +17 -2
- data/lib/stripe/resources/review.rb +24 -3
- data/lib/stripe/resources/setup_attempt.rb +12 -0
- data/lib/stripe/resources/setup_intent.rb +113 -7
- data/lib/stripe/resources/shipping_rate.rb +25 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +17 -0
- data/lib/stripe/resources/source.rb +52 -10
- data/lib/stripe/resources/source_transaction.rb +7 -0
- data/lib/stripe/resources/subscription.rb +118 -5
- data/lib/stripe/resources/subscription_item.rb +54 -6
- data/lib/stripe/resources/subscription_schedule.rb +60 -5
- data/lib/stripe/resources/tax/calculation.rb +48 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +13 -0
- data/lib/stripe/resources/tax/registration.rb +54 -0
- data/lib/stripe/resources/tax/settings.rb +17 -0
- data/lib/stripe/resources/tax/transaction.rb +56 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +13 -0
- data/lib/stripe/resources/tax_code.rb +9 -0
- data/lib/stripe/resources/tax_id.rb +34 -12
- data/lib/stripe/resources/tax_rate.rb +26 -0
- data/lib/stripe/resources/terminal/configuration.rb +54 -0
- data/lib/stripe/resources/terminal/connection_token.rb +16 -0
- data/lib/stripe/resources/terminal/location.rb +57 -0
- data/lib/stripe/resources/terminal/reader.rb +138 -11
- data/lib/stripe/resources/test_helpers/test_clock.rb +58 -3
- data/lib/stripe/resources/token.rb +29 -0
- data/lib/stripe/resources/topup.rb +40 -3
- data/lib/stripe/resources/transfer.rb +29 -6
- data/lib/stripe/resources/treasury/credit_reversal.rb +37 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +37 -0
- data/lib/stripe/resources/treasury/financial_account.rb +109 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +15 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +130 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +152 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +152 -0
- data/lib/stripe/resources/treasury/received_credit.rb +47 -0
- data/lib/stripe/resources/treasury/received_debit.rb +47 -0
- data/lib/stripe/resources/treasury/transaction.rb +26 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +30 -0
- data/lib/stripe/resources/usage_record.rb +9 -0
- data/lib/stripe/resources/usage_record_summary.rb +4 -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/v2/event_destination.rb +13 -0
- data/lib/stripe/resources/webhook_endpoint.rb +55 -0
- data/lib/stripe/resources.rb +51 -10
- data/lib/stripe/search_result_object.rb +5 -2
- 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_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/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_owner_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +81 -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 +15 -0
- data/lib/stripe/services/forwarding/request_service.rb +41 -0
- data/lib/stripe/services/forwarding_service.rb +13 -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_rendering_template_service.rb +50 -0
- data/lib/stripe/services/invoice_service.rb +202 -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/dispute_service.rb +63 -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 +20 -0
- data/lib/stripe/services/mandate_service.rb +17 -0
- data/lib/stripe/services/oauth_service.rb +63 -0
- data/lib/stripe/services/payment_intent_service.rb +204 -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_service.rb +92 -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 +72 -0
- data/lib/stripe/services/subscription_service.rb +127 -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/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 +16 -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_service.rb +118 -0
- data/lib/stripe/services/terminal_service.rb +16 -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 +87 -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 +70 -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 +89 -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_destination_service.rb +98 -0
- data/lib/stripe/services/v2/core/event_service.rb +32 -0
- data/lib/stripe/services/v2/core_service.rb +16 -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 +182 -0
- data/lib/stripe/singleton_api_resource.rb +3 -3
- data/lib/stripe/stripe_client.rb +55 -1028
- data/lib/stripe/stripe_configuration.rb +63 -42
- data/lib/stripe/stripe_object.rb +60 -38
- data/lib/stripe/stripe_response.rb +1 -3
- data/lib/stripe/stripe_service.rb +32 -0
- data/lib/stripe/thin_event.rb +37 -0
- data/lib/stripe/util.rb +109 -45
- data/lib/stripe/v2_list_object.rb +84 -0
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +3 -2
- data/lib/stripe.rb +39 -0
- data/stripe.gemspec +7 -4
- metadata +252 -13
- data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
- data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
- data/lib/stripe/resources/issuing/card_details.rb +0 -10
- data/lib/stripe/resources/order.rb +0 -33
- data/lib/stripe/resources/order_return.rb +0 -10
- data/lib/stripe/resources/recipient.rb +0 -14
- data/lib/stripe/resources/sku.rb +0 -13
- data/lib/stripe/resources/three_d_secure.rb +0 -14
@@ -0,0 +1,60 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class ApplicationFeeRefundService < StripeService
|
6
|
+
# Refunds an application fee that has previously been collected but not yet refunded.
|
7
|
+
# Funds will be refunded to the Stripe account from which the fee was originally collected.
|
8
|
+
#
|
9
|
+
# You can optionally refund only part of an application fee.
|
10
|
+
# You can do so multiple times, until the entire fee has been refunded.
|
11
|
+
#
|
12
|
+
# Once entirely refunded, an application fee can't be refunded again.
|
13
|
+
# This method will raise an error when called on an already-refunded application fee,
|
14
|
+
# or when trying to refund more money than is left on an application fee.
|
15
|
+
def create(id, params = {}, opts = {})
|
16
|
+
request(
|
17
|
+
method: :post,
|
18
|
+
path: format("/v1/application_fees/%<id>s/refunds", { id: CGI.escape(id) }),
|
19
|
+
params: params,
|
20
|
+
opts: opts,
|
21
|
+
base_address: :api
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
# You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds.
|
26
|
+
def list(id, params = {}, opts = {})
|
27
|
+
request(
|
28
|
+
method: :get,
|
29
|
+
path: format("/v1/application_fees/%<id>s/refunds", { id: CGI.escape(id) }),
|
30
|
+
params: params,
|
31
|
+
opts: opts,
|
32
|
+
base_address: :api
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
# By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee.
|
37
|
+
def retrieve(fee, id, params = {}, opts = {})
|
38
|
+
request(
|
39
|
+
method: :get,
|
40
|
+
path: format("/v1/application_fees/%<fee>s/refunds/%<id>s", { fee: CGI.escape(fee), id: CGI.escape(id) }),
|
41
|
+
params: params,
|
42
|
+
opts: opts,
|
43
|
+
base_address: :api
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
48
|
+
#
|
49
|
+
# This request only accepts metadata as an argument.
|
50
|
+
def update(fee, id, params = {}, opts = {})
|
51
|
+
request(
|
52
|
+
method: :post,
|
53
|
+
path: format("/v1/application_fees/%<fee>s/refunds/%<id>s", { fee: CGI.escape(fee), id: CGI.escape(id) }),
|
54
|
+
params: params,
|
55
|
+
opts: opts,
|
56
|
+
base_address: :api
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class ApplicationFeeService < StripeService
|
6
|
+
attr_reader :refunds
|
7
|
+
|
8
|
+
def initialize(requestor)
|
9
|
+
super(requestor)
|
10
|
+
@refunds = Stripe::ApplicationFeeRefundService.new(@requestor)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
|
14
|
+
def list(params = {}, opts = {})
|
15
|
+
request(
|
16
|
+
method: :get,
|
17
|
+
path: "/v1/application_fees",
|
18
|
+
params: params,
|
19
|
+
opts: opts,
|
20
|
+
base_address: :api
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee.
|
25
|
+
def retrieve(id, params = {}, opts = {})
|
26
|
+
request(
|
27
|
+
method: :get,
|
28
|
+
path: format("/v1/application_fees/%<id>s", { id: CGI.escape(id) }),
|
29
|
+
params: params,
|
30
|
+
opts: opts,
|
31
|
+
base_address: :api
|
32
|
+
)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Apps
|
6
|
+
class SecretService < StripeService
|
7
|
+
# Create or replace a secret in the secret store.
|
8
|
+
def create(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: "/v1/apps/secrets",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Deletes a secret from the secret store by name and scope.
|
19
|
+
def delete_where(params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :post,
|
22
|
+
path: "/v1/apps/secrets/delete",
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Finds a secret in the secret store by name and scope.
|
30
|
+
def find(params = {}, opts = {})
|
31
|
+
request(
|
32
|
+
method: :get,
|
33
|
+
path: "/v1/apps/secrets/find",
|
34
|
+
params: params,
|
35
|
+
opts: opts,
|
36
|
+
base_address: :api
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
# List all secrets stored on the given scope.
|
41
|
+
def list(params = {}, opts = {})
|
42
|
+
request(
|
43
|
+
method: :get,
|
44
|
+
path: "/v1/apps/secrets",
|
45
|
+
params: params,
|
46
|
+
opts: opts,
|
47
|
+
base_address: :api
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class AppsService < StripeService
|
6
|
+
attr_reader :secrets
|
7
|
+
|
8
|
+
def initialize(requestor)
|
9
|
+
super(requestor)
|
10
|
+
@secrets = Stripe::Apps::SecretService.new(@requestor)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class BalanceService < StripeService
|
6
|
+
# Retrieves the current account balance, based on the authentication that was used to make the request.
|
7
|
+
# For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances).
|
8
|
+
def retrieve(params = {}, opts = {})
|
9
|
+
request(method: :get, path: "/v1/balance", params: params, opts: opts, base_address: :api)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class BalanceTransactionService < StripeService
|
6
|
+
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
|
7
|
+
#
|
8
|
+
# Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
|
9
|
+
def list(params = {}, opts = {})
|
10
|
+
request(
|
11
|
+
method: :get,
|
12
|
+
path: "/v1/balance_transactions",
|
13
|
+
params: params,
|
14
|
+
opts: opts,
|
15
|
+
base_address: :api
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Retrieves the balance transaction with the given ID.
|
20
|
+
#
|
21
|
+
# Note that this endpoint previously used the path /v1/balance/history/:id.
|
22
|
+
def retrieve(id, params = {}, opts = {})
|
23
|
+
request(
|
24
|
+
method: :get,
|
25
|
+
path: format("/v1/balance_transactions/%<id>s", { id: CGI.escape(id) }),
|
26
|
+
params: params,
|
27
|
+
opts: opts,
|
28
|
+
base_address: :api
|
29
|
+
)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class AlertService < StripeService
|
7
|
+
# Reactivates this alert, allowing it to trigger again.
|
8
|
+
def activate(id, params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: format("/v1/billing/alerts/%<id>s/activate", { id: CGI.escape(id) }),
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Archives this alert, removing it from the list view and APIs. This is non-reversible.
|
19
|
+
def archive(id, params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :post,
|
22
|
+
path: format("/v1/billing/alerts/%<id>s/archive", { id: CGI.escape(id) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Creates a billing alert
|
30
|
+
def create(params = {}, opts = {})
|
31
|
+
request(
|
32
|
+
method: :post,
|
33
|
+
path: "/v1/billing/alerts",
|
34
|
+
params: params,
|
35
|
+
opts: opts,
|
36
|
+
base_address: :api
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Deactivates this alert, preventing it from triggering.
|
41
|
+
def deactivate(id, params = {}, opts = {})
|
42
|
+
request(
|
43
|
+
method: :post,
|
44
|
+
path: format("/v1/billing/alerts/%<id>s/deactivate", { id: CGI.escape(id) }),
|
45
|
+
params: params,
|
46
|
+
opts: opts,
|
47
|
+
base_address: :api
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Lists billing active and inactive alerts
|
52
|
+
def list(params = {}, opts = {})
|
53
|
+
request(
|
54
|
+
method: :get,
|
55
|
+
path: "/v1/billing/alerts",
|
56
|
+
params: params,
|
57
|
+
opts: opts,
|
58
|
+
base_address: :api
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Retrieves a billing alert given an ID
|
63
|
+
def retrieve(id, params = {}, opts = {})
|
64
|
+
request(
|
65
|
+
method: :get,
|
66
|
+
path: format("/v1/billing/alerts/%<id>s", { id: CGI.escape(id) }),
|
67
|
+
params: params,
|
68
|
+
opts: opts,
|
69
|
+
base_address: :api
|
70
|
+
)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class CreditBalanceSummaryService < StripeService
|
7
|
+
# Retrieves the credit balance summary for a customer.
|
8
|
+
def retrieve(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: "/v1/billing/credit_balance_summary",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class CreditBalanceTransactionService < StripeService
|
7
|
+
# Retrieve a list of credit balance transactions.
|
8
|
+
def list(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: "/v1/billing/credit_balance_transactions",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Retrieves a credit balance transaction.
|
19
|
+
def retrieve(id, params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :get,
|
22
|
+
path: format("/v1/billing/credit_balance_transactions/%<id>s", { id: CGI.escape(id) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class CreditGrantService < StripeService
|
7
|
+
# Creates a credit grant.
|
8
|
+
def create(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: "/v1/billing/credit_grants",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Expires a credit grant.
|
19
|
+
def expire(id, params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :post,
|
22
|
+
path: format("/v1/billing/credit_grants/%<id>s/expire", { id: CGI.escape(id) }),
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Retrieve a list of credit grants.
|
30
|
+
def list(params = {}, opts = {})
|
31
|
+
request(
|
32
|
+
method: :get,
|
33
|
+
path: "/v1/billing/credit_grants",
|
34
|
+
params: params,
|
35
|
+
opts: opts,
|
36
|
+
base_address: :api
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Retrieves a credit grant.
|
41
|
+
def retrieve(id, params = {}, opts = {})
|
42
|
+
request(
|
43
|
+
method: :get,
|
44
|
+
path: format("/v1/billing/credit_grants/%<id>s", { id: CGI.escape(id) }),
|
45
|
+
params: params,
|
46
|
+
opts: opts,
|
47
|
+
base_address: :api
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Updates a credit grant.
|
52
|
+
def update(id, params = {}, opts = {})
|
53
|
+
request(
|
54
|
+
method: :post,
|
55
|
+
path: format("/v1/billing/credit_grants/%<id>s", { id: CGI.escape(id) }),
|
56
|
+
params: params,
|
57
|
+
opts: opts,
|
58
|
+
base_address: :api
|
59
|
+
)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Voids a credit grant.
|
63
|
+
def void_grant(id, params = {}, opts = {})
|
64
|
+
request(
|
65
|
+
method: :post,
|
66
|
+
path: format("/v1/billing/credit_grants/%<id>s/void", { id: CGI.escape(id) }),
|
67
|
+
params: params,
|
68
|
+
opts: opts,
|
69
|
+
base_address: :api
|
70
|
+
)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class MeterEventAdjustmentService < StripeService
|
7
|
+
# Creates a billing meter event adjustment.
|
8
|
+
def create(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: "/v1/billing/meter_event_adjustments",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class MeterEventService < StripeService
|
7
|
+
# Creates a billing meter event.
|
8
|
+
def create(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: "/v1/billing/meter_events",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class MeterEventSummaryService < StripeService
|
7
|
+
# Retrieve a list of billing meter event summaries.
|
8
|
+
def list(id, params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :get,
|
11
|
+
path: format("/v1/billing/meters/%<id>s/event_summaries", { id: CGI.escape(id) }),
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module Billing
|
6
|
+
class MeterService < StripeService
|
7
|
+
attr_reader :event_summaries
|
8
|
+
|
9
|
+
def initialize(requestor)
|
10
|
+
super(requestor)
|
11
|
+
@event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor)
|
12
|
+
end
|
13
|
+
|
14
|
+
# Creates a billing meter.
|
15
|
+
def create(params = {}, opts = {})
|
16
|
+
request(
|
17
|
+
method: :post,
|
18
|
+
path: "/v1/billing/meters",
|
19
|
+
params: params,
|
20
|
+
opts: opts,
|
21
|
+
base_address: :api
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
# When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
|
26
|
+
def deactivate(id, params = {}, opts = {})
|
27
|
+
request(
|
28
|
+
method: :post,
|
29
|
+
path: format("/v1/billing/meters/%<id>s/deactivate", { id: CGI.escape(id) }),
|
30
|
+
params: params,
|
31
|
+
opts: opts,
|
32
|
+
base_address: :api
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Retrieve a list of billing meters.
|
37
|
+
def list(params = {}, opts = {})
|
38
|
+
request(
|
39
|
+
method: :get,
|
40
|
+
path: "/v1/billing/meters",
|
41
|
+
params: params,
|
42
|
+
opts: opts,
|
43
|
+
base_address: :api
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
# When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
|
48
|
+
def reactivate(id, params = {}, opts = {})
|
49
|
+
request(
|
50
|
+
method: :post,
|
51
|
+
path: format("/v1/billing/meters/%<id>s/reactivate", { id: CGI.escape(id) }),
|
52
|
+
params: params,
|
53
|
+
opts: opts,
|
54
|
+
base_address: :api
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Retrieves a billing meter given an ID.
|
59
|
+
def retrieve(id, params = {}, opts = {})
|
60
|
+
request(
|
61
|
+
method: :get,
|
62
|
+
path: format("/v1/billing/meters/%<id>s", { id: CGI.escape(id) }),
|
63
|
+
params: params,
|
64
|
+
opts: opts,
|
65
|
+
base_address: :api
|
66
|
+
)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Updates a billing meter.
|
70
|
+
def update(id, params = {}, opts = {})
|
71
|
+
request(
|
72
|
+
method: :post,
|
73
|
+
path: format("/v1/billing/meters/%<id>s", { id: CGI.escape(id) }),
|
74
|
+
params: params,
|
75
|
+
opts: opts,
|
76
|
+
base_address: :api
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module BillingPortal
|
6
|
+
class ConfigurationService < StripeService
|
7
|
+
# Creates a configuration that describes the functionality and behavior of a PortalSession
|
8
|
+
def create(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: "/v1/billing_portal/configurations",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Returns a list of configurations that describe the functionality of the customer portal.
|
19
|
+
def list(params = {}, opts = {})
|
20
|
+
request(
|
21
|
+
method: :get,
|
22
|
+
path: "/v1/billing_portal/configurations",
|
23
|
+
params: params,
|
24
|
+
opts: opts,
|
25
|
+
base_address: :api
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Retrieves a configuration that describes the functionality of the customer portal.
|
30
|
+
def retrieve(configuration, params = {}, opts = {})
|
31
|
+
request(
|
32
|
+
method: :get,
|
33
|
+
path: format("/v1/billing_portal/configurations/%<configuration>s", { configuration: CGI.escape(configuration) }),
|
34
|
+
params: params,
|
35
|
+
opts: opts,
|
36
|
+
base_address: :api
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Updates a configuration that describes the functionality of the customer portal.
|
41
|
+
def update(configuration, params = {}, opts = {})
|
42
|
+
request(
|
43
|
+
method: :post,
|
44
|
+
path: format("/v1/billing_portal/configurations/%<configuration>s", { configuration: CGI.escape(configuration) }),
|
45
|
+
params: params,
|
46
|
+
opts: opts,
|
47
|
+
base_address: :api
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module BillingPortal
|
6
|
+
class SessionService < StripeService
|
7
|
+
# Creates a session of the customer portal.
|
8
|
+
def create(params = {}, opts = {})
|
9
|
+
request(
|
10
|
+
method: :post,
|
11
|
+
path: "/v1/billing_portal/sessions",
|
12
|
+
params: params,
|
13
|
+
opts: opts,
|
14
|
+
base_address: :api
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class BillingPortalService < StripeService
|
6
|
+
attr_reader :configurations, :sessions
|
7
|
+
|
8
|
+
def initialize(requestor)
|
9
|
+
super(requestor)
|
10
|
+
@configurations = Stripe::BillingPortal::ConfigurationService.new(@requestor)
|
11
|
+
@sessions = Stripe::BillingPortal::SessionService.new(@requestor)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
class BillingService < StripeService
|
6
|
+
attr_reader :alerts, :credit_balance_summary, :credit_balance_transactions, :credit_grants, :meters, :meter_events, :meter_event_adjustments
|
7
|
+
|
8
|
+
def initialize(requestor)
|
9
|
+
super(requestor)
|
10
|
+
@alerts = Stripe::Billing::AlertService.new(@requestor)
|
11
|
+
@credit_balance_summary = Stripe::Billing::CreditBalanceSummaryService.new(@requestor)
|
12
|
+
@credit_balance_transactions = Stripe::Billing::CreditBalanceTransactionService
|
13
|
+
.new(@requestor)
|
14
|
+
@credit_grants = Stripe::Billing::CreditGrantService.new(@requestor)
|
15
|
+
@meters = Stripe::Billing::MeterService.new(@requestor)
|
16
|
+
@meter_events = Stripe::Billing::MeterEventService.new(@requestor)
|
17
|
+
@meter_event_adjustments = Stripe::Billing::MeterEventAdjustmentService.new(@requestor)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|