Class: MicrosoftGraph::Models::TermsAndConditionsAcceptanceStatus

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

Overview

A termsAndConditionsAcceptanceStatus entity represents the acceptance status of a given Terms and Conditions (T&C) policy by a given user. Users must accept the most up-to-date version of the terms in order to retain access to the Company Portal.

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 termsAndConditionsAcceptanceStatus and sets the default values.



61
62
63
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 61

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 terms_and_conditions_acceptance_status

Raises:

  • (StandardError)


69
70
71
72
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 69

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

Instance Method Details

#accepted_date_timeObject

Gets the acceptedDateTime property value. DateTime when the terms were last accepted by the user.

Returns:

  • a date_time



31
32
33
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 31

def accepted_date_time
    return @accepted_date_time
end

#accepted_date_time=(value) ⇒ Object

Sets the acceptedDateTime property value. DateTime when the terms were last accepted by the user.

Parameters:

  • value

    Value to set for the acceptedDateTime property.

Returns:

  • a void



39
40
41
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 39

def accepted_date_time=(value)
    @accepted_date_time = value
end

#accepted_versionObject

Gets the acceptedVersion property value. Most recent version number of the T&C accepted by the user.

Returns:

  • a integer



46
47
48
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 46

def accepted_version
    return @accepted_version
end

#accepted_version=(value) ⇒ Object

Sets the acceptedVersion property value. Most recent version number of the T&C accepted by the user.

Parameters:

  • value

    Value to set for the acceptedVersion property.

Returns:

  • a void



54
55
56
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 54

def accepted_version=(value)
    @accepted_version = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



77
78
79
80
81
82
83
84
85
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 77

def get_field_deserializers()
    return super.merge({
        "acceptedDateTime" => lambda {|n| @accepted_date_time = n.get_date_time_value() },
        "acceptedVersion" => lambda {|n| @accepted_version = n.get_number_value() },
        "termsAndConditions" => lambda {|n| @terms_and_conditions = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TermsAndConditions.create_from_discriminator_value(pn) }) },
        "userDisplayName" => lambda {|n| @user_display_name = n.get_string_value() },
        "userPrincipalName" => lambda {|n| @user_principal_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)


91
92
93
94
95
96
97
98
99
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 91

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_date_time_value("acceptedDateTime", @accepted_date_time)
    writer.write_number_value("acceptedVersion", @accepted_version)
    writer.write_object_value("termsAndConditions", @terms_and_conditions)
    writer.write_string_value("userDisplayName", @user_display_name)
    writer.write_string_value("userPrincipalName", @user_principal_name)
end

#terms_and_conditionsObject

Gets the termsAndConditions property value. Navigation link to the terms and conditions that are assigned.

Returns:

  • a terms_and_conditions



104
105
106
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 104

def terms_and_conditions
    return @terms_and_conditions
end

#terms_and_conditions=(value) ⇒ Object

Sets the termsAndConditions property value. Navigation link to the terms and conditions that are assigned.

Parameters:

  • value

    Value to set for the termsAndConditions property.

Returns:

  • a void



112
113
114
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 112

def terms_and_conditions=(value)
    @terms_and_conditions = value
end

#user_display_nameObject

Gets the userDisplayName property value. Display name of the user whose acceptance the entity represents.

Returns:

  • a string



119
120
121
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 119

def user_display_name
    return @user_display_name
end

#user_display_name=(value) ⇒ Object

Sets the userDisplayName property value. Display name of the user whose acceptance the entity represents.

Parameters:

  • value

    Value to set for the userDisplayName property.

Returns:

  • a void



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

def user_display_name=(value)
    @user_display_name = value
end

#user_principal_nameObject

Gets the userPrincipalName property value. The userPrincipalName of the User that accepted the term.

Returns:

  • a string



134
135
136
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 134

def user_principal_name
    return @user_principal_name
end

#user_principal_name=(value) ⇒ Object

Sets the userPrincipalName property value. The userPrincipalName of the User that accepted the term.

Parameters:

  • value

    Value to set for the userPrincipalName property.

Returns:

  • a void



142
143
144
# File 'lib/models/terms_and_conditions_acceptance_status.rb', line 142

def user_principal_name=(value)
    @user_principal_name = value
end