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

Overview

Defined Under Namespace

Classes: AmountsOff

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Method Summary

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, #initialize, 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

This class inherits a constructor from Stigg::Internal::Type::BaseModel

Instance Attribute Details

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

Fixed amount discounts in different currencies



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

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

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

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

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

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

Returns:

  • (Float, nil)


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

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