Class: MicrosoftGraph::Models::BookingSchedulingPolicy

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/booking_scheduling_policy.rb

Overview

This type represents the set of policies that dictate how bookings can be created in a Booking Calendar.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new bookingSchedulingPolicy and sets the default values.



66
67
68
# File 'lib/models/booking_scheduling_policy.rb', line 66

def initialize()
    @additional_data = Hash.new
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_scheduling_policy

Raises:

  • (StandardError)


74
75
76
77
# File 'lib/models/booking_scheduling_policy.rb', line 74

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



36
37
38
# File 'lib/models/booking_scheduling_policy.rb', line 36

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



44
45
46
# File 'lib/models/booking_scheduling_policy.rb', line 44

def additional_data=(value)
    @additional_data = value
end

#allow_staff_selectionObject

Gets the allowStaffSelection property value. True if to allow customers to choose a specific person for the booking.

Returns:

  • a boolean



51
52
53
# File 'lib/models/booking_scheduling_policy.rb', line 51

def allow_staff_selection
    return @allow_staff_selection
end

#allow_staff_selection=(value) ⇒ Object

Sets the allowStaffSelection property value. True if to allow customers to choose a specific person for the booking.

Parameters:

  • value

    Value to set for the allowStaffSelection property.

Returns:

  • a void



59
60
61
# File 'lib/models/booking_scheduling_policy.rb', line 59

def allow_staff_selection=(value)
    @allow_staff_selection = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



82
83
84
85
86
87
88
89
90
91
# File 'lib/models/booking_scheduling_policy.rb', line 82

def get_field_deserializers()
    return {
        "allowStaffSelection" => lambda {|n| @allow_staff_selection = n.get_boolean_value() },
        "maximumAdvance" => lambda {|n| @maximum_advance = n.get_duration_value() },
        "minimumLeadTime" => lambda {|n| @minimum_lead_time = n.get_duration_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "sendConfirmationsToOwner" => lambda {|n| @send_confirmations_to_owner = n.get_boolean_value() },
        "timeSlotInterval" => lambda {|n| @time_slot_interval = n.get_duration_value() },
    }
end

#maximum_advanceObject

Gets the maximumAdvance property value. Maximum number of days in advance that a booking can be made. It follows the ISO 8601 format.

Returns:

  • a microsoft_kiota_abstractions::_i_s_o_duration



96
97
98
# File 'lib/models/booking_scheduling_policy.rb', line 96

def maximum_advance
    return @maximum_advance
end

#maximum_advance=(value) ⇒ Object

Sets the maximumAdvance property value. Maximum number of days in advance that a booking can be made. It follows the ISO 8601 format.

Parameters:

  • value

    Value to set for the maximumAdvance property.

Returns:

  • a void



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

def maximum_advance=(value)
    @maximum_advance = value
end

#minimum_lead_timeObject

Gets the minimumLeadTime property value. The minimum amount of time before which bookings and cancellations must be made. It follows the ISO 8601 format.

Returns:

  • a microsoft_kiota_abstractions::_i_s_o_duration



111
112
113
# File 'lib/models/booking_scheduling_policy.rb', line 111

def minimum_lead_time
    return @minimum_lead_time
end

#minimum_lead_time=(value) ⇒ Object

Sets the minimumLeadTime property value. The minimum amount of time before which bookings and cancellations must be made. It follows the ISO 8601 format.

Parameters:

  • value

    Value to set for the minimumLeadTime property.

Returns:

  • a void



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

def minimum_lead_time=(value)
    @minimum_lead_time = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



126
127
128
# File 'lib/models/booking_scheduling_policy.rb', line 126

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



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

def odata_type=(value)
    @odata_type = value
end

#send_confirmations_to_ownerObject

Gets the sendConfirmationsToOwner property value. True to notify the business via email when a booking is created or changed. Use the email address specified in the email property of the bookingBusiness entity for the business.

Returns:

  • a boolean



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

def send_confirmations_to_owner
    return @send_confirmations_to_owner
end

#send_confirmations_to_owner=(value) ⇒ Object

Sets the sendConfirmationsToOwner property value. True to notify the business via email when a booking is created or changed. Use the email address specified in the email property of the bookingBusiness entity for the business.

Parameters:

  • value

    Value to set for the sendConfirmationsToOwner property.

Returns:

  • a void



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

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


157
158
159
160
161
162
163
164
165
166
# File 'lib/models/booking_scheduling_policy.rb', line 157

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("allowStaffSelection", @allow_staff_selection)
    writer.write_duration_value("maximumAdvance", @maximum_advance)
    writer.write_duration_value("minimumLeadTime", @minimum_lead_time)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_boolean_value("sendConfirmationsToOwner", @send_confirmations_to_owner)
    writer.write_duration_value("timeSlotInterval", @time_slot_interval)
    writer.write_additional_data(@additional_data)
end

#time_slot_intervalObject

Gets the timeSlotInterval property value. Duration of each time slot, denoted in ISO 8601 format.

Returns:

  • a microsoft_kiota_abstractions::_i_s_o_duration



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

def time_slot_interval
    return @time_slot_interval
end

#time_slot_interval=(value) ⇒ Object

Sets the timeSlotInterval property value. Duration of each time slot, denoted in ISO 8601 format.

Parameters:

  • value

    Value to set for the timeSlotInterval property.

Returns:

  • a void



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

def time_slot_interval=(value)
    @time_slot_interval = value
end