Class: Stigg::Models::V1::Coupon::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/coupon.rb

Overview

See Also:

Defined Under Namespace

Modules: Source, Status, Type Classes: AmountsOff

Instance Attribute Summary collapse

Class Method Summary collapse

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::Coupon::Data::AmountsOff>?

Fixed amount discounts in different currencies



31
32
33
34
# File 'lib/stigg/models/v1/coupon.rb', line 31

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

#billing_idString?

The unique identifier for the entity in the billing provider

Returns:

  • (String, nil)


40
# File 'lib/stigg/models/v1/coupon.rb', line 40

required :billing_id, String, api_name: :billingId, nil?: true

The URL to the entity in the billing provider

Returns:

  • (String, nil)


46
# File 'lib/stigg/models/v1/coupon.rb', line 46

required :billing_link_url, String, api_name: :billingLinkUrl, nil?: true

#created_atTime

Timestamp of when the record was created

Returns:

  • (Time)


52
# File 'lib/stigg/models/v1/coupon.rb', line 52

required :created_at, Time, api_name: :createdAt

#descriptionString?

Description of the coupon

Returns:

  • (String, nil)


58
# File 'lib/stigg/models/v1/coupon.rb', line 58

required :description, String, nil?: true

#duration_in_monthsInteger?

Duration of the coupon validity in months

Returns:

  • (Integer, nil)


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

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

#idString

The unique identifier for the entity

Returns:

  • (String)


25
# File 'lib/stigg/models/v1/coupon.rb', line 25

required :id, String

#metadataHash{Symbol=>String}?

Metadata associated with the entity

Returns:

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


70
# File 'lib/stigg/models/v1/coupon.rb', line 70

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

#nameString

Name of the coupon

Returns:

  • (String)


76
# File 'lib/stigg/models/v1/coupon.rb', line 76

required :name, String

#percent_offInteger?

Percentage discount off the original price

Returns:

  • (Integer, nil)


82
# File 'lib/stigg/models/v1/coupon.rb', line 82

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

#sourceSymbol, ...

The source of the coupon

Returns:



88
# File 'lib/stigg/models/v1/coupon.rb', line 88

required :source, enum: -> { Stigg::V1::Coupon::Data::Source }, nil?: true

#statusSymbol, Stigg::Models::V1::Coupon::Data::Status

Current status of the coupon



94
# File 'lib/stigg/models/v1/coupon.rb', line 94

required :status, enum: -> { Stigg::V1::Coupon::Data::Status }

#typeSymbol, Stigg::Models::V1::Coupon::Data::Type

Type of the coupon (percentage or fixed amount)



100
# File 'lib/stigg/models/v1/coupon.rb', line 100

required :type, enum: -> { Stigg::V1::Coupon::Data::Type }

#updated_atTime

Timestamp of when the record was last updated

Returns:

  • (Time)


106
# File 'lib/stigg/models/v1/coupon.rb', line 106

required :updated_at, Time, api_name: :updatedAt

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/coupon.rb', line 282