/// <summary>
 /// Sends a PUT to '/api/organisation/{id}'
 /// </summary>
 /// <param name="id">a path parameter (no description)</param>
 /// <param name="model">a body parameter (no description)</param>
 /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param>
 /// <returns></returns>
 public static RestOperation UpdateOrganisation(string id, CreateOrUpdateOrganisation model, string expand = null)
 {
     return new RestOperation("PUT", "api/organisation/" + id + "")
         {
             Content = model,                    QueryParams =
                 {
                      {"$expand", expand},
                 }
         };
 }
 /// <summary>
 /// Sends a POST to '/api/organisations'
 /// </summary>
 /// <param name="model">a body parameter (no description)</param>
 /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param>
 /// <returns></returns>
 public static RestOperation CreateOrganisation(CreateOrUpdateOrganisation model, string expand = null)
 {
     return new RestOperation("POST", "api/organisations")
         {
             Content = model,                    QueryParams =
                 {
                      {"$expand", expand},
                 }
         };
 }
partial         void CopyExtraPropertiesToClone(CreateOrUpdateOrganisation clone, bool includeLocalProperties);
 public CreateOrUpdateOrganisation Clone(bool includeLocalProperties)
 {
     var c = new CreateOrUpdateOrganisation
             {
                 Id = Id,
                 IndustryType = IndustryType,
                 LongDescription = LongDescription,
                 Name = Name,
                 OrderNumber = OrderNumber,
                 ShortDescription = ShortDescription,
             };
     CopyExtraPropertiesToClone(c, includeLocalProperties);
     return c;
 }
		/// <summary>
        /// Sends a POST to '/api/organisations'  (asynchronous)
        /// </summary>
        /// <param name="model">a body parameter (no description)</param>
        /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param>
        /// <returns></returns>
        public virtual async Task<HttpResponseMessage> CreateOrganisationAsync(CreateOrUpdateOrganisation model, string expand = null)
        {
            var operation = Operations.CreateOrganisation(model, expand);
			var response = await _client.SendAsync(operation.BuildRequest(_client));
			EnsureSuccess(response);
			return response;
						
		}
		/// <summary>
        /// Sends a PUT to '/api/organisation/{id}'  (asynchronous)
        /// </summary>
        /// <param name="id">a path parameter (no description)</param>
        /// <param name="model">a body parameter (no description)</param>
        /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param>
        /// <returns></returns>
        public virtual async Task<Organisation> UpdateOrganisationAsync(string id, CreateOrUpdateOrganisation model, string expand = null)
        {
            var operation = Operations.UpdateOrganisation(id, model, expand);
			var response = await _client.SendAsync(operation.BuildRequest(_client));
			EnsureSuccess(response);
			var result = await response.Content.ReadAsAsync<Organisation>();
			return result;
						
		}