Module: Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/stigg/models/v1/subscription_provision_response.rb
Defined Under Namespace
Classes: UnionObjectVariant0, UnionObjectVariant1
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, entitlements:, status:, subscription:, checkout_billing_id: nil, checkout_url: nil, is_scheduled: nil) ⇒ Object
Provisioning result with status and subscription or checkout URL.
Methods included from Internal::Type::Union
==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/stigg/models/v1/subscription_provision_response.rb', line 314
|
Instance Method Details
#initialize(id:, entitlements:, status:, subscription:, checkout_billing_id: nil, checkout_url: nil, is_scheduled: nil) ⇒ Object
Provisioning result with status and subscription or checkout URL.
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 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/stigg/models/v1/subscription_provision_response.rb', line 83 module Entitlement extend Stigg::Internal::Type::Union variant -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0 } variant -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1 } class UnionObjectVariant0 < Stigg::Internal::Type::BaseModel # @!attribute access_denied_reason # # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::AccessDeniedReason, nil] required :access_denied_reason, enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::AccessDeniedReason }, api_name: :accessDeniedReason, nil?: true # @!attribute is_granted # # @return [Boolean] required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted # @!attribute type # # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Type] required :type, enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Type } # @!attribute current_usage # # @return [Float, nil] optional :current_usage, Float, api_name: :currentUsage # @!attribute entitlement_updated_at # Timestamp of the last update to the entitlement grant or configuration. # # @return [Time, nil] optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt # @!attribute feature # # @return [Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature, nil] optional :feature, -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature } # @!attribute has_unlimited_usage # # @return [Boolean, nil] optional :has_unlimited_usage, Stigg::Internal::Type::Boolean, api_name: :hasUnlimitedUsage # @!attribute reset_period # # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::ResetPeriod, nil] optional :reset_period, enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::ResetPeriod }, api_name: :resetPeriod, nil?: true # @!attribute usage_limit # # @return [Float, nil] optional :usage_limit, Float, api_name: :usageLimit, nil?: true # @!attribute usage_period_anchor # The anchor for calculating the usage period for metered entitlements with a # reset period configured # # @return [Time, nil] optional :usage_period_anchor, Time, api_name: :usagePeriodAnchor # @!attribute usage_period_end # The end date of the usage period for metered entitlements with a reset period # configured # # @return [Time, nil] optional :usage_period_end, Time, api_name: :usagePeriodEnd # @!attribute usage_period_start # The start date of the usage period for metered entitlements with a reset period # configured # # @return [Time, nil] optional :usage_period_start, Time, api_name: :usagePeriodStart # @!attribute valid_until # The next time the entitlement should be recalculated # # @return [Time, nil] optional :valid_until, Time, api_name: :validUntil # @!method initialize(access_denied_reason:, is_granted:, type:, current_usage: nil, entitlement_updated_at: nil, feature: nil, has_unlimited_usage: nil, reset_period: nil, usage_limit: nil, usage_period_anchor: nil, usage_period_end: nil, usage_period_start: nil, valid_until: nil) # Some parameter documentations has been truncated, see # {Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0} # for more details. # # @param access_denied_reason [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::AccessDeniedReason, nil] # # @param is_granted [Boolean] # # @param type [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Type] # # @param current_usage [Float] # # @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration. # # @param feature [Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature] # # @param has_unlimited_usage [Boolean] # # @param reset_period [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::ResetPeriod, nil] # # @param usage_limit [Float, nil] # # @param usage_period_anchor [Time] The anchor for calculating the usage period for metered entitlements with a rese # # @param usage_period_end [Time] The end date of the usage period for metered entitlements with a reset period co # # @param usage_period_start [Time] The start date of the usage period for metered entitlements with a reset period # # @param valid_until [Time] The next time the entitlement should be recalculated # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0#access_denied_reason module AccessDeniedReason extend Stigg::Internal::Type::Enum FEATURE_NOT_FOUND = :FeatureNotFound CUSTOMER_NOT_FOUND = :CustomerNotFound CUSTOMER_IS_ARCHIVED = :CustomerIsArchived CUSTOMER_RESOURCE_NOT_FOUND = :CustomerResourceNotFound NO_ACTIVE_SUBSCRIPTION = :NoActiveSubscription NO_FEATURE_ENTITLEMENT_IN_SUBSCRIPTION = :NoFeatureEntitlementInSubscription REQUESTED_USAGE_EXCEEDING_LIMIT = :RequestedUsageExceedingLimit REQUESTED_VALUES_MISMATCH = :RequestedValuesMismatch BUDGET_EXCEEDED = :BudgetExceeded UNKNOWN = :Unknown FEATURE_TYPE_MISMATCH = :FeatureTypeMismatch REVOKED = :Revoked INSUFFICIENT_CREDITS = :InsufficientCredits ENTITLEMENT_NOT_FOUND = :EntitlementNotFound # @!method self.values # @return [Array<Symbol>] end # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0#type module Type extend Stigg::Internal::Type::Enum FEATURE = :FEATURE # @!method self.values # @return [Array<Symbol>] end # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0#feature class Feature < Stigg::Internal::Type::BaseModel # @!attribute id # The unique reference ID of the entitlement. # # @return [String] required :id, String # @!attribute display_name # The human-readable name of the entitlement, shown in UI elements. # # @return [String] required :display_name, String, api_name: :displayName # @!attribute feature_status # The current status of the feature. # # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature::FeatureStatus] required :feature_status, enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature::FeatureStatus }, api_name: :featureStatus # @!attribute feature_type # The type of feature associated with the entitlement. # # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature::FeatureType] required :feature_type, enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature::FeatureType }, api_name: :featureType # @!method initialize(id:, display_name:, feature_status:, feature_type:) # @param id [String] The unique reference ID of the entitlement. # # @param display_name [String] The human-readable name of the entitlement, shown in UI elements. # # @param feature_status [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature::FeatureStatus] The current status of the feature. # # @param feature_type [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature::FeatureType] The type of feature associated with the entitlement. # The current status of the feature. # # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature#feature_status module FeatureStatus extend Stigg::Internal::Type::Enum NEW = :NEW SUSPENDED = :SUSPENDED ACTIVE = :ACTIVE # @!method self.values # @return [Array<Symbol>] end # The type of feature associated with the entitlement. # # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0::Feature#feature_type module FeatureType extend Stigg::Internal::Type::Enum BOOLEAN = :BOOLEAN NUMBER = :NUMBER ENUM = :ENUM # @!method self.values # @return [Array<Symbol>] end end # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0#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 end class UnionObjectVariant1 < Stigg::Internal::Type::BaseModel # @!attribute access_denied_reason # # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::AccessDeniedReason, nil] required :access_denied_reason, enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::AccessDeniedReason }, api_name: :accessDeniedReason, nil?: true # @!attribute currency # The currency associated with a credit entitlement. # # @return [Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Currency] required :currency, -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Currency } # @!attribute current_usage # # @return [Float] required :current_usage, Float, api_name: :currentUsage # @!attribute is_granted # # @return [Boolean] required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted # @!attribute type # # @return [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Type] required :type, enum: -> { Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Type } # @!attribute usage_limit # # @return [Float] required :usage_limit, Float, api_name: :usageLimit # @!attribute usage_updated_at # Timestamp of the last update to the credit usage. # # @return [Time] required :usage_updated_at, Time, api_name: :usageUpdatedAt # @!attribute entitlement_updated_at # Timestamp of the last update to the entitlement grant or configuration. # # @return [Time, nil] optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt # @!attribute usage_period_end # The end date of the current billing period for recurring credit grants. # # @return [Time, nil] optional :usage_period_end, Time, api_name: :usagePeriodEnd # @!attribute valid_until # The next time the entitlement should be recalculated # # @return [Time, nil] optional :valid_until, Time, api_name: :validUntil # @!method initialize(access_denied_reason:, currency:, current_usage:, is_granted:, type:, usage_limit:, usage_updated_at:, entitlement_updated_at: nil, usage_period_end: nil, valid_until: nil) # @param access_denied_reason [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::AccessDeniedReason, nil] # # @param currency [Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Currency] The currency associated with a credit entitlement. # # @param current_usage [Float] # # @param is_granted [Boolean] # # @param type [Symbol, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1::Type] # # @param usage_limit [Float] # # @param usage_updated_at [Time] Timestamp of the last update to the credit usage. # # @param entitlement_updated_at [Time] Timestamp of the last update to the entitlement grant or configuration. # # @param usage_period_end [Time] The end date of the current billing period for recurring credit grants. # # @param valid_until [Time] The next time the entitlement should be recalculated # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1#access_denied_reason module AccessDeniedReason extend Stigg::Internal::Type::Enum FEATURE_NOT_FOUND = :FeatureNotFound CUSTOMER_NOT_FOUND = :CustomerNotFound CUSTOMER_IS_ARCHIVED = :CustomerIsArchived CUSTOMER_RESOURCE_NOT_FOUND = :CustomerResourceNotFound NO_ACTIVE_SUBSCRIPTION = :NoActiveSubscription NO_FEATURE_ENTITLEMENT_IN_SUBSCRIPTION = :NoFeatureEntitlementInSubscription REQUESTED_USAGE_EXCEEDING_LIMIT = :RequestedUsageExceedingLimit REQUESTED_VALUES_MISMATCH = :RequestedValuesMismatch BUDGET_EXCEEDED = :BudgetExceeded UNKNOWN = :Unknown FEATURE_TYPE_MISMATCH = :FeatureTypeMismatch REVOKED = :Revoked INSUFFICIENT_CREDITS = :InsufficientCredits ENTITLEMENT_NOT_FOUND = :EntitlementNotFound # @!method self.values # @return [Array<Symbol>] end # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1#currency class Currency < Stigg::Internal::Type::BaseModel # @!attribute currency_id # The unique identifier of the custom currency. # # @return [String] required :currency_id, String, api_name: :currencyId # @!attribute display_name # The display name of the currency. # # @return [String] required :display_name, String, api_name: :displayName # @!attribute description # A description of the currency. # # @return [String, nil] optional :description, String, nil?: true # @!attribute metadata # Additional metadata associated with the currency. # # @return [Hash{Symbol=>String}, nil] optional :metadata, Stigg::Internal::Type::HashOf[String], nil?: true # @!attribute unit_plural # The plural form of the currency unit. # # @return [String, nil] optional :unit_plural, String, api_name: :unitPlural, nil?: true # @!attribute unit_singular # The singular form of the currency unit. # # @return [String, nil] optional :unit_singular, String, api_name: :unitSingular, nil?: true # @!method initialize(currency_id:, display_name:, description: nil, metadata: nil, unit_plural: nil, unit_singular: nil) # The currency associated with a credit entitlement. # # @param currency_id [String] The unique identifier of the custom currency. # # @param display_name [String] The display name of the currency. # # @param description [String, nil] A description of the currency. # # @param metadata [Hash{Symbol=>String}, nil] Additional metadata associated with the currency. # # @param unit_plural [String, nil] The plural form of the currency unit. # # @param unit_singular [String, nil] The singular form of the currency unit. end # @see Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1#type module Type extend Stigg::Internal::Type::Enum CREDIT = :CREDIT # @!method self.values # @return [Array<Symbol>] end end # @!method self.variants # @return [Array(Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant0, Stigg::Models::V1::SubscriptionProvisionResponse::Data::Entitlement::UnionObjectVariant1)] end |