public void ListStatus_CorrectInputParametersAndSpecifiedEnvelopeIdsInRequestBody_ReturnEnvelopesInformation() { JwtGetSampleEnvelopeIds(); var envIdsRequest = new EnvelopeIdsRequest(_testConfig.EnvelopeIdsList); var options = new EnvelopesApi.ListStatusOptions() { envelopeIds = "request_body", fromDate = DateTime.Now.AddMonths(-1).ToString("o") }; EnvelopesInformation envelopes = _envelopesApi.ListStatus(_testConfig.AccountId, envIdsRequest, options); Assert.IsNotNull(envelopes?.Envelopes[0]?.EnvelopeId); Assert.IsNotNull(envelopes?.Envelopes[0]?.Status); }
public void JwtListEnvelopesWithSpecifiedEnvelopeIdsInRequestBodyTest() { GetSampleEnvelopeIds(); // This example gets statuses of all envelopes listed in envelopeIds comma separated EnvelopeIdsRequest envIdsRequest = new EnvelopeIdsRequest(testConfig.EnvelopeIdsList); // set a filter for the envelopes we want returned - we will ask the API to let the List of Envelope Ids from request body EnvelopesApi.ListStatusOptions options = new EnvelopesApi.ListStatusOptions() { envelopeIds = "request_body" }; // |EnvelopesApi| contains methods related to envelopes and envelope recipients EnvelopesApi envelopesApi = new EnvelopesApi(testConfig.ApiClient.Configuration); EnvelopesInformation envelopes = envelopesApi.ListStatus(testConfig.AccountId, envIdsRequest, options); Assert.IsNotNull(envelopes); Assert.IsNotNull(envelopes.Envelopes); Assert.IsNotNull(envelopes.Envelopes[0].EnvelopeId); Assert.IsNotNull(envelopes.Envelopes[0].Status); }
/// <summary> /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// </summary> ///<param name="accountId">The external account number (int) or account ID Guid.</param> <param name="envelopeIdsRequest">TBD Description</param> /// <returns>8Task of ApiResponse (EnvelopesInformation)</returns> public async System.Threading.Tasks.Task<ApiResponse<EnvelopesInformation>> ListStatusAsyncWithHttpInfo (string accountId, EnvelopeIdsRequest envelopeIdsRequest) { // verify the required parameter 'accountId' is set if (accountId == null) throw new ApiException(400, "Missing required parameter 'accountId' when calling ListStatus"); var path_ = "/v2/accounts/{accountId}/envelopes/status"; var pathParams = new Dictionary<String, String>(); var queryParams = new Dictionary<String, String>(); var headerParams = new Dictionary<String, String>(Configuration.DefaultHeader); var formParams = new Dictionary<String, String>(); var fileParams = new Dictionary<String, FileParameter>(); String postBody = null; // to determine the Accept header String[] http_header_accepts = new String[] { "application/json" }; String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); if (accountId != null) pathParams.Add("accountId", Configuration.ApiClient.ParameterToString(accountId)); // path parameter postBody = Configuration.ApiClient.Serialize(envelopeIdsRequest); // http body (model) parameter // make the HTTP request IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); int statusCode = (int) response.StatusCode; if (statusCode >= 400) throw new ApiException (statusCode, "Error calling ListStatus: " + response.Content, response.Content); else if (statusCode == 0) throw new ApiException (statusCode, "Error calling ListStatus: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse<EnvelopesInformation>(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (EnvelopesInformation) Configuration.ApiClient.Deserialize(response, typeof(EnvelopesInformation))); }
/// <summary> /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// </summary> ///<param name="accountId">The external account number (int) or account ID Guid.</param> <param name="envelopeIdsRequest">TBD Description</param> /// <returns>7Task of EnvelopesInformation</returns> public async System.Threading.Tasks.Task<EnvelopesInformation> ListStatusAsync (string accountId, EnvelopeIdsRequest envelopeIdsRequest) { ApiResponse<EnvelopesInformation> response = await ListStatusAsyncWithHttpInfo(accountId, envelopeIdsRequest); return response.Data; }
/// <summary> /// Gets the envelope status for the specified envelopes. Retrieves the envelope status for the specified envelopes. /// </summary> ///<param name="accountId">The external account number (int) or account ID Guid.</param> <param name="envelopeIdsRequest">TBD Description</param> /// <returns>5EnvelopesInformation</returns> public EnvelopesInformation ListStatus (string accountId, EnvelopeIdsRequest envelopeIdsRequest) { ApiResponse<EnvelopesInformation> response = ListStatusWithHttpInfo(accountId, envelopeIdsRequest); return response.Data; }