Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
e19dab47
Commit
e19dab47
authored
May 03, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add addresses to customers. Fix NSNull values in BUYAddress objects.
parent
5ee41564
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
BUYCustomer.h
Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.h
+12
-0
BUYCustomer.m
Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.m
+3
-0
BUYAddress.m
Mobile Buy SDK/Mobile Buy SDK/Models/Transient/BUYAddress.m
+10
-10
No files found.
Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.h
View file @
e19dab47
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
#import "BUYObject.h"
#import "BUYObject.h"
@class
BUYAddress
;
@interface
BUYCustomer
:
BUYObject
@interface
BUYCustomer
:
BUYObject
/**
/**
...
@@ -118,4 +120,14 @@
...
@@ -118,4 +120,14 @@
*/
*/
@property
(
nonatomic
,
strong
)
NSDate
*
updatedAt
;
@property
(
nonatomic
,
strong
)
NSDate
*
updatedAt
;
/**
* An array of addresses for the customer.
*/
@property
(
nonatomic
,
strong
)
NSArray
<
BUYAddress
*>
*
addresses
;
/**
* The default address for the customer.
*/
@property
(
nonatomic
,
strong
)
BUYAddress
*
defaultAddress
;
@end
@end
Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomer.m
View file @
e19dab47
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
//
//
#import "BUYCustomer.h"
#import "BUYCustomer.h"
#import "BUYAddress.h"
@implementation
BUYCustomer
@implementation
BUYCustomer
...
@@ -56,6 +57,8 @@
...
@@ -56,6 +57,8 @@
_totalSpent
=
dictionary
[
@"total_spent"
];
_totalSpent
=
dictionary
[
@"total_spent"
];
_createdAt
=
dictionary
[
@"created_at"
];
_createdAt
=
dictionary
[
@"created_at"
];
_updatedAt
=
dictionary
[
@"updated_at"
];
_updatedAt
=
dictionary
[
@"updated_at"
];
_addresses
=
[
BUYAddress
convertJSONArray
:
dictionary
[
@"addresses"
]];
_defaultAddress
=
[
BUYAddress
convertObject
:
dictionary
[
@"default_address"
]];
}
}
@end
@end
Mobile Buy SDK/Mobile Buy SDK/Models/Transient/BUYAddress.m
View file @
e19dab47
...
@@ -32,19 +32,19 @@
...
@@ -32,19 +32,19 @@
-
(
void
)
updateWithDictionary
:(
NSDictionary
*
)
dictionary
-
(
void
)
updateWithDictionary
:(
NSDictionary
*
)
dictionary
{
{
self
.
address1
=
dictionary
[
@"address1"
];
self
.
address1
=
[
dictionary
buy_objectForKey
:
@"address1"
];
self
.
address2
=
dictionary
[
@"address2"
];
self
.
address2
=
[
dictionary
buy_objectForKey
:
@"address2"
];
self
.
city
=
dictionary
[
@"city"
];
self
.
city
=
[
dictionary
buy_objectForKey
:
@"city"
];
self
.
company
=
dictionary
[
@"company"
];
self
.
company
=
[
dictionary
buy_objectForKey
:
@"company"
];
self
.
firstName
=
dictionary
[
@"first_name"
];
self
.
firstName
=
[
dictionary
buy_objectForKey
:
@"first_name"
];
self
.
lastName
=
dictionary
[
@"last_name"
];
self
.
lastName
=
[
dictionary
buy_objectForKey
:
@"last_name"
];
self
.
phone
=
dictionary
[
@"phone"
];
self
.
phone
=
[
dictionary
buy_objectForKey
:
@"phone"
];
self
.
country
=
dictionary
[
@"country"
];
self
.
country
=
[
dictionary
buy_objectForKey
:
@"country"
];
self
.
countryCode
=
dictionary
[
@"country_code"
];
self
.
countryCode
=
[
dictionary
buy_objectForKey
:
@"country_code"
];
self
.
province
=
[
dictionary
buy_objectForKey
:
@"province"
];
self
.
province
=
[
dictionary
buy_objectForKey
:
@"province"
];
self
.
provinceCode
=
[
dictionary
buy_objectForKey
:
@"province_code"
];
self
.
provinceCode
=
[
dictionary
buy_objectForKey
:
@"province_code"
];
self
.
zip
=
dictionary
[
@"zip"
];
self
.
zip
=
[
dictionary
buy_objectForKey
:
@"zip"
];
}
}
-
(
NSDictionary
*
)
jsonDictionaryForCheckout
-
(
NSDictionary
*
)
jsonDictionaryForCheckout
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment