Class: MicrosoftGraph::Models::BookingStaffMember

Inherits:
BookingStaffMemberBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/booking_staff_member.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 BookingStaffMember and sets the default values.



52
53
54
55
# File 'lib/models/booking_staff_member.rb', line 52

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#availability_is_affected_by_personal_calendarObject

Gets the availabilityIsAffectedByPersonalCalendar property value. True means that if the staff member is a Microsoft 365 user, the Bookings API would verify the staff member’s availability in their personal calendar in Microsoft 365, before making a booking.

Returns:

  • a boolean



37
38
39
# File 'lib/models/booking_staff_member.rb', line 37

def availability_is_affected_by_personal_calendar
    return @availability_is_affected_by_personal_calendar
end

#availability_is_affected_by_personal_calendar=(value) ⇒ Object

Sets the availabilityIsAffectedByPersonalCalendar property value. True means that if the staff member is a Microsoft 365 user, the Bookings API would verify the staff member’s availability in their personal calendar in Microsoft 365, before making a booking.

Parameters:

  • value

    Value to set for the availability_is_affected_by_personal_calendar property.

Returns:

  • a void



45
46
47
# File 'lib/models/booking_staff_member.rb', line 45

def availability_is_affected_by_personal_calendar=(value)
    @availability_is_affected_by_personal_calendar = value
end

#display_nameObject

Gets the displayName property value. The name of the staff member, as displayed to customers. Required.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the staff member, as displayed to customers. Required.

Parameters:

  • value

    Value to set for the display_name property.

Returns:

  • a void



77
78
79
# File 'lib/models/booking_staff_member.rb', line 77

def display_name=(value)
    @display_name = value
end

#email_addressObject

Gets the emailAddress property value. The email address of the staff member. This can be in the same Microsoft 365 tenant as the business, or in a different email domain. This email address can be used if the sendConfirmationsToOwner property is set to true in the scheduling policy of the business. Required.

Returns:

  • a string



84
85
86
# File 'lib/models/booking_staff_member.rb', line 84

def email_address
    return @email_address
end

#email_address=(value) ⇒ Object

Sets the emailAddress property value. The email address of the staff member. This can be in the same Microsoft 365 tenant as the business, or in a different email domain. This email address can be used if the sendConfirmationsToOwner property is set to true in the scheduling policy of the business. Required.

Parameters:

  • value

    Value to set for the email_address property.

Returns:

  • a void



92
93
94
# File 'lib/models/booking_staff_member.rb', line 92

def email_address=(value)
    @email_address = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/models/booking_staff_member.rb', line 99

def get_field_deserializers()
    return super.merge({
        "availabilityIsAffectedByPersonalCalendar" => lambda {|n| @availability_is_affected_by_personal_calendar = n.get_boolean_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "emailAddress" => lambda {|n| @email_address = n.get_string_value() },
        "isEmailNotificationEnabled" => lambda {|n| @is_email_notification_enabled = n.get_boolean_value() },
        "role" => lambda {|n| @role = n.get_enum_value(MicrosoftGraph::Models::BookingStaffRole) },
        "timeZone" => lambda {|n| @time_zone = n.get_string_value() },
        "useBusinessHours" => lambda {|n| @use_business_hours = n.get_boolean_value() },
        "workingHours" => lambda {|n| @working_hours = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::BookingWorkHours.create_from_discriminator_value(pn) }) },
    })
end

#is_email_notification_enabledObject

Gets the isEmailNotificationEnabled property value. True indicates that a staff member will be notified via email when a booking assigned to them is created or changed.

Returns:

  • a boolean



115
116
117
# File 'lib/models/booking_staff_member.rb', line 115

def is_email_notification_enabled
    return @is_email_notification_enabled
end

#is_email_notification_enabled=(value) ⇒ Object

Sets the isEmailNotificationEnabled property value. True indicates that a staff member will be notified via email when a booking assigned to them is created or changed.

Parameters:

  • value

    Value to set for the is_email_notification_enabled property.

Returns:

  • a void



123
124
125
# File 'lib/models/booking_staff_member.rb', line 123

def is_email_notification_enabled=(value)
    @is_email_notification_enabled = value
end

#roleObject

Gets the role property value. The role property

Returns:

  • a booking_staff_role



130
131
132
# File 'lib/models/booking_staff_member.rb', line 130

def role
    return @role
end

#role=(value) ⇒ Object

Sets the role property value. The role property

Parameters:

  • value

    Value to set for the role property.

Returns:

  • a void



138
139
140
# File 'lib/models/booking_staff_member.rb', line 138

def role=(value)
    @role = 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)


146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/models/booking_staff_member.rb', line 146

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_boolean_value("availabilityIsAffectedByPersonalCalendar", @availability_is_affected_by_personal_calendar)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("emailAddress", @email_address)
    writer.write_boolean_value("isEmailNotificationEnabled", @is_email_notification_enabled)
    writer.write_enum_value("role", @role)
    writer.write_string_value("timeZone", @time_zone)
    writer.write_boolean_value("useBusinessHours", @use_business_hours)
    writer.write_collection_of_object_values("workingHours", @working_hours)
end

#time_zoneObject

Gets the timeZone property value. The time zone of the staff member. For a list of possible values, see dateTimeTimeZone.

Returns:

  • a string



162
163
164
# File 'lib/models/booking_staff_member.rb', line 162

def time_zone
    return @time_zone
end

#time_zone=(value) ⇒ Object

Sets the timeZone property value. The time zone of the staff member. For a list of possible values, see dateTimeTimeZone.

Parameters:

  • value

    Value to set for the time_zone property.

Returns:

  • a void



170
171
172
# File 'lib/models/booking_staff_member.rb', line 170

def time_zone=(value)
    @time_zone = value
end

#use_business_hoursObject

Gets the useBusinessHours property value. True means the staff member’s availability is as specified in the businessHours property of the business. False means the availability is determined by the staff member’s workingHours property setting.

Returns:

  • a boolean



177
178
179
# File 'lib/models/booking_staff_member.rb', line 177

def use_business_hours
    return @use_business_hours
end

#use_business_hours=(value) ⇒ Object

Sets the useBusinessHours property value. True means the staff member’s availability is as specified in the businessHours property of the business. False means the availability is determined by the staff member’s workingHours property setting.

Parameters:

  • value

    Value to set for the use_business_hours property.

Returns:

  • a void



185
186
187
# File 'lib/models/booking_staff_member.rb', line 185

def use_business_hours=(value)
    @use_business_hours = value
end

#working_hoursObject

Gets the workingHours property value. The range of hours each day of the week that the staff member is available for booking. By default, they are initialized to be the same as the businessHours property of the business.

Returns:

  • a booking_work_hours



192
193
194
# File 'lib/models/booking_staff_member.rb', line 192

def working_hours
    return @working_hours
end

#working_hours=(value) ⇒ Object

Sets the workingHours property value. The range of hours each day of the week that the staff member is available for booking. By default, they are initialized to be the same as the businessHours property of the business.

Parameters:

  • value

    Value to set for the working_hours property.

Returns:

  • a void



200
201
202
# File 'lib/models/booking_staff_member.rb', line 200

def working_hours=(value)
    @working_hours = value
end