Commit 18c860b5 by Dima Bart

Add full name property for BUYCustomer.

parent 5073c14f
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
@property (nonatomic, strong) NSString *lastName; @property (nonatomic, strong) NSString *lastName;
@property (nonatomic, strong, readonly) NSString *fullName;
@property (nonatomic, strong) NSNumber *lastOrderID; @property (nonatomic, strong) NSNumber *lastOrderID;
@property (nonatomic, strong) NSString *lastOrderName; @property (nonatomic, strong) NSString *lastOrderName;
......
...@@ -10,7 +10,16 @@ ...@@ -10,7 +10,16 @@
@implementation BUYCustomer @implementation BUYCustomer
- (void)updateWithDictionary:(NSDictionary *)dictionary { - (NSString *)fullName
{
if (self.firstName.length > 0 || self.lastName.length > 0) {
return [NSString stringWithFormat:@"%@ %@", self.firstName, self.lastName];
}
return @"";
}
- (void)updateWithDictionary:(NSDictionary *)dictionary
{
[super updateWithDictionary:dictionary]; [super updateWithDictionary:dictionary];
_taxExempt = dictionary[@"tax_exempt"]; _taxExempt = dictionary[@"tax_exempt"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment