Class: WhopSDK::Models::InvoiceCreateParams::Plan

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/invoice_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(collection_method: , company_id: , due_date: , plan: , charge_buyer_fee: nil, customer_name: nil, email_address: nil, member_id: nil, payment_token_id: nil, product: nil, product_id: nil, request_options: {}) ⇒ Object

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

Parameters:

  • collection_method (Symbol, WhopSDK::Models::CollectionMethod) (defaults to: )

    The method of collection for this invoice. If using charge_automatically, you mu

  • company_id (String) (defaults to: )

    The company ID to create this invoice for.

  • due_date (Time) (defaults to: )

    The date the invoice is due, if applicable.

  • plan (WhopSDK::Models::InvoiceCreateParams::Plan) (defaults to: )

    The properties of the plan to create for this invoice.

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

    Whether or not to charge the customer a buyer fee.

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

    The name of the customer to create this invoice for. This is required if you wan

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

    The email address to create this invoice for. This is required if you want to cr

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

    The member ID to create this invoice for. Include this if you want to create an

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

    The payment token ID to use for this invoice. If using charge_automatically, you

  • product (WhopSDK::Models::InvoiceCreateParams::Product, nil) (defaults to: nil)

    The properties of the product to create for this invoice. Include this if you wa

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

    The product ID to create this invoice for. Include this if you want to create an

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


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
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 113

class Plan < WhopSDK::Internal::Type::BaseModel
  # @!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::InvoiceCreateParams::Plan::CustomField>, nil]
  optional :custom_fields,
           -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::InvoiceCreateParams::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 initial_price
  #   An additional amount charged upon first purchase. Use only if a one time payment
  #   OR you want to charge an additional amount on top of the renewal price. Provided
  #   as a number in dollars. Eg: 10.43 for $10.43
  #
  #   @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 an access pass
  #
  #   @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. Use only if a recurring
  #   payment. Provided as a number in dollars. Eg: 10.43 for $10.43
  #
  #   @return [Float, nil]
  optional :renewal_price, Float, 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(billing_period: nil, custom_fields: nil, description: nil, expiration_days: nil, initial_price: nil, internal_notes: nil, plan_type: nil, release_method: nil, renewal_price: nil, trial_period_days: nil, visibility: nil)
  #   Some parameter documentations has been truncated, see
  #   {WhopSDK::Models::InvoiceCreateParams::Plan} for more details.
  #
  #   The properties of the plan to create for this invoice.
  #
  #   @param billing_period [Integer, nil] The interval at which the plan charges (renewal plans).
  #
  #   @param custom_fields [Array<WhopSDK::Models::InvoiceCreateParams::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 initial_price [Float, nil] An additional amount charged upon first purchase. Use only if a one time payment
  #
  #   @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 an access pass
  #
  #   @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. Use only if a recurring
  #
  #   @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
end

Instance Attribute Details

#billing_periodInteger?

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

Returns:

  • (Integer, nil)


118
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 118

optional :billing_period, Integer, nil?: true

#custom_fieldsArray<WhopSDK::Models::InvoiceCreateParams::Plan::CustomField>?

An array of custom field objects.



124
125
126
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 124

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

#descriptionString?

The description of the plan.

Returns:

  • (String, nil)


132
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 132

optional :description, String, nil?: true

#expiration_daysInteger?

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

Returns:

  • (Integer, nil)


138
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 138

optional :expiration_days, Integer, nil?: true

#initial_priceFloat?

An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in dollars. Eg: 10.43 for $10.43

Returns:

  • (Float, nil)


146
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 146

optional :initial_price, Float, nil?: true

#internal_notesString?

A personal description or notes section for the business.

Returns:

  • (String, nil)


152
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 152

optional :internal_notes, String, nil?: true

#plan_typeSymbol, ...

The type of plan that can be attached to an access pass

Returns:



158
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 158

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

#release_methodSymbol, ...

The methods of how a plan can be released.

Returns:



164
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 164

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

#renewal_priceFloat?

The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in dollars. Eg: 10.43 for $10.43

Returns:

  • (Float, nil)


171
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 171

optional :renewal_price, Float, nil?: true

#trial_period_daysInteger?

The number of free trial days added before a renewal plan.

Returns:

  • (Integer, nil)


177
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 177

optional :trial_period_days, Integer, nil?: true

#visibilitySymbol, ...

Visibility of a resource

Returns:



183
# File 'lib/whop_sdk/models/invoice_create_params.rb', line 183

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