Class: Dodopayments::Models::ProductCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/dodopayments/models/product_create_params.rb

Overview

Defined Under Namespace

Classes: DigitalProductDelivery

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Method Summary

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, 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

This class inherits a constructor from Dodopayments::Internal::Type::BaseModel

Instance Attribute Details

#addonsArray<String>?

Addons available for subscription product

Returns:

  • (Array<String>, nil)


32
# File 'lib/dodopayments/models/product_create_params.rb', line 32

optional :addons, Dodopayments::Internal::Type::ArrayOf[String], nil?: true

#brand_idString?

Brand id for the product, if not provided will default to primary brand

Returns:

  • (String, nil)


38
# File 'lib/dodopayments/models/product_create_params.rb', line 38

optional :brand_id, String, nil?: true

#credit_entitlementsArray<Dodopayments::Models::AttachCreditEntitlement>?

Optional credit entitlements to attach (max 3)



44
45
46
# File 'lib/dodopayments/models/product_create_params.rb', line 44

optional :credit_entitlements,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachCreditEntitlement] },
nil?: true

#descriptionString?

Optional description of the product

Returns:

  • (String, nil)


52
# File 'lib/dodopayments/models/product_create_params.rb', line 52

optional :description, String, nil?: true

#digital_product_deliveryDodopayments::Models::ProductCreateParams::DigitalProductDelivery?

Choose how you would like you digital product delivered

deprecated: use entitlements instead



60
61
62
# File 'lib/dodopayments/models/product_create_params.rb', line 60

optional :digital_product_delivery,
-> { Dodopayments::ProductCreateParams::DigitalProductDelivery },
nil?: true

#entitlementsArray<Dodopayments::Models::AttachProductEntitlement>?

Optional entitlements to attach to this product (max 20)



68
69
70
# File 'lib/dodopayments/models/product_create_params.rb', line 68

optional :entitlements,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachProductEntitlement] },
nil?: true

#license_key_activation_messageString?

Deprecated.

Optional message displayed during license key activation

deprecated: use entitlements instead. Ignored when a ‘license_key` entitlement is attached via the `entitlements` field.

Returns:

  • (String, nil)


81
# File 'lib/dodopayments/models/product_create_params.rb', line 81

optional :license_key_activation_message, String, nil?: true

#license_key_activations_limitInteger?

Deprecated.

The number of times the license key can be activated. Must be 0 or greater

deprecated: use entitlements instead. Ignored when a ‘license_key` entitlement is attached via the `entitlements` field.

Returns:

  • (Integer, nil)


92
# File 'lib/dodopayments/models/product_create_params.rb', line 92

optional :license_key_activations_limit, Integer, nil?: true

#license_key_durationDodopayments::Models::LicenseKeyDuration?

Duration configuration for the license key. Set to null if you don’t want the license key to expire. For subscriptions, the lifetime of the license key is tied to the subscription period

deprecated: use entitlements instead. Ignored when a ‘license_key` entitlement is attached via the `entitlements` field.



103
# File 'lib/dodopayments/models/product_create_params.rb', line 103

optional :license_key_duration, -> { Dodopayments::LicenseKeyDuration }, nil?: true

#license_key_enabledBoolean?

Deprecated.

When true, generates and sends a license key to your customer. Defaults to false

deprecated: use entitlements instead. If a ‘license_key` entitlement is also attached via the `entitlements` field, the `license_key_*` config fields below are ignored — the attached entitlement’s config is the source of truth.

Returns:

  • (Boolean, nil)


115
# File 'lib/dodopayments/models/product_create_params.rb', line 115

optional :license_key_enabled, Dodopayments::Internal::Type::Boolean, nil?: true

#metadataHash{Symbol=>String}?

Additional metadata for the product

Returns:

  • (Hash{Symbol=>String}, nil)


121
# File 'lib/dodopayments/models/product_create_params.rb', line 121

optional :metadata, Dodopayments::Internal::Type::HashOf[String]

#nameString

Name of the product

Returns:

  • (String)


14
# File 'lib/dodopayments/models/product_create_params.rb', line 14

required :name, String

#priceDodopayments::Models::Price::OneTimePrice, ...

Price configuration for the product



20
# File 'lib/dodopayments/models/product_create_params.rb', line 20

required :price, union: -> { Dodopayments::Price }

#tax_categorySymbol, Dodopayments::Models::TaxCategory

Tax category applied to this product



26
# File 'lib/dodopayments/models/product_create_params.rb', line 26

required :tax_category, enum: -> { Dodopayments::TaxCategory }