상속: BaseModel
예제 #1
0
        public void SaveAccount()
        {
            var account = new Account();
            account.Name = "Other Other Sales 1";
            account.Category = new Category { ID = 1 };

            var newaccount = Api.AccountRequest.Save(account);
        }
 public Account Save(Account account)
 {
     var url = string.Format("Account/Save?apikey={0}&companyid={1}", _apiKey, _companyId);
     var request = new RestRequest(url, Method.POST) { JsonSerializer = new JsonSerializer() };
     request.RequestFormat = DataFormat.Json;
     request.AddBody(account);
     var response = _client.Execute<Account>(request);
     return response.Data;
 }