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

            return(JsonSerialiser.Serialise(command));
        }
Ejemplo n.º 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);
            }
        }