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.



64
65
66
# File 'lib/models/subscribed_sku.rb', line 64

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)


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

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

#applies_toObject

Gets the appliesTo property value. For example, ‘User’ or ‘Company’.

Returns:

  • a string



34
35
36
# File 'lib/models/subscribed_sku.rb', line 34

def applies_to
    return @applies_to
end

#applies_to=(value) ⇒ Object

Sets the appliesTo property value. For example, ‘User’ or ‘Company’.

Parameters:

  • value

    Value to set for the applies_to property.

Returns:

  • a void



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

def applies_to=(value)
    @applies_to = value
end

#capability_statusObject

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

Returns:

  • a string



49
50
51
# File 'lib/models/subscribed_sku.rb', line 49

def capability_status
    return @capability_status
end

#capability_status=(value) ⇒ Object

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

Parameters:

  • value

    Value to set for the capability_status property.

Returns:

  • a void



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

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



71
72
73
# File 'lib/models/subscribed_sku.rb', line 71

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 consumed_units property.

Returns:

  • a void



79
80
81
# File 'lib/models/subscribed_sku.rb', line 79

def consumed_units=(value)
    @consumed_units = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



95
96
97
98
99
100
101
102
103
104
105
# File 'lib/models/subscribed_sku.rb', line 95

def get_field_deserializers()
    return super.merge({
        "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() },
    })
end

#prepaid_unitsObject

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

Returns:

  • a license_units_detail



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

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 prepaid_units property.

Returns:

  • a void



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

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)


126
127
128
129
130
131
132
133
134
135
136
# File 'lib/models/subscribed_sku.rb', line 126

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    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)
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



141
142
143
# File 'lib/models/subscribed_sku.rb', line 141

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 service_plans property.

Returns:

  • a void



149
150
151
# File 'lib/models/subscribed_sku.rb', line 149

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



156
157
158
# File 'lib/models/subscribed_sku.rb', line 156

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 sku_id property.

Returns:

  • a void



164
165
166
# File 'lib/models/subscribed_sku.rb', line 164

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



171
172
173
# File 'lib/models/subscribed_sku.rb', line 171

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 sku_part_number property.

Returns:

  • a void



179
180
181
# File 'lib/models/subscribed_sku.rb', line 179

def sku_part_number=(value)
    @sku_part_number = value
end