Class: WhopSDK::Models::ProductCreateParams::PlanOptions

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

Defined Under Namespace

Classes: CustomField

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(company_id: , title: , business_type: nil, collect_shipping_address: nil, custom_cta: nil, custom_cta_url: nil, custom_statement_descriptor: nil, description: nil, experience_ids: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, industry_type: nil, member_affiliate_percentage: nil, member_affiliate_status: nil, plan_options: nil, product_highlights: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, visibility: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see WhopSDK::Models::ProductCreateParams for more details.

betwee

Parameters:

  • company_id (String) (defaults to: )

    The ID of the company to create the product for.

  • title (String) (defaults to: )

    The title of the product.

  • business_type (Symbol, WhopSDK::Models::BusinessTypes, nil) (defaults to: nil)

    The different business types a company can be.

  • collect_shipping_address (Boolean, nil) (defaults to: nil)

    Whether or not to collect shipping information at checkout from the customer.

  • custom_cta (Symbol, WhopSDK::Models::CustomCta, nil) (defaults to: nil)

    The different types of custom CTAs that can be selected.

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

    The custom call to action URL for the product.

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

    The custom statement descriptor for the product i.e. WHOP*SPORTS, must be

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

    A written description of the product.

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

    An array of experience IDs that this pass has

  • global_affiliate_percentage (Float, nil) (defaults to: nil)

    The percentage of the revenue that goes to the global affiliate program.

  • global_affiliate_status (Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil) (defaults to: nil)

    The different statuses of the global affiliate program for a product.

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

    The headline of the product.

  • industry_type (Symbol, WhopSDK::Models::IndustryTypes, nil) (defaults to: nil)

    The different industry types a company can be in.

  • member_affiliate_percentage (Float, nil) (defaults to: nil)

    The percentage of the revenue that goes to the member affiliate program.

  • member_affiliate_status (Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil) (defaults to: nil)

    The different statuses of the global affiliate program for a product.

  • plan_options (WhopSDK::Models::ProductCreateParams::PlanOptions, nil) (defaults to: nil)

    The details to assign an autogenerated plan.

  • product_highlights (Array<WhopSDK::Models::ProductCreateParams::ProductHighlight>, nil) (defaults to: nil)

    The product highlights for the product.

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

    The ID of the product tax code to apply to this product.

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

    The URL to redirect the customer to after a purchase.

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

    The route of the product.

  • visibility (Symbol, WhopSDK::Models::Visibility, nil) (defaults to: nil)

    Visibility of a resource

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/whop_sdk/models/product_create_params.rb', line 189

class PlanOptions < WhopSDK::Internal::Type::BaseModel
  # @!attribute base_currency
  #   The available currencies on the platform
  #
  #   @return [Symbol, WhopSDK::Models::Currency, nil]
  optional :base_currency, enum: -> { WhopSDK::Currency }, nil?: true

  # @!attribute billing_period
  #   The interval at which the plan charges (renewal plans).
  #
  #   @return [Integer, nil]
  optional :billing_period, Integer, nil?: true

  # @!attribute custom_fields
  #   An array of custom field objects.
  #
  #   @return [Array<WhopSDK::Models::ProductCreateParams::PlanOptions::CustomField>, nil]
  optional :custom_fields,
           -> {
             WhopSDK::Internal::Type::ArrayOf[WhopSDK::ProductCreateParams::PlanOptions::CustomField]
           },
           nil?: true

  # @!attribute initial_price
  #   An additional amount charged upon first purchase.
  #
  #   @return [Float, nil]
  optional :initial_price, Float, nil?: true

  # @!attribute plan_type
  #   The type of plan that can be attached to a product
  #
  #   @return [Symbol, WhopSDK::Models::PlanType, nil]
  optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true

  # @!attribute release_method
  #   The methods of how a plan can be released.
  #
  #   @return [Symbol, WhopSDK::Models::ReleaseMethod, nil]
  optional :release_method, enum: -> { WhopSDK::ReleaseMethod }, nil?: true

  # @!attribute renewal_price
  #   The amount the customer is charged every billing period.
  #
  #   @return [Float, nil]
  optional :renewal_price, Float, nil?: true

  # @!attribute visibility
  #   Visibility of a resource
  #
  #   @return [Symbol, WhopSDK::Models::Visibility, nil]
  optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true

  # @!method initialize(base_currency: nil, billing_period: nil, custom_fields: nil, initial_price: nil, plan_type: nil, release_method: nil, renewal_price: nil, visibility: nil)
  #   The details to assign an autogenerated plan.
  #
  #   @param base_currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform
  #
  #   @param billing_period [Integer, nil] The interval at which the plan charges (renewal plans).
  #
  #   @param custom_fields [Array<WhopSDK::Models::ProductCreateParams::PlanOptions::CustomField>, nil] An array of custom field objects.
  #
  #   @param initial_price [Float, nil] An additional amount charged upon first purchase.
  #
  #   @param plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to a product
  #
  #   @param release_method [Symbol, WhopSDK::Models::ReleaseMethod, nil] The methods of how a plan can be released.
  #
  #   @param renewal_price [Float, nil] The amount the customer is charged every billing period.
  #
  #   @param visibility [Symbol, WhopSDK::Models::Visibility, nil] Visibility of a resource

  class CustomField < WhopSDK::Internal::Type::BaseModel
    # @!attribute field_type
    #   The type of the custom field.
    #
    #   @return [Symbol, :text]
    required :field_type, const: :text

    # @!attribute name
    #   The name of the custom field.
    #
    #   @return [String]
    required :name, String

    # @!attribute id
    #   The ID of the custom field (if being updated)
    #
    #   @return [String, nil]
    optional :id, String, nil?: true

    # @!attribute order
    #   The order of the field.
    #
    #   @return [Integer, nil]
    optional :order, Integer, nil?: true

    # @!attribute placeholder
    #   The placeholder value of the field.
    #
    #   @return [String, nil]
    optional :placeholder, String, nil?: true

    # @!attribute required
    #   Whether or not the field is required.
    #
    #   @return [Boolean, nil]
    optional :required, WhopSDK::Internal::Type::Boolean, nil?: true

    # @!method initialize(name:, id: nil, order: nil, placeholder: nil, required: nil, field_type: :text)
    #   @param name [String] The name of the custom field.
    #
    #   @param id [String, nil] The ID of the custom field (if being updated)
    #
    #   @param order [Integer, nil] The order of the field.
    #
    #   @param placeholder [String, nil] The placeholder value of the field.
    #
    #   @param required [Boolean, nil] Whether or not the field is required.
    #
    #   @param field_type [Symbol, :text] The type of the custom field.
  end
end

Instance Attribute Details

#base_currencySymbol, ...

The available currencies on the platform

Returns:



194
# File 'lib/whop_sdk/models/product_create_params.rb', line 194

optional :base_currency, enum: -> { WhopSDK::Currency }, nil?: true

#billing_periodInteger?

The interval at which the plan charges (renewal plans).

Returns:

  • (Integer, nil)


200
# File 'lib/whop_sdk/models/product_create_params.rb', line 200

optional :billing_period, Integer, nil?: true

#custom_fieldsArray<WhopSDK::Models::ProductCreateParams::PlanOptions::CustomField>?

An array of custom field objects.



206
207
208
209
210
# File 'lib/whop_sdk/models/product_create_params.rb', line 206

optional :custom_fields,
-> {
  WhopSDK::Internal::Type::ArrayOf[WhopSDK::ProductCreateParams::PlanOptions::CustomField]
},
nil?: true

#initial_priceFloat?

An additional amount charged upon first purchase.

Returns:

  • (Float, nil)


216
# File 'lib/whop_sdk/models/product_create_params.rb', line 216

optional :initial_price, Float, nil?: true

#plan_typeSymbol, ...

The type of plan that can be attached to a product

Returns:



222
# File 'lib/whop_sdk/models/product_create_params.rb', line 222

optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



228
# File 'lib/whop_sdk/models/product_create_params.rb', line 228

optional :release_method, enum: -> { WhopSDK::ReleaseMethod }, nil?: true

#renewal_priceFloat?

The amount the customer is charged every billing period.

Returns:

  • (Float, nil)


234
# File 'lib/whop_sdk/models/product_create_params.rb', line 234

optional :renewal_price, Float, nil?: true

#visibilitySymbol, ...

Visibility of a resource

Returns:



240
# File 'lib/whop_sdk/models/product_create_params.rb', line 240

optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true