Class: Dodopayments::Models::Product

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

Overview

Defined Under Namespace

Classes: Entitlement

Instance Attribute Summary collapse

Method Summary

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>?

Available Addons for subscription products

Returns:

  • (Array<String>, nil)


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

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)


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

optional :description, String, nil?: true

#digital_product_deliveryDodopayments::Models::DigitalProductDelivery?



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

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

#entitlementsArray<Dodopayments::Models::Product::Entitlement>

Attached entitlements (integration-based access grants)



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

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

#imageString?

URL of the product image, optional.

Returns:

  • (String, nil)


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

optional :image, String, nil?: true

#is_recurringBoolean

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

Returns:

  • (Boolean)


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

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

#license_key_activation_messageString?

Deprecated.

Message sent upon license key activation, if applicable.

Returns:

  • (String, nil)


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

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)


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

optional :license_key_activations_limit, Integer, nil?: true

#license_key_durationDodopayments::Models::LicenseKeyDuration?

Duration of the license key validity, if enabled.



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

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

#license_key_enabledBoolean

Deprecated.

Indicates whether the product requires a license key.

Returns:

  • (Boolean)


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

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

#metadataHash{Symbol=>String}

Additional custom data associated with the product

Returns:

  • (Hash{Symbol=>String})


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

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

#nameString?

Name of the product, optional.

Returns:

  • (String, nil)


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

optional :name, String, nil?: true

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

Pricing information for the product.



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

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

#product_collection_idString?

The product collection ID this product belongs to, if any

Returns:

  • (String, nil)


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

optional :product_collection_id, String, nil?: true

#product_idString

Unique identifier for the product.

Returns:

  • (String)


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

required :product_id, String

#tax_categorySymbol, Dodopayments::Models::TaxCategory

Tax category associated with the product.



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

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

#updated_atTime

Timestamp when the product was last updated.

Returns:

  • (Time)


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

required :updated_at, Time