|
@@ -74,6 +74,37 @@
|
|
|
return m;
|
|
|
}
|
|
|
|
|
|
+- (NSDictionary *)params {
|
|
|
+ NSMutableDictionary *dic = [NSMutableDictionary dictionary];
|
|
|
+ dic[@"id"] = self.Id;
|
|
|
+ dic[@"firstname"] = self.firstname;
|
|
|
+ dic[@"lastname"] = self.lastname;
|
|
|
+ NSString *stre = [self.street componentsJoinedByString:@","];
|
|
|
+ dic[@"street[]"] = stre;
|
|
|
+ dic[@"postcode"] = self.postcode;
|
|
|
+ dic[@"city"] = self.city;
|
|
|
+ dic[@"country_id"] = self.country_id;
|
|
|
+ dic[@"region_id"] = self.region_id;
|
|
|
+ dic[@"region"] = self.region.region;
|
|
|
+ dic[@"telephone"] = self.telephone;
|
|
|
+ dic[@"default_billing"] = @"0";
|
|
|
+ dic[@"default_shipping"] = @"0";
|
|
|
+ if (self.addressType == 3) {
|
|
|
+ dic[@"default_billing"] = @"1";
|
|
|
+ dic[@"default_shipping"] = @"1";
|
|
|
+ }
|
|
|
+ if (self.addressType == 2) {
|
|
|
+ dic[@"default_billing"] = @"0";
|
|
|
+ dic[@"default_shipping"] = @"1";
|
|
|
+ }
|
|
|
+ if (self.addressType == 1) {
|
|
|
+ dic[@"default_billing"] = @"1";
|
|
|
+ dic[@"default_shipping"] = @"0";
|
|
|
+ }
|
|
|
+
|
|
|
+ return dic;
|
|
|
+}
|
|
|
+
|
|
|
@end
|
|
|
|
|
|
@implementation ASAddressReginModel
|