public static InboundDomainResponse CreateFromResponse(Response response) { var result = new InboundDomainResponse(); LeftRight.SetValuesToMatch(result, response); var results = Jsonification.DeserializeObject <dynamic>(response.Content).results; result.InboundDomain = ListInboundDomainResponse.ConvertToAInboundDomain(results); return(result); }
public async Task <InboundDomainResponse> Retrieve(string domain) { var request = new Request { Url = $"/api/{client.Version}/inbound-domains/{domain}", Method = "GET" }; var response = await requestSender.Send(request); if (response.StatusCode != HttpStatusCode.OK) { throw new ResponseException(response); } return(InboundDomainResponse.CreateFromResponse(response)); }