OIRestaurant Class Reference
Inherits from | OIRestaurantBase : NSObject |
Declared in | OIRestaurant.h OIRestaurant.m |
Tasks
-
address
property -
state
The state of the restaurant.
property -
meals
Meals that are being delivered at the requested time.
property -
menu
Set of menu items.
property -
rdsInfo
RDS is our Restaurant Delivery Service partner (OIRDSInfo).
property -
phone
The customer service number for the restaurant (typically this is the RDS’s phone number).
property -
– initWithRestaurantBase:
Initalization method, which creat restaurant (OIRestaurant) instance.
-
– deliveryCheckToAddress:atTime:usingBlock:
Check to see if a particular restaurant delivers to an address at the specified time.
-
– calculateFeesForSubtotal:usingBlock:
Calculates all fees for a given subtotal and delivery address.
-
– menuItemsForChildrens:
Return array of menu items for given children IDs
-
+ createRestaurantByRestaurantBase:usingBlock:
Create restaurant (OIRestaurant) instance from base restaurant (OIRestaurantBase).
Properties
meals
Meals that are being delivered at the requested time.
@property (nonatomic, readwrite, retain) NSDictionary *meals
Discussion
Meals that are being delivered at the requested time.
Declared In
OIRestaurant.h
menu
Set of menu items.
@property (nonatomic, readwrite, retain) NSMutableArray *menu
Discussion
Set of menu items.
Declared In
OIRestaurant.h
phone
The customer service number for the restaurant (typically this is the RDS’s phone number).
@property (nonatomic, copy) NSString *phone
Discussion
The customer service number for the restaurant (typically this is the RDS’s phone number).
Declared In
OIRestaurant.h
Class Methods
createRestaurantByRestaurantBase:usingBlock:
Create restaurant (OIRestaurant) instance from base restaurant (OIRestaurantBase).
+ (void)createRestaurantByRestaurantBase:(OIRestaurantBase *)restaurantBase usingBlock:(void ( ^ ) ( OIRestaurant *restaurant ))block
Parameters
- restaurantBase
Base (OIRestaurantBase) informations, which are used for creat complete restaurant (OIRestaurant) instance.
- block
Block return complete restaurant (OIRestaurant) instance.
Discussion
Create restaurant (OIRestaurant) instance from base restaurant (OIRestaurantBase).
Declared In
OIRestaurant.h
Instance Methods
calculateFeesForSubtotal:usingBlock:
Calculates all fees for a given subtotal and delivery address.
- (void)calculateFeesForSubtotal:(OIOrder *)order usingBlock:(void ( ^ ) ( OIDelivery *delivery ))block
Parameters
- order
Order (OIOrder), which is used for calculates all fees.
- block
Block return delivery (OIDelivery).
Discussion
Calculates all fees for a given subtotal and delivery address.
Declared In
OIRestaurant.h
deliveryCheckToAddress:atTime:usingBlock:
Check to see if a particular restaurant delivers to an address at the specified time.
- (void)deliveryCheckToAddress:(OIAddress *)address atTime:(OIDateTime *)dateTime usingBlock:(void ( ^ ) ( OIDelivery *delivery ))block
Parameters
- dateTime
Is delivery time (OIDateTime)
- block
Block return delivery (OIDelivery) to an OIAddress at the specified OIDateTime.
Discussion
Check to see if a particular restaurant delivers to an address at the specified time.
Declared In
OIRestaurant.h
initWithRestaurantBase:
Initalization method, which creat restaurant (OIRestaurant) instance.
- (id)initWithRestaurantBase:(OIRestaurantBase *)restaurantBase
Parameters
- restaurantBase
(OIRestaurantBase) Base information about restaurant.
Return Value
Return instance of OIRestaurant.
Discussion
Initalization method, which creat restaurant (OIRestaurant) instance.
Declared In
OIRestaurant.h
menuItemsForChildrens:
Return array of menu items for given children IDs
- (NSArray *)menuItemsForChildrens:(NSArray *)childrenIDs
Parameters
- childrenIDs
All id’s, which you need.
Return Value
Return all menu items for each child id.
Discussion
Return array of menu items for given children IDs
Declared In
OIRestaurant.h