public void Get(string orderId, Action <ApiResponse <DataModel.Order> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/orders/{0}", UriBuilderExtension.EnsureEscapedDataString("orderId", orderId))); this.client.DoGetRequest(uriBuilder.Uri, callback); }
public async Task <DataModel.Voucher> Enable(string code) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}/enable", UriBuilderExtension.EnsureEscapedDataString("code", code))); return(await this.client.DoPostRequest <DataModel.Voucher>(uriBuilder.Uri).ConfigureAwait(false)); }
public void UpdateConsents(string customerId, DataModel.Contexts.CustomerConsentUpdate udpate, Action <ApiResponse <Core.DataModel.Empty> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/customers/{0}/consents", UriBuilderExtension.EnsureEscapedDataString("customerId", customerId))); this.client.DoPutRequest(uriBuilder.Uri, udpate, callback); }
public void ImportVouchers(string name, List <DataModel.Contexts.CampaignVoucherImport> addVoucherContext, Action <ApiResponse <Core.DataModel.Empty> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/campaigns/{0}/import", UriBuilderExtension.EnsureEscapedDataString("name", name))); this.client.DoPostRequest(uriBuilder.Uri, addVoucherContext, callback); }
public async Task <DataModel.Balance> AddGiftBalance(string code, DataModel.Contexts.VoucherAddGiftBalance balance) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}/balance", UriBuilderExtension.EnsureEscapedDataString("code", code))); return(await this.client.DoPostRequest <DataModel.Balance, DataModel.Contexts.VoucherAddGiftBalance>(uriBuilder.Uri, balance).ConfigureAwait(false)); }
public void DeleteSession(string code, String sessionId, Action <ApiResponse> callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}/sessions/{1}", UriBuilderExtension.EnsureEscapedDataString("code", code), UriBuilderExtension.EnsureEscapedDataString("sessionId", sessionId))); this.client.DoDeleteRequest(uriBuilder.Uri, callback); }
public void Delete(string name, Core.DataModel.ForcedOperation query, Action <ApiResponse> callback) { UriBuilder uriBuilder = UriBuilderExtension.WithQuery(this.client.GetUriBuilder(string.Format("/campaigns/{0}", UriBuilderExtension.EnsureEscapedDataString("name", name))), query); this.client.DoDeleteRequest(uriBuilder.Uri, callback); }
public void DeleteSku(string productId, string skuId, Core.DataModel.ForcedOperation query, Action <ApiResponse> callback) { UriBuilder uriBuilder = UriBuilderExtension.WithQuery(this.client.GetUriBuilder(string.Format("/products/{0}/skus/{1}", UriBuilderExtension.EnsureEscapedDataString("productId", productId), UriBuilderExtension.EnsureEscapedDataString("skuId", skuId))), query); this.client.DoDeleteRequest(uriBuilder.Uri, callback); }
public void ListSkus(string productId, Action <ApiResponse <DataModel.ProductSkuList> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/products/{0}/skus", UriBuilderExtension.EnsureEscapedDataString("productId", productId))); this.client.DoGetRequest(uriBuilder.Uri, callback); }
public async Task Delete(string promotionTierId) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/tiers/{0}", UriBuilderExtension.EnsureEscapedDataString("promotionTierId", promotionTierId))); await this.client.DoDeleteRequest(uriBuilder.Uri).ConfigureAwait(false); }
public void UpdateSku(string productId, string skuId, DataModel.Contexts.SkuUpdate sku, Action <ApiResponse <DataModel.Sku> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/products/{0}/skus/{1}", UriBuilderExtension.EnsureEscapedDataString("productId", productId), UriBuilderExtension.EnsureEscapedDataString("skuId", skuId))); this.client.DoPutRequest(uriBuilder.Uri, sku, callback); }
public async Task<DataModel.PromotionTier> Update(string promotionTierId, DataModel.Contexts.PromotionTierUpdate promotionTier) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/tiers/{0}", UriBuilderExtension.EnsureEscapedDataString("promotionTierId", promotionTierId))); return await this.client.DoPutRequest<DataModel.PromotionTier, DataModel.Contexts.PromotionTierUpdate>(uriBuilder.Uri, promotionTier).ConfigureAwait(false); }
public async Task<DataModel.PromotionTier> AddTierToCampaign(string campaignId, DataModel.Contexts.PromotionTierCreate promotionTier) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/{0}/tiers", UriBuilderExtension.EnsureEscapedDataString("campaignId", campaignId))); return await this.client.DoPutRequest<DataModel.PromotionTier, DataModel.Contexts.PromotionTierCreate>(uriBuilder.Uri, promotionTier).ConfigureAwait(false); }
public async Task<DataModel.PromotionTierList> ListForCampaign(string campaign) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/{0}/tiers", UriBuilderExtension.EnsureEscapedDataString("campaign", campaign))); return await this.client.DoGetRequest<DataModel.PromotionTierList>(uriBuilder.Uri).ConfigureAwait(false); }
public void AddGiftBalance(string code, DataModel.Contexts.VoucherAddGiftBalance balance, Action <ApiResponse <DataModel.Balance> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}/balance", UriBuilderExtension.EnsureEscapedDataString("code", code))); this.client.DoPostRequest(uriBuilder.Uri, balance, callback); }
public void Update(string customerId, DataModel.Contexts.CustomerUpdate customer, Action <ApiResponse <DataModel.Customer> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/customers/{0}", UriBuilderExtension.EnsureEscapedDataString("customerId", customerId))); this.client.DoPutRequest(uriBuilder.Uri, customer, callback); }
public void Enable(string code, Action <ApiResponse <DataModel.Voucher> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}/enable", UriBuilderExtension.EnsureEscapedDataString("code", code))); this.client.DoPostRequest(uriBuilder.Uri, callback); }
public void Delete(string segmentId, Action <ApiResponse> callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/segments/{0}", UriBuilderExtension.EnsureEscapedDataString("segmentId", segmentId))); this.client.DoDeleteRequest(uriBuilder.Uri, callback); }
public void Update(string name, DataModel.Contexts.CampaignUpdate campaign, Action <ApiResponse <DataModel.Campaign> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/campaigns/{0}", UriBuilderExtension.EnsureEscapedDataString("name", name))); this.client.DoPutRequest(uriBuilder.Uri, campaign, callback); }
public void ListForCampaign(string campaign, Action <ApiResponse <DataModel.PromotionTierList> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/{0}/tiers", UriBuilderExtension.EnsureEscapedDataString("campaign", campaign))); this.client.DoGetRequest(uriBuilder.Uri, callback); }
public void AddVoucher(string name, DataModel.Contexts.CampaignAddVoucher addVoucherContext, Action <ApiResponse <DataModel.Voucher> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/campaigns/{0}/vouchers", UriBuilderExtension.EnsureEscapedDataString("name", name))); this.client.DoPostRequest(uriBuilder.Uri, addVoucherContext, callback); }
public void AddTierToCampaign(string campaignId, DataModel.Contexts.PromotionTierCreate promotionTier, Action <ApiResponse <DataModel.PromotionTier> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/{0}/tiers", UriBuilderExtension.EnsureEscapedDataString("campaignId", campaignId))); this.client.DoPutRequest(uriBuilder.Uri, promotionTier, callback); }
public async Task <DataModel.Voucher> Create(string code, DataModel.Contexts.VoucherCreate voucher) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}", UriBuilderExtension.EnsureEscapedDataString("code", code))); return(await this.client.DoPostRequest <DataModel.Voucher, DataModel.Contexts.VoucherCreate>(uriBuilder.Uri, voucher).ConfigureAwait(false)); }
public void Update(string promotionTierId, DataModel.Contexts.PromotionTierUpdate promotionTier, Action <ApiResponse <DataModel.PromotionTier> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/tiers/{0}", UriBuilderExtension.EnsureEscapedDataString("promotionTierId", promotionTierId))); this.client.DoPutRequest(uriBuilder.Uri, promotionTier, callback); }
public async Task Delete(string code, Core.DataModel.ForcedOperation query) { UriBuilder uriBuilder = UriBuilderExtension.WithQuery(this.client.GetUriBuilder(string.Format("/vouchers/{0}", UriBuilderExtension.EnsureEscapedDataString("code", code))), query); await this.client.DoDeleteRequest(uriBuilder.Uri).ConfigureAwait(false); }
public void Delete(string promotionTierId, Action <ApiResponse> callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/promotions/tiers/{0}", UriBuilderExtension.EnsureEscapedDataString("promotionTierId", promotionTierId))); this.client.DoDeleteRequest(uriBuilder.Uri, callback); }
public async Task DeleteSession(string code, string sessionId) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}/sessions/{1}", UriBuilderExtension.EnsureEscapedDataString("code", code), UriBuilderExtension.EnsureEscapedDataString("sessionId", sessionId))); await this.client.DoDeleteRequest(uriBuilder.Uri).ConfigureAwait(false); }
public void Update(string code, DataModel.Contexts.VoucherUpdate voucher, Action <ApiResponse <DataModel.Voucher> > callback) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/vouchers/{0}", UriBuilderExtension.EnsureEscapedDataString("code", code))); this.client.DoPutRequest(uriBuilder.Uri, voucher, callback); }
public async Task <DataModel.Customer> Update(string customerId, DataModel.Contexts.CustomerUpdate customer) { UriBuilder uriBuilder = this.client.GetUriBuilder(string.Format("/customers/{0}", UriBuilderExtension.EnsureEscapedDataString("customerId", customerId))); return(await this.client.DoPutRequest <DataModel.Customer, DataModel.Contexts.CustomerUpdate>(uriBuilder.Uri, customer).ConfigureAwait(false)); }
public void ListAssignments(string validationRuleId, DataModel.Queries.BusinessValidationRuleAssignmentFilter filter, Action <ApiResponse <DataModel.BusinessValidationRuleAssignmentList> > callback) { UriBuilder uriBuilder = UriBuilderExtension.WithQuery(this.client.GetUriBuilder(string.Format("/validation-rules/{0}/assignments", UriBuilderExtension.EnsureEscapedDataString("validationRuleId", validationRuleId))), filter); this.client.DoGetRequest(uriBuilder.Uri, callback); }