Commit 229e299b by Brent Gulanowski

Convert instances of customer ID as a string to a number.

parent ffb8db1c
No related merge requests found
......@@ -342,7 +342,7 @@
[BUYAccountCredentialItem itemWithPassword:@"12345"]
];
BUYAccountCredentials *credentials = [BUYAccountCredentials credentialsWithItems:items];
NSString *customerID = @"12345";
NSNumber *customerID = @12345;
NSString *token = @"12345";
BUYRequestOperation *task = (BUYRequestOperation *)[self.client activateCustomerWithCredentials:credentials customerID:customerID token:token callback:^(BUYCustomer *customer, BUYCustomerToken *token, NSError *error) {
......
......@@ -116,7 +116,7 @@ typedef void (^BUYDataOrderBlock)(BUYOrder * _Nullable order, NSError * _Nullabl
*
* @return The associated BUYRequestOperation
*/
- (NSOperation *)activateCustomerWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSString *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block;
- (NSOperation *)activateCustomerWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSNumber *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block;
/**
* PUT /api/customers/:customer_id
......@@ -141,7 +141,7 @@ typedef void (^BUYDataOrderBlock)(BUYOrder * _Nullable order, NSError * _Nullabl
*
* @return The associated BUYRequestOperation
*/
- (NSOperation *)resetPasswordWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSString *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block;
- (NSOperation *)resetPasswordWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSNumber *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block;
#pragma mark - Token -
......
......@@ -66,9 +66,9 @@
}];
}
- (NSOperation *)activateCustomerWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSString *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block
- (NSOperation *)activateCustomerWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSNumber *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block
{
NSURL *url = [self urlForCustomersActivationWithID:customerID parameters:@{ @"token": token }];
NSURL *url = [self urlForCustomersActivationWithID:customerID.stringValue parameters:@{ @"token": token }];
return [self putRequestForURL:url object:credentials.JSONRepresentation completionHandler:^(NSDictionary *json, NSHTTPURLResponse *response, NSError *error) {
NSString *email = json[@"customer"][@"email"];
......@@ -94,9 +94,9 @@
}];
}
- (NSOperation *)resetPasswordWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSString *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block
- (NSOperation *)resetPasswordWithCredentials:(BUYAccountCredentials *)credentials customerID:(NSNumber *)customerID token:(NSString *)token callback:(BUYDataCustomerTokenBlock)block
{
NSURL *url = [self urlForCustomersPasswordResetWithID:customerID parameters:@{ @"token": token }];
NSURL *url = [self urlForCustomersPasswordResetWithID:customerID.stringValue parameters:@{ @"token": token }];
return [self putRequestForURL:url object:credentials.JSONRepresentation completionHandler:^(NSDictionary *json, NSHTTPURLResponse *response, NSError *error) {
NSString *email = json[@"customer"][@"email"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment