Class: Dodopayments::Models::SubscriptionCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::SubscriptionCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/dodopayments/models/subscription_create_params.rb
Overview
Instance Attribute Summary collapse
-
#addons ⇒ Array<Dodopayments::Models::AttachAddon>?
Attach addons to this subscription.
-
#allowed_payment_method_types ⇒ Array<Symbol, Dodopayments::Models::PaymentMethodTypes>?
List of payment methods allowed during checkout.
-
#billing ⇒ Dodopayments::Models::BillingAddress
Billing address information for the subscription.
-
#billing_currency ⇒ Symbol, ...
Fix the currency in which the end customer is billed.
-
#customer ⇒ Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer
Customer details for the subscription.
-
#discount_code ⇒ String?
Discount Code to apply to the subscription.
-
#force_3ds ⇒ Boolean?
Override merchant default 3DS behaviour for this subscription.
-
#mandate_min_amount_inr_paise ⇒ Integer?
Override the merchant-level mandate floor (in INR paise) for INR e-mandates on Indian-card recurring payments.
-
#metadata ⇒ Hash{Symbol=>String}?
Additional metadata for the subscription Defaults to empty if not specified.
- #on_demand ⇒ Dodopayments::Models::OnDemandSubscription?
-
#one_time_product_cart ⇒ Array<Dodopayments::Models::OneTimeProductCartItem>?
List of one time products that will be bundled with the first payment for this subscription.
-
#payment_link ⇒ Boolean?
If true, generates a payment link.
-
#payment_method_id ⇒ String?
Optional payment method ID to use for this subscription.
-
#product_id ⇒ String
Unique identifier of the product to subscribe to.
-
#quantity ⇒ Integer
Number of units to subscribe for.
-
#redirect_immediately ⇒ Boolean?
If true, redirects the customer immediately after payment completion False by default.
-
#require_phone_number ⇒ Boolean?
If true, the customer’s phone number is required to create this subscription.
-
#return_url ⇒ String?
Optional URL to redirect after successful subscription creation.
-
#short_link ⇒ Boolean?
If true, returns a shortened payment link.
-
#show_saved_payment_methods ⇒ Boolean?
Display saved payment methods of a returning customer False by default.
-
#tax_id ⇒ String?
Tax ID in case the payment is B2B.
-
#trial_period_days ⇒ Integer?
Optional trial period in days If specified, this value overrides the trial period set in the product’s price Must be between 0 and 10000 days.
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
-
#initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {}) ⇒ Object
constructor
Some parameter documentations has been truncated, see SubscriptionCreateParams for more details.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {}) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::SubscriptionCreateParams for more details.
|
|
# File 'lib/dodopayments/models/subscription_create_params.rb', line 164
|
Instance Attribute Details
#addons ⇒ Array<Dodopayments::Models::AttachAddon>?
Attach addons to this subscription
38 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 38 optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true |
#allowed_payment_method_types ⇒ Array<Symbol, Dodopayments::Models::PaymentMethodTypes>?
List of payment methods allowed during checkout.
Customers will never see payment methods that are not in this list. However, adding a method here **does not guarantee** customers will see it. Availability still depends on other factors (e.g., customer location, merchant settings).
49 50 51 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 49 optional :allowed_payment_method_types, -> { Dodopayments::Internal::Type::ArrayOf[enum: Dodopayments::PaymentMethodTypes] }, nil?: true |
#billing ⇒ Dodopayments::Models::BillingAddress
Billing address information for the subscription
14 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 14 required :billing, -> { Dodopayments::BillingAddress } |
#billing_currency ⇒ Symbol, ...
Fix the currency in which the end customer is billed. If Dodo Payments cannot support that currency for this transaction, it will not proceed
58 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 58 optional :billing_currency, enum: -> { Dodopayments::Currency }, nil?: true |
#customer ⇒ Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer
Customer details for the subscription
20 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 20 required :customer, union: -> { Dodopayments::CustomerRequest } |
#discount_code ⇒ String?
Discount Code to apply to the subscription
64 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 64 optional :discount_code, String, nil?: true |
#force_3ds ⇒ Boolean?
Override merchant default 3DS behaviour for this subscription
70 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 70 optional :force_3ds, Dodopayments::Internal::Type::Boolean, nil?: true |
#mandate_min_amount_inr_paise ⇒ Integer?
Override the merchant-level mandate floor (in INR paise) for INR e-mandates on Indian-card recurring payments. The mandate amount sent to the processor is ‘max(this_floor, actual_billing_amount)`, so this is effectively the customer-facing authorization ceiling whenever billing is lower. When unset, the merchant setting applies; when that’s also unset, the system default of ₹15,000 applies.
81 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 81 optional :mandate_min_amount_inr_paise, Integer, nil?: true |
#metadata ⇒ Hash{Symbol=>String}?
Additional metadata for the subscription Defaults to empty if not specified
87 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 87 optional :metadata, Dodopayments::Internal::Type::HashOf[String] |
#on_demand ⇒ Dodopayments::Models::OnDemandSubscription?
92 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 92 optional :on_demand, -> { Dodopayments::OnDemandSubscription }, nil?: true |
#one_time_product_cart ⇒ Array<Dodopayments::Models::OneTimeProductCartItem>?
List of one time products that will be bundled with the first payment for this subscription
99 100 101 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 99 optional :one_time_product_cart, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::OneTimeProductCartItem] }, nil?: true |
#payment_link ⇒ Boolean?
If true, generates a payment link. Defaults to false if not specified.
107 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 107 optional :payment_link, Dodopayments::Internal::Type::Boolean, nil?: true |
#payment_method_id ⇒ String?
Optional payment method ID to use for this subscription. If provided, customer_id must also be provided (via AttachExistingCustomer). The payment method will be validated for eligibility with the subscription’s currency.
115 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 115 optional :payment_method_id, String, nil?: true |
#product_id ⇒ String
Unique identifier of the product to subscribe to
26 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 26 required :product_id, String |
#quantity ⇒ Integer
Number of units to subscribe for. Must be at least 1.
32 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 32 required :quantity, Integer |
#redirect_immediately ⇒ Boolean?
If true, redirects the customer immediately after payment completion False by default
122 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 122 optional :redirect_immediately, Dodopayments::Internal::Type::Boolean |
#require_phone_number ⇒ Boolean?
If true, the customer’s phone number is required to create this subscription. Typically set alongside ‘payment_link=true` so merchants can enforce phone collection on the hosted payment page. Defaults to false.
130 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 130 optional :require_phone_number, Dodopayments::Internal::Type::Boolean |
#return_url ⇒ String?
Optional URL to redirect after successful subscription creation
136 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 136 optional :return_url, String, nil?: true |
#short_link ⇒ Boolean?
If true, returns a shortened payment link. Defaults to false if not specified.
142 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 142 optional :short_link, Dodopayments::Internal::Type::Boolean, nil?: true |
#show_saved_payment_methods ⇒ Boolean?
Display saved payment methods of a returning customer False by default
148 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 148 optional :show_saved_payment_methods, Dodopayments::Internal::Type::Boolean |
#tax_id ⇒ String?
Tax ID in case the payment is B2B. If tax id validation fails the payment creation will fail
155 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 155 optional :tax_id, String, nil?: true |
#trial_period_days ⇒ Integer?
Optional trial period in days If specified, this value overrides the trial period set in the product’s price Must be between 0 and 10000 days
162 |
# File 'lib/dodopayments/models/subscription_create_params.rb', line 162 optional :trial_period_days, Integer, nil?: true |