Class: WhopSDK::Models::AdListParams

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

Overview

See Also:

  • WhopSDK::Resources::Ads#list

Defined Under Namespace

Modules: Direction, Order, Status

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: nil, ad_campaign_id: nil, ad_group_id: nil, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, order: nil, query: nil, stats_from: nil, stats_to: nil, status: nil, time_zone: nil, request_options: {}) ⇒ Object

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

Parameters:

  • account_id (String) (defaults to: nil)

    The account the ads belong to. Defaults to the account-scoped key's own account.

  • ad_campaign_id (String) (defaults to: nil)

    Only return ads in this ad campaign.

  • ad_group_id (String) (defaults to: nil)

    Only return ads in this ad group.

  • after (String) (defaults to: nil)

    Cursor to fetch the page after (from page_info.end_cursor).

  • before (String) (defaults to: nil)

    Cursor to fetch the page before (from page_info.start_cursor).

  • created_after (String) (defaults to: nil)

    Only return ads created after this timestamp.

  • created_before (String) (defaults to: nil)

    Only return ads created before this timestamp.

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

    The sort direction. Defaults to desc.

  • first (Integer) (defaults to: nil)

    The number of ads to return.

  • last (Integer) (defaults to: nil)

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

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

    The field to sort by. Defaults to created_at. Stat columns (spend, impressions,

  • query (String) (defaults to: nil)

    Filter ads by a title or ID substring.

  • stats_from (String) (defaults to: nil)

    Start of the stats window. Defaults to all-time.

  • stats_to (String) (defaults to: nil)

    End of the stats window. Defaults to now.

  • status (Symbol, WhopSDK::Models::AdListParams::Status) (defaults to: nil)

    Only return ads with this status.

  • time_zone (String) (defaults to: nil)

    IANA timezone (e.g. America/New_York) the stats window is interpreted in. Bare s

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


# File 'lib/whop_sdk/models/ad_list_params.rb', line 111

Instance Attribute Details

#account_idString?

The account the ads belong to. Defaults to the account-scoped key's own account.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :account_id, String

#ad_campaign_idString?

Only return ads in this ad campaign.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :ad_campaign_id, String

#ad_group_idString?

Only return ads in this ad group.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :ad_group_id, String

#afterString?

Cursor to fetch the page after (from page_info.end_cursor).

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :after, String

#beforeString?

Cursor to fetch the page before (from page_info.start_cursor).

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :before, String

#created_afterString?

Only return ads created after this timestamp.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :created_after, String

#created_beforeString?

Only return ads created before this timestamp.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :created_before, String

#directionSymbol, ...

The sort direction. Defaults to desc.



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

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

#firstInteger?

The number of ads to return.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


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

optional :first, Integer

#lastInteger?

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

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


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

optional :last, Integer

#orderSymbol, ...

The field to sort by. Defaults to created_at. Stat columns (spend, impressions, …) rank over the stats_from/stats_to window across the whole list, not just the current page. results, cost_per_result and return_on_ad_spend rank by the same Whop pixel-attributed values the response reports.

Returns:



77
# File 'lib/whop_sdk/models/ad_list_params.rb', line 77

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

#queryString?

Filter ads by a title or ID substring.

Parameters:

  • (String)

Returns:

  • (String, nil)


83
# File 'lib/whop_sdk/models/ad_list_params.rb', line 83

optional :query, String

#stats_fromString?

Start of the stats window. Defaults to all-time.

Parameters:

  • (String)

Returns:

  • (String, nil)


89
# File 'lib/whop_sdk/models/ad_list_params.rb', line 89

optional :stats_from, String

#stats_toString?

End of the stats window. Defaults to now.

Parameters:

  • (String)

Returns:

  • (String, nil)


95
# File 'lib/whop_sdk/models/ad_list_params.rb', line 95

optional :stats_to, String

#statusSymbol, ...

Only return ads with this status.

Returns:



101
# File 'lib/whop_sdk/models/ad_list_params.rb', line 101

optional :status, enum: -> { WhopSDK::AdListParams::Status }

#time_zoneString?

IANA timezone (e.g. America/New_York) the stats window is interpreted in. Bare stats_from/stats_to dates resolve to day boundaries on this clock. Defaults to UTC.

Parameters:

  • (String)

Returns:

  • (String, nil)


109
# File 'lib/whop_sdk/models/ad_list_params.rb', line 109

optional :time_zone, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/whop_sdk/models/ad_list_params.rb', line 156

Instance Method Details

#to_hash{

Returns:

  • ({)


118
# File 'sig/whop_sdk/models/ad_list_params.rbs', line 118

def to_hash: -> {