Exemple #1
0
 private static void UpdateLocation(ExpectedLocation location, ApiResponse response)
 {
     if (response.Payload != null)
     {
         location.Id = ((LocationData)response.Payload).id;
     }
 }
Exemple #2
0
        private static string CreateNewCoachSaveCommand(ExpectedLocation expectedLocation)
        {
            var command = new ApiLocationSaveCommand
            {
                name = expectedLocation.Name
            };

            return(JsonSerialiser.Serialise(command));
        }
Exemple #3
0
        public static void RegisterLocation(ExpectedLocation location, ExpectedBusiness business)
        {
            var json     = CreateNewCoachSaveCommand(location);
            var response = PostLocation(business, json);

            if (response.StatusCode == HttpStatusCode.OK)
            {
                UpdateLocation(location, response);
            }
        }