public Api(Client client) { this._client = client; this._user = new User(this); this._merchants = new Merchant(this); this._invoices = new Invoices(this); this._accounts = new Accounts(this); }
/// <summary> /// Updates an existing merchant. /// </summary> /// <param name="_merchant">New merchant data.</param> /// <returns>The updated merchant.</returns> public Merchant update(Merchant _merchant) { Callbackurl = "merchants/" + _merchant.id + "?access_token=" + this._api.client.token; restClient = new RestClient(this._api.Baseapiurl, HttpVerb.PATCH, SerializeJson(_merchant), Callbackurl, this._api.client.token); Merchant Merchant_update = DeserializeJson(restClient.MakeRequest()); return Merchant_update; }
public Api(Client client) { this._client = client; this._user = new User(this); this._merchants = new Merchant(this); this._invoices = new Invoices(this); this._accounts = new Accounts(this); this.Baseapiurl = client.request_client(client.secure) + "://" + client.host.Trim('/') + "/" + client.path.Trim('/') + "/" + client.api_version.Trim('/') + "/"; this.BaseapiSecureUrl = this.Baseapiurl.Replace("http://", "https://"); }
// Todo: Searialize type T to Json private string SerializeJson(Merchant obj) { return(JsonConvert.SerializeObject(obj)); }
// Todo: Searialize type T to Json private string SerializeJson(Merchant obj) { return JsonConvert.SerializeObject(obj); }