/// <summary> /// Sets the assign similar size locker by locker station id, booking id and reason. /// </summary> /// <returns> /// Gets the success bool flag, hardware door number, assigned locker and locker preview. /// </returns> public LockerResponse AssignSimilarSizeLocker(AssignSimilarSizeLocker model) { var request = SerializerHelper <AssignSimilarSizeLocker> .SerializeObject(model); Log.Information("[Assign Similar Size Locker][Req]" + "[" + request + "]"); var response = HttpHandler.PostRequestResolver(request, HttpMethod.Post, MemberInfo.Version, MemberInfo.ClientId, MemberInfo.ClientSecret, UriAbsolutePath.AssignSimilarSizeLocker, TokenResponse.AccessToken, TokenResponse.DateTime); var result = JsonConvert.DeserializeObject <LockerResponse>(response); Log.Information("[Res]" + "[" + response + "]"); return(result); }
/// <summary> /// Sets the assign similar size locker by locker station id, booking id and reason. /// </summary> /// <returns> /// Gets the success bool flag, hardware door number, assigned locker and locker preview. /// </returns> public JObject AssignSimilarSizeLocker(AssignSimilarSizeLocker model) { JObject result; if (TokenResponse.StatusCode == 200) { var request = SerializerHelper <AssignSimilarSizeLocker> .SerializeObject(model); Log.Information("Assign Similar Size Locker][Req]" + "[" + request + "]"); var response = HttpHandler.PostRequestResolver(request, HttpMethod.Post, MemberInfo.Version, MemberInfo.ClientId, MemberInfo.ClientSecret, UriAbsolutePath.AssignSimilarSizeLocker, TokenResponse.AccessToken, TokenResponse.DateTime); Log.Information("[Res]" + "[" + response + "]"); result = JObject.Parse(response); return(result); } return(JObject.Parse(SerializerHelper <AuthenticationError> .SerializeObject(new AuthenticationError(false, "401", "Unauthenticated")))); }