Class: Dodopayments::Models::DiscountListParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/dodopayments/models/discount_list_params.rb

Overview

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(active: nil, code: nil, discount_type: nil, page_number: nil, page_size: nil, product_id: nil, request_options: {}) ⇒ Object

Parameters:

  • active (Boolean) (defaults to: nil)

    Filter by active status (true = not expired, false = expired)

  • code (String) (defaults to: nil)

    Filter by discount code (partial match, case-insensitive)

  • discount_type (Symbol, Dodopayments::Models::DiscountType) (defaults to: nil)

    Filter by discount type (percentage)

  • page_number (Integer) (defaults to: nil)

    Page number (default = 0).

  • page_size (Integer) (defaults to: nil)

    Page size (default = 10, max = 100).

  • product_id (String) (defaults to: nil)

    Filter by product restriction (only discounts that apply to this product)

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


# File 'lib/dodopayments/models/discount_list_params.rb', line 46

Instance Attribute Details

#activeBoolean?

Filter by active status (true = not expired, false = expired)

Returns:

  • (Boolean, nil)


14
# File 'lib/dodopayments/models/discount_list_params.rb', line 14

optional :active, Dodopayments::Internal::Type::Boolean

#codeString?

Filter by discount code (partial match, case-insensitive)

Returns:

  • (String, nil)


20
# File 'lib/dodopayments/models/discount_list_params.rb', line 20

optional :code, String

#discount_typeSymbol, ...

Filter by discount type (percentage)

Returns:



26
# File 'lib/dodopayments/models/discount_list_params.rb', line 26

optional :discount_type, enum: -> { Dodopayments::DiscountType }

#page_numberInteger?

Page number (default = 0).

Returns:

  • (Integer, nil)


32
# File 'lib/dodopayments/models/discount_list_params.rb', line 32

optional :page_number, Integer

#page_sizeInteger?

Page size (default = 10, max = 100).

Returns:

  • (Integer, nil)


38
# File 'lib/dodopayments/models/discount_list_params.rb', line 38

optional :page_size, Integer

#product_idString?

Filter by product restriction (only discounts that apply to this product)

Returns:

  • (String, nil)


44
# File 'lib/dodopayments/models/discount_list_params.rb', line 44

optional :product_id, String