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
c8fd3ec9
Commit
c8fd3ec9
authored
Jul 19, 2016
by
Brent Gulanowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename BUYAuthenticatedResponse -> BUYCustomerToken, make public.
parent
55aad718
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
18 deletions
+19
-18
project.pbxproj
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
+8
-8
Buy.h
Mobile Buy SDK/Mobile Buy SDK/Buy.h
+1
-0
BUYClient+Customers.m
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.m
+3
-3
BUYCustomerToken.h
Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomerToken.h
+3
-3
BUYCustomerToken.m
Mobile Buy SDK/Mobile Buy SDK/Models/BUYCustomerToken.m
+4
-4
No files found.
Mobile Buy SDK/Mobile Buy SDK.xcodeproj/project.pbxproj
View file @
c8fd3ec9
...
...
@@ -226,8 +226,8 @@
9A0B0C6D1CEB4D300037D68F
/* BUYClient+Storefront.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C6A1CEB4D300037D68F
/* BUYClient+Storefront.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9A0B0C6F1CEB4D300037D68F
/* BUYClient+Storefront.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C6B1CEB4D300037D68F
/* BUYClient+Storefront.m */
;
};
9A0B0C731CEB52B90037D68F
/* BUYClient+Checkout.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C701CEB52B90037D68F
/* BUYClient+Checkout.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9A0B0C791CEB5BBD0037D68F
/* BUY
AuthenticatedResponse.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C761CEB5BBD0037D68F
/* BUYAuthenticatedResponse.h */
;
};
9A0B0C7B1CEB5BBD0037D68F
/* BUY
AuthenticatedResponse.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C771CEB5BBD0037D68F
/* BUYAuthenticatedResponse
.m */
;
};
9A0B0C791CEB5BBD0037D68F
/* BUY
CustomerToken.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C761CEB5BBD0037D68F
/* BUYCustomerToken.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
}
;
};
9A0B0C7B1CEB5BBD0037D68F
/* BUY
CustomerToken.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C771CEB5BBD0037D68F
/* BUYCustomerToken
.m */
;
};
9A0B0C831CEB981C0037D68F
/* BUYClient+RoutingTests.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C821CEB981C0037D68F
/* BUYClient+RoutingTests.m */
;
};
9A0B0CA21CECC1BC0037D68F
/* BUYClient+Checkout.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0C711CEB52B90037D68F
/* BUYClient+Checkout.m */
;
};
9A0B0CA81CED0A860037D68F
/* BUYCheckoutOperation.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9A0B0CA51CED0A860037D68F
/* BUYCheckoutOperation.h */
;
};
...
...
@@ -470,8 +470,8 @@
9A0B0C6B1CEB4D300037D68F
/* BUYClient+Storefront.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"BUYClient+Storefront.m"
;
sourceTree
=
"<group>"
;
};
9A0B0C701CEB52B90037D68F
/* BUYClient+Checkout.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"BUYClient+Checkout.h"
;
sourceTree
=
"<group>"
;
};
9A0B0C711CEB52B90037D68F
/* BUYClient+Checkout.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"BUYClient+Checkout.m"
;
sourceTree
=
"<group>"
;
};
9A0B0C761CEB5BBD0037D68F
/* BUY
AuthenticatedResponse.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYAuthenticatedResponse
.h
;
sourceTree
=
"<group>"
;
};
9A0B0C771CEB5BBD0037D68F
/* BUY
AuthenticatedResponse.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYAuthenticatedResponse
.m
;
sourceTree
=
"<group>"
;
};
9A0B0C761CEB5BBD0037D68F
/* BUY
CustomerToken.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYCustomerToken
.h
;
sourceTree
=
"<group>"
;
};
9A0B0C771CEB5BBD0037D68F
/* BUY
CustomerToken.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYCustomerToken
.m
;
sourceTree
=
"<group>"
;
};
9A0B0C821CEB981C0037D68F
/* BUYClient+RoutingTests.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"BUYClient+RoutingTests.m"
;
sourceTree
=
"<group>"
;
};
9A0B0CA51CED0A860037D68F
/* BUYCheckoutOperation.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
BUYCheckoutOperation.h
;
sourceTree
=
"<group>"
;
};
9A0B0CA61CED0A860037D68F
/* BUYCheckoutOperation.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
BUYCheckoutOperation.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -960,8 +960,8 @@
F773744419C779C20039681C
/* Models */
=
{
isa
=
PBXGroup
;
children
=
(
9A0B0C761CEB5BBD0037D68F
/* BUY
AuthenticatedResponse
.h */
,
9A0B0C771CEB5BBD0037D68F
/* BUY
AuthenticatedResponse
.m */
,
9A0B0C761CEB5BBD0037D68F
/* BUY
CustomerToken
.h */
,
9A0B0C771CEB5BBD0037D68F
/* BUY
CustomerToken
.m */
,
8498DCB91CDD1FA400BD12A8
/* BUYAccountCredentials.h */
,
8498DCBA1CDD1FA400BD12A8
/* BUYAccountCredentials.m */
,
F77374AA19C796BD0039681C
/* BUYCreditCard.h */
,
...
...
@@ -1146,7 +1146,7 @@
9A0B0CA81CED0A860037D68F
/* BUYCheckoutOperation.h in Headers */
,
901931611BC5B9BC00D1134E
/* BUYClient.h in Headers */
,
9A585C0B1CE6440B001F20F0
/* BUYOperation.h in Headers */
,
9A0B0C791CEB5BBD0037D68F
/* BUY
AuthenticatedResponse
.h in Headers */
,
9A0B0C791CEB5BBD0037D68F
/* BUY
CustomerToken
.h in Headers */
,
849810971CB7E07900CFAB58
/* BUYFlatCollectionTransformer.h in Headers */
,
9A6C1DC41D089E4700BFF4F9
/* BUYClientTypes.h in Headers */
,
901931641BC5B9BC00D1134E
/* BUYCartLineItem.h in Headers */
,
...
...
@@ -1332,7 +1332,7 @@
9A0B0CAA1CED0A860037D68F
/* BUYCheckoutOperation.m in Sources */
,
84B0A7211CDD261100253EB0
/* BUYSerializable.m in Sources */
,
9A47CEFE1CE39F6100A6D5BA
/* BUYCreditCardToken.m in Sources */
,
9A0B0C7B1CEB5BBD0037D68F
/* BUY
AuthenticatedResponse
.m in Sources */
,
9A0B0C7B1CEB5BBD0037D68F
/* BUY
CustomerToken
.m in Sources */
,
901930F21BC5B9BC00D1134E
/* BUYOrder.m in Sources */
,
849810991CB7E07900CFAB58
/* BUYFlatCollectionTransformer.m in Sources */
,
84DD12A41CC63FE600A2442D
/* _BUYLineItem.m in Sources */
,
...
...
Mobile Buy SDK/Mobile Buy SDK/Buy.h
View file @
c8fd3ec9
...
...
@@ -36,6 +36,7 @@
#import <Buy/BUYCollection.h>
#import <Buy/BUYCreditCard.h>
#import <Buy/BUYCustomer.h>
#import <Buy/BUYCustomerToken.h>
#import <Buy/BUYDiscount.h>
#import <Buy/BUYGiftCard.h>
#import <Buy/BUYImageLink.h>
...
...
Mobile Buy SDK/Mobile Buy SDK/Data/BUYClient+Customers.m
View file @
c8fd3ec9
...
...
@@ -30,7 +30,7 @@
#import "NSDateFormatter+BUYAdditions.h"
#import "BUYCustomer.h"
#import "BUYAccountCredentials.h"
#import "BUY
AuthenticatedResponse
.h"
#import "BUY
CustomerToken
.h"
#import "BUYOrder.h"
#import "BUYShopifyErrorCodes.h"
...
...
@@ -119,7 +119,7 @@
return
[
self
putRequestForURL
:
url
object
:
nil
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
NSString
*
accessToken
=
nil
;
if
(
json
&&
!
error
)
{
BUY
AuthenticatedResponse
*
authenticatedResponse
=
[
BUYAuthenticatedResponse
responseWithJSON
:
json
];
BUY
CustomerToken
*
authenticatedResponse
=
[
BUYCustomerToken
responseWithJSON
:
json
];
accessToken
=
authenticatedResponse
.
accessToken
;
}
...
...
@@ -190,7 +190,7 @@
NSURL
*
url
=
[
self
urlForCustomersToken
];
return
[
self
postRequestForURL
:
url
object
:
credentials
.
JSONRepresentation
completionHandler
:^
(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
)
{
if
(
json
&&
!
error
)
{
BUY
AuthenticatedResponse
*
authenticatedResponse
=
[
BUYAuthenticatedResponse
responseWithJSON
:
json
];
BUY
CustomerToken
*
authenticatedResponse
=
[
BUYCustomerToken
responseWithJSON
:
json
];
self
.
customerToken
=
authenticatedResponse
.
accessToken
;
if
(
!
customerJSON
)
{
...
...
Mobile Buy SDK/Mobile Buy SDK/Models/BUY
AuthenticatedResponse
.h
→
Mobile Buy SDK/Mobile Buy SDK/Models/BUY
CustomerToken
.h
View file @
c8fd3ec9
//
// BUY
AuthenticatedResponse
.h
// BUY
CustomerToken
.h
// Mobile Buy SDK
//
// Created by Shopify.
...
...
@@ -26,12 +26,12 @@
#import <Foundation/Foundation.h>
@interface
BUY
AuthenticatedResponse
:
NSObject
@interface
BUY
CustomerToken
:
NSObject
@property
(
nonatomic
,
copy
,
readonly
)
NSString
*
accessToken
;
@property
(
nonatomic
,
copy
,
readonly
)
NSDate
*
expiry
;
@property
(
nonatomic
,
copy
,
readonly
)
NSString
*
customerID
;
+
(
BUY
AuthenticatedResponse
*
)
responseWithJSON
:(
NSDictionary
*
)
json
;
+
(
BUY
CustomerToken
*
)
responseWithJSON
:(
NSDictionary
*
)
json
;
@end
Mobile Buy SDK/Mobile Buy SDK/Models/BUY
AuthenticatedResponse
.m
→
Mobile Buy SDK/Mobile Buy SDK/Models/BUY
CustomerToken
.m
View file @
c8fd3ec9
//
// BUY
AuthenticatedResponse
.m
// BUY
CustomerToken
.m
// Mobile Buy SDK
//
// Created by Shopify.
...
...
@@ -24,12 +24,12 @@
// THE SOFTWARE.
//
#import "BUY
AuthenticatedResponse
.h"
#import "BUY
CustomerToken
.h"
#import "NSDateFormatter+BUYAdditions.h"
@implementation
BUY
AuthenticatedResponse
@implementation
BUY
CustomerToken
+
(
BUY
AuthenticatedResponse
*
)
responseWithJSON
:(
NSDictionary
*
)
json
+
(
BUY
CustomerToken
*
)
responseWithJSON
:(
NSDictionary
*
)
json
{
return
[[[
self
class
]
alloc
]
initWithJSON
:
json
];
}
...
...
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