Class: WhopSDK::Models::PaymentCreateParams::Plan
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::PaymentCreateParams::Plan
- Defined in:
- lib/whop_sdk/models/payment_create_params.rb
Defined Under Namespace
Classes: Product
Instance Attribute Summary collapse
-
#billing_period ⇒ Integer?
The interval at which the plan charges (renewal plans).
-
#currency ⇒ Symbol, WhopSDK::Models::Currency
The respective currency identifier for the plan.
-
#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.
-
#initial_price ⇒ Float?
An additional amount charged upon first purchase.
-
#internal_notes ⇒ String?
A personal description or notes section for the business.
-
#plan_type ⇒ Symbol, ...
The type of plan that can be attached to a product.
-
#product ⇒ WhopSDK::Models::PaymentCreateParams::Plan::Product?
Pass this object to create a new product for this plan.
-
#product_id ⇒ String?
The product the plan is related to.
-
#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(currency: , billing_period: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, initial_price: nil, internal_notes: nil, plan_type: nil, product: nil, product_id: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Plan 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(currency: , billing_period: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, initial_price: nil, internal_notes: nil, plan_type: nil, product: nil, product_id: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil) ⇒ Object
Some parameter documentations has been truncated, see WhopSDK::Models::PaymentCreateParams::Plan for more details.
Pass this object to create a new plan for this payment
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 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 57 class Plan < WhopSDK::Internal::Type::BaseModel # @!attribute currency # The respective currency identifier for the plan. # # @return [Symbol, WhopSDK::Models::Currency] required :currency, enum: -> { WhopSDK::Currency } # @!attribute billing_period # The interval at which the plan charges (renewal plans). # # @return [Integer, nil] optional :billing_period, Integer, 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 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 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 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::PaymentCreateParams::Plan::Product, nil] optional :product, -> { WhopSDK::PaymentCreateParams::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 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(currency:, billing_period: nil, description: nil, expiration_days: nil, force_create_new_plan: nil, initial_price: nil, internal_notes: nil, plan_type: nil, product: nil, product_id: nil, renewal_price: nil, title: nil, trial_period_days: nil, visibility: nil) # Some parameter documentations has been truncated, see # {WhopSDK::Models::PaymentCreateParams::Plan} for more details. # # Pass this object to create a new plan for this payment # # @param currency [Symbol, WhopSDK::Models::Currency] The respective currency identifier for the plan. # # @param billing_period [Integer, nil] The interval at which the plan charges (renewal plans). # # @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 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 plan_type [Symbol, WhopSDK::Models::PlanType, nil] The type of plan that can be attached to a product # # @param product [WhopSDK::Models::PaymentCreateParams::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 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 # @see WhopSDK::Models::PaymentCreateParams::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 a product. # # @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::PaymentCreateParams::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 a product. # # @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).
68 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 68 optional :billing_period, Integer, nil?: true |
#currency ⇒ Symbol, WhopSDK::Models::Currency
The respective currency identifier for the plan.
62 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 62 required :currency, enum: -> { WhopSDK::Currency } |
#description ⇒ String?
The description of the plan.
74 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 74 optional :description, String, nil?: true |
#expiration_days ⇒ Integer?
The interval at which the plan charges (expiration plans).
80 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 80 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.
87 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 87 optional :force_create_new_plan, WhopSDK::Internal::Type::Boolean, nil?: true |
#initial_price ⇒ Float?
An additional amount charged upon first purchase.
93 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 93 optional :initial_price, Float, nil?: true |
#internal_notes ⇒ String?
A personal description or notes section for the business.
99 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 99 optional :internal_notes, String, nil?: true |
#plan_type ⇒ Symbol, ...
The type of plan that can be attached to a product
105 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 105 optional :plan_type, enum: -> { WhopSDK::PlanType }, nil?: true |
#product ⇒ WhopSDK::Models::PaymentCreateParams::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.
112 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 112 optional :product, -> { WhopSDK::PaymentCreateParams::Plan::Product }, nil?: true |
#product_id ⇒ String?
The product the plan is related to. Either this or product is required.
118 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 118 optional :product_id, String, nil?: true |
#renewal_price ⇒ Float?
The amount the customer is charged every billing period.
124 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 124 optional :renewal_price, Float, nil?: true |
#title ⇒ String?
The title of the plan. This will be visible on the product page to customers.
130 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 130 optional :title, String, nil?: true |
#trial_period_days ⇒ Integer?
The number of free trial days added before a renewal plan.
136 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 136 optional :trial_period_days, Integer, nil?: true |
#visibility ⇒ Symbol, ...
Visibility of a resource
142 |
# File 'lib/whop_sdk/models/payment_create_params.rb', line 142 optional :visibility, enum: -> { WhopSDK::Visibility }, nil?: true |