Class: MicrosoftGraph::Models::SubscribedSku

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/subscribed_sku.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new subscribedSku and sets the default values.



103
104
105
# File 'lib/models/subscribed_sku.rb', line 103

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a subscribed_sku

Raises:

  • (StandardError)


126
127
128
129
# File 'lib/models/subscribed_sku.rb', line 126

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return SubscribedSku.new
end

Instance Method Details

#account_idObject

Gets the accountId property value. The unique ID of the account this SKU belongs to.

Returns:

  • a string



43
44
45
# File 'lib/models/subscribed_sku.rb', line 43

def 
    return @account_id
end

#account_id=(value) ⇒ Object

Sets the accountId property value. The unique ID of the account this SKU belongs to.

Parameters:

  • value

    Value to set for the accountId property.

Returns:

  • a void



51
52
53
# File 'lib/models/subscribed_sku.rb', line 51

def (value)
    @account_id = value
end

#account_nameObject

Gets the accountName property value. The name of the account this SKU belongs to.

Returns:

  • a string



58
59
60
# File 'lib/models/subscribed_sku.rb', line 58

def 
    return @account_name
end

#account_name=(value) ⇒ Object

Sets the accountName property value. The name of the account this SKU belongs to.

Parameters:

  • value

    Value to set for the accountName property.

Returns:

  • a void



66
67
68
# File 'lib/models/subscribed_sku.rb', line 66

def (value)
    @account_name = value
end

#applies_toObject

Gets the appliesTo property value. The target class for this SKU. Only SKUs with target class User are assignable. Possible values are: ‘User’, ‘Company’.

Returns:

  • a string



73
74
75
# File 'lib/models/subscribed_sku.rb', line 73

def applies_to
    return @applies_to
end

#applies_to=(value) ⇒ Object

Sets the appliesTo property value. The target class for this SKU. Only SKUs with target class User are assignable. Possible values are: ‘User’, ‘Company’.

Parameters:

  • value

    Value to set for the appliesTo property.

Returns:

  • a void



81
82
83
# File 'lib/models/subscribed_sku.rb', line 81

def applies_to=(value)
    @applies_to = value
end

#capability_statusObject

Gets the capabilityStatus property value. Enabled indicates that the prepaidUnits property has at least one unit that is enabled. LockedOut indicates that the customer cancelled their subscription. Possible values are: Enabled, Warning, Suspended, Deleted, LockedOut.

Returns:

  • a string



88
89
90
# File 'lib/models/subscribed_sku.rb', line 88

def capability_status
    return @capability_status
end

#capability_status=(value) ⇒ Object

Sets the capabilityStatus property value. Enabled indicates that the prepaidUnits property has at least one unit that is enabled. LockedOut indicates that the customer cancelled their subscription. Possible values are: Enabled, Warning, Suspended, Deleted, LockedOut.

Parameters:

  • value

    Value to set for the capabilityStatus property.

Returns:

  • a void



96
97
98
# File 'lib/models/subscribed_sku.rb', line 96

def capability_status=(value)
    @capability_status = value
end

#consumed_unitsObject

Gets the consumedUnits property value. The number of licenses that have been assigned.

Returns:

  • a integer



110
111
112
# File 'lib/models/subscribed_sku.rb', line 110

def consumed_units
    return @consumed_units
end

#consumed_units=(value) ⇒ Object

Sets the consumedUnits property value. The number of licenses that have been assigned.

Parameters:

  • value

    Value to set for the consumedUnits property.

Returns:

  • a void



118
119
120
# File 'lib/models/subscribed_sku.rb', line 118

def consumed_units=(value)
    @consumed_units = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/models/subscribed_sku.rb', line 134

def get_field_deserializers()
    return super.merge({
        "accountId" => lambda {|n| @account_id = n.get_string_value() },
        "accountName" => lambda {|n| @account_name = n.get_string_value() },
        "appliesTo" => lambda {|n| @applies_to = n.get_string_value() },
        "capabilityStatus" => lambda {|n| @capability_status = n.get_string_value() },
        "consumedUnits" => lambda {|n| @consumed_units = n.get_number_value() },
        "prepaidUnits" => lambda {|n| @prepaid_units = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::LicenseUnitsDetail.create_from_discriminator_value(pn) }) },
        "servicePlans" => lambda {|n| @service_plans = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ServicePlanInfo.create_from_discriminator_value(pn) }) },
        "skuId" => lambda {|n| @sku_id = n.get_guid_value() },
        "skuPartNumber" => lambda {|n| @sku_part_number = n.get_string_value() },
        "subscriptionIds" => lambda {|n| @subscription_ids = n.get_collection_of_primitive_values(String) },
    })
end

#prepaid_unitsObject

Gets the prepaidUnits property value. Information about the number and status of prepaid licenses.

Returns:

  • a license_units_detail



152
153
154
# File 'lib/models/subscribed_sku.rb', line 152

def prepaid_units
    return @prepaid_units
end

#prepaid_units=(value) ⇒ Object

Sets the prepaidUnits property value. Information about the number and status of prepaid licenses.

Parameters:

  • value

    Value to set for the prepaidUnits property.

Returns:

  • a void



160
161
162
# File 'lib/models/subscribed_sku.rb', line 160

def prepaid_units=(value)
    @prepaid_units = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/models/subscribed_sku.rb', line 168

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("accountId", @account_id)
    writer.write_string_value("accountName", @account_name)
    writer.write_string_value("appliesTo", @applies_to)
    writer.write_string_value("capabilityStatus", @capability_status)
    writer.write_number_value("consumedUnits", @consumed_units)
    writer.write_object_value("prepaidUnits", @prepaid_units)
    writer.write_collection_of_object_values("servicePlans", @service_plans)
    writer.write_guid_value("skuId", @sku_id)
    writer.write_string_value("skuPartNumber", @sku_part_number)
    writer.write_collection_of_primitive_values("subscriptionIds", @subscription_ids)
end

#service_plansObject

Gets the servicePlans property value. Information about the service plans that are available with the SKU. Not nullable.

Returns:

  • a service_plan_info



186
187
188
# File 'lib/models/subscribed_sku.rb', line 186

def service_plans
    return @service_plans
end

#service_plans=(value) ⇒ Object

Sets the servicePlans property value. Information about the service plans that are available with the SKU. Not nullable.

Parameters:

  • value

    Value to set for the servicePlans property.

Returns:

  • a void



194
195
196
# File 'lib/models/subscribed_sku.rb', line 194

def service_plans=(value)
    @service_plans = value
end

#sku_idObject

Gets the skuId property value. The unique identifier (GUID) for the service SKU.

Returns:

  • a guid



201
202
203
# File 'lib/models/subscribed_sku.rb', line 201

def sku_id
    return @sku_id
end

#sku_id=(value) ⇒ Object

Sets the skuId property value. The unique identifier (GUID) for the service SKU.

Parameters:

  • value

    Value to set for the skuId property.

Returns:

  • a void



209
210
211
# File 'lib/models/subscribed_sku.rb', line 209

def sku_id=(value)
    @sku_id = value
end

#sku_part_numberObject

Gets the skuPartNumber property value. The SKU part number; for example: ‘AAD_PREMIUM’ or ‘RMSBASIC’. To get a list of commercial subscriptions that an organization has acquired, see List subscribedSkus.

Returns:

  • a string



216
217
218
# File 'lib/models/subscribed_sku.rb', line 216

def sku_part_number
    return @sku_part_number
end

#sku_part_number=(value) ⇒ Object

Sets the skuPartNumber property value. The SKU part number; for example: ‘AAD_PREMIUM’ or ‘RMSBASIC’. To get a list of commercial subscriptions that an organization has acquired, see List subscribedSkus.

Parameters:

  • value

    Value to set for the skuPartNumber property.

Returns:

  • a void



224
225
226
# File 'lib/models/subscribed_sku.rb', line 224

def sku_part_number=(value)
    @sku_part_number = value
end

#subscription_idsObject

Gets the subscriptionIds property value. The subscriptionIds property

Returns:

  • a string



231
232
233
# File 'lib/models/subscribed_sku.rb', line 231

def subscription_ids
    return @subscription_ids
end

#subscription_ids=(value) ⇒ Object

Sets the subscriptionIds property value. The subscriptionIds property

Parameters:

  • value

    Value to set for the subscriptionIds property.

Returns:

  • a void



239
240
241
# File 'lib/models/subscribed_sku.rb', line 239

def subscription_ids=(value)
    @subscription_ids = value
end