Class: WhopSDK::Models::Product
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::Product
- Defined in:
- lib/whop_sdk/models/product.rb
Defined Under Namespace
Classes: Company, GalleryImage, OwnerUser, ProductTaxCode
Instance Attribute Summary collapse
-
#company ⇒ WhopSDK::Models::Product::Company
The company this product belongs to.
-
#created_at ⇒ Time
The datetime the product was created.
-
#custom_cta ⇒ Symbol, WhopSDK::Models::CustomCta
The call-to-action button label displayed on the product’s purchase page (e.g., ‘join’, ‘buy’, ‘subscribe’).
-
#custom_cta_url ⇒ String?
An optional URL that the call-to-action button links to instead of the default checkout flow.
-
#custom_statement_descriptor ⇒ String?
A custom text label that appears on the customer’s bank or credit card statement for purchases of this product.
-
#description ⇒ String?
A brief summary of what the product offers, displayed on product pages and search results.
-
#external_identifier ⇒ String?
A unique identifier used to create or update products via the API.
-
#gallery_images ⇒ Array<WhopSDK::Models::Product::GalleryImage>
The gallery images for this product, ordered by position.
-
#global_affiliate_percentage ⇒ Float?
The commission rate (as a percentage) that affiliates earn on sales through the Whop marketplace global affiliate program.
-
#global_affiliate_status ⇒ Symbol, WhopSDK::Models::GlobalAffiliateStatus
The enrollment status of this product in the Whop marketplace global affiliate program.
-
#headline ⇒ String?
A short marketing headline displayed prominently on the product’s product page.
-
#id ⇒ String
The unique identifier for the product.
-
#member_affiliate_percentage ⇒ Float?
The commission rate (as a percentage) that existing members earn when referring new customers through the member affiliate program.
-
#member_affiliate_status ⇒ Symbol, WhopSDK::Models::GlobalAffiliateStatus
The enrollment status of this product in the member affiliate program.
-
#member_count ⇒ Integer
The number of users who currently hold an active membership to this product.
-
#owner_user ⇒ WhopSDK::Models::Product::OwnerUser
The user who owns the company that sells this product.
-
#product_tax_code ⇒ WhopSDK::Models::Product::ProductTaxCode?
The tax classification code applied to purchases of this product for sales tax calculation.
-
#published_reviews_count ⇒ Integer
The total number of published customer reviews for this product’s company.
-
#route ⇒ String
The URL slug used in the product’s public link (e.g., ‘my-product’ in whop.com/company/my-product).
-
#title ⇒ String
The display name of the product shown to customers on the product page and in search results.
-
#updated_at ⇒ Time
The datetime the product was last updated.
-
#verified ⇒ Boolean
Whether this company has been verified by Whop’s trust and safety team.
-
#visibility ⇒ Symbol, WhopSDK::Models::Visibility
Controls whether the product is visible to customers.
Instance Method Summary collapse
-
#initialize(id:, name:, username:) ⇒ Object
constructor
The user who owns the company that sells this product.
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 who owns the company that sells this product.
|
|
# File 'lib/whop_sdk/models/product.rb', line 160
|
Instance Attribute Details
#company ⇒ WhopSDK::Models::Product::Company
The company this product belongs to.
16 |
# File 'lib/whop_sdk/models/product.rb', line 16 required :company, -> { WhopSDK::Product::Company } |
#created_at ⇒ Time
The datetime the product was created.
22 |
# File 'lib/whop_sdk/models/product.rb', line 22 required :created_at, Time |
#custom_cta ⇒ Symbol, WhopSDK::Models::CustomCta
The call-to-action button label displayed on the product’s purchase page (e.g., ‘join’, ‘buy’, ‘subscribe’).
29 |
# File 'lib/whop_sdk/models/product.rb', line 29 required :custom_cta, enum: -> { WhopSDK::CustomCta } |
#custom_cta_url ⇒ String?
An optional URL that the call-to-action button links to instead of the default checkout flow. Null if no custom URL is set.
36 |
# File 'lib/whop_sdk/models/product.rb', line 36 required :custom_cta_url, String, nil?: true |
#custom_statement_descriptor ⇒ String?
A custom text label that appears on the customer’s bank or credit card statement for purchases of this product. Maximum 22 characters, including the required prefix WHOP*.
44 |
# File 'lib/whop_sdk/models/product.rb', line 44 required :custom_statement_descriptor, String, nil?: true |
#description ⇒ String?
A brief summary of what the product offers, displayed on product pages and search results.
51 |
# File 'lib/whop_sdk/models/product.rb', line 51 required :description, String, nil?: true |
#external_identifier ⇒ String?
A unique identifier used to create or update products via the API. When provided on product creation endpoints, an existing product with this identifier will be updated instead of creating a new one.
59 |
# File 'lib/whop_sdk/models/product.rb', line 59 required :external_identifier, String, nil?: true |
#gallery_images ⇒ Array<WhopSDK::Models::Product::GalleryImage>
The gallery images for this product, ordered by position.
65 |
# File 'lib/whop_sdk/models/product.rb', line 65 required :gallery_images, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Product::GalleryImage] } |
#global_affiliate_percentage ⇒ Float?
The commission rate (as a percentage) that affiliates earn on sales through the Whop marketplace global affiliate program. Null if the program is not active.
72 |
# File 'lib/whop_sdk/models/product.rb', line 72 required :global_affiliate_percentage, Float, nil?: true |
#global_affiliate_status ⇒ Symbol, WhopSDK::Models::GlobalAffiliateStatus
The enrollment status of this product in the Whop marketplace global affiliate program.
79 |
# File 'lib/whop_sdk/models/product.rb', line 79 required :global_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus } |
#headline ⇒ String?
A short marketing headline displayed prominently on the product’s product page.
85 |
# File 'lib/whop_sdk/models/product.rb', line 85 required :headline, String, nil?: true |
#id ⇒ String
The unique identifier for the product.
10 |
# File 'lib/whop_sdk/models/product.rb', line 10 required :id, String |
#member_affiliate_percentage ⇒ Float?
The commission rate (as a percentage) that existing members earn when referring new customers through the member affiliate program. Null if the program is not active.
93 |
# File 'lib/whop_sdk/models/product.rb', line 93 required :member_affiliate_percentage, Float, nil?: true |
#member_affiliate_status ⇒ Symbol, WhopSDK::Models::GlobalAffiliateStatus
The enrollment status of this product in the member affiliate program.
99 |
# File 'lib/whop_sdk/models/product.rb', line 99 required :member_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus } |
#member_count ⇒ Integer
The number of users who currently hold an active membership to this product. Returns 0 if the company has disabled public member counts.
106 |
# File 'lib/whop_sdk/models/product.rb', line 106 required :member_count, Integer |
#owner_user ⇒ WhopSDK::Models::Product::OwnerUser
The user who owns the company that sells this product.
112 |
# File 'lib/whop_sdk/models/product.rb', line 112 required :owner_user, -> { WhopSDK::Product::OwnerUser } |
#product_tax_code ⇒ WhopSDK::Models::Product::ProductTaxCode?
The tax classification code applied to purchases of this product for sales tax calculation. Null if no tax code is assigned.
119 |
# File 'lib/whop_sdk/models/product.rb', line 119 required :product_tax_code, -> { WhopSDK::Product::ProductTaxCode }, nil?: true |
#published_reviews_count ⇒ Integer
The total number of published customer reviews for this product’s company.
125 |
# File 'lib/whop_sdk/models/product.rb', line 125 required :published_reviews_count, Integer |
#route ⇒ String
The URL slug used in the product’s public link (e.g., ‘my-product’ in whop.com/company/my-product).
132 |
# File 'lib/whop_sdk/models/product.rb', line 132 required :route, String |
#title ⇒ String
The display name of the product shown to customers on the product page and in search results.
139 |
# File 'lib/whop_sdk/models/product.rb', line 139 required :title, String |
#updated_at ⇒ Time
The datetime the product was last updated.
145 |
# File 'lib/whop_sdk/models/product.rb', line 145 required :updated_at, Time |
#verified ⇒ Boolean
Whether this company has been verified by Whop’s trust and safety team.
151 |
# File 'lib/whop_sdk/models/product.rb', line 151 required :verified, WhopSDK::Internal::Type::Boolean |
#visibility ⇒ Symbol, WhopSDK::Models::Visibility
Controls whether the product is visible to customers. When set to ‘hidden’, the product is only accessible via direct link.
158 |
# File 'lib/whop_sdk/models/product.rb', line 158 required :visibility, enum: -> { WhopSDK::Visibility } |