Class: Dodopayments::Models::Product

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/product.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

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(brand_id:, business_id:, created_at:, credit_entitlements:, entitlements:, is_recurring:, license_key_enabled:, metadata:, price:, product_id:, tax_category:, updated_at:, addons: nil, description: nil, digital_product_delivery: nil, image: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, name: nil, product_collection_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::Product for more details.

Parameters:

  • brand_id (String)
  • business_id (String)

    Unique identifier for the business to which the product belongs.

  • created_at (Time)

    Timestamp when the product was created.

  • credit_entitlements (Array<Dodopayments::Models::CreditEntitlementMappingResponse>)

    Attached credit entitlements with settings

  • entitlements (Array<Dodopayments::Models::ProductEntitlementSummary>)

    Attached entitlements (integration-based access grants)

  • is_recurring (Boolean)

    Indicates if the product is recurring (e.g., subscriptions).

  • license_key_enabled (Boolean)

    Indicates whether the product requires a license key.

  • metadata (Hash{Symbol=>String})

    Additional custom data associated with the product

  • price (Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice)

    Pricing information for the product.

  • product_id (String)

    Unique identifier for the product.

  • tax_category (Symbol, Dodopayments::Models::TaxCategory)

    Tax category associated with the product.

  • updated_at (Time)

    Timestamp when the product was last updated.

  • addons (Array<String>, nil) (defaults to: nil)

    Available Addons for subscription products

  • description (String, nil) (defaults to: nil)

    Description of the product, optional.

  • digital_product_delivery (Dodopayments::Models::DigitalProductDelivery, nil) (defaults to: nil)

    Digital-product-delivery payload for a grant. Populated for grants whose

  • image (String, nil) (defaults to: nil)

    URL of the product image, optional.

  • license_key_activation_message (String, nil) (defaults to: nil)

    Message sent upon license key activation, if applicable.

  • license_key_activations_limit (Integer, nil) (defaults to: nil)

    Limit on the number of activations for the license key, if enabled.

  • license_key_duration (Dodopayments::Models::LicenseKeyDuration, nil) (defaults to: nil)

    Duration of the license key validity, if enabled.

  • name (String, nil) (defaults to: nil)

    Name of the product, optional.

  • product_collection_id (String, nil) (defaults to: nil)

    The product collection ID this product belongs to, if any



# File 'lib/dodopayments/models/product.rb', line 143

Instance Attribute Details

#addonsArray<String>?

Available Addons for subscription products

Returns:

  • (Array<String>, nil)


86
# File 'lib/dodopayments/models/product.rb', line 86

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

#brand_idString

Returns:

  • (String)


10
# File 'lib/dodopayments/models/product.rb', line 10

required :brand_id, String

#business_idString

Unique identifier for the business to which the product belongs.

Returns:

  • (String)


16
# File 'lib/dodopayments/models/product.rb', line 16

required :business_id, String

#created_atTime

Timestamp when the product was created.

Returns:

  • (Time)


22
# File 'lib/dodopayments/models/product.rb', line 22

required :created_at, Time

#credit_entitlementsArray<Dodopayments::Models::CreditEntitlementMappingResponse>

Attached credit entitlements with settings



28
29
# File 'lib/dodopayments/models/product.rb', line 28

required :credit_entitlements,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::CreditEntitlementMappingResponse] }

#descriptionString?

Description of the product, optional.

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#digital_product_deliveryDodopayments::Models::DigitalProductDelivery?

Digital-product-delivery payload for a grant. Populated for grants whose entitlement has ‘integration_type = ’digital_files’‘. `files` carries presigned download URLs; the source (EE service or legacy in-process S3 presigning) is opaque to the caller.



101
# File 'lib/dodopayments/models/product.rb', line 101

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

#entitlementsArray<Dodopayments::Models::ProductEntitlementSummary>

Attached entitlements (integration-based access grants)



35
36
# File 'lib/dodopayments/models/product.rb', line 35

required :entitlements,
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductEntitlementSummary] }

#imageString?

URL of the product image, optional.

Returns:

  • (String, nil)


107
# File 'lib/dodopayments/models/product.rb', line 107

optional :image, String, nil?: true

#is_recurringBoolean

Indicates if the product is recurring (e.g., subscriptions).

Returns:

  • (Boolean)


42
# File 'lib/dodopayments/models/product.rb', line 42

required :is_recurring, Dodopayments::Internal::Type::Boolean

#license_key_activation_messageString?

Deprecated.

Message sent upon license key activation, if applicable.

Returns:

  • (String, nil)


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

optional :license_key_activation_message, String, nil?: true

#license_key_activations_limitInteger?

Deprecated.

Limit on the number of activations for the license key, if enabled.

Returns:

  • (Integer, nil)


123
# File 'lib/dodopayments/models/product.rb', line 123

optional :license_key_activations_limit, Integer, nil?: true

#license_key_durationDodopayments::Models::LicenseKeyDuration?

Duration of the license key validity, if enabled.



129
# File 'lib/dodopayments/models/product.rb', line 129

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

#license_key_enabledBoolean

Deprecated.

Indicates whether the product requires a license key.

Returns:

  • (Boolean)


50
# File 'lib/dodopayments/models/product.rb', line 50

required :license_key_enabled, Dodopayments::Internal::Type::Boolean

#metadataHash{Symbol=>String}

Additional custom data associated with the product

Returns:

  • (Hash{Symbol=>String})


56
# File 'lib/dodopayments/models/product.rb', line 56

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

#nameString?

Name of the product, optional.

Returns:

  • (String, nil)


135
# File 'lib/dodopayments/models/product.rb', line 135

optional :name, String, nil?: true

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

Pricing information for the product.



62
# File 'lib/dodopayments/models/product.rb', line 62

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

#product_collection_idString?

The product collection ID this product belongs to, if any

Returns:

  • (String, nil)


141
# File 'lib/dodopayments/models/product.rb', line 141

optional :product_collection_id, String, nil?: true

#product_idString

Unique identifier for the product.

Returns:

  • (String)


68
# File 'lib/dodopayments/models/product.rb', line 68

required :product_id, String

#tax_categorySymbol, Dodopayments::Models::TaxCategory

Tax category associated with the product.



74
# File 'lib/dodopayments/models/product.rb', line 74

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

#updated_atTime

Timestamp when the product was last updated.

Returns:

  • (Time)


80
# File 'lib/dodopayments/models/product.rb', line 80

required :updated_at, Time