/// <summary> /// POST /v1/calls - create an outbound SIP or PSTN Call /// </summary> /// <param name="command"></param> /// <param name="creds">(Optional) Overridden credentials for only this request</param> /// <returns></returns> /// <exception cref="NexmoHttpRequestException">thrown if an error is encountered when talking to the API</exception> public CallResponse CreateCall(CallCommand command, Credentials creds = null) { return(ApiRequest.DoRequestWithJsonContent <CallResponse>( POST, ApiRequest.GetBaseUri(ApiRequest.UriType.Api, CALLS_ENDPOINT), command, ApiRequest.AuthType.Bearer, creds ?? Credentials )); }
/// <summary> /// POST /v1/calls - create an outbound SIP or PSTN Call /// </summary> /// <param name="cmd"></param> /// <returns></returns> public static CallResponse Do(CallCommand cmd, Credentials creds = null) { var response = VersionedApiRequest.DoRequest("POST", ApiRequest.GetBaseUriFor(typeof(Call), "/v1/calls"), cmd, creds); return(JsonConvert.DeserializeObject <CallResponse>(response.JsonResponse)); }
/// <summary> /// POST /v1/calls - create an outbound SIP or PSTN Call /// </summary> /// <param name="cmd"></param> /// <param name="creds">(Optional) Overridden credentials for only this request</param> /// <returns></returns> public static CallResponse Do(CallCommand cmd, Credentials creds = null) { return(ApiRequest.DoRequestWithJsonContent <CallResponse>("POST", ApiRequest.GetBaseUriFor(typeof(Call), "/v1/calls"), cmd, ApiRequest.AuthType.Bearer, creds)); }