Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        /// <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;
        }
Ejemplo n.º 3
0
 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://");
 }
Ejemplo n.º 4
0
 // Todo: Searialize type T to Json
 private string SerializeJson(Merchant obj)
 {
     return(JsonConvert.SerializeObject(obj));
 }
Ejemplo n.º 5
0
 // Todo: Searialize type T to Json
 private string SerializeJson(Merchant obj)
 {
     return JsonConvert.SerializeObject(obj);
 }