Class: WhopSDK::Models::PlanListParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/whop_sdk/models/plan_list_params.rb,
sig/whop_sdk/models/plan_list_params.rbs

Overview

See Also:

  • WhopSDK::Resources::Plans#list

Defined Under Namespace

Modules: Direction, Order

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(account_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, plan_types: nil, product_ids: nil, release_methods: nil, visibilities: nil, request_options: {}) ⇒ Object

Parameters:

  • account_id (String)

    The unique identifier of the account to list plans for.

  • after (String) (defaults to: nil)

    A cursor; returns plans after this position.

  • before (String) (defaults to: nil)

    A cursor; returns plans before this position.

  • created_after (String) (defaults to: nil)

    Only return plans created after this timestamp.

  • created_before (String) (defaults to: nil)

    Only return plans created before this timestamp.

  • direction (Symbol, WhopSDK::Models::PlanListParams::Direction) (defaults to: nil)

    The sort direction for results. Defaults to descending.

  • first (Integer) (defaults to: nil)

    The number of plans to return (default and max 100).

  • last (Integer) (defaults to: nil)

    The number of plans to return from the end of the range.

  • order (Symbol, WhopSDK::Models::PlanListParams::Order) (defaults to: nil)

    The field to sort results by. Defaults to created_at.

  • plan_types (Array<String>) (defaults to: nil)

    Filter to only plans matching these billing types.

  • product_ids (Array<String>) (defaults to: nil)

    Filter to only plans belonging to these product identifiers.

  • release_methods (Array<String>) (defaults to: nil)

    Filter to only plans matching these release methods.

  • visibilities (Array<String>) (defaults to: nil)

    Filter to only plans matching these visibility states.

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


# File 'lib/whop_sdk/models/plan_list_params.rb', line 88

Instance Attribute Details

#account_idString

The unique identifier of the account to list plans for.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/whop_sdk/models/plan_list_params.rb', line 14

required :account_id, String

#afterString?

A cursor; returns plans after this position.

Parameters:

  • (String)

Returns:

  • (String, nil)


20
# File 'lib/whop_sdk/models/plan_list_params.rb', line 20

optional :after, String

#beforeString?

A cursor; returns plans before this position.

Parameters:

  • (String)

Returns:

  • (String, nil)


26
# File 'lib/whop_sdk/models/plan_list_params.rb', line 26

optional :before, String

#created_afterString?

Only return plans created after this timestamp.

Parameters:

  • (String)

Returns:

  • (String, nil)


32
# File 'lib/whop_sdk/models/plan_list_params.rb', line 32

optional :created_after, String

#created_beforeString?

Only return plans created before this timestamp.

Parameters:

  • (String)

Returns:

  • (String, nil)


38
# File 'lib/whop_sdk/models/plan_list_params.rb', line 38

optional :created_before, String

#directionSymbol, ...

The sort direction for results. Defaults to descending.



44
# File 'lib/whop_sdk/models/plan_list_params.rb', line 44

optional :direction, enum: -> { WhopSDK::PlanListParams::Direction }

#firstInteger?

The number of plans to return (default and max 100).

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


50
# File 'lib/whop_sdk/models/plan_list_params.rb', line 50

optional :first, Integer

#lastInteger?

The number of plans to return from the end of the range.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


56
# File 'lib/whop_sdk/models/plan_list_params.rb', line 56

optional :last, Integer

#orderSymbol, ...

The field to sort results by. Defaults to created_at.

Returns:



62
# File 'lib/whop_sdk/models/plan_list_params.rb', line 62

optional :order, enum: -> { WhopSDK::PlanListParams::Order }

#plan_typesArray<String>?

Filter to only plans matching these billing types.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


68
# File 'lib/whop_sdk/models/plan_list_params.rb', line 68

optional :plan_types, WhopSDK::Internal::Type::ArrayOf[String]

#product_idsArray<String>?

Filter to only plans belonging to these product identifiers.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


74
# File 'lib/whop_sdk/models/plan_list_params.rb', line 74

optional :product_ids, WhopSDK::Internal::Type::ArrayOf[String]

#release_methodsArray<String>?

Filter to only plans matching these release methods.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


80
# File 'lib/whop_sdk/models/plan_list_params.rb', line 80

optional :release_methods, WhopSDK::Internal::Type::ArrayOf[String]

#visibilitiesArray<String>?

Filter to only plans matching these visibility states.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


86
# File 'lib/whop_sdk/models/plan_list_params.rb', line 86

optional :visibilities, WhopSDK::Internal::Type::ArrayOf[String]

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/plan_list_params.rb', line 124

Instance Method Details

#to_hash{

Returns:

  • ({)


96
# File 'sig/whop_sdk/models/plan_list_params.rbs', line 96

def to_hash: -> {