stripe 18.1.0.pre.alpha.1 → 18.1.0.pre.alpha.3
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/lib/stripe/event_types.rb +8 -565
- data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +2 -0
- data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +2 -0
- data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +2 -0
- data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +2 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +21 -9
- data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +15 -1
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_firing_event.rb +30 -1
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_resolved_event.rb +30 -1
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +30 -1
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +30 -1
- data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +2 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +2 -0
- data/lib/stripe/events/{v1_sigma_scheduled_query_run_created_event.rb → v2_payments_off_session_payment_attempt_failed_event.rb} +7 -7
- data/lib/stripe/events/{v1_radar_early_fraud_warning_created_event.rb → v2_payments_off_session_payment_attempt_started_event.rb} +9 -7
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +2 -0
- data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +2 -0
- data/lib/stripe/events/v2_payments_off_session_payment_requires_capture_event.rb +2 -2
- data/lib/stripe/object_types.rb +4 -0
- data/lib/stripe/params/invoice_create_preview_params.rb +42 -6
- data/lib/stripe/params/payment_intent_create_params.rb +14 -1
- data/lib/stripe/params/product_catalog/trial_offer_create_params.rb +60 -0
- data/lib/stripe/params/quote_create_params.rb +15 -3
- data/lib/stripe/params/quote_update_params.rb +15 -3
- data/lib/stripe/params/subscription_create_params.rb +17 -1
- data/lib/stripe/params/subscription_item_create_params.rb +17 -1
- data/lib/stripe/params/subscription_item_update_params.rb +17 -1
- data/lib/stripe/params/subscription_schedule_amend_params.rb +15 -3
- data/lib/stripe/params/subscription_schedule_create_params.rb +10 -2
- data/lib/stripe/params/subscription_schedule_update_params.rb +10 -2
- data/lib/stripe/params/subscription_update_params.rb +17 -1
- data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +2 -2
- data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +2 -2
- data/lib/stripe/params/v2/billing/service_action_create_params.rb +24 -0
- data/lib/stripe/params/v2/core/account_create_params.rb +118 -3
- data/lib/stripe/params/v2/core/account_token_create_params.rb +1259 -0
- data/lib/stripe/params/v2/core/account_token_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/core/account_update_params.rb +119 -4
- data/lib/stripe/params/v2/core/accounts/person_create_params.rb +4 -0
- data/lib/stripe/params/v2/core/accounts/person_token_create_params.rb +487 -0
- data/lib/stripe/params/v2/core/accounts/person_token_retrieve_params.rb +12 -0
- data/lib/stripe/params/v2/core/accounts/person_update_params.rb +4 -0
- data/lib/stripe/params/v2/core/event_list_params.rb +21 -21
- data/lib/stripe/params/v2/money_management/currency_conversion_create_params.rb +68 -0
- data/lib/stripe/params/v2/money_management/currency_conversion_list_params.rb +20 -0
- data/lib/stripe/params/v2/money_management/currency_conversion_retrieve_params.rb +10 -0
- data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +12 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +12 -0
- data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +12 -0
- data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +12 -0
- data/lib/stripe/params/v2/payments/off_session_payment_capture_params.rb +5 -9
- data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +13 -89
- data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +11 -0
- data/lib/stripe/params.rb +8 -0
- data/lib/stripe/resources/delegated_checkout/requested_session.rb +9 -3
- data/lib/stripe/resources/payment_intent.rb +16 -0
- data/lib/stripe/resources/payment_method.rb +2 -2
- data/lib/stripe/resources/product_catalog/trial_offer.rb +101 -0
- data/lib/stripe/resources/quote.rb +8 -118
- data/lib/stripe/resources/quote_line.rb +6 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +7 -87
- data/lib/stripe/resources/subscription.rb +3 -87
- data/lib/stripe/resources/subscription_item.rb +24 -1
- data/lib/stripe/resources/subscription_schedule.rb +7 -87
- data/lib/stripe/resources/v2/billing/cadence.rb +2 -2
- data/lib/stripe/resources/v2/billing/collection_setting.rb +2 -2
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +2 -2
- data/lib/stripe/resources/v2/billing/meter_event.rb +2 -1
- data/lib/stripe/resources/v2/billing/service_action.rb +32 -2
- data/lib/stripe/resources/v2/core/account.rb +341 -10
- data/lib/stripe/resources/v2/core/account_person_token.rb +37 -0
- data/lib/stripe/resources/v2/core/account_token.rb +37 -0
- data/lib/stripe/resources/v2/core/event.rb +0 -2
- data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +15 -1
- data/lib/stripe/resources/v2/money_management/adjustment.rb +16 -1
- data/lib/stripe/resources/v2/money_management/currency_conversion.rb +94 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +49 -1
- data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +52 -3
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +46 -2
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +61 -3
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +46 -2
- data/lib/stripe/resources/v2/money_management/received_credit.rb +32 -0
- data/lib/stripe/resources/v2/money_management/received_debit.rb +32 -0
- data/lib/stripe/resources/v2/money_management/transaction.rb +65 -1
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +49 -1
- data/lib/stripe/resources/v2/payments/off_session_payment.rb +23 -79
- data/lib/stripe/resources.rb +6 -186
- data/lib/stripe/services/payment_method_service.rb +1 -1
- data/lib/stripe/services/product_catalog/trial_offer_service.rb +19 -0
- data/lib/stripe/services/product_catalog_service.rb +13 -0
- data/lib/stripe/services/v1_services.rb +2 -1
- data/lib/stripe/services/v2/core/account_service.rb +2 -1
- data/lib/stripe/services/v2/core/account_token_service.rb +32 -0
- data/lib/stripe/services/v2/core/accounts/person_token_service.rb +34 -0
- data/lib/stripe/services/v2/core_service.rb +2 -1
- data/lib/stripe/services/v2/money_management/currency_conversion_service.rb +45 -0
- data/lib/stripe/services/v2/money_management_service.rb +3 -1
- data/lib/stripe/services.rb +5 -0
- data/lib/stripe/stripe_object.rb +22 -1
- data/lib/stripe/version.rb +1 -1
- data/rbi/stripe.rbi +6451 -2138
- metadata +21 -188
- data/lib/stripe/events/v1_account_updated_event.rb +0 -44
- data/lib/stripe/events/v1_application_fee_created_event.rb +0 -44
- data/lib/stripe/events/v1_application_fee_refunded_event.rb +0 -44
- data/lib/stripe/events/v1_billing_portal_configuration_created_event.rb +0 -44
- data/lib/stripe/events/v1_billing_portal_configuration_updated_event.rb +0 -44
- data/lib/stripe/events/v1_capability_updated_event.rb +0 -44
- data/lib/stripe/events/v1_charge_captured_event.rb +0 -44
- data/lib/stripe/events/v1_charge_dispute_closed_event.rb +0 -44
- data/lib/stripe/events/v1_charge_dispute_created_event.rb +0 -44
- data/lib/stripe/events/v1_charge_dispute_funds_reinstated_event.rb +0 -44
- data/lib/stripe/events/v1_charge_dispute_funds_withdrawn_event.rb +0 -44
- data/lib/stripe/events/v1_charge_dispute_updated_event.rb +0 -44
- data/lib/stripe/events/v1_charge_expired_event.rb +0 -44
- data/lib/stripe/events/v1_charge_failed_event.rb +0 -44
- data/lib/stripe/events/v1_charge_pending_event.rb +0 -44
- data/lib/stripe/events/v1_charge_refund_updated_event.rb +0 -44
- data/lib/stripe/events/v1_charge_refunded_event.rb +0 -44
- data/lib/stripe/events/v1_charge_succeeded_event.rb +0 -44
- data/lib/stripe/events/v1_charge_updated_event.rb +0 -44
- data/lib/stripe/events/v1_checkout_session_async_payment_failed_event.rb +0 -44
- data/lib/stripe/events/v1_checkout_session_async_payment_succeeded_event.rb +0 -44
- data/lib/stripe/events/v1_checkout_session_completed_event.rb +0 -44
- data/lib/stripe/events/v1_checkout_session_expired_event.rb +0 -44
- data/lib/stripe/events/v1_climate_order_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_climate_order_created_event.rb +0 -44
- data/lib/stripe/events/v1_climate_order_delayed_event.rb +0 -44
- data/lib/stripe/events/v1_climate_order_delivered_event.rb +0 -44
- data/lib/stripe/events/v1_climate_order_product_substituted_event.rb +0 -44
- data/lib/stripe/events/v1_climate_product_created_event.rb +0 -44
- data/lib/stripe/events/v1_climate_product_pricing_updated_event.rb +0 -44
- data/lib/stripe/events/v1_coupon_created_event.rb +0 -44
- data/lib/stripe/events/v1_coupon_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_coupon_updated_event.rb +0 -44
- data/lib/stripe/events/v1_credit_note_created_event.rb +0 -44
- data/lib/stripe/events/v1_credit_note_updated_event.rb +0 -44
- data/lib/stripe/events/v1_credit_note_voided_event.rb +0 -44
- data/lib/stripe/events/v1_customer_created_event.rb +0 -44
- data/lib/stripe/events/v1_customer_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_created_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_paused_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_pending_update_applied_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_pending_update_expired_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_resumed_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_trial_will_end_event.rb +0 -44
- data/lib/stripe/events/v1_customer_subscription_updated_event.rb +0 -44
- data/lib/stripe/events/v1_customer_tax_id_created_event.rb +0 -44
- data/lib/stripe/events/v1_customer_tax_id_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_customer_tax_id_updated_event.rb +0 -44
- data/lib/stripe/events/v1_customer_updated_event.rb +0 -44
- data/lib/stripe/events/v1_file_created_event.rb +0 -44
- data/lib/stripe/events/v1_financial_connections_account_created_event.rb +0 -44
- data/lib/stripe/events/v1_financial_connections_account_deactivated_event.rb +0 -44
- data/lib/stripe/events/v1_financial_connections_account_disconnected_event.rb +0 -44
- data/lib/stripe/events/v1_financial_connections_account_reactivated_event.rb +0 -44
- data/lib/stripe/events/v1_financial_connections_account_refreshed_balance_event.rb +0 -44
- data/lib/stripe/events/v1_financial_connections_account_refreshed_ownership_event.rb +0 -44
- data/lib/stripe/events/v1_financial_connections_account_refreshed_transactions_event.rb +0 -44
- data/lib/stripe/events/v1_identity_verification_session_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_identity_verification_session_created_event.rb +0 -44
- data/lib/stripe/events/v1_identity_verification_session_processing_event.rb +0 -44
- data/lib/stripe/events/v1_identity_verification_session_redacted_event.rb +0 -44
- data/lib/stripe/events/v1_identity_verification_session_requires_input_event.rb +0 -44
- data/lib/stripe/events/v1_identity_verification_session_verified_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_created_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_finalization_failed_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_finalized_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_marked_uncollectible_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_overdue_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_overpaid_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_paid_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_payment_action_required_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_payment_failed_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_payment_paid_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_payment_succeeded_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_sent_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_upcoming_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_updated_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_voided_event.rb +0 -44
- data/lib/stripe/events/v1_invoice_will_be_due_event.rb +0 -44
- data/lib/stripe/events/v1_invoiceitem_created_event.rb +0 -44
- data/lib/stripe/events/v1_invoiceitem_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_authorization_created_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_authorization_request_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_authorization_updated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_card_created_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_card_updated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_cardholder_created_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_cardholder_updated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_dispute_closed_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_dispute_created_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_dispute_funds_reinstated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_dispute_funds_rescinded_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_dispute_submitted_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_dispute_updated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_personalization_design_activated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_personalization_design_deactivated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_personalization_design_rejected_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_personalization_design_updated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_token_created_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_token_updated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_transaction_created_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_transaction_purchase_details_receipt_updated_event.rb +0 -44
- data/lib/stripe/events/v1_issuing_transaction_updated_event.rb +0 -44
- data/lib/stripe/events/v1_mandate_updated_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_amount_capturable_updated_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_created_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_partially_funded_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_payment_failed_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_processing_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_requires_action_event.rb +0 -44
- data/lib/stripe/events/v1_payment_intent_succeeded_event.rb +0 -44
- data/lib/stripe/events/v1_payment_link_created_event.rb +0 -44
- data/lib/stripe/events/v1_payment_link_updated_event.rb +0 -44
- data/lib/stripe/events/v1_payment_method_attached_event.rb +0 -44
- data/lib/stripe/events/v1_payment_method_automatically_updated_event.rb +0 -44
- data/lib/stripe/events/v1_payment_method_detached_event.rb +0 -44
- data/lib/stripe/events/v1_payment_method_updated_event.rb +0 -44
- data/lib/stripe/events/v1_payout_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_payout_created_event.rb +0 -44
- data/lib/stripe/events/v1_payout_failed_event.rb +0 -44
- data/lib/stripe/events/v1_payout_paid_event.rb +0 -44
- data/lib/stripe/events/v1_payout_reconciliation_completed_event.rb +0 -44
- data/lib/stripe/events/v1_payout_updated_event.rb +0 -44
- data/lib/stripe/events/v1_person_created_event.rb +0 -44
- data/lib/stripe/events/v1_person_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_person_updated_event.rb +0 -44
- data/lib/stripe/events/v1_plan_created_event.rb +0 -44
- data/lib/stripe/events/v1_plan_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_plan_updated_event.rb +0 -44
- data/lib/stripe/events/v1_price_created_event.rb +0 -44
- data/lib/stripe/events/v1_price_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_price_updated_event.rb +0 -44
- data/lib/stripe/events/v1_product_created_event.rb +0 -44
- data/lib/stripe/events/v1_product_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_product_updated_event.rb +0 -44
- data/lib/stripe/events/v1_promotion_code_created_event.rb +0 -44
- data/lib/stripe/events/v1_promotion_code_updated_event.rb +0 -44
- data/lib/stripe/events/v1_quote_accepted_event.rb +0 -44
- data/lib/stripe/events/v1_quote_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_quote_created_event.rb +0 -44
- data/lib/stripe/events/v1_quote_finalized_event.rb +0 -44
- data/lib/stripe/events/v1_radar_early_fraud_warning_updated_event.rb +0 -44
- data/lib/stripe/events/v1_refund_created_event.rb +0 -44
- data/lib/stripe/events/v1_refund_failed_event.rb +0 -44
- data/lib/stripe/events/v1_refund_updated_event.rb +0 -44
- data/lib/stripe/events/v1_review_closed_event.rb +0 -44
- data/lib/stripe/events/v1_review_opened_event.rb +0 -44
- data/lib/stripe/events/v1_setup_intent_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_setup_intent_created_event.rb +0 -44
- data/lib/stripe/events/v1_setup_intent_requires_action_event.rb +0 -44
- data/lib/stripe/events/v1_setup_intent_setup_failed_event.rb +0 -44
- data/lib/stripe/events/v1_setup_intent_succeeded_event.rb +0 -44
- data/lib/stripe/events/v1_source_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_source_chargeable_event.rb +0 -44
- data/lib/stripe/events/v1_source_failed_event.rb +0 -44
- data/lib/stripe/events/v1_source_refund_attributes_required_event.rb +0 -44
- data/lib/stripe/events/v1_subscription_schedule_aborted_event.rb +0 -44
- data/lib/stripe/events/v1_subscription_schedule_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_subscription_schedule_completed_event.rb +0 -44
- data/lib/stripe/events/v1_subscription_schedule_created_event.rb +0 -44
- data/lib/stripe/events/v1_subscription_schedule_expiring_event.rb +0 -44
- data/lib/stripe/events/v1_subscription_schedule_released_event.rb +0 -44
- data/lib/stripe/events/v1_subscription_schedule_updated_event.rb +0 -44
- data/lib/stripe/events/v1_tax_rate_created_event.rb +0 -44
- data/lib/stripe/events/v1_tax_rate_updated_event.rb +0 -44
- data/lib/stripe/events/v1_terminal_reader_action_failed_event.rb +0 -44
- data/lib/stripe/events/v1_terminal_reader_action_succeeded_event.rb +0 -44
- data/lib/stripe/events/v1_terminal_reader_action_updated_event.rb +0 -44
- data/lib/stripe/events/v1_test_helpers_test_clock_advancing_event.rb +0 -44
- data/lib/stripe/events/v1_test_helpers_test_clock_created_event.rb +0 -44
- data/lib/stripe/events/v1_test_helpers_test_clock_deleted_event.rb +0 -44
- data/lib/stripe/events/v1_test_helpers_test_clock_internal_failure_event.rb +0 -44
- data/lib/stripe/events/v1_test_helpers_test_clock_ready_event.rb +0 -44
- data/lib/stripe/events/v1_topup_canceled_event.rb +0 -44
- data/lib/stripe/events/v1_topup_created_event.rb +0 -44
- data/lib/stripe/events/v1_topup_failed_event.rb +0 -44
- data/lib/stripe/events/v1_topup_reversed_event.rb +0 -44
- data/lib/stripe/events/v1_topup_succeeded_event.rb +0 -44
- data/lib/stripe/events/v1_transfer_created_event.rb +0 -44
- data/lib/stripe/events/v1_transfer_reversed_event.rb +0 -44
- data/lib/stripe/events/v1_transfer_updated_event.rb +0 -44
|
@@ -5,6 +5,18 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module MoneyManagement
|
|
7
7
|
class InboundTransferCreateParams < ::Stripe::RequestParams
|
|
8
|
+
class Amount < ::Stripe::RequestParams
|
|
9
|
+
# A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
|
10
|
+
attr_accessor :value
|
|
11
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
12
|
+
attr_accessor :currency
|
|
13
|
+
|
|
14
|
+
def initialize(value: nil, currency: nil)
|
|
15
|
+
@value = value
|
|
16
|
+
@currency = currency
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
8
20
|
class From < ::Stripe::RequestParams
|
|
9
21
|
# An optional currency field used to specify which currency is debited from the Payment Method.
|
|
10
22
|
# Since many Payment Methods support only one currency, this field is optional.
|
|
@@ -5,6 +5,18 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module MoneyManagement
|
|
7
7
|
class OutboundPaymentCreateParams < ::Stripe::RequestParams
|
|
8
|
+
class Amount < ::Stripe::RequestParams
|
|
9
|
+
# A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
|
10
|
+
attr_accessor :value
|
|
11
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
12
|
+
attr_accessor :currency
|
|
13
|
+
|
|
14
|
+
def initialize(value: nil, currency: nil)
|
|
15
|
+
@value = value
|
|
16
|
+
@currency = currency
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
8
20
|
class DeliveryOptions < ::Stripe::RequestParams
|
|
9
21
|
# Open Enum. Method for bank account.
|
|
10
22
|
attr_accessor :bank_account
|
|
@@ -5,6 +5,18 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module MoneyManagement
|
|
7
7
|
class OutboundPaymentQuoteCreateParams < ::Stripe::RequestParams
|
|
8
|
+
class Amount < ::Stripe::RequestParams
|
|
9
|
+
# A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
|
10
|
+
attr_accessor :value
|
|
11
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
12
|
+
attr_accessor :currency
|
|
13
|
+
|
|
14
|
+
def initialize(value: nil, currency: nil)
|
|
15
|
+
@value = value
|
|
16
|
+
@currency = currency
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
8
20
|
class DeliveryOptions < ::Stripe::RequestParams
|
|
9
21
|
# Open Enum. Method for bank account.
|
|
10
22
|
attr_accessor :bank_account
|
|
@@ -5,6 +5,18 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module MoneyManagement
|
|
7
7
|
class OutboundTransferCreateParams < ::Stripe::RequestParams
|
|
8
|
+
class Amount < ::Stripe::RequestParams
|
|
9
|
+
# A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
|
10
|
+
attr_accessor :value
|
|
11
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
12
|
+
attr_accessor :currency
|
|
13
|
+
|
|
14
|
+
def initialize(value: nil, currency: nil)
|
|
15
|
+
@value = value
|
|
16
|
+
@currency = currency
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
8
20
|
class DeliveryOptions < ::Stripe::RequestParams
|
|
9
21
|
# Open Enum. Method for bank account.
|
|
10
22
|
attr_accessor :bank_account
|
|
@@ -10,25 +10,21 @@ module Stripe
|
|
|
10
10
|
# automatically after the payment succeeds. If no amount is specified, by default
|
|
11
11
|
# the entire payment amount is transferred to the destination account. The amount
|
|
12
12
|
# must be less than or equal to the
|
|
13
|
-
# [amount_requested](https://docs.
|
|
13
|
+
# [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested),
|
|
14
14
|
# and must be a positive integer representing how much to transfer in the smallest
|
|
15
15
|
# currency unit (e.g., 100 cents to charge $1.00).
|
|
16
16
|
attr_accessor :amount
|
|
17
|
-
# The account (if any) that the payment is attributed to for tax reporting, and
|
|
18
|
-
# where funds from the payment are transferred to after payment success.
|
|
19
|
-
attr_accessor :destination
|
|
20
17
|
|
|
21
|
-
def initialize(amount: nil
|
|
18
|
+
def initialize(amount: nil)
|
|
22
19
|
@amount = amount
|
|
23
|
-
@destination = destination
|
|
24
20
|
end
|
|
25
21
|
end
|
|
26
22
|
# The amount to capture.
|
|
27
23
|
attr_accessor :amount_to_capture
|
|
28
|
-
# Set of [key-value pairs](https://docs.
|
|
24
|
+
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can
|
|
29
25
|
# attach to an object. This can be useful for storing additional information about
|
|
30
26
|
# the object in a structured format. Learn more about
|
|
31
|
-
# [storing information in metadata](https://docs.
|
|
27
|
+
# [storing information in metadata](https://docs.stripe.com/payments/payment-intents#storing-information-in-metadata).
|
|
32
28
|
attr_accessor :metadata
|
|
33
29
|
# Text that appears on the customer’s statement as the statement descriptor for a
|
|
34
30
|
# non-card charge. This value overrides the account’s default statement descriptor.
|
|
@@ -39,7 +35,7 @@ module Stripe
|
|
|
39
35
|
# [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static)
|
|
40
36
|
# to form the complete statement descriptor that appears on the customer’s statement.
|
|
41
37
|
attr_accessor :statement_descriptor_suffix
|
|
42
|
-
# The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.
|
|
38
|
+
# The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts).
|
|
43
39
|
attr_accessor :transfer_data
|
|
44
40
|
|
|
45
41
|
def initialize(
|
|
@@ -5,83 +5,15 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module Payments
|
|
7
7
|
class OffSessionPaymentCreateParams < ::Stripe::RequestParams
|
|
8
|
-
class
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
end
|
|
18
|
-
# The amount an item was discounted for. Positive integer.
|
|
19
|
-
attr_accessor :discount_amount
|
|
20
|
-
# Unique identifier of the product. At most 12 characters long.
|
|
21
|
-
attr_accessor :product_code
|
|
22
|
-
# Name of the product. At most 100 characters long.
|
|
23
|
-
attr_accessor :product_name
|
|
24
|
-
# Number of items of the product. Positive integer.
|
|
25
|
-
attr_accessor :quantity
|
|
26
|
-
# Contains information about the tax on the item.
|
|
27
|
-
attr_accessor :tax
|
|
28
|
-
# Cost of the product. Non-negative integer.
|
|
29
|
-
attr_accessor :unit_cost
|
|
30
|
-
|
|
31
|
-
def initialize(
|
|
32
|
-
discount_amount: nil,
|
|
33
|
-
product_code: nil,
|
|
34
|
-
product_name: nil,
|
|
35
|
-
quantity: nil,
|
|
36
|
-
tax: nil,
|
|
37
|
-
unit_cost: nil
|
|
38
|
-
)
|
|
39
|
-
@discount_amount = discount_amount
|
|
40
|
-
@product_code = product_code
|
|
41
|
-
@product_name = product_name
|
|
42
|
-
@quantity = quantity
|
|
43
|
-
@tax = tax
|
|
44
|
-
@unit_cost = unit_cost
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
class Shipping < ::Stripe::RequestParams
|
|
49
|
-
# Portion of the amount that is for shipping.
|
|
50
|
-
attr_accessor :amount
|
|
51
|
-
# The postal code that represents the shipping source.
|
|
52
|
-
attr_accessor :from_postal_code
|
|
53
|
-
# The postal code that represents the shipping destination.
|
|
54
|
-
attr_accessor :to_postal_code
|
|
55
|
-
|
|
56
|
-
def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil)
|
|
57
|
-
@amount = amount
|
|
58
|
-
@from_postal_code = from_postal_code
|
|
59
|
-
@to_postal_code = to_postal_code
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
class Tax < ::Stripe::RequestParams
|
|
64
|
-
# Total portion of the amount that is for tax.
|
|
65
|
-
attr_accessor :total_tax_amount
|
|
66
|
-
|
|
67
|
-
def initialize(total_tax_amount: nil)
|
|
68
|
-
@total_tax_amount = total_tax_amount
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
# The amount the total transaction was discounted for.
|
|
72
|
-
attr_accessor :discount_amount
|
|
73
|
-
# A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items.
|
|
74
|
-
attr_accessor :line_items
|
|
75
|
-
# Contains information about the shipping portion of the amount.
|
|
76
|
-
attr_accessor :shipping
|
|
77
|
-
# Contains information about the tax portion of the amount.
|
|
78
|
-
attr_accessor :tax
|
|
79
|
-
|
|
80
|
-
def initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil)
|
|
81
|
-
@discount_amount = discount_amount
|
|
82
|
-
@line_items = line_items
|
|
83
|
-
@shipping = shipping
|
|
84
|
-
@tax = tax
|
|
8
|
+
class Amount < ::Stripe::RequestParams
|
|
9
|
+
# A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
|
10
|
+
attr_accessor :value
|
|
11
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
12
|
+
attr_accessor :currency
|
|
13
|
+
|
|
14
|
+
def initialize(value: nil, currency: nil)
|
|
15
|
+
@value = value
|
|
16
|
+
@currency = currency
|
|
85
17
|
end
|
|
86
18
|
end
|
|
87
19
|
|
|
@@ -142,7 +74,7 @@ module Stripe
|
|
|
142
74
|
# automatically after the payment succeeds. If no amount is specified, by default
|
|
143
75
|
# the entire payment amount is transferred to the destination account. The amount
|
|
144
76
|
# must be less than or equal to the
|
|
145
|
-
# [amount_requested](https://docs.
|
|
77
|
+
# [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested),
|
|
146
78
|
# and must be a positive integer representing how much to transfer in the smallest
|
|
147
79
|
# currency unit (e.g., 100 cents to charge $1.00).
|
|
148
80
|
attr_accessor :amount
|
|
@@ -157,20 +89,16 @@ module Stripe
|
|
|
157
89
|
end
|
|
158
90
|
# The “presentment amount” to be collected from the customer.
|
|
159
91
|
attr_accessor :amount
|
|
160
|
-
# Provides industry-specific information about the amount.
|
|
161
|
-
attr_accessor :amount_details
|
|
162
92
|
# The frequency of the underlying payment.
|
|
163
93
|
attr_accessor :cadence
|
|
164
94
|
# Details about the capture configuration for the OffSessionPayment.
|
|
165
95
|
attr_accessor :capture
|
|
166
|
-
# Whether the OffSessionPayment should be captured automatically or manually.
|
|
167
|
-
attr_accessor :capture_method
|
|
168
96
|
# ID of the Customer to which this OffSessionPayment belongs.
|
|
169
97
|
attr_accessor :customer
|
|
170
|
-
# Set of [key-value pairs](https://docs.
|
|
98
|
+
# Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can
|
|
171
99
|
# attach to an object. This can be useful for storing additional information about
|
|
172
100
|
# the object in a structured format. Learn more about
|
|
173
|
-
# [storing information in metadata](https://docs.
|
|
101
|
+
# [storing information in metadata](https://docs.stripe.com/payments/payment-intents#storing-information-in-metadata).
|
|
174
102
|
attr_accessor :metadata
|
|
175
103
|
# The account (if any) for which the funds of the OffSessionPayment are intended.
|
|
176
104
|
attr_accessor :on_behalf_of
|
|
@@ -193,15 +121,13 @@ module Stripe
|
|
|
193
121
|
attr_accessor :statement_descriptor_suffix
|
|
194
122
|
# Test clock that can be used to advance the retry attempts in a sandbox.
|
|
195
123
|
attr_accessor :test_clock
|
|
196
|
-
# The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.
|
|
124
|
+
# The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts).
|
|
197
125
|
attr_accessor :transfer_data
|
|
198
126
|
|
|
199
127
|
def initialize(
|
|
200
128
|
amount: nil,
|
|
201
|
-
amount_details: nil,
|
|
202
129
|
cadence: nil,
|
|
203
130
|
capture: nil,
|
|
204
|
-
capture_method: nil,
|
|
205
131
|
customer: nil,
|
|
206
132
|
metadata: nil,
|
|
207
133
|
on_behalf_of: nil,
|
|
@@ -215,10 +141,8 @@ module Stripe
|
|
|
215
141
|
transfer_data: nil
|
|
216
142
|
)
|
|
217
143
|
@amount = amount
|
|
218
|
-
@amount_details = amount_details
|
|
219
144
|
@cadence = cadence
|
|
220
145
|
@capture = capture
|
|
221
|
-
@capture_method = capture_method
|
|
222
146
|
@customer = customer
|
|
223
147
|
@metadata = metadata
|
|
224
148
|
@on_behalf_of = on_behalf_of
|
|
@@ -5,6 +5,17 @@ module Stripe
|
|
|
5
5
|
module V2
|
|
6
6
|
module TestHelpers
|
|
7
7
|
class FinancialAddressCreditParams < ::Stripe::RequestParams
|
|
8
|
+
class Amount < ::Stripe::RequestParams
|
|
9
|
+
# A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
|
|
10
|
+
attr_accessor :value
|
|
11
|
+
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
12
|
+
attr_accessor :currency
|
|
13
|
+
|
|
14
|
+
def initialize(value: nil, currency: nil)
|
|
15
|
+
@value = value
|
|
16
|
+
@currency = currency
|
|
17
|
+
end
|
|
18
|
+
end
|
|
8
19
|
# Object containing the amount value and currency to credit.
|
|
9
20
|
attr_accessor :amount
|
|
10
21
|
# Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit.
|
data/lib/stripe/params.rb
CHANGED
|
@@ -402,6 +402,7 @@ require "stripe/params/privacy/redaction_job_run_params"
|
|
|
402
402
|
require "stripe/params/privacy/redaction_job_update_params"
|
|
403
403
|
require "stripe/params/privacy/redaction_job_validate_params"
|
|
404
404
|
require "stripe/params/privacy/redaction_job_validation_error_list_params"
|
|
405
|
+
require "stripe/params/product_catalog/trial_offer_create_params"
|
|
405
406
|
require "stripe/params/product_create_params"
|
|
406
407
|
require "stripe/params/product_delete_params"
|
|
407
408
|
require "stripe/params/product_feature_create_params"
|
|
@@ -762,11 +763,15 @@ require "stripe/params/v2/core/account_create_params"
|
|
|
762
763
|
require "stripe/params/v2/core/account_link_create_params"
|
|
763
764
|
require "stripe/params/v2/core/account_list_params"
|
|
764
765
|
require "stripe/params/v2/core/account_retrieve_params"
|
|
766
|
+
require "stripe/params/v2/core/account_token_create_params"
|
|
767
|
+
require "stripe/params/v2/core/account_token_retrieve_params"
|
|
765
768
|
require "stripe/params/v2/core/account_update_params"
|
|
766
769
|
require "stripe/params/v2/core/accounts/person_create_params"
|
|
767
770
|
require "stripe/params/v2/core/accounts/person_delete_params"
|
|
768
771
|
require "stripe/params/v2/core/accounts/person_list_params"
|
|
769
772
|
require "stripe/params/v2/core/accounts/person_retrieve_params"
|
|
773
|
+
require "stripe/params/v2/core/accounts/person_token_create_params"
|
|
774
|
+
require "stripe/params/v2/core/accounts/person_token_retrieve_params"
|
|
770
775
|
require "stripe/params/v2/core/accounts/person_update_params"
|
|
771
776
|
require "stripe/params/v2/core/claimable_sandbox_create_params"
|
|
772
777
|
require "stripe/params/v2/core/claimable_sandbox_retrieve_params"
|
|
@@ -795,6 +800,9 @@ require "stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params"
|
|
|
795
800
|
require "stripe/params/v2/core/vault/us_bank_account_update_params"
|
|
796
801
|
require "stripe/params/v2/money_management/adjustment_list_params"
|
|
797
802
|
require "stripe/params/v2/money_management/adjustment_retrieve_params"
|
|
803
|
+
require "stripe/params/v2/money_management/currency_conversion_create_params"
|
|
804
|
+
require "stripe/params/v2/money_management/currency_conversion_list_params"
|
|
805
|
+
require "stripe/params/v2/money_management/currency_conversion_retrieve_params"
|
|
798
806
|
require "stripe/params/v2/money_management/financial_account_close_params"
|
|
799
807
|
require "stripe/params/v2/money_management/financial_account_create_params"
|
|
800
808
|
require "stripe/params/v2/money_management/financial_account_list_params"
|
|
@@ -151,8 +151,12 @@ module Stripe
|
|
|
151
151
|
attr_reader :quantity
|
|
152
152
|
# The SKU ID of the line item.
|
|
153
153
|
attr_reader :sku_id
|
|
154
|
-
# The unit amount of the
|
|
154
|
+
# The per-unit amount of the item before any discounts or taxes are applied.
|
|
155
155
|
attr_reader :unit_amount
|
|
156
|
+
# The total discount for this line item. If no discount were applied, defaults to 0.
|
|
157
|
+
attr_reader :amount_discount
|
|
158
|
+
# The total before any discounts or taxes are applied.
|
|
159
|
+
attr_reader :amount_subtotal
|
|
156
160
|
|
|
157
161
|
def self.inner_class_types
|
|
158
162
|
@inner_class_types = {}
|
|
@@ -279,12 +283,14 @@ module Stripe
|
|
|
279
283
|
@field_remappings = {}
|
|
280
284
|
end
|
|
281
285
|
end
|
|
282
|
-
# The amount discount of the total details.
|
|
283
|
-
attr_reader :amount_discount
|
|
284
286
|
# The amount fulfillment of the total details.
|
|
285
287
|
attr_reader :amount_fulfillment
|
|
286
288
|
# The amount tax of the total details.
|
|
287
289
|
attr_reader :amount_tax
|
|
290
|
+
# The amount of order-level discounts applied to the cart. The total discount amount for this session can be computed by summing the cart discount and the item discounts.
|
|
291
|
+
attr_reader :amount_cart_discount
|
|
292
|
+
# The amount of item-level discounts applied to the cart. The total discount amount for this session can be computed by summing the cart discount and the item discounts.
|
|
293
|
+
attr_reader :amount_items_discount
|
|
288
294
|
# The applicable fees of the total details.
|
|
289
295
|
attr_reader :applicable_fees
|
|
290
296
|
|
|
@@ -3459,6 +3459,19 @@ module Stripe
|
|
|
3459
3459
|
@field_remappings = {}
|
|
3460
3460
|
end
|
|
3461
3461
|
end
|
|
3462
|
+
|
|
3463
|
+
class PaymentsOrchestration < ::Stripe::StripeObject
|
|
3464
|
+
# Whether this feature is enabled.
|
|
3465
|
+
attr_reader :enabled
|
|
3466
|
+
|
|
3467
|
+
def self.inner_class_types
|
|
3468
|
+
@inner_class_types = {}
|
|
3469
|
+
end
|
|
3470
|
+
|
|
3471
|
+
def self.field_remappings
|
|
3472
|
+
@field_remappings = {}
|
|
3473
|
+
end
|
|
3474
|
+
end
|
|
3462
3475
|
# Allocated Funds configuration for this PaymentIntent.
|
|
3463
3476
|
attr_reader :allocated_funds
|
|
3464
3477
|
# Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
|
|
@@ -3573,6 +3586,8 @@ module Stripe
|
|
|
3573
3586
|
attr_reader :transfer_data
|
|
3574
3587
|
# A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers).
|
|
3575
3588
|
attr_reader :transfer_group
|
|
3589
|
+
# When you enable this parameter, this PaymentIntent will route your payment to processors that you configure in the dashboard.
|
|
3590
|
+
attr_reader :payments_orchestration
|
|
3576
3591
|
|
|
3577
3592
|
# Manually reconcile the remaining amount for a customer_balance PaymentIntent.
|
|
3578
3593
|
def apply_customer_balance(params = {}, opts = {})
|
|
@@ -3947,6 +3962,7 @@ module Stripe
|
|
|
3947
3962
|
processing: Processing,
|
|
3948
3963
|
shipping: Shipping,
|
|
3949
3964
|
transfer_data: TransferData,
|
|
3965
|
+
payments_orchestration: PaymentsOrchestration,
|
|
3950
3966
|
}
|
|
3951
3967
|
end
|
|
3952
3968
|
|
|
@@ -1723,7 +1723,7 @@ module Stripe
|
|
|
1723
1723
|
)
|
|
1724
1724
|
end
|
|
1725
1725
|
|
|
1726
|
-
# Retrieves a
|
|
1726
|
+
# Retrieves a PaymentMethod's Balance.
|
|
1727
1727
|
def check_balance(params = {}, opts = {})
|
|
1728
1728
|
request_stripe_object(
|
|
1729
1729
|
method: :post,
|
|
@@ -1733,7 +1733,7 @@ module Stripe
|
|
|
1733
1733
|
)
|
|
1734
1734
|
end
|
|
1735
1735
|
|
|
1736
|
-
# Retrieves a
|
|
1736
|
+
# Retrieves a PaymentMethod's Balance.
|
|
1737
1737
|
def self.check_balance(payment_method, params = {}, opts = {})
|
|
1738
1738
|
request_stripe_object(
|
|
1739
1739
|
method: :post,
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Stripe
|
|
5
|
+
module ProductCatalog
|
|
6
|
+
# Resource for the TrialOffer API, used to describe a subscription item's trial period settings.
|
|
7
|
+
# Renders a TrialOffer object that describes the price, duration, end_behavior of a trial offer.
|
|
8
|
+
class TrialOffer < APIResource
|
|
9
|
+
extend Stripe::APIOperations::Create
|
|
10
|
+
|
|
11
|
+
OBJECT_NAME = "product_catalog.trial_offer"
|
|
12
|
+
def self.object_name
|
|
13
|
+
"product_catalog.trial_offer"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class Duration < ::Stripe::StripeObject
|
|
17
|
+
class Relative < ::Stripe::StripeObject
|
|
18
|
+
# The number of iterations of the price's interval for this trial offer.
|
|
19
|
+
attr_reader :iterations
|
|
20
|
+
|
|
21
|
+
def self.inner_class_types
|
|
22
|
+
@inner_class_types = {}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.field_remappings
|
|
26
|
+
@field_remappings = {}
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
# Attribute for field relative
|
|
30
|
+
attr_reader :relative
|
|
31
|
+
# The type of trial offer duration.
|
|
32
|
+
attr_reader :type
|
|
33
|
+
|
|
34
|
+
def self.inner_class_types
|
|
35
|
+
@inner_class_types = { relative: Relative }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.field_remappings
|
|
39
|
+
@field_remappings = {}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
class EndBehavior < ::Stripe::StripeObject
|
|
44
|
+
class Transition < ::Stripe::StripeObject
|
|
45
|
+
# The new price to use at the end of the trial offer period.
|
|
46
|
+
attr_reader :price
|
|
47
|
+
|
|
48
|
+
def self.inner_class_types
|
|
49
|
+
@inner_class_types = {}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def self.field_remappings
|
|
53
|
+
@field_remappings = {}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
# Attribute for field transition
|
|
57
|
+
attr_reader :transition
|
|
58
|
+
# The type of behavior when the trial offer ends.
|
|
59
|
+
attr_reader :type
|
|
60
|
+
|
|
61
|
+
def self.inner_class_types
|
|
62
|
+
@inner_class_types = { transition: Transition }
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def self.field_remappings
|
|
66
|
+
@field_remappings = {}
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
# Attribute for field duration
|
|
70
|
+
attr_reader :duration
|
|
71
|
+
# Attribute for field end_behavior
|
|
72
|
+
attr_reader :end_behavior
|
|
73
|
+
# Unique identifier for the object.
|
|
74
|
+
attr_reader :id
|
|
75
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
76
|
+
attr_reader :livemode
|
|
77
|
+
# String representing the object's type. Objects of the same type share the same value.
|
|
78
|
+
attr_reader :object
|
|
79
|
+
# The price during the trial offer.
|
|
80
|
+
attr_reader :price
|
|
81
|
+
|
|
82
|
+
# Creates a trial offer.
|
|
83
|
+
def self.create(params = {}, opts = {})
|
|
84
|
+
request_stripe_object(
|
|
85
|
+
method: :post,
|
|
86
|
+
path: "/v1/product_catalog/trial_offers",
|
|
87
|
+
params: params,
|
|
88
|
+
opts: opts
|
|
89
|
+
)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def self.inner_class_types
|
|
93
|
+
@inner_class_types = { duration: Duration, end_behavior: EndBehavior }
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def self.field_remappings
|
|
97
|
+
@field_remappings = {}
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|