Skip to content

Commit

Permalink
Merge pull request #187 from XeroAPI/regenerated-against-OAS-v2-1-7
Browse files Browse the repository at this point in the history
type changes from float/double to decimal
  • Loading branch information
jenksguo authored May 30, 2020
2 parents 714df5d + 40bcd7d commit 8f1727f
Show file tree
Hide file tree
Showing 227 changed files with 538 additions and 440 deletions.
100 changes: 99 additions & 1 deletion Xero.NetStandard.OAuth2/Api/AccountingApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.1.4
* The version of the OpenAPI document: 2.1.7
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down Expand Up @@ -2234,6 +2234,29 @@ public interface IAccountingApiAsync : IApiAccessor
/// <returns>Task of ApiResponse (Attachments)</returns>
System.Threading.Tasks.Task<ApiResponse<Attachments>> GetContactAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID);
/// <summary>
/// Allows you to retrieve a single contact by Contact Number in a Xero organisation
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="contactNumber">This field is read only on the Xero contact screen, used to identify contacts in external systems (max length &#x3D; 50).</param>
/// <returns>Task of Contacts</returns>
System.Threading.Tasks.Task<Contacts> GetContactByContactNumberAsync (string accessToken, string xeroTenantId, string contactNumber);

/// <summary>
/// Allows you to retrieve a single contact by Contact Number in a Xero organisation
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="contactNumber">This field is read only on the Xero contact screen, used to identify contacts in external systems (max length &#x3D; 50).</param>
/// <returns>Task of ApiResponse (Contacts)</returns>
System.Threading.Tasks.Task<ApiResponse<Contacts>> GetContactByContactNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, string contactNumber);
/// <summary>
/// Allows you to retrieve CISSettings for a contact in a Xero organisation
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -12985,6 +13008,81 @@ public async System.Threading.Tasks.Task<Attachments> GetContactAttachmentsAsync
}


/// <summary>
/// Allows you to retrieve a single contact by Contact Number in a Xero organisation
/// </summary>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="contactNumber">This field is read only on the Xero contact screen, used to identify contacts in external systems (max length &#x3D; 50).</param>
/// <returns>Task of Contacts</returns>
public async System.Threading.Tasks.Task<Contacts> GetContactByContactNumberAsync (string accessToken, string xeroTenantId, string contactNumber)
{
Xero.NetStandard.OAuth2.Client.ApiResponse<Contacts> localVarResponse = await GetContactByContactNumberAsyncWithHttpInfo(accessToken, xeroTenantId, contactNumber);
return localVarResponse.Data;

}

/// <summary>
/// Allows you to retrieve a single contact by Contact Number in a Xero organisation
/// </summary>
/// <exception cref="Xero.NetStandard.OAuth2.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="xeroTenantId">Xero identifier for Tenant</param>
/// <param name="contactNumber">This field is read only on the Xero contact screen, used to identify contacts in external systems (max length &#x3D; 50).</param>
/// <returns>Task of ApiResponse (Contacts)</returns>
public async System.Threading.Tasks.Task<Xero.NetStandard.OAuth2.Client.ApiResponse<Contacts>> GetContactByContactNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, string contactNumber)
{
// verify the required parameter 'xeroTenantId' is set
if (xeroTenantId == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactByContactNumber");

// verify the required parameter 'contactNumber' is set
if (contactNumber == null)
throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactNumber' when calling AccountingApi->GetContactByContactNumber");


Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions();

String[] @contentTypes = new String[] {
};

// to determine the Accept header
String[] @accepts = new String[] {
"application/json"
};

foreach (var cType in @contentTypes)
requestOptions.HeaderParameters.Add("Content-Type", cType);

foreach (var accept in @accepts)
requestOptions.HeaderParameters.Add("Accept", accept);

if (contactNumber != null)
requestOptions.PathParameters.Add("ContactNumber", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactNumber)); // path parameter
if (xeroTenantId != null)
requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter

// authentication (OAuth2) required
// oauth required
if (!String.IsNullOrEmpty(accessToken))
{
requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken);
}
// make the HTTP request



var response = await this.AsynchronousClient.GetAsync<Contacts>("/Contacts/{ContactNumber}", requestOptions, this.Configuration);

if (this.ExceptionFactory != null)
{
Exception exception = this.ExceptionFactory("GetContactByContactNumber", response);
if (exception != null) throw exception;
}

return response;
}


/// <summary>
/// Allows you to retrieve CISSettings for a contact in a Xero organisation
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/AssetApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This is the Xero Assets API
*
* The version of the OpenAPI document: 2.1.4
* The version of the OpenAPI document: 2.1.7
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Api/IdentityApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This specifing endpoints related to managing authentication tokens and identity for Xero API
*
* The version of the OpenAPI document: 2.1.4
* The version of the OpenAPI document: 2.1.7
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
Loading

0 comments on commit 8f1727f

Please sign in to comment.