Class: WhopSDK::Models::Product

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

Defined Under Namespace

Classes: Company, OwnerUser, ProductTaxCode

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(id: , name: , username: ) ⇒ Object

The user that owns the product (company owner).

Parameters:

  • id (String) (defaults to: )

    The internal ID of the user.

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

    The name of the user from their Whop account.

  • username (String) (defaults to: )

    The username of the user from their Whop account.



# File 'lib/whop_sdk/models/product.rb', line 154

Instance Attribute Details

#business_typeSymbol, ...

The different business types a company can be.

Returns:



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

required :business_type, enum: -> { WhopSDK::BusinessTypes }, nil?: true

#companyWhopSDK::Models::Product::Company

A short type of the company that this product belongs to.



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

required :company, -> { WhopSDK::Product::Company }

#created_atTime

When the product was created.

Returns:

  • (Time)


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

required :created_at, Time

#custom_ctaSymbol, WhopSDK::Models::CustomCta

The custom call to action for the product.

Returns:



34
# File 'lib/whop_sdk/models/product.rb', line 34

required :custom_cta, enum: -> { WhopSDK::CustomCta }

#custom_cta_urlString?

The custom call to action URL for the product, if any.

Returns:

  • (String, nil)


40
# File 'lib/whop_sdk/models/product.rb', line 40

required :custom_cta_url, String, nil?: true

#custom_statement_descriptorString?

The custom statement descriptor for the product.

Returns:

  • (String, nil)


46
# File 'lib/whop_sdk/models/product.rb', line 46

required :custom_statement_descriptor, String, nil?: true

#descriptionString?

A short description of what the company offers or does.

Returns:

  • (String, nil)


52
# File 'lib/whop_sdk/models/product.rb', line 52

required :description, String, nil?: true

#external_identifierString?

A unique identifier used to create or update products. When provided on product creation endpoints, we’ll look up an existing product by this identifier — if it exists, we’ll update it; if not, we’ll create a new one.

Returns:

  • (String, nil)


60
# File 'lib/whop_sdk/models/product.rb', line 60

required :external_identifier, String, nil?: true

#global_affiliate_percentageFloat?

The percentage of a transaction a user is eligible to earn from the whop marketplace global affiliate program.

Returns:

  • (Float, nil)


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

required :global_affiliate_percentage, Float, nil?: true

#global_affiliate_statusSymbol, WhopSDK::Models::GlobalAffiliateStatus

The status of the global affiliate program for this product.



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

required :global_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }

#headlineString?

The headline of the product.

Returns:

  • (String, nil)


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

required :headline, String, nil?: true

#idString

The internal ID of the public product.

Returns:

  • (String)


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

required :id, String

#industry_typeSymbol, ...

The different industry types a company can be in.

Returns:



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

required :industry_type, enum: -> { WhopSDK::IndustryTypes }, nil?: true

#member_affiliate_percentageFloat?

The percentage of a transaction a user is eligible to earn from the whop marketplace member affiliate program.

Returns:

  • (Float, nil)


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

required :member_affiliate_percentage, Float, nil?: true

#member_affiliate_statusSymbol, WhopSDK::Models::GlobalAffiliateStatus

The status of the member affiliate program for this product.



98
# File 'lib/whop_sdk/models/product.rb', line 98

required :member_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }

#member_countInteger

The number of active users for this product.

Returns:

  • (Integer)


104
# File 'lib/whop_sdk/models/product.rb', line 104

required :member_count, Integer

#owner_userWhopSDK::Models::Product::OwnerUser

The user that owns the product (company owner).



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

required :owner_user, -> { WhopSDK::Product::OwnerUser }

#product_tax_codeWhopSDK::Models::Product::ProductTaxCode?

The product tax code for the product, if any.



116
# File 'lib/whop_sdk/models/product.rb', line 116

required :product_tax_code, -> { WhopSDK::Product::ProductTaxCode }, nil?: true

#published_reviews_countInteger

The number of reviews that have been published for the product.

Returns:

  • (Integer)


122
# File 'lib/whop_sdk/models/product.rb', line 122

required :published_reviews_count, Integer

#routeString

The route of the product.

Returns:

  • (String)


128
# File 'lib/whop_sdk/models/product.rb', line 128

required :route, String

#titleString

The title of the product. Use for Whop 4.0.

Returns:

  • (String)


134
# File 'lib/whop_sdk/models/product.rb', line 134

required :title, String

#updated_atTime

When the product was updated.

Returns:

  • (Time)


140
# File 'lib/whop_sdk/models/product.rb', line 140

required :updated_at, Time

#verifiedBoolean

Whether this product is Whop verified.

Returns:

  • (Boolean)


146
# File 'lib/whop_sdk/models/product.rb', line 146

required :verified, WhopSDK::Internal::Type::Boolean

#visibilitySymbol, WhopSDK::Models::Visibility

This product will/will not be displayed publicly.

Returns:



152
# File 'lib/whop_sdk/models/product.rb', line 152

required :visibility, enum: -> { WhopSDK::Visibility }