Inheritance: BaseModel
コード例 #1
0
 public void SaveTaxType()
 {
     var taxType = new TaxType
     {
         Name = "New Tax Type",
         Percentage = 0.20m
     };
     var newTaxType = taxTypeRequest.Save(taxType);
 }
コード例 #2
0
 public TaxType Save(TaxType taxType)
 {
     var url = string.Format("TaxType/Save?apikey={0}&companyid={1}", _apiKey, _companyId);
     var request = new RestRequest(url, Method.POST) { JsonSerializer = new JsonSerializer() };
     request.RequestFormat = DataFormat.Json;
     request.AddBody(taxType);
     var response = _client.Execute<TaxType>(request);
     StatusDescription = response.StatusDescription;
     StatusCode = response.StatusCode;
     return response.Data;
 }