Class: Stigg::Models::V1::CouponCreateParams

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

Overview

See Also:

  • Stigg::Resources::V1::Coupons#create

Defined Under Namespace

Classes: AmountsOff

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

#initializeObject



44
# File 'sig/stigg/models/v1/coupon_create_params.rbs', line 44

def initialize: (

Instance Attribute Details

#amounts_offArray<Stigg::Models::V1::CouponCreateParams::AmountsOff>?

Fixed amount discounts in different currencies

Parameters:

  • value (::Array[Stigg::V1::CouponCreateParams::AmountsOff], nil)

Returns:



21
22
23
24
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 21

required :amounts_off,
-> { Stigg::Internal::Type::ArrayOf[Stigg::V1::CouponCreateParams::AmountsOff] },
api_name: :amountsOff,
nil?: true

#descriptionString?

Description of the coupon

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


30
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 30

required :description, String, nil?: true

#duration_in_monthsInteger?

Duration of the coupon validity in months

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


36
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 36

required :duration_in_months, Integer, api_name: :durationInMonths, nil?: true

#idString

The unique identifier for the entity

Parameters:

  • value (String)

Returns:

  • (String)


15
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 15

required :id, String

#metadataHash{Symbol=>String}?

Metadata associated with the entity

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

  • (Hash{Symbol=>String}, nil)


42
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 42

required :metadata, Stigg::Internal::Type::HashOf[String], nil?: true

#nameString

Name of the coupon

Parameters:

  • value (String)

Returns:

  • (String)


48
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 48

required :name, String

#percent_offFloat?

Percentage discount off the original price

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


54
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 54

required :percent_off, Float, api_name: :percentOff, nil?: true

#x_account_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


59
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 59

optional :x_account_id, String

#x_environment_idString?

Parameters:

  • (String)

Returns:

  • (String, nil)


64
# File 'lib/stigg/models/v1/coupon_create_params.rb', line 64

optional :x_environment_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


57
# File 'sig/stigg/models/v1/coupon_create_params.rbs', line 57

def to_hash: -> {