Class: MicrosoftGraph::Models::BookingCustomer

Inherits:
BookingCustomerBase show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/booking_customer.rb

Overview

Represents a customer of the 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 bookingCustomer and sets the default values.



42
43
44
45
# File 'lib/models/booking_customer.rb', line 42

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

Raises:

  • (StandardError)


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

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

Instance Method Details

#addressesObject

Gets the addresses property value. Addresses associated with the customer. The attribute type of physicalAddress is not supported in v1.0. Internally we map the addresses to the type others.

Returns:

  • a physical_address



27
28
29
# File 'lib/models/booking_customer.rb', line 27

def addresses
    return @addresses
end

#addresses=(value) ⇒ Object

Sets the addresses property value. Addresses associated with the customer. The attribute type of physicalAddress is not supported in v1.0. Internally we map the addresses to the type others.

Parameters:

  • value

    Value to set for the addresses property.

Returns:

  • a void



35
36
37
# File 'lib/models/booking_customer.rb', line 35

def addresses=(value)
    @addresses = value
end

#display_nameObject

Gets the displayName property value. The name of the customer.

Returns:

  • a string



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

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The name of the customer.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



67
68
69
# File 'lib/models/booking_customer.rb', line 67

def display_name=(value)
    @display_name = value
end

#email_addressObject

Gets the emailAddress property value. The SMTP address of the customer.

Returns:

  • a string



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

def email_address
    return @email_address
end

#email_address=(value) ⇒ Object

Sets the emailAddress property value. The SMTP address of the customer.

Parameters:

  • value

    Value to set for the emailAddress property.

Returns:

  • a void



82
83
84
# File 'lib/models/booking_customer.rb', line 82

def email_address=(value)
    @email_address = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



89
90
91
92
93
94
95
96
# File 'lib/models/booking_customer.rb', line 89

def get_field_deserializers()
    return super.merge({
        "addresses" => lambda {|n| @addresses = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PhysicalAddress.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "emailAddress" => lambda {|n| @email_address = n.get_string_value() },
        "phones" => lambda {|n| @phones = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::Phone.create_from_discriminator_value(pn) }) },
    })
end

#phonesObject

Gets the phones property value. Phone numbers associated with the customer, including home, business and mobile numbers.

Returns:

  • a phone



101
102
103
# File 'lib/models/booking_customer.rb', line 101

def phones
    return @phones
end

#phones=(value) ⇒ Object

Sets the phones property value. Phone numbers associated with the customer, including home, business and mobile numbers.

Parameters:

  • value

    Value to set for the phones property.

Returns:

  • a void



109
110
111
# File 'lib/models/booking_customer.rb', line 109

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


117
118
119
120
121
122
123
124
# File 'lib/models/booking_customer.rb', line 117

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("addresses", @addresses)
    writer.write_string_value("displayName", @display_name)
    writer.write_string_value("emailAddress", @email_address)
    writer.write_collection_of_object_values("phones", @phones)
end