Commit e8899caf by Dima Bart

Update test shop data, update client test base with customer info.

parent 18c860b5
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
extern NSString * const BUYShopDomain_Placeholder; extern NSString * const BUYShopDomain_Placeholder;
extern NSString * const BUYAPIKey_Placeholder; extern NSString * const BUYAPIKey_Placeholder;
extern NSString * const BUYAppId_Placeholder; extern NSString * const BUYAppId_Placeholder;
extern NSString * const BUYChannelId_Placeholder;
extern NSString * const BUYFakeCustomerToken;
@interface BUYClientTestBase : XCTestCase @interface BUYClientTestBase : XCTestCase
...@@ -37,6 +39,8 @@ extern NSString * const BUYAppId_Placeholder; ...@@ -37,6 +39,8 @@ extern NSString * const BUYAppId_Placeholder;
@property (nonatomic, strong) NSString *apiKey; @property (nonatomic, strong) NSString *apiKey;
@property (nonatomic, strong) NSString *appId; @property (nonatomic, strong) NSString *appId;
@property (nonatomic, strong) NSString *merchantId; @property (nonatomic, strong) NSString *merchantId;
@property (nonatomic, strong) NSString *customerEmail;
@property (nonatomic, strong) NSString *customerPassword;
@property (nonatomic, strong) NSString *giftCardCode; @property (nonatomic, strong) NSString *giftCardCode;
@property (nonatomic, strong) NSString *giftCardCode2; @property (nonatomic, strong) NSString *giftCardCode2;
@property (nonatomic, strong) NSString *giftCardCode3; @property (nonatomic, strong) NSString *giftCardCode3;
...@@ -45,7 +49,11 @@ extern NSString * const BUYAppId_Placeholder; ...@@ -45,7 +49,11 @@ extern NSString * const BUYAppId_Placeholder;
@property (nonatomic, strong) NSString *giftCardCodeInvalid; @property (nonatomic, strong) NSString *giftCardCodeInvalid;
@property (nonatomic, strong) NSString *discountCodeValid; @property (nonatomic, strong) NSString *discountCodeValid;
@property (nonatomic, strong) NSString *discountCodeExpired; @property (nonatomic, strong) NSString *discountCodeExpired;
@property (nonatomic, strong) NSArray *productIds; @property (nonatomic, strong) NSArray *productIds;
@property (nonatomic, strong) NSNumber *variantUntrackedId;
@property (nonatomic, strong) NSNumber *variantInventory1Id;
@property (nonatomic, strong) NSNumber *variantSoldOutId;
@property (nonatomic, strong) BUYClient *client; @property (nonatomic, strong) BUYClient *client;
......
...@@ -53,6 +53,9 @@ NSString * const BUYAppId_Placeholder = @"app_id"; ...@@ -53,6 +53,9 @@ NSString * const BUYAppId_Placeholder = @"app_id";
self.appId = environment[kBUYTestAppId] ?: jsonConfig[kBUYTestAppId]; self.appId = environment[kBUYTestAppId] ?: jsonConfig[kBUYTestAppId];
self.merchantId = environment[kBUYTestMerchantId] ?: jsonConfig[kBUYTestMerchantId]; self.merchantId = environment[kBUYTestMerchantId] ?: jsonConfig[kBUYTestMerchantId];
self.customerEmail = environment[kBUYTestEmail] ?: jsonConfig[kBUYTestEmail];
self.customerPassword = environment[kBUYTestPassword] ?: jsonConfig[kBUYTestPassword];
NSDictionary *giftCards = jsonConfig[@"gift_cards"]; NSDictionary *giftCards = jsonConfig[@"gift_cards"];
self.giftCardCode = environment[kBUYTestGiftCardCode11] ?: giftCards[@"valid11"][@"code"]; self.giftCardCode = environment[kBUYTestGiftCardCode11] ?: giftCards[@"valid11"][@"code"];
...@@ -67,6 +70,10 @@ NSString * const BUYAppId_Placeholder = @"app_id"; ...@@ -67,6 +70,10 @@ NSString * const BUYAppId_Placeholder = @"app_id";
NSString *productIdsString = [environment[kBUYTestProductIdsCommaSeparated] stringByReplacingOccurrencesOfString:@" " withString:@""]; NSString *productIdsString = [environment[kBUYTestProductIdsCommaSeparated] stringByReplacingOccurrencesOfString:@" " withString:@""];
self.productIds = [productIdsString componentsSeparatedByString:@","]; self.productIds = [productIdsString componentsSeparatedByString:@","];
} else { } else {
self.variantUntrackedId = jsonConfig[@"variants"][@"variant_untracked_id"];
self.variantInventory1Id = jsonConfig[@"variants"][@"variant_inventory1_id"];
self.variantSoldOutId = jsonConfig[@"variants"][@"variant_soldout_id"];
self.productIds = jsonConfig[@"product_ids"]; self.productIds = jsonConfig[@"product_ids"];
} }
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#define kBUYTestAPIKey @"api_key" #define kBUYTestAPIKey @"api_key"
#define kBUYTestAppId @"app_id" #define kBUYTestAppId @"app_id"
#define kBUYTestMerchantId @"merchant_id" #define kBUYTestMerchantId @"merchant_id"
#define kBUYTestEmail @"customer_email"
#define kBUYTestPassword @"customer_password"
#define kBUYTestGiftCardCode11 @"gift_card_code_11" #define kBUYTestGiftCardCode11 @"gift_card_code_11"
#define kBUYTestGiftCardCode25 @"gift_card_code_25" #define kBUYTestGiftCardCode25 @"gift_card_code_25"
#define kBUYTestGiftCardCode50 @"gift_card_code_50" #define kBUYTestGiftCardCode50 @"gift_card_code_50"
......
...@@ -45,6 +45,16 @@ ...@@ -45,6 +45,16 @@
"testCheckoutFlowUsingCreditCard_12":{"body":"","code":200,"message":"OK"}, "testCheckoutFlowUsingCreditCard_12":{"body":"","code":200,"message":"OK"},
"testCheckoutFlowUsingCreditCard_13":{"body":"{\"checkout\":{\"created_at\":\"2016-03-07T10:20:56-05:00\",\"currency\":\"CAD\",\"customer_id\":1137418883,\"email\":\"test@test.com\",\"location_id\":null,\"order_id\":2548686982,\"requires_shipping\":true,\"reservation_time\":300,\"source_name\":\"mobile_app\",\"source_identifier\":\"26915715\",\"source_url\":null,\"taxes_included\":false,\"token\":\"4bd92a3e9ab0b3adf790e0774db6c815\",\"updated_at\":\"2016-03-07T10:21:00-05:00\",\"payment_due\":\"2238.99\",\"payment_url\":\"https:\\/\\/elb.deposit.shopifycs.com\\/sessions\",\"reservation_time_left\":0,\"subtotal_price\":\"2230.99\",\"total_price\":\"2238.99\",\"total_tax\":\"0.00\",\"attributes\":[],\"note\":\"\",\"order\":{\"id\":2548686982,\"name\":\"#4269\",\"status_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/4bd92a3e9ab0b3adf790e0774db6c815\\/thank_you\"},\"order_status_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/4bd92a3e9ab0b3adf790e0774db6c815\\/thank_you\",\"privacy_policy_url\":null,\"refund_policy_url\":null,\"terms_of_service_url\":null,\"user_id\":null,\"web_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/4bd92a3e9ab0b3adf790e0774db6c815\",\"tax_lines\":[],\"line_items\":[{\"id\":\"cfdc9344bacf009e\",\"product_id\":2096063363,\"variant_id\":6030700419,\"sku\":\"\",\"vendor\":\"McCullough Group\",\"title\":\"Actinian Fur Hat\",\"variant_title\":\"Teal\",\"taxable\":false,\"requires_shipping\":true,\"price\":\"2230.99\",\"compare_at_price\":null,\"line_price\":\"2230.99\",\"properties\":{\"size\":\"large\",\"color\":\"red\"},\"quantity\":1,\"grams\":4000,\"fulfillment_service\":\"manual\",\"applied_discounts\":[]}],\"gift_cards\":[],\"shipping_rate\":{\"id\":\"shopify-Standard%20Shipping-8.00\",\"price\":\"8.00\",\"title\":\"Standard Shipping\"},\"shipping_address\":{\"id\":3479864454,\"first_name\":\"MobileBuy\",\"last_name\":\"TestBot\",\"phone\":\"1-555-555-5555\",\"company\":\"Shopify Inc.\",\"address1\":\"150 Elgin Street\",\"address2\":\"8th Floor\",\"city\":\"Ottawa\",\"province\":\"Ontario\",\"province_code\":\"ON\",\"country\":\"Canada\",\"country_code\":\"CA\",\"zip\":\"K1N5T5\"},\"credit_card\":{\"first_name\":\"John\",\"last_name\":\"Smith\",\"first_digits\":\"424242\",\"last_digits\":\"4242\",\"expiry_month\":5,\"expiry_year\":2020},\"billing_address\":{\"id\":3479864390,\"first_name\":\"MobileBuy\",\"last_name\":\"TestBot\",\"phone\":\"1-555-555-5555\",\"company\":\"Shopify Inc.\",\"address1\":\"150 Elgin Street\",\"address2\":\"8th Floor\",\"city\":\"Ottawa\",\"province\":\"Ontario\",\"province_code\":\"ON\",\"country\":\"Canada\",\"country_code\":\"CA\",\"zip\":\"K1N5T5\"},\"discount\":null}}","code":200,"message":"OK"}, "testCheckoutFlowUsingCreditCard_13":{"body":"{\"checkout\":{\"created_at\":\"2016-03-07T10:20:56-05:00\",\"currency\":\"CAD\",\"customer_id\":1137418883,\"email\":\"test@test.com\",\"location_id\":null,\"order_id\":2548686982,\"requires_shipping\":true,\"reservation_time\":300,\"source_name\":\"mobile_app\",\"source_identifier\":\"26915715\",\"source_url\":null,\"taxes_included\":false,\"token\":\"4bd92a3e9ab0b3adf790e0774db6c815\",\"updated_at\":\"2016-03-07T10:21:00-05:00\",\"payment_due\":\"2238.99\",\"payment_url\":\"https:\\/\\/elb.deposit.shopifycs.com\\/sessions\",\"reservation_time_left\":0,\"subtotal_price\":\"2230.99\",\"total_price\":\"2238.99\",\"total_tax\":\"0.00\",\"attributes\":[],\"note\":\"\",\"order\":{\"id\":2548686982,\"name\":\"#4269\",\"status_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/4bd92a3e9ab0b3adf790e0774db6c815\\/thank_you\"},\"order_status_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/4bd92a3e9ab0b3adf790e0774db6c815\\/thank_you\",\"privacy_policy_url\":null,\"refund_policy_url\":null,\"terms_of_service_url\":null,\"user_id\":null,\"web_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/4bd92a3e9ab0b3adf790e0774db6c815\",\"tax_lines\":[],\"line_items\":[{\"id\":\"cfdc9344bacf009e\",\"product_id\":2096063363,\"variant_id\":6030700419,\"sku\":\"\",\"vendor\":\"McCullough Group\",\"title\":\"Actinian Fur Hat\",\"variant_title\":\"Teal\",\"taxable\":false,\"requires_shipping\":true,\"price\":\"2230.99\",\"compare_at_price\":null,\"line_price\":\"2230.99\",\"properties\":{\"size\":\"large\",\"color\":\"red\"},\"quantity\":1,\"grams\":4000,\"fulfillment_service\":\"manual\",\"applied_discounts\":[]}],\"gift_cards\":[],\"shipping_rate\":{\"id\":\"shopify-Standard%20Shipping-8.00\",\"price\":\"8.00\",\"title\":\"Standard Shipping\"},\"shipping_address\":{\"id\":3479864454,\"first_name\":\"MobileBuy\",\"last_name\":\"TestBot\",\"phone\":\"1-555-555-5555\",\"company\":\"Shopify Inc.\",\"address1\":\"150 Elgin Street\",\"address2\":\"8th Floor\",\"city\":\"Ottawa\",\"province\":\"Ontario\",\"province_code\":\"ON\",\"country\":\"Canada\",\"country_code\":\"CA\",\"zip\":\"K1N5T5\"},\"credit_card\":{\"first_name\":\"John\",\"last_name\":\"Smith\",\"first_digits\":\"424242\",\"last_digits\":\"4242\",\"expiry_month\":5,\"expiry_year\":2020},\"billing_address\":{\"id\":3479864390,\"first_name\":\"MobileBuy\",\"last_name\":\"TestBot\",\"phone\":\"1-555-555-5555\",\"company\":\"Shopify Inc.\",\"address1\":\"150 Elgin Street\",\"address2\":\"8th Floor\",\"city\":\"Ottawa\",\"province\":\"Ontario\",\"province_code\":\"ON\",\"country\":\"Canada\",\"country_code\":\"CA\",\"zip\":\"K1N5T5\"},\"discount\":null}}","code":200,"message":"OK"},
"testCreateCheckoutWithExpiredDiscount_0":{"body":"{\"product_listings\":[{\"id\":2626498435,\"product_id\":2096063363,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:37-04:00\",\"updated_at\":\"2015-08-19T09:47:37-04:00\",\"body_html\":\"parsing the driver won't do anything, we need to calculate the online PNG program!\",\"handle\":\"actinian-fur-hat\",\"product_type\":\"enable bricks-and-clicks e-business\",\"title\":\"Actinian Fur Hat\",\"vendor\":\"McCullough Group\",\"published_at\":\"2015-08-19T09:47:37-04:00\",\"published\":true,\"available\":true,\"tags\":\"\",\"images\":[{\"id\":4277333187,\"created_at\":\"2015-08-13T14:12:44-04:00\",\"position\":1,\"updated_at\":\"2015-08-13T14:12:44-04:00\",\"product_id\":2096063363,\"src\":\"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0957\\/5792\\/products\\/Kraepelin3.gif?v=1439489564\",\"variant_ids\":[]}],\"options\":[{\"id\":2524801731,\"name\":\"Color or something\",\"product_id\":2096063363,\"position\":1}],\"variants\":[{\"id\":6030700419,\"title\":\"Teal\",\"option_values\":[{\"option_id\":2524801731,\"name\":\"Color or something\",\"value\":\"Teal\"}],\"price\":\"2230.99\",\"compare_at_price\":null,\"grams\":4000,\"requires_shipping\":true,\"sku\":\"\",\"taxable\":false,\"position\":1,\"available\":true}]}]}","code":200,"message":"OK"}, "testCreateCheckoutWithExpiredDiscount_0":{"body":"{\"product_listings\":[{\"id\":2626498435,\"product_id\":2096063363,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:37-04:00\",\"updated_at\":\"2015-08-19T09:47:37-04:00\",\"body_html\":\"parsing the driver won't do anything, we need to calculate the online PNG program!\",\"handle\":\"actinian-fur-hat\",\"product_type\":\"enable bricks-and-clicks e-business\",\"title\":\"Actinian Fur Hat\",\"vendor\":\"McCullough Group\",\"published_at\":\"2015-08-19T09:47:37-04:00\",\"published\":true,\"available\":true,\"tags\":\"\",\"images\":[{\"id\":4277333187,\"created_at\":\"2015-08-13T14:12:44-04:00\",\"position\":1,\"updated_at\":\"2015-08-13T14:12:44-04:00\",\"product_id\":2096063363,\"src\":\"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0957\\/5792\\/products\\/Kraepelin3.gif?v=1439489564\",\"variant_ids\":[]}],\"options\":[{\"id\":2524801731,\"name\":\"Color or something\",\"product_id\":2096063363,\"position\":1}],\"variants\":[{\"id\":6030700419,\"title\":\"Teal\",\"option_values\":[{\"option_id\":2524801731,\"name\":\"Color or something\",\"value\":\"Teal\"}],\"price\":\"2230.99\",\"compare_at_price\":null,\"grams\":4000,\"requires_shipping\":true,\"sku\":\"\",\"taxable\":false,\"position\":1,\"available\":true}]}]}","code":200,"message":"OK"},
"testCheckoutFlowUsingCreditCard_14": {
"body": "",
"code": 200,
"message": "OK"
},
"testCheckoutFlowUsingCreditCard_15": {
"body": "{\"checkout\":{\"created_at\":\"2015-10-08T13:34:30-04:00\",\"currency\":\"CAD\",\"customer_id\":1137418883,\"email\":\"test@test.com\",\"location_id\":null,\"order_id\":1432044675,\"requires_shipping\":true,\"reservation_time\":300,\"source_name\":\"mobile_app\",\"source_identifier\":\"26915715\",\"source_url\":null,\"taxes_included\":false,\"token\":\"89978073d2d3602c114fbd59becc5f96\",\"updated_at\":\"2015-10-08T13:34:33-04:00\",\"payment_due\":\"2238.99\",\"payment_url\":\"https:\\/\\/us-east-1-deposit.cs.shopify.com\\/sessions\",\"reservation_time_left\":0,\"subtotal_price\":\"2230.99\",\"total_price\":\"2238.99\",\"total_tax\":\"0.00\",\"order\":{\"id\":1432044675,\"name\":\"#1771\",\"status_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/89978073d2d3602c114fbd59becc5f96\\/thank_you\"},\"order_status_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/89978073d2d3602c114fbd59becc5f96\\/thank_you\",\"privacy_policy_url\":null,\"refund_policy_url\":null,\"terms_of_service_url\":null,\"user_id\":null,\"web_url\":\"https:\\/\\/checkout.shopify.com\\/9575792\\/checkouts\\/89978073d2d3602c114fbd59becc5f96\",\"tax_lines\":[],\"line_items\":[{\"id\":\"c7ec4b9bf3e6ddbd\",\"product_id\":2096063363,\"variant_id\":6030700419,\"sku\":\"\",\"vendor\":\"McCullough Group\",\"title\":\"Actinian Fur Hat\",\"variant_title\":\"Teal\",\"taxable\":false,\"requires_shipping\":true,\"price\":\"2230.99\",\"compare_at_price\":null,\"line_price\":\"2230.99\",\"properties\":{\"size\":\"large\",\"color\":\"red\"},\"quantity\":1,\"grams\":4000,\"fulfillment_service\":\"manual\"}],\"gift_cards\":[],\"shipping_rate\":{\"id\":\"shopify-Standard%20Shipping-8.00\",\"price\":\"8.00\",\"title\":\"Standard Shipping\"},\"shipping_address\":{\"first_name\":\"MobileBuy\",\"last_name\":\"TestBot\",\"phone\":\"1-555-555-5555\",\"company\":\"Shopify Inc.\",\"address1\":\"150 Elgin Street\",\"address2\":\"8th Floor\",\"city\":\"Ottawa\",\"province\":\"Ontario\",\"province_code\":\"ON\",\"country\":\"Canada\",\"country_code\":\"CA\",\"zip\":\"K1N5T5\"},\"credit_card\":{\"first_name\":\"John\",\"last_name\":\"Smith\",\"first_digits\":\"424242\",\"last_digits\":\"4242\",\"expiry_month\":5,\"expiry_year\":2020},\"billing_address\":{\"first_name\":\"MobileBuy\",\"last_name\":\"TestBot\",\"phone\":\"1-555-555-5555\",\"company\":\"Shopify Inc.\",\"address1\":\"150 Elgin Street\",\"address2\":\"8th Floor\",\"city\":\"Ottawa\",\"province\":\"Ontario\",\"province_code\":\"ON\",\"country\":\"Canada\",\"country_code\":\"CA\",\"zip\":\"K1N5T5\"},\"discount\":null}}",
"code": 200,
"message": "OK"
},
"testCreateCheckoutWithExpiredDiscount_1":{"body":"{\"errors\":{\"checkout\":{\"line_items\":[],\"source_name\":[],\"reservation_time\":[],\"discount\":{\"amount\":[{\"code\":\"greater_than\",\"message\":\"must be greater than 0\",\"options\":{\"value\":0.0,\"count\":0}}],\"code\":[{\"code\":\"discount_not_found\",\"message\":\"Unable to find a valid discount matching the code entered\",\"options\":{}}]}}}}","code":422,"message":"Unprocessable Entity"}, "testCreateCheckoutWithExpiredDiscount_1":{"body":"{\"errors\":{\"checkout\":{\"line_items\":[],\"source_name\":[],\"reservation_time\":[],\"discount\":{\"amount\":[{\"code\":\"greater_than\",\"message\":\"must be greater than 0\",\"options\":{\"value\":0.0,\"count\":0}}],\"code\":[{\"code\":\"discount_not_found\",\"message\":\"Unable to find a valid discount matching the code entered\",\"options\":{}}]}}}}","code":422,"message":"Unprocessable Entity"},
"testCreateCheckoutWithNonExistentDiscount_0":{"body":"{\"product_listings\":[{\"id\":2626498435,\"product_id\":2096063363,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:37-04:00\",\"updated_at\":\"2015-08-19T09:47:37-04:00\",\"body_html\":\"parsing the driver won't do anything, we need to calculate the online PNG program!\",\"handle\":\"actinian-fur-hat\",\"product_type\":\"enable bricks-and-clicks e-business\",\"title\":\"Actinian Fur Hat\",\"vendor\":\"McCullough Group\",\"published_at\":\"2015-08-19T09:47:37-04:00\",\"published\":true,\"available\":true,\"tags\":\"\",\"images\":[{\"id\":4277333187,\"created_at\":\"2015-08-13T14:12:44-04:00\",\"position\":1,\"updated_at\":\"2015-08-13T14:12:44-04:00\",\"product_id\":2096063363,\"src\":\"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0957\\/5792\\/products\\/Kraepelin3.gif?v=1439489564\",\"variant_ids\":[]}],\"options\":[{\"id\":2524801731,\"name\":\"Color or something\",\"product_id\":2096063363,\"position\":1}],\"variants\":[{\"id\":6030700419,\"title\":\"Teal\",\"option_values\":[{\"option_id\":2524801731,\"name\":\"Color or something\",\"value\":\"Teal\"}],\"price\":\"2230.99\",\"compare_at_price\":null,\"grams\":4000,\"requires_shipping\":true,\"sku\":\"\",\"taxable\":false,\"position\":1,\"available\":true}]}]}","code":200,"message":"OK"}, "testCreateCheckoutWithNonExistentDiscount_0":{"body":"{\"product_listings\":[{\"id\":2626498435,\"product_id\":2096063363,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:37-04:00\",\"updated_at\":\"2015-08-19T09:47:37-04:00\",\"body_html\":\"parsing the driver won't do anything, we need to calculate the online PNG program!\",\"handle\":\"actinian-fur-hat\",\"product_type\":\"enable bricks-and-clicks e-business\",\"title\":\"Actinian Fur Hat\",\"vendor\":\"McCullough Group\",\"published_at\":\"2015-08-19T09:47:37-04:00\",\"published\":true,\"available\":true,\"tags\":\"\",\"images\":[{\"id\":4277333187,\"created_at\":\"2015-08-13T14:12:44-04:00\",\"position\":1,\"updated_at\":\"2015-08-13T14:12:44-04:00\",\"product_id\":2096063363,\"src\":\"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0957\\/5792\\/products\\/Kraepelin3.gif?v=1439489564\",\"variant_ids\":[]}],\"options\":[{\"id\":2524801731,\"name\":\"Color or something\",\"product_id\":2096063363,\"position\":1}],\"variants\":[{\"id\":6030700419,\"title\":\"Teal\",\"option_values\":[{\"option_id\":2524801731,\"name\":\"Color or something\",\"value\":\"Teal\"}],\"price\":\"2230.99\",\"compare_at_price\":null,\"grams\":4000,\"requires_shipping\":true,\"sku\":\"\",\"taxable\":false,\"position\":1,\"available\":true}]}]}","code":200,"message":"OK"},
"testCreateCheckoutWithNonExistentDiscount_1":{"body":"{\"errors\":{\"checkout\":{\"line_items\":[],\"source_name\":[],\"reservation_time\":[],\"discount\":{\"amount\":[{\"code\":\"greater_than\",\"message\":\"must be greater than 0\",\"options\":{\"value\":0.0,\"count\":0}}],\"code\":[{\"code\":\"discount_not_found\",\"message\":\"Unable to find a valid discount matching the code entered\",\"options\":{}}]}}}}","code":422,"message":"Unprocessable Entity"}, "testCreateCheckoutWithNonExistentDiscount_1":{"body":"{\"errors\":{\"checkout\":{\"line_items\":[],\"source_name\":[],\"reservation_time\":[],\"discount\":{\"amount\":[{\"code\":\"greater_than\",\"message\":\"must be greater than 0\",\"options\":{\"value\":0.0,\"count\":0}}],\"code\":[{\"code\":\"discount_not_found\",\"message\":\"Unable to find a valid discount matching the code entered\",\"options\":{}}]}}}}","code":422,"message":"Unprocessable Entity"},
...@@ -109,4 +119,9 @@ ...@@ -109,4 +119,9 @@
"testGetProductsWithOneInvalidId_0":{"body":"{\"product_listings\":[{\"id\":2626498435,\"product_id\":2096063363,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:37-04:00\",\"updated_at\":\"2015-08-19T09:47:37-04:00\",\"body_html\":\"parsing the driver won't do anything, we need to calculate the online PNG program!\",\"handle\":\"actinian-fur-hat\",\"product_type\":\"enable bricks-and-clicks e-business\",\"title\":\"Actinian Fur Hat\",\"vendor\":\"McCullough Group\",\"published_at\":\"2015-08-19T09:47:37-04:00\",\"published\":true,\"available\":true,\"tags\":\"\",\"images\":[{\"id\":4277333187,\"created_at\":\"2015-08-13T14:12:44-04:00\",\"position\":1,\"updated_at\":\"2015-08-13T14:12:44-04:00\",\"product_id\":2096063363,\"src\":\"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0957\\/5792\\/products\\/Kraepelin3.gif?v=1439489564\",\"variant_ids\":[]}],\"options\":[{\"id\":2524801731,\"name\":\"Color or something\",\"product_id\":2096063363,\"position\":1}],\"variants\":[{\"id\":6030700419,\"title\":\"Teal\",\"option_values\":[{\"option_id\":2524801731,\"name\":\"Color or something\",\"value\":\"Teal\"}],\"price\":\"2230.99\",\"compare_at_price\":null,\"grams\":4000,\"requires_shipping\":true,\"sku\":\"\",\"taxable\":false,\"position\":1,\"available\":true}]}]}","code":200,"message":"OK"}, "testGetProductsWithOneInvalidId_0":{"body":"{\"product_listings\":[{\"id\":2626498435,\"product_id\":2096063363,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:37-04:00\",\"updated_at\":\"2015-08-19T09:47:37-04:00\",\"body_html\":\"parsing the driver won't do anything, we need to calculate the online PNG program!\",\"handle\":\"actinian-fur-hat\",\"product_type\":\"enable bricks-and-clicks e-business\",\"title\":\"Actinian Fur Hat\",\"vendor\":\"McCullough Group\",\"published_at\":\"2015-08-19T09:47:37-04:00\",\"published\":true,\"available\":true,\"tags\":\"\",\"images\":[{\"id\":4277333187,\"created_at\":\"2015-08-13T14:12:44-04:00\",\"position\":1,\"updated_at\":\"2015-08-13T14:12:44-04:00\",\"product_id\":2096063363,\"src\":\"https:\\/\\/cdn.shopify.com\\/s\\/files\\/1\\/0957\\/5792\\/products\\/Kraepelin3.gif?v=1439489564\",\"variant_ids\":[]}],\"options\":[{\"id\":2524801731,\"name\":\"Color or something\",\"product_id\":2096063363,\"position\":1}],\"variants\":[{\"id\":6030700419,\"title\":\"Teal\",\"option_values\":[{\"option_id\":2524801731,\"name\":\"Color or something\",\"value\":\"Teal\"}],\"price\":\"2230.99\",\"compare_at_price\":null,\"grams\":4000,\"requires_shipping\":true,\"sku\":\"\",\"taxable\":false,\"position\":1,\"available\":true}]}]}","code":200,"message":"OK"},
"testGetShop_0":{"body":"{\"id\":9575792,\"name\":\"MobileBuySDKTestShop\",\"city\":\"Richmond Hill\",\"province\":\"Ontario\",\"country\":\"CA\",\"currency\":\"CAD\",\"domain\":\"mobilebuysdktestshop.myshopify.com\",\"url\":\"http:\\/\\/mobilebuysdktestshop.myshopify.com\",\"myshopify_domain\":\"mobilebuysdktestshop.myshopify.com\",\"description\":\"\",\"ships_to_countries\":[\"*\",\"CA\"],\"money_format\":\"${{amount}}\",\"published_collections_count\":1,\"published_products_count\":11}","code":200,"message":"OK"}, "testGetShop_0":{"body":"{\"id\":9575792,\"name\":\"MobileBuySDKTestShop\",\"city\":\"Richmond Hill\",\"province\":\"Ontario\",\"country\":\"CA\",\"currency\":\"CAD\",\"domain\":\"mobilebuysdktestshop.myshopify.com\",\"url\":\"http:\\/\\/mobilebuysdktestshop.myshopify.com\",\"myshopify_domain\":\"mobilebuysdktestshop.myshopify.com\",\"description\":\"\",\"ships_to_countries\":[\"*\",\"CA\"],\"money_format\":\"${{amount}}\",\"published_collections_count\":1,\"published_products_count\":11}","code":200,"message":"OK"},
"testGetCollectionPage_0":{"body":"{\"collection_listings\":[{\"id\":171459075,\"collection_id\":109931075,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:00-04:00\",\"updated_at\":\"2015-08-19T15:43:26-04:00\",\"body_html\":\"\",\"handle\":\"frontpage\",\"image\":null,\"title\":\"Frontpage\",\"published_at\":\"2015-08-19T09:47:00-04:00\",\"published\":true}]}","code":200,"message":"OK"}, "testGetCollectionPage_0":{"body":"{\"collection_listings\":[{\"id\":171459075,\"collection_id\":109931075,\"channel_id\":26915715,\"created_at\":\"2015-08-19T09:47:00-04:00\",\"updated_at\":\"2015-08-19T15:43:26-04:00\",\"body_html\":\"\",\"handle\":\"frontpage\",\"image\":null,\"title\":\"Frontpage\",\"published_at\":\"2015-08-19T09:47:00-04:00\",\"published\":true}]}","code":200,"message":"OK"},
"testGetOutOfIndexCollectionPage_0":{"body":"{\"collection_listings\":[]}","code":200,"message":"OK"}} "testGetOutOfIndexCollectionPage_0":{"body":"{\"collection_listings\":[]}","code":200,"message":"OK"},
\ No newline at end of file "testOutOfStockVariant":{"body":"{\"errors\":{\"checkout\":{\"line_items\":[null,{\"quantity\":[{\"code\":\"not_enough_in_stock\",\"message\":\"Not enough items available. Only 0 left.\",\"options\":{\"remaining\":0}}]},{\"quantity\":[{\"code\":\"not_enough_in_stock\",\"message\":\"Not enough items available. Only 0 left.\",\"options\":{\"remaining\":0}}]}],\"source_name\":[],\"reservation_time\":[]}}}"},
"testCustomerDuplicateEmail":{"body":"{\"errors\":{\"customer\":{\"email\":[{\"code\":\"taken\",\"message\":\"has already been taken\",\"options\":{\"rescue_from_duplicate\":true,\"value\":\"asd@asd.com\"}}]}}}"},
"testCustomerInvalidEmailPassword":{"body":"{\"errors\":{\"customer\":{\"password\":[{\"code\":\"too_short\",\"message\":\"is too short (minimum is 5 characters)\",\"options\":{\"count\":5}}],\"password_confirmation\":[{\"code\":\"confirmation\",\"message\":\"doesn't match Password\",\"options\":{\"attribute\":\"Password\"}}],\"email\":[{\"code\":\"invalid\",\"message\":\"is invalid\",\"options\":{}}]}}}"},
"testCustomerLogin":{"body":"{\"customer\":{\"id\":2529265094,\"email\":\"asd@asd.com\",\"default_address\":{\"id\":2839567814,\"first_name\":\"Fast\",\"last_name\":\"Add\",\"company\":\"Adidas\",\"address1\":\"Sass\",\"address2\":\"12\",\"city\":\"Qsdasd\",\"province\":null,\"country\":\"Bouvet Island\",\"zip\":\"24124124\",\"phone\":\"123124124\",\"name\":\"Fast Add\",\"province_code\":null,\"country_code\":\"BV\",\"country_name\":\"Bouvet Island\",\"default\":true},\"verified_email\":true,\"accepts_marketing\":false,\"first_name\":\"Fast\",\"last_name\":\"Add\",\"orders_count\":9,\"total_spent\":\"375.00\",\"created_at\":\"2016-02-16T14:42:24-05:00\",\"updated_at\":\"2016-03-10T16:34:04-05:00\",\"state\":\"enabled\",\"last_order_id\":2566266118,\"last_order_name\":\"#1137\",\"addresses\":[{\"id\":2785988486,\"first_name\":\"AA\",\"last_name\":\"A\",\"phone\":\"\",\"company\":\"\",\"address1\":\"Assiniboine Road\",\"address2\":\"\",\"city\":\"Toronto\",\"province\":\"Ontario\",\"province_code\":\"ON\",\"country\":\"Canada\",\"country_code\":\"CA\",\"zip\":\"M3J1E1\"},{\"id\":2839567814,\"first_name\":\"Fast\",\"last_name\":\"Add\",\"phone\":\"123124124\",\"company\":\"Adidas\",\"address1\":\"Sass\",\"address2\":\"12\",\"city\":\"Qsdasd\",\"province\":null,\"province_code\":null,\"country\":\"Bouvet Island\",\"country_code\":\"BV\",\"zip\":\"24124124\"}],\"multipass_identifier\":null,\"tax_exempt\":false}}","code":200,"message":"OK"}
}
...@@ -5,10 +5,17 @@ ...@@ -5,10 +5,17 @@
"channel_id": "", "channel_id": "",
"app_id": "", "app_id": "",
"merchant_id": "", "merchant_id": "",
"customer_email": "",
"customer_password": "",
"product_ids": [ "product_ids": [
"", "",
"" ""
], ],
"variants": {
"variant_untracked_id": "",
"variant_inventory1_id": "",
"variant_soldout_id": ""
},
"collection_id": "", "collection_id": "",
"gift_cards": { "gift_cards": {
"ValidGiftCard11": { "ValidGiftCard11": {
......
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