Class: WhopSDK::Models::CheckoutConfigurationCreateParams::Plan
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::CheckoutConfigurationCreateParams::Plan
- Defined in:
- lib/whop_sdk/models/checkout_configuration_create_params.rb
Defined Under Namespace
Classes: CustomField, Image, Product
Instance Attribute Summary collapse
-
#billing_period ⇒ Integer?
The interval at which the plan charges (renewal plans).
-
#company_id ⇒ String
The company the plan should be created for.
-
#currency ⇒ Symbol, ...
The available currencies on the platform.
-
#custom_fields ⇒ Array<WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::CustomField>?
An array of custom field objects.
-
#description ⇒ String?
The description of the plan.
-
#expiration_days ⇒ Integer?
The interval at which the plan charges (expiration plans).
-
#force_create_new_plan ⇒ Boolean?
Whether to force the creation of a new plan even if one with the same attributes already exists.
-
#image ⇒ WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image?
An image for the plan.
-
#initial_price ⇒ Float?
An additional amount charged upon first purchase.
-
#internal_notes ⇒ String?
A personal description or notes section for the business.
-
#override_tax_type ⇒ Symbol, ...
Whether or not the tax is included in a plan’s price (or if it hasn’t been set up).
-
#plan_type ⇒ Symbol, ...
The type of plan that can be attached to an access pass.
-
#product ⇒ WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product?
Pass this object to create a new product for this plan.
-
#product_id ⇒ String?
The product the plan is related to.
-
#release_method ⇒ Symbol, ...
The methods of how a plan can be released.
-
#renewal_price ⇒ Float?
The amount the customer is charged every billing period.
-
#title ⇒ String?
The title of the plan.
-
#trial_period_days ⇒ Integer?
The number of free trial days added before a renewal plan.
-
#visibility ⇒ Symbol, ...
Visibility of a resource.
Instance Method Summary collapse
-
#initialize(id: nil, direct_upload_id: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Image for more details.
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: nil, direct_upload_id: nil) ⇒ Object
Some parameter documentations has been truncated, see Image for more details.
An image for the plan. This will be visible on the product page to customers.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 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 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 53 class Plan < WhopSDK::Internal::Type::BaseModel # @!attribute company_id # The company the plan should be created for. # # @return [String] required :company_id, String # @!attribute billing_period # The interval at which the plan charges (renewal plans). # # @return [Integer, nil] optional :billing_period, Integer, nil?: true # @!attribute currency # The available currencies on the platform # # @return [Symbol, WhopSDK::Models::Currency, nil] optional :currency, enum: -> { WhopSDK::Currency }, nil?: true # @!attribute custom_fields # An array of custom field objects. # # @return [Array<WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::CustomField>, nil] optional :custom_fields, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField] }, nil?: true # @!attribute description # The description of the plan. # # @return [String, nil] optional :description, String, nil?: true # @!attribute expiration_days # The interval at which the plan charges (expiration plans). # # @return [Integer, nil] optional :expiration_days, Integer, nil?: true # @!attribute force_create_new_plan # Whether to force the creation of a new plan even if one with the same attributes # already exists. # # @return [Boolean, nil] optional :force_create_new_plan, WhopSDK::Internal::Type::Boolean, nil?: true # @!attribute image # An image for the plan. This will be visible on the product page to customers. # # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image, nil] optional :image, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image }, nil?: true # @!attribute initial_price # An additional amount charged upon first purchase. # # @return [Float, nil] optional :initial_price, Float, nil?: true # @!attribute internal_notes # A personal description or notes section for the business. # # @return [String, nil] optional :internal_notes, String, nil?: true # @!attribute override_tax_type # Whether or not the tax is included in a plan's price (or if it hasn't been set # up) # # @return [Symbol, WhopSDK::Models::TaxType, nil] optional :override_tax_type, enum: -> { WhopSDK::TaxType }, nil?: true # @!attribute plan_type # The type of plan that can be attached to an access pass # # @return [Symbol, WhopSDK::Models::PlanType, nil] optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true # @!attribute product # Pass this object to create a new product for this plan. We will use the product # external identifier to find or create an existing product. # # @return [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product, nil] optional :product, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Product }, nil?: true # @!attribute product_id # The product the plan is related to. Either this or product is required. # # @return [String, nil] optional :product_id, String, 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 title # The title of the plan. This will be visible on the product page to customers. # # @return [String, nil] optional :title, String, nil?: true # @!attribute trial_period_days # The number of free trial days added before a renewal plan. # # @return [Integer, nil] optional :trial_period_days, Integer, nil?: true # @!attribute visibility # Visibility of a resource # # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true # @!method initialize(company_id:, billing_period: nil, currency: nil, custom_fields: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, image: nil, initial_price: nil, internal_notes: nil, override_tax_type: nil, plan_type: nil, product: nil, product_id: nil, release_method: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan} for more details. # # Pass this object to create a new plan for this checkout configuration # # @param company_id [String] The company the plan should be created for. # # @param billing_period [Integer, nil] The interval at which the plan charges (renewal plans). # # @param currency [Symbol, WhopSDK::Models::Currency, nil] The available currencies on the platform # # @param custom_fields [Array<WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::CustomField>, nil] An array of custom field objects. # # @param description [String, nil] The description of the plan. # # @param expiration_days [Integer, nil] The interval at which the plan charges (expiration plans). # # @param force_create_new_plan [Boolean, nil] Whether to force the creation of a new plan even if one with the same attributes # # @param image [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image, nil] An image for the plan. This will be visible on the product page to customers. # # @param initial_price [Float, nil] An additional amount charged upon first purchase. # # @param internal_notes [String, nil] A personal description or notes section for the business. # # @param override_tax_type [Symbol, WhopSDK::Models::TaxType, nil] Whether or not the tax is included in a plan's price (or if it hasn't been set u # # @param plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to an access pass # # @param product [WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product, nil] Pass this object to create a new product for this plan. We will use the product # # @param product_id [String, nil] The product the plan is related to. Either this or product is required. # # @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 title [String, nil] The title of the plan. This will be visible on the product page to customers. # # @param trial_period_days [Integer, nil] The number of free trial days added before a renewal plan. # # @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 # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#image class Image < WhopSDK::Internal::Type::BaseModel # @!attribute id # The ID of an existing attachment object. Use this when updating a resource and # keeping a subset of the attachments. Don't use this unless you know what you're # doing. # # @return [String, nil] optional :id, String, nil?: true # @!attribute direct_upload_id # This ID should be used the first time you upload an attachment. It is the ID of # the direct upload that was created when uploading the file to S3 via the # mediaDirectUpload mutation. # # @return [String, nil] optional :direct_upload_id, String, nil?: true # @!method initialize(id: nil, direct_upload_id: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image} for more # details. # # An image for the plan. This will be visible on the product page to customers. # # @param id [String, nil] The ID of an existing attachment object. Use this when updating a resource and k # # @param direct_upload_id [String, nil] This ID should be used the first time you upload an attachment. It is the ID of end # @see WhopSDK::Models::CheckoutConfigurationCreateParams::Plan#product class Product < WhopSDK::Internal::Type::BaseModel # @!attribute external_identifier # A unique ID used to find or create a product. When provided during creation, we # will look for an existing product with this external identifier — if found, it # will be updated; otherwise, a new product will be created. # # @return [String] required :external_identifier, String # @!attribute title # The title of the product. # # @return [String] required :title, String # @!attribute business_type # The different business types a company can be. # # @return [Symbol, WhopSDK::Models::BusinessTypes, nil] optional :business_type, enum: -> { WhopSDK::BusinessTypes }, nil?: true # @!attribute collect_shipping_address # Whether or not to collect shipping information at checkout from the customer. # # @return [Boolean, nil] optional :collect_shipping_address, WhopSDK::Internal::Type::Boolean, nil?: true # @!attribute custom_statement_descriptor # The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be # between 5 and 22 characters, contain at least one letter, and not contain any of # the following characters: <, >, \, ', " # # @return [String, nil] optional :custom_statement_descriptor, String, nil?: true # @!attribute description # A written description of the product. # # @return [String, nil] optional :description, String, nil?: true # @!attribute global_affiliate_percentage # The percentage of the revenue that goes to the global affiliate program. # # @return [Float, nil] optional :global_affiliate_percentage, Float, nil?: true # @!attribute global_affiliate_status # The different statuses of the global affiliate program for an access pass. # # @return [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] optional :global_affiliate_status, enum: -> { WhopSDK::GlobalAffiliateStatus }, nil?: true # @!attribute headline # The headline of the product. # # @return [String, nil] optional :headline, String, nil?: true # @!attribute industry_type # The different industry types a company can be in. # # @return [Symbol, WhopSDK::Models::IndustryTypes, nil] optional :industry_type, enum: -> { WhopSDK::IndustryTypes }, nil?: true # @!attribute product_tax_code_id # The ID of the product tax code to apply to this product. # # @return [String, nil] optional :product_tax_code_id, String, nil?: true # @!attribute redirect_purchase_url # The URL to redirect the customer to after a purchase. # # @return [String, nil] optional :redirect_purchase_url, String, nil?: true # @!attribute route # The route of the product. # # @return [String, nil] optional :route, String, nil?: true # @!attribute visibility # Visibility of a resource # # @return [Symbol, WhopSDK::Models::Visibility, nil] optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true # @!method initialize(external_identifier:, title:, business_type: nil, collect_shipping_address: nil, custom_statement_descriptor: nil, description: nil, global_affiliate_percentage: nil, global_affiliate_status: nil, headline: nil, industry_type: nil, product_tax_code_id: nil, redirect_purchase_url: nil, route: nil, visibility: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product} for more # details. # # Pass this object to create a new product for this plan. We will use the product # external identifier to find or create an existing product. # # @param external_identifier [String] A unique ID used to find or create a product. When provided during creation, we # # @param title [String] The title of the product. # # @param business_type [Symbol, WhopSDK::Models::BusinessTypes, nil] The different business types a company can be. # # @param collect_shipping_address [Boolean, nil] Whether or not to collect shipping information at checkout from the customer. # # @param custom_statement_descriptor [String, nil] The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be # betwee # # @param description [String, nil] A written description of the product. # # @param global_affiliate_percentage [Float, nil] The percentage of the revenue that goes to the global affiliate program. # # @param global_affiliate_status [Symbol, WhopSDK::Models::GlobalAffiliateStatus, nil] The different statuses of the global affiliate program for an access pass. # # @param headline [String, nil] The headline of the product. # # @param industry_type [Symbol, WhopSDK::Models::IndustryTypes, nil] The different industry types a company can be in. # # @param product_tax_code_id [String, nil] The ID of the product tax code to apply to this product. # # @param redirect_purchase_url [String, nil] The URL to redirect the customer to after a purchase. # # @param route [String, nil] The route of the product. # # @param visibility [Symbol, WhopSDK::Models::Visibility, nil] Visibility of a resource end end |
Instance Attribute Details
#billing_period ⇒ Integer?
The interval at which the plan charges (renewal plans).
64 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 64 optional :billing_period, Integer, nil?: true |
#company_id ⇒ String
The company the plan should be created for.
58 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 58 required :company_id, String |
#currency ⇒ Symbol, ...
The available currencies on the platform
70 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 70 optional :currency, enum: -> { WhopSDK::Currency }, nil?: true |
#custom_fields ⇒ Array<WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::CustomField>?
An array of custom field objects.
76 77 78 79 80 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 76 optional :custom_fields, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CheckoutConfigurationCreateParams::Plan::CustomField] }, nil?: true |
#description ⇒ String?
The description of the plan.
86 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 86 optional :description, String, nil?: true |
#expiration_days ⇒ Integer?
The interval at which the plan charges (expiration plans).
92 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 92 optional :expiration_days, Integer, nil?: true |
#force_create_new_plan ⇒ Boolean?
Whether to force the creation of a new plan even if one with the same attributes already exists.
99 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 99 optional :force_create_new_plan, WhopSDK::Internal::Type::Boolean, nil?: true |
#image ⇒ WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Image?
An image for the plan. This will be visible on the product page to customers.
105 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 105 optional :image, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Image }, nil?: true |
#initial_price ⇒ Float?
An additional amount charged upon first purchase.
111 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 111 optional :initial_price, Float, nil?: true |
#internal_notes ⇒ String?
A personal description or notes section for the business.
117 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 117 optional :internal_notes, String, nil?: true |
#override_tax_type ⇒ Symbol, ...
Whether or not the tax is included in a plan’s price (or if it hasn’t been set up)
124 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 124 optional :override_tax_type, enum: -> { WhopSDK::TaxType }, nil?: true |
#plan_type ⇒ Symbol, ...
The type of plan that can be attached to an access pass
130 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 130 optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true |
#product ⇒ WhopSDK::Models::CheckoutConfigurationCreateParams::Plan::Product?
Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.
137 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 137 optional :product, -> { WhopSDK::CheckoutConfigurationCreateParams::Plan::Product }, nil?: true |
#product_id ⇒ String?
The product the plan is related to. Either this or product is required.
143 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 143 optional :product_id, String, nil?: true |
#release_method ⇒ Symbol, ...
The methods of how a plan can be released.
149 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 149 optional :release_method, enum: -> { WhopSDK::ReleaseMethod }, nil?: true |
#renewal_price ⇒ Float?
The amount the customer is charged every billing period.
155 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 155 optional :renewal_price, Float, nil?: true |
#title ⇒ String?
The title of the plan. This will be visible on the product page to customers.
161 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 161 optional :title, String, nil?: true |
#trial_period_days ⇒ Integer?
The number of free trial days added before a renewal plan.
167 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 167 optional :trial_period_days, Integer, nil?: true |
#visibility ⇒ Symbol, ...
Visibility of a resource
173 |
# File 'lib/whop_sdk/models/checkout_configuration_create_params.rb', line 173 optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true |