public bool update(Types.Batch batch) { string endPoint = "/v1/batches/" + batch.id; string response = this.gateway.client.patch(endPoint, batch); return(true); }
public Types.Batch create(Types.Batch body) { string endPoint = "/v1/batches/"; string response = this.gateway.client.post(endPoint, body); return(batchFactory(response)); }
public Types.Batch processBatch(string batch_id) { StringBuilder builder = new StringBuilder(); builder.AppendFormat("/v1/batches/{0}/start-processing", batch_id); string endPoint = builder.ToString(); Types.Batch batch = new Types.Batch(null, null, null, 0); string response = this.gateway.client.post(endPoint, batch); return(batchFactory(response)); }
public Types.Batch generateQuote(Types.Batch batch) { return(generateQuote(batch.id)); }
public bool delete(Types.Batch batch) { return(delete(batch.id)); }
private Types.Batch batchFactory(string response) { Types.Batch batch = JsonHelpers.BatchHelper.JsonToBatch(response); return(batch); }
public Types.Batch proccessBatch(Types.Batch batch) { return(processBatch(batch.id)); }
/// <summary> /// Updates a batch based on batch id and the body /// </summary> /// <param name="body">A batch object that will be updated</param> /// <returns>The response</returns> public static bool update(Types.Batch batch) { return(Configuration.gateway().batch.update(batch)); }
/// <summary> /// Creates a batch based on the body or /// Genereates a quote based on batch_id or /// Starts processing the batch based on the batch_id /// or this does way too many things for a single method /// </summary> /// <param name="body">A batch object</param> /// <returns>The newly created batch object</returns> public static Types.Batch create(Types.Batch body) { return(Configuration.gateway().batch.create(body)); }