Class: Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data

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

Defined Under Namespace

Modules: Period, ResetPeriod, ResetPeriodConfiguration, Status

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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(id:, created_at:, description:, end_date:, enum_values:, environment_id:, feature_group_ids:, feature_id:, has_soft_limit:, has_unlimited_usage:, is_visible:, period:, reset_period:, reset_period_configuration:, start_date:, status:, updated_at:, usage_limit:) ⇒ Object

Granted feature entitlement

Parameters:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 20

class Data < Stigg::Internal::Type::BaseModel
  # @!attribute id
  #   Unique identifier for the entity
  #
  #   @return [String]
  required :id, String

  # @!attribute created_at
  #   Timestamp of when the record was created
  #
  #   @return [Time]
  required :created_at, Time, api_name: :createdAt

  # @!attribute description
  #   The description of the entitlement
  #
  #   @return [String, nil]
  required :description, String, nil?: true

  # @!attribute end_date
  #   The end date of the promotional entitlement
  #
  #   @return [Time, nil]
  required :end_date, Time, api_name: :endDate, nil?: true

  # @!attribute enum_values
  #   The enum values of the entitlement
  #
  #   @return [Array<String>, nil]
  required :enum_values, Stigg::Internal::Type::ArrayOf[String], api_name: :enumValues, nil?: true

  # @!attribute environment_id
  #   The unique identifier for the environment
  #
  #   @return [String]
  required :environment_id, String, api_name: :environmentId

  # @!attribute feature_group_ids
  #   Feature group IDs associated with this entitlement
  #
  #   @return [Array<String>, nil]
  required :feature_group_ids,
           Stigg::Internal::Type::ArrayOf[String],
           api_name: :featureGroupIds,
           nil?: true

  # @!attribute feature_id
  #   The unique identifier of the entitlement feature
  #
  #   @return [String]
  required :feature_id, String, api_name: :featureId

  # @!attribute has_soft_limit
  #   Whether the entitlement has a soft limit
  #
  #   @return [Boolean, nil]
  required :has_soft_limit, Stigg::Internal::Type::Boolean, api_name: :hasSoftLimit, nil?: true

  # @!attribute has_unlimited_usage
  #   Whether the entitlement has an unlimited usage
  #
  #   @return [Boolean, nil]
  required :has_unlimited_usage,
           Stigg::Internal::Type::Boolean,
           api_name: :hasUnlimitedUsage,
           nil?: true

  # @!attribute is_visible
  #   Whether the entitlement is visible
  #
  #   @return [Boolean]
  required :is_visible, Stigg::Internal::Type::Boolean, api_name: :isVisible

  # @!attribute period
  #   The grant period of the promotional entitlement
  #
  #   @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Period]
  required :period,
           enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Period }

  # @!attribute reset_period
  #   The reset period of the entitlement
  #
  #   @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriod, nil]
  required :reset_period,
           enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriod },
           api_name: :resetPeriod,
           nil?: true

  # @!attribute reset_period_configuration
  #   The reset period configuration of the entitlement
  #
  #   @return [Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig, nil]
  required :reset_period_configuration,
           union: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration },
           api_name: :resetPeriodConfiguration,
           nil?: true

  # @!attribute start_date
  #   The start date of the entitlement
  #
  #   @return [Time]
  required :start_date, Time, api_name: :startDate

  # @!attribute status
  #   The status of the entitlement
  #
  #   @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Status]
  required :status,
           enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Status }

  # @!attribute updated_at
  #   Timestamp of when the record was last updated
  #
  #   @return [Time]
  required :updated_at, Time, api_name: :updatedAt

  # @!attribute usage_limit
  #   The usage limit of the entitlement
  #
  #   @return [Float, nil]
  required :usage_limit, Float, api_name: :usageLimit, nil?: true

  # @!method initialize(id:, created_at:, description:, end_date:, enum_values:, environment_id:, feature_group_ids:, feature_id:, has_soft_limit:, has_unlimited_usage:, is_visible:, period:, reset_period:, reset_period_configuration:, start_date:, status:, updated_at:, usage_limit:)
  #   Granted feature entitlement
  #
  #   @param id [String] Unique identifier for the entity
  #
  #   @param created_at [Time] Timestamp of when the record was created
  #
  #   @param description [String, nil] The description of the entitlement
  #
  #   @param end_date [Time, nil] The end date of the promotional entitlement
  #
  #   @param enum_values [Array<String>, nil] The enum values of the entitlement
  #
  #   @param environment_id [String] The unique identifier for the environment
  #
  #   @param feature_group_ids [Array<String>, nil] Feature group IDs associated with this entitlement
  #
  #   @param feature_id [String] The unique identifier of the entitlement feature
  #
  #   @param has_soft_limit [Boolean, nil] Whether the entitlement has a soft limit
  #
  #   @param has_unlimited_usage [Boolean, nil] Whether the entitlement has an unlimited usage
  #
  #   @param is_visible [Boolean] Whether the entitlement is visible
  #
  #   @param period [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Period] The grant period of the promotional entitlement
  #
  #   @param reset_period [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriod, nil] The reset period of the entitlement
  #
  #   @param reset_period_configuration [Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig, nil] The reset period configuration of the entitlement
  #
  #   @param start_date [Time] The start date of the entitlement
  #
  #   @param status [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Status] The status of the entitlement
  #
  #   @param updated_at [Time] Timestamp of when the record was last updated
  #
  #   @param usage_limit [Float, nil] The usage limit of the entitlement

  # The grant period of the promotional entitlement
  #
  # @see Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data#period
  module Period
    extend Stigg::Internal::Type::Enum

    PERIOD_1_WEEK = :"1 week"
    PERIOD_1_MONTH = :"1 month"
    PERIOD_6_MONTH = :"6 month"
    PERIOD_1_YEAR = :"1 year"
    LIFETIME = :lifetime
    CUSTOM = :custom

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The reset period of the entitlement
  #
  # @see Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data#reset_period
  module ResetPeriod
    extend Stigg::Internal::Type::Enum

    YEAR = :YEAR
    MONTH = :MONTH
    WEEK = :WEEK
    DAY = :DAY
    HOUR = :HOUR

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The reset period configuration of the entitlement
  #
  # @see Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data#reset_period_configuration
  module ResetPeriodConfiguration
    extend Stigg::Internal::Type::Union

    # Yearly reset configuration
    variant -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig }

    # Monthly reset configuration
    variant -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig }

    # Weekly reset configuration
    variant -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig }

    class YearlyResetPeriodConfig < Stigg::Internal::Type::BaseModel
      # @!attribute according_to
      #   Reset anchor (SubscriptionStart)
      #
      #   @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig::AccordingTo]
      required :according_to,
               enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig::AccordingTo },
               api_name: :accordingTo

      # @!method initialize(according_to:)
      #   Yearly reset configuration
      #
      #   @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig::AccordingTo] Reset anchor (SubscriptionStart)

      # Reset anchor (SubscriptionStart)
      #
      # @see Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig#according_to
      module AccordingTo
        extend Stigg::Internal::Type::Enum

        SUBSCRIPTION_START = :SubscriptionStart

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class MonthlyResetPeriodConfig < Stigg::Internal::Type::BaseModel
      # @!attribute according_to
      #   Reset anchor (SubscriptionStart or StartOfTheMonth)
      #
      #   @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo]
      required :according_to,
               enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo },
               api_name: :accordingTo

      # @!method initialize(according_to:)
      #   Monthly reset configuration
      #
      #   @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig::AccordingTo] Reset anchor (SubscriptionStart or StartOfTheMonth)

      # Reset anchor (SubscriptionStart or StartOfTheMonth)
      #
      # @see Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig#according_to
      module AccordingTo
        extend Stigg::Internal::Type::Enum

        SUBSCRIPTION_START = :SubscriptionStart
        START_OF_THE_MONTH = :StartOfTheMonth

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    class WeeklyResetPeriodConfig < Stigg::Internal::Type::BaseModel
      # @!attribute according_to
      #   Reset anchor (SubscriptionStart or specific day)
      #
      #   @return [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig::AccordingTo]
      required :according_to,
               enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig::AccordingTo },
               api_name: :accordingTo

      # @!method initialize(according_to:)
      #   Weekly reset configuration
      #
      #   @param according_to [Symbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig::AccordingTo] Reset anchor (SubscriptionStart or specific day)

      # Reset anchor (SubscriptionStart or specific day)
      #
      # @see Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig#according_to
      module AccordingTo
        extend Stigg::Internal::Type::Enum

        SUBSCRIPTION_START = :SubscriptionStart
        EVERY_SUNDAY = :EverySunday
        EVERY_MONDAY = :EveryMonday
        EVERY_TUESDAY = :EveryTuesday
        EVERY_WEDNESDAY = :EveryWednesday
        EVERY_THURSDAY = :EveryThursday
        EVERY_FRIDAY = :EveryFriday
        EVERY_SATURDAY = :EverySaturday

        # @!method self.values
        #   @return [Array<Symbol>]
      end
    end

    # @!method self.variants
    #   @return [Array(Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::YearlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::MonthlyResetPeriodConfig, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriodConfiguration::WeeklyResetPeriodConfig)]
  end

  # The status of the entitlement
  #
  # @see Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data#status
  module Status
    extend Stigg::Internal::Type::Enum

    ACTIVE = :Active
    EXPIRED = :Expired
    PAUSED = :Paused

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#created_atTime

Timestamp of when the record was created

Returns:

  • (Time)


31
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 31

required :created_at, Time, api_name: :createdAt

#descriptionString?

The description of the entitlement

Returns:

  • (String, nil)


37
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 37

required :description, String, nil?: true

#end_dateTime?

The end date of the promotional entitlement

Returns:

  • (Time, nil)


43
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 43

required :end_date, Time, api_name: :endDate, nil?: true

#enum_valuesArray<String>?

The enum values of the entitlement

Returns:

  • (Array<String>, nil)


49
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 49

required :enum_values, Stigg::Internal::Type::ArrayOf[String], api_name: :enumValues, nil?: true

#environment_idString

The unique identifier for the environment

Returns:

  • (String)


55
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 55

required :environment_id, String, api_name: :environmentId

#feature_group_idsArray<String>?

Feature group IDs associated with this entitlement

Returns:

  • (Array<String>, nil)


61
62
63
64
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 61

required :feature_group_ids,
Stigg::Internal::Type::ArrayOf[String],
api_name: :featureGroupIds,
nil?: true

#feature_idString

The unique identifier of the entitlement feature

Returns:

  • (String)


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

required :feature_id, String, api_name: :featureId

#has_soft_limitBoolean?

Whether the entitlement has a soft limit

Returns:

  • (Boolean, nil)


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

required :has_soft_limit, Stigg::Internal::Type::Boolean, api_name: :hasSoftLimit, nil?: true

#has_unlimited_usageBoolean?

Whether the entitlement has an unlimited usage

Returns:

  • (Boolean, nil)


82
83
84
85
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 82

required :has_unlimited_usage,
Stigg::Internal::Type::Boolean,
api_name: :hasUnlimitedUsage,
nil?: true

#idString

Unique identifier for the entity

Returns:

  • (String)


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

required :id, String

#is_visibleBoolean

Whether the entitlement is visible

Returns:

  • (Boolean)


91
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 91

required :is_visible, Stigg::Internal::Type::Boolean, api_name: :isVisible

#periodSymbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Period

The grant period of the promotional entitlement



97
98
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 97

required :period,
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Period }

#reset_periodSymbol, ...

The reset period of the entitlement



104
105
106
107
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 104

required :reset_period,
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::ResetPeriod },
api_name: :resetPeriod,
nil?: true

#start_dateTime

The start date of the entitlement

Returns:

  • (Time)


122
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 122

required :start_date, Time, api_name: :startDate

#statusSymbol, Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Status

The status of the entitlement



128
129
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 128

required :status,
enum: -> { Stigg::Models::V1::Customers::PromotionalEntitlementCreateResponse::Data::Status }

#updated_atTime

Timestamp of when the record was last updated

Returns:

  • (Time)


135
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 135

required :updated_at, Time, api_name: :updatedAt

#usage_limitFloat?

The usage limit of the entitlement

Returns:

  • (Float, nil)


141
# File 'lib/stigg/models/v1/customers/promotional_entitlement_create_response.rb', line 141

required :usage_limit, Float, api_name: :usageLimit, nil?: true