Class: Booker::Models::Customer

Inherits:
Model
  • Object
show all
Defined in:
lib/booker/models/customer.rb

Direct Known Subclasses

Customer2

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

constantize, from_hash, #initialize, time_from_booker_datetime, time_to_booker_datetime, timezone_from_booker_offset!, timezone_from_booker_timezone, #to_hash, #to_json, to_wday

Constructor Details

This class inherits a constructor from Booker::Models::Model

Instance Attribute Details

#AddressObject

Returns the value of attribute Address.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def Address
  @Address
end

#AllowReceiveEmailsObject

Returns the value of attribute AllowReceiveEmails.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def AllowReceiveEmails
  @AllowReceiveEmails
end

#AllowReceiveSMSObject

Returns the value of attribute AllowReceiveSMS.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def AllowReceiveSMS
  @AllowReceiveSMS
end

#CellPhoneObject

Returns the value of attribute CellPhone.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def CellPhone
  @CellPhone
end

#CreditCardObject

Returns the value of attribute CreditCard.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def CreditCard
  @CreditCard
end

#CustomerIDObject

Returns the value of attribute CustomerID.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def CustomerID
  @CustomerID
end

#CustomerRecordTypeObject

Returns the value of attribute CustomerRecordType.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def CustomerRecordType
  @CustomerRecordType
end

#DateOfBirthObject

Returns the value of attribute DateOfBirth.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def DateOfBirth
  @DateOfBirth
end

#EmailObject

Returns the value of attribute Email.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def Email
  @Email
end

#EmergencyContactNameObject

Returns the value of attribute EmergencyContactName.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def EmergencyContactName
  @EmergencyContactName
end

#EmergencyContactPhoneObject

Returns the value of attribute EmergencyContactPhone.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def EmergencyContactPhone
  @EmergencyContactPhone
end

#EmergencyContactRelationshipObject

Returns the value of attribute EmergencyContactRelationship.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def EmergencyContactRelationship
  @EmergencyContactRelationship
end

#FirstNameObject

Returns the value of attribute FirstName.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def FirstName
  @FirstName
end

#GenderObject

Returns the value of attribute Gender.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def Gender
  @Gender
end

#GenderIDObject

Returns the value of attribute GenderID.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def GenderID
  @GenderID
end

#GUIDObject

Returns the value of attribute GUID.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def GUID
  @GUID
end

#HasActiveMembershipObject

Returns the value of attribute HasActiveMembership.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def HasActiveMembership
  @HasActiveMembership
end

#HasMembershipObject

Returns the value of attribute HasMembership.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def HasMembership
  @HasMembership
end

#HasPastMembershipObject

Returns the value of attribute HasPastMembership.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def HasPastMembership
  @HasPastMembership
end

#HomePhoneObject

Returns the value of attribute HomePhone.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def HomePhone
  @HomePhone
end

#IsActiveObject

Returns the value of attribute IsActive.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def IsActive
  @IsActive
end

#IsNewCustomerObject

Returns the value of attribute IsNewCustomer.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def IsNewCustomer
  @IsNewCustomer
end

#LastNameObject

Returns the value of attribute LastName.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def LastName
  @LastName
end

#LocationIDObject

Returns the value of attribute LocationID.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def LocationID
  @LocationID
end

#LocationNameObject

Returns the value of attribute LocationName.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def LocationName
  @LocationName
end

#LoyaltyPointsObject

Returns the value of attribute LoyaltyPoints.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def LoyaltyPoints
  @LoyaltyPoints
end

#MobilePhoneObject

Returns the value of attribute MobilePhone.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def MobilePhone
  @MobilePhone
end

#MobilePhoneCarrierIDObject

Returns the value of attribute MobilePhoneCarrierID.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def MobilePhoneCarrierID
  @MobilePhoneCarrierID
end

#NumberOfReferralsObject

Returns the value of attribute NumberOfReferrals.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def NumberOfReferrals
  @NumberOfReferrals
end

#OccupationObject

Returns the value of attribute Occupation.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def Occupation
  @Occupation
end

#PreferredStaffGenderObject

Returns the value of attribute PreferredStaffGender.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def PreferredStaffGender
  @PreferredStaffGender
end

#PreferredStaffMemberIDObject

Returns the value of attribute PreferredStaffMemberID.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def PreferredStaffMemberID
  @PreferredStaffMemberID
end

#ReferredByCustomerIDObject

Returns the value of attribute ReferredByCustomerID.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def ReferredByCustomerID
  @ReferredByCustomerID
end

#SendEmailObject

Returns the value of attribute SendEmail.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def SendEmail
  @SendEmail
end

#ShippingAddressObject

Returns the value of attribute ShippingAddress.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def ShippingAddress
  @ShippingAddress
end

#WorkPhoneObject

Returns the value of attribute WorkPhone.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def WorkPhone
  @WorkPhone
end

#WorkPhoneExtObject

Returns the value of attribute WorkPhoneExt.



4
5
6
# File 'lib/booker/models/customer.rb', line 4

def WorkPhoneExt
  @WorkPhoneExt
end

Class Method Details

.from_list(array) ⇒ Object



42
43
44
45
46
47
48
49
# File 'lib/booker/models/customer.rb', line 42

def self.from_list(array)
  if array.any? && array.first['Customer']
    flattened = array.map{|a| a['Customer'].merge('CustomerID' => a['CustomerID'])}
    super(flattened)
  else
    super
  end
end