Class: WhopSDK::Models::Product
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::Product
- Defined in:
- lib/whop_sdk/models/product.rb,
sig/whop_sdk/models/product.rbs
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
Call-to-action button label shown on the product purchase page.
-
#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?
Custom bank statement descriptor for product purchases.
-
#description ⇒ String?
A brief summary of what the product offers, displayed on product pages and search results.
-
#external_identifier ⇒ String?
External identifier for the product.
-
#gallery_images ⇒ Array<WhopSDK::Models::Product::GalleryImage>
The gallery images for this product, ordered by position.
-
#global_affiliate_percentage ⇒ Float?
Marketplace affiliate commission percentage for this product, or
nullif program is inactive. -
#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?
Member referral commission percentage for this product, or
nullif program is inactive. -
#member_affiliate_status ⇒ Symbol, WhopSDK::Models::GlobalAffiliateStatus
The enrollment status of this product in the member affiliate program.
-
#member_count ⇒ Integer
Active memberships for this product.
-
#metadata ⇒ Hash{Symbol=>Object}?
Custom key-value pairs stored on the product and included in payment and membership webhook payloads.
-
#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
URL slug in the product's public link, e.g.
-
#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.
- #to_hash ⇒ {
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 164
|
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
Call-to-action button label shown on the product purchase page.
28 |
# File 'lib/whop_sdk/models/product.rb', line 28 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.
35 |
# File 'lib/whop_sdk/models/product.rb', line 35 required :custom_cta_url, String, nil?: true |
#custom_statement_descriptor ⇒ String?
Custom bank statement descriptor for product purchases. Maximum 22 characters,
including required WHOP* prefix.
42 |
# File 'lib/whop_sdk/models/product.rb', line 42 required :custom_statement_descriptor, String, nil?: true |
#description ⇒ String?
A brief summary of what the product offers, displayed on product pages and search results.
49 |
# File 'lib/whop_sdk/models/product.rb', line 49 required :description, String, nil?: true |
#external_identifier ⇒ String?
External identifier for the product. Providing it on a product creation endpoint updates the existing product with this identifier instead of creating a new one.
56 |
# File 'lib/whop_sdk/models/product.rb', line 56 required :external_identifier, String, nil?: true |
#gallery_images ⇒ Array<WhopSDK::Models::Product::GalleryImage>
The gallery images for this product, ordered by position.
62 |
# File 'lib/whop_sdk/models/product.rb', line 62 required :gallery_images, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Product::GalleryImage] } |
#global_affiliate_percentage ⇒ Float?
Marketplace affiliate commission percentage for this product, or null if
program is inactive.
69 |
# File 'lib/whop_sdk/models/product.rb', line 69 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.
76 |
# File 'lib/whop_sdk/models/product.rb', line 76 required :global_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus } |
#headline ⇒ String?
A short marketing headline displayed prominently on the product's product page.
82 |
# File 'lib/whop_sdk/models/product.rb', line 82 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?
Member referral commission percentage for this product, or null if program is
inactive.
89 |
# File 'lib/whop_sdk/models/product.rb', line 89 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.
95 |
# File 'lib/whop_sdk/models/product.rb', line 95 required :member_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus } |
#member_count ⇒ Integer
Active memberships for this product. Returns 0 if the account has disabled
public member counts.
102 |
# File 'lib/whop_sdk/models/product.rb', line 102 required :member_count, Integer |
#metadata ⇒ Hash{Symbol=>Object}?
Custom key-value pairs stored on the product and included in payment and membership webhook payloads. Max 50 keys, 100 characters per key, 500 characters per string value.
110 |
# File 'lib/whop_sdk/models/product.rb', line 110 required :metadata, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown], nil?: true |
#owner_user ⇒ WhopSDK::Models::Product::OwnerUser
The user who owns the company that sells this product.
116 |
# File 'lib/whop_sdk/models/product.rb', line 116 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.
123 |
# File 'lib/whop_sdk/models/product.rb', line 123 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.
129 |
# File 'lib/whop_sdk/models/product.rb', line 129 required :published_reviews_count, Integer |
#route ⇒ String
URL slug in the product's public link, e.g. pickaxe-analytics in
whop.com/company/pickaxe-analytics.
136 |
# File 'lib/whop_sdk/models/product.rb', line 136 required :route, String |
#title ⇒ String
The display name of the product shown to customers on the product page and in search results.
143 |
# File 'lib/whop_sdk/models/product.rb', line 143 required :title, String |
#updated_at ⇒ Time
The datetime the product was last updated.
149 |
# File 'lib/whop_sdk/models/product.rb', line 149 required :updated_at, Time |
#verified ⇒ Boolean
Whether this company has been verified by Whop's trust and safety team.
155 |
# File 'lib/whop_sdk/models/product.rb', line 155 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.
162 |
# File 'lib/whop_sdk/models/product.rb', line 162 required :visibility, enum: -> { WhopSDK::Visibility } |
Instance Method Details
#to_hash ⇒ {
107 |
# File 'sig/whop_sdk/models/product.rbs', line 107
def to_hash: -> {
|