Class: Stigg::Models::V1Beta::Customers::AssignmentUpsertParams::Assignment
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Stigg::Models::V1Beta::Customers::AssignmentUpsertParams::Assignment
- Defined in:
- lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb
Defined Under Namespace
Modules: Cadence
Instance Attribute Summary collapse
-
#cadence ⇒ Symbol, ...
Usage-reset cadence (required on create).
-
#currency_id ⇒ String?
Currency refId this assignment grants (credit budgets).
-
#entity_id ⇒ String
The entity refId this assignment is attached to.
-
#feature_id ⇒ String?
Feature refId this assignment grants.
-
#parent_id ⇒ String?
Parent entity refId in the hierarchy.
- #scope_entity_ids ⇒ Array<String>?
-
#usage_limit ⇒ Float?
Maximum usage allowed within one cadence window (required on create).
Instance Method Summary collapse
-
#initialize(entity_id:, cadence: nil, currency_id: nil, feature_id: nil, parent_id: nil, scope_entity_ids: nil, usage_limit: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Assignment for more details.
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(entity_id:, cadence: nil, currency_id: nil, feature_id: nil, parent_id: nil, scope_entity_ids: nil, usage_limit: nil) ⇒ Object
Some parameter documentations has been truncated, see Stigg::Models::V1Beta::Customers::AssignmentUpsertParams::Assignment for more details.
A single assignment to create or update. Identify the capability with exactly one of ‘featureId` or `currencyId`. The natural key is the `(entityId, capability, scopeEntityIds)` triple. On create both `usageLimit` and `cadence` are required; on update they may be omitted individually to preserve the existing value.
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 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 45 class Assignment < Stigg::Internal::Type::BaseModel # @!attribute entity_id # The entity refId this assignment is attached to # # @return [String] required :entity_id, String, api_name: :entityId # @!attribute cadence # Usage-reset cadence (required on create). Currently only `MONTH` is supported # # @return [Symbol, Stigg::Models::V1Beta::Customers::AssignmentUpsertParams::Assignment::Cadence, nil] optional :cadence, enum: -> { Stigg::V1Beta::Customers::AssignmentUpsertParams::Assignment::Cadence } # @!attribute currency_id # Currency refId this assignment grants (credit budgets). Mutually exclusive with # `featureId`. # # @return [String, nil] optional :currency_id, String, api_name: :currencyId # @!attribute feature_id # Feature refId this assignment grants. Mutually exclusive with `currencyId`. # # @return [String, nil] optional :feature_id, String, api_name: :featureId # @!attribute parent_id # Parent entity refId in the hierarchy. Omit to leave the current parent untouched # (a new node defaults to a root); `null` detaches to a root; a refId sets or # changes the parent. Reparenting an existing node is leaf-only. # # @return [String, nil] optional :parent_id, String, api_name: :parentId, nil?: true # @!attribute scope_entity_ids # # @return [Array<String>, nil] optional :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds # @!attribute usage_limit # Maximum usage allowed within one cadence window (required on create) # # @return [Float, nil] optional :usage_limit, Float, api_name: :usageLimit # @!method initialize(entity_id:, cadence: nil, currency_id: nil, feature_id: nil, parent_id: nil, scope_entity_ids: nil, usage_limit: nil) # Some parameter documentations has been truncated, see # {Stigg::Models::V1Beta::Customers::AssignmentUpsertParams::Assignment} for more # details. # # A single assignment to create or update. Identify the capability with exactly # one of `featureId` or `currencyId`. The natural key is the # `(entityId, capability, scopeEntityIds)` triple. On create both `usageLimit` and # `cadence` are required; on update they may be omitted individually to preserve # the existing value. # # @param entity_id [String] The entity refId this assignment is attached to # # @param cadence [Symbol, Stigg::Models::V1Beta::Customers::AssignmentUpsertParams::Assignment::Cadence] Usage-reset cadence (required on create). Currently only `MONTH` is supported # # @param currency_id [String] Currency refId this assignment grants (credit budgets). Mutually exclusive with # # @param feature_id [String] Feature refId this assignment grants. Mutually exclusive with `currencyId`. # # @param parent_id [String, nil] Parent entity refId in the hierarchy. Omit to leave the current parent untouched # # @param scope_entity_ids [Array<String>] # # @param usage_limit [Float] Maximum usage allowed within one cadence window (required on create) # Usage-reset cadence (required on create). Currently only `MONTH` is supported # # @see Stigg::Models::V1Beta::Customers::AssignmentUpsertParams::Assignment#cadence module Cadence extend Stigg::Internal::Type::Enum MONTH = :MONTH # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#cadence ⇒ Symbol, ...
Usage-reset cadence (required on create). Currently only ‘MONTH` is supported
56 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 56 optional :cadence, enum: -> { Stigg::V1Beta::Customers::AssignmentUpsertParams::Assignment::Cadence } |
#currency_id ⇒ String?
Currency refId this assignment grants (credit budgets). Mutually exclusive with ‘featureId`.
63 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 63 optional :currency_id, String, api_name: :currencyId |
#entity_id ⇒ String
The entity refId this assignment is attached to
50 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 50 required :entity_id, String, api_name: :entityId |
#feature_id ⇒ String?
Feature refId this assignment grants. Mutually exclusive with ‘currencyId`.
69 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 69 optional :feature_id, String, api_name: :featureId |
#parent_id ⇒ String?
Parent entity refId in the hierarchy. Omit to leave the current parent untouched (a new node defaults to a root); ‘null` detaches to a root; a refId sets or changes the parent. Reparenting an existing node is leaf-only.
77 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 77 optional :parent_id, String, api_name: :parentId, nil?: true |
#scope_entity_ids ⇒ Array<String>?
82 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 82 optional :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds |
#usage_limit ⇒ Float?
Maximum usage allowed within one cadence window (required on create)
88 |
# File 'lib/stigg/models/v1_beta/customers/assignment_upsert_params.rb', line 88 optional :usage_limit, Float, api_name: :usageLimit |