Inherits from OIRestaurantBase : NSObject
Declared in OIRestaurant.h
OIRestaurant.m

Overview

Class contain detail iformations about restaurant.

Tasks

Properties

address

The full address of the restaurant (OIAddress).

@property (nonatomic, readwrite, retain) OIAddress *address

Discussion

The full address of the restaurant (OIAddress).

Declared In

OIRestaurant.h

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

rdsInfo

RDS is our Restaurant Delivery Service partner (OIRDSInfo).

@property (nonatomic, readwrite, retain) OIRDSInfo *rdsInfo

Discussion

RDS is our Restaurant Delivery Service partner (OIRDSInfo).

Declared In

OIRestaurant.h

state

The state of the restaurant.

@property (nonatomic, readwrite, copy) NSString *state

Discussion

The state of the restaurant.

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

address

Is a delivery address (OIAddress).

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