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
e1811bb7
Commit
e1811bb7
authored
May 27, 2016
by
Dima Bart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor style clean up.
parent
56016532
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
BUYRequestOperation.m
...e Buy SDK/Mobile Buy SDK/Operations/BUYRequestOperation.m
+6
-9
No files found.
Mobile Buy SDK/Mobile Buy SDK/Operations/BUYRequestOperation.m
View file @
e1811bb7
...
@@ -32,6 +32,7 @@ NSString * const kShopifyError = @"shopify";
...
@@ -32,6 +32,7 @@ NSString * const kShopifyError = @"shopify";
typedef
void
(
^
BUYRequestJSONCompletion
)(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
);
typedef
void
(
^
BUYRequestJSONCompletion
)(
NSDictionary
*
json
,
NSHTTPURLResponse
*
response
,
NSError
*
error
);
#pragma mark - NSURLResponse -
#pragma mark - NSURLResponse -
@interface
NSHTTPURLResponse
(
Convenience
)
@interface
NSHTTPURLResponse
(
Convenience
)
@property
(
assign
,
nonatomic
,
readonly
)
BOOL
successful
;
@property
(
assign
,
nonatomic
,
readonly
)
BOOL
successful
;
...
@@ -40,19 +41,13 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
...
@@ -40,19 +41,13 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
@implementation
NSHTTPURLResponse
(
Convenience
)
@implementation
NSHTTPURLResponse
(
Convenience
)
-
(
BOOL
)
successful
{
-
(
BOOL
)
successful
{
return
((
NSUInteger
)(
self
.
statusCode
/
100
))
==
2
;
return
((
NSUInteger
)(
self
.
statusCode
/
100
))
==
2
;
}
}
@end
@end
#pragma mark - BUYOperation Private -
@interface
BUYOperation
(
Private
)
-
(
void
)
setExecuting
:(
BOOL
)
executing
;
-
(
void
)
setFinished
:(
BOOL
)
finished
;
@end
#pragma mark - BUYRequestOperation -
#pragma mark - BUYRequestOperation -
@interface
BUYRequestOperation
()
@interface
BUYRequestOperation
()
...
@@ -65,7 +60,9 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
...
@@ -65,7 +60,9 @@ typedef void (^BUYRequestJSONCompletion)(NSDictionary *json, NSHTTPURLResponse *
@implementation
BUYRequestOperation
@implementation
BUYRequestOperation
#pragma mark - Init -
#pragma mark - Init -
+
(
instancetype
)
operationWithSession
:(
NSURLSession
*
)
session
request
:(
NSURLRequest
*
)
request
payload
:(
id
<
BUYSerializable
>
)
payload
completion
:(
BUYRequestOperationCompletion
)
completion
{
+
(
instancetype
)
operationWithSession
:(
NSURLSession
*
)
session
request
:(
NSURLRequest
*
)
request
payload
:(
id
<
BUYSerializable
>
)
payload
completion
:(
BUYRequestOperationCompletion
)
completion
{
return
[[[
self
class
]
alloc
]
initWithSession
:
session
request
:
request
payload
:
payload
completion
:
completion
];
return
[[[
self
class
]
alloc
]
initWithSession
:
session
request
:
request
payload
:
payload
completion
:
completion
];
}
}
...
...
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