Class: WhopSDK::Models::ProductListParams

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

Overview

See Also:

  • WhopSDK::Resources::Products#list

Defined Under Namespace

Modules: Direction

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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(company_id:, access_pass_types: nil, after: nil, before: nil, direction: nil, first: nil, last: nil, order: nil, visibilities: nil, request_options: {}) ⇒ Object

Parameters:

  • company_id (String)

    The unique identifier of the company to list products for.

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

    Filter to only products matching these types.

  • after (String) (defaults to: nil)

    A cursor; returns products after this position.

  • before (String) (defaults to: nil)

    A cursor; returns products before this position.

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

    The sort direction for results. Defaults to descending.

  • first (Integer) (defaults to: nil)

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

  • last (Integer) (defaults to: nil)

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

  • order (String) (defaults to: nil)

    The field to sort results by. Defaults to created_at.

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

    Filter to only products matching these visibility states.

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


# File 'lib/whop_sdk/models/product_list_params.rb', line 64

Instance Attribute Details

#access_pass_typesArray<String>?

Filter to only products matching these types.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

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

#afterString?

A cursor; returns products after this position.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :after, String

#beforeString?

A cursor; returns products before this position.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :before, String

#company_idString

The unique identifier of the company to list products for.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :company_id, String

#directionSymbol, ...

The sort direction for results. Defaults to descending.



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

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

#firstInteger?

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

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


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

optional :first, Integer

#lastInteger?

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

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


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

optional :last, Integer

#orderString?

The field to sort results by. Defaults to created_at.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :order, String

#visibilitiesArray<String>?

Filter to only products matching these visibility states.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

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

Instance Method Details

#to_hash{

Returns:

  • ({)


70
# File 'sig/whop_sdk/models/product_list_params.rbs', line 70

def to_hash: -> {