Class: Customer

Inherits:
Object
  • Object
show all
Defined in:
app/models/customer.rb

Overview

The Customer that books Slots with service Providers.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Array<Affiliation>) affiliations

Returns the Affiliations for that given Customer.

Returns:



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

def affiliations
  @affiliations
end

Instance Method Details

- (Booking) book(slot)

Book the Slot with the service Provider.

If Customer and Provider don't have an Affiliation, create one.

If the Booking causes any time conflict in the Customer agenda, fail.

Parameters:

Returns:



15
16
# File 'app/models/customer.rb', line 15

def book slot
end