Class: MicrosoftGraph::Models::Contract

Inherits:
DirectoryObject show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/contract.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DirectoryObject

#deleted_date_time, #deleted_date_time=

Methods inherited from Entity

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

Constructor Details

#initializeObject

Instantiates a new contract and sets the default values.



25
26
27
28
# File 'lib/models/contract.rb', line 25

def initialize()
    super
    @odata_type = "#microsoft.graph.contract"
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 contract

Raises:

  • (StandardError)


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

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

Instance Method Details

#contract_typeObject

Gets the contractType property value. Type of contract. Possible values are: SyndicationPartner, BreadthPartner, ResellerPartner. See more in the table below.

Returns:

  • a string



33
34
35
# File 'lib/models/contract.rb', line 33

def contract_type
    return @contract_type
end

#contract_type=(value) ⇒ Object

Sets the contractType property value. Type of contract. Possible values are: SyndicationPartner, BreadthPartner, ResellerPartner. See more in the table below.

Parameters:

  • value

    Value to set for the contractType property.

Returns:

  • a void



41
42
43
# File 'lib/models/contract.rb', line 41

def contract_type=(value)
    @contract_type = value
end

#customer_idObject

Gets the customerId property value. The unique identifier for the customer tenant referenced by this partnership. Corresponds to the id property of the customer tenant’s organization resource.

Returns:

  • a guid



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

def customer_id
    return @customer_id
end

#customer_id=(value) ⇒ Object

Sets the customerId property value. The unique identifier for the customer tenant referenced by this partnership. Corresponds to the id property of the customer tenant’s organization resource.

Parameters:

  • value

    Value to set for the customerId property.

Returns:

  • a void



65
66
67
# File 'lib/models/contract.rb', line 65

def customer_id=(value)
    @customer_id = value
end

#default_domain_nameObject

Gets the defaultDomainName property value. A copy of the customer tenant’s default domain name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant’s default domain name changes.

Returns:

  • a string



72
73
74
# File 'lib/models/contract.rb', line 72

def default_domain_name
    return @default_domain_name
end

#default_domain_name=(value) ⇒ Object

Sets the defaultDomainName property value. A copy of the customer tenant’s default domain name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant’s default domain name changes.

Parameters:

  • value

    Value to set for the defaultDomainName property.

Returns:

  • a void



80
81
82
# File 'lib/models/contract.rb', line 80

def default_domain_name=(value)
    @default_domain_name = value
end

#display_nameObject

Gets the displayName property value. A copy of the customer tenant’s display name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant’s display name changes.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. A copy of the customer tenant’s display name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant’s display name changes.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



95
96
97
# File 'lib/models/contract.rb', line 95

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



102
103
104
105
106
107
108
109
# File 'lib/models/contract.rb', line 102

def get_field_deserializers()
    return super.merge({
        "contractType" => lambda {|n| @contract_type = n.get_string_value() },
        "customerId" => lambda {|n| @customer_id = n.get_guid_value() },
        "defaultDomainName" => lambda {|n| @default_domain_name = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_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)


115
116
117
118
119
120
121
122
# File 'lib/models/contract.rb', line 115

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("contractType", @contract_type)
    writer.write_guid_value("customerId", @customer_id)
    writer.write_string_value("defaultDomainName", @default_domain_name)
    writer.write_string_value("displayName", @display_name)
end