OIAddress Class Reference
Inherits from | NSObject |
Declared in | OIAddress.h OIAddress.m |
Tasks
-
nickname
The nickname of this address (i.e. Home, Work).
property -
address1
The street address.
property -
address2
The 2nd line of the address (optional).
property -
city
The city.
property -
state
The state.
property -
postalCode
The zip code.
property -
phoneNumber
The phone number.
property -
userId
User id is set only if address owner is user not restaurant.
property -
– addressAsString
This method return address as a string.
-
– updateAddressWithAddress:usingBlock:
Update adrress, you must have set a delegate (if not your address will be changed only on the server side).
-
+ addAddress:usingBlock:
Add user address.
-
+ loadAddressesUsingBlock:
Load all user addresses into the OIUser instance.
-
+ loadAddressByNickname:usingBlock:
Load user address by its nickname. Call block with created OIAddress instance if succeeded.
-
+ deleteAddressByNickname:usingBlock:
Delete user address by its nickname.
-
+ addressWithStreet:city:postalCode:
Created simple address (OIAddress).
Properties
address1
The street address.
@property (nonatomic, readwrite, copy) NSString *address1
Discussion
The street address.
Declared In
OIAddress.h
address2
The 2nd line of the address (optional).
@property (nonatomic, readwrite, copy) NSString *address2
Discussion
The 2nd line of the address (optional).
Declared In
OIAddress.h
city
The city.
@property (nonatomic, readwrite, copy) NSString *city
Discussion
The city.
Declared In
OIAddress.h
nickname
The nickname of this address (i.e. Home, Work).
@property (nonatomic, readwrite, copy) NSString *nickname
Discussion
The nickname of this address (i.e. Home, Work).
Declared In
OIAddress.h
phoneNumber
The phone number.
@property (nonatomic, readwrite, copy) NSString *phoneNumber
Discussion
The phone number.
Declared In
OIAddress.h
postalCode
The zip code.
@property (nonatomic, readwrite, retain) NSNumber *postalCode
Discussion
The zip code.
Declared In
OIAddress.h
Class Methods
addAddress:usingBlock:
Add user address.
+ (void)addAddress:(OIAddress *)address usingBlock:(void ( ^ ) ( NSError *error ))block
Parameters
- address
New address (OIAddress), which will be saved.
- block
Block return nil if request finished successfully.
Discussion
Add user address.
Declared In
OIAddress.h
addressWithStreet:city:postalCode:
Created simple address (OIAddress).
+ (OIAddress *)addressWithStreet:(NSString *)street city:(NSString *)city postalCode:(NSNumber *)postalCode
Return Value
Return instance of OIAddress.
Discussion
Created simple address (OIAddress).
Declared In
OIAddress.h
deleteAddressByNickname:usingBlock:
Delete user address by its nickname.
+ (void)deleteAddressByNickname:(NSString *)nickname usingBlock:(void ( ^ ) ( NSError *error ))block
Parameters
- nickname
The nick name of the address, which will be deleted.
- block
If request finished successfully return nil else some error (NSError).
Discussion
Delete user address by its nickname.
Declared In
OIAddress.h
loadAddressByNickname:usingBlock:
+ (void)loadAddressByNickname:(NSString *)nickname usingBlock:(void ( ^ ) ( OIAddress *address ))block
Parameters
- nickname
The nickname of the searching address(i.e. Home, Work).
Discussion
Load user address by its nickname. Call block with created OIAddress instance if succeeded.
Declared In
OIAddress.h
Instance Methods
addressAsString
This method return address as a string.
- (NSString *)addressAsString
Return Value
Return string, which contain postal code, street and city name.
Discussion
This method return address as a string.
Declared In
OIAddress.h
updateAddressWithAddress:usingBlock:
Update adrress, you must have set a delegate (if not your address will be changed only on the server side).
- (void)updateAddressWithAddress:(OIAddress *)address usingBlock:(void ( ^ ) ( NSError *error ))block
Parameters
- address
Changed address, which will replace previous address (OIAddress).
- block
Block return nil if request finished successfully.
Discussion
Update adrress, you must have set a delegate (if not your address will be changed only on the server side).
Declared In
OIAddress.h