Class: MicrosoftGraph::Models::BookingStaffMember

Inherits:
BookingStaffMemberBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/booking_staff_member.rb

Overview

Represents a staff member who provides services in a business.

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.



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

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)


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

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



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

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

Returns:

  • a void



47
48
49
# File 'lib/models/booking_staff_member.rb', line 47

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



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

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

Returns:

  • a void



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

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



86
87
88
# File 'lib/models/booking_staff_member.rb', line 86

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

Returns:

  • a void



94
95
96
# File 'lib/models/booking_staff_member.rb', line 94

def email_address=(value)
    @email_address = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

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



117
118
119
# File 'lib/models/booking_staff_member.rb', line 117

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

Returns:

  • a void



125
126
127
# File 'lib/models/booking_staff_member.rb', line 125

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



132
133
134
# File 'lib/models/booking_staff_member.rb', line 132

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



140
141
142
# File 'lib/models/booking_staff_member.rb', line 140

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)


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

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



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

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

Returns:

  • a void



172
173
174
# File 'lib/models/booking_staff_member.rb', line 172

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



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

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

Returns:

  • a void



187
188
189
# File 'lib/models/booking_staff_member.rb', line 187

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



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

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

Returns:

  • a void



202
203
204
# File 'lib/models/booking_staff_member.rb', line 202

def working_hours=(value)
    @working_hours = value
end