diff --git a/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.h b/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.h index d5d8b43..3047acb 100644 --- a/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.h +++ b/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.h @@ -24,6 +24,8 @@ @property (nonatomic, strong) NSString *lastName; +@property (nonatomic, strong, readonly) NSString *fullName; + @property (nonatomic, strong) NSNumber *lastOrderID; @property (nonatomic, strong) NSString *lastOrderName; diff --git a/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.m b/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.m index 0a28146..7cb3f61 100644 --- a/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.m +++ b/Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.m @@ -10,7 +10,16 @@ @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]; _taxExempt = dictionary[@"tax_exempt"];