コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        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);
        }
コード例 #8
0
        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);
        }
コード例 #9
0
        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);
        }
コード例 #10
0
 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);
 }
コード例 #11
0
        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);
        }
コード例 #12
0
 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);
 }
コード例 #13
0
 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);
 }
コード例 #14
0
 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);
 }
コード例 #15
0
        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);
        }
コード例 #16
0
        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);
        }
コード例 #17
0
        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);
        }
コード例 #18
0
        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);
        }
コード例 #19
0
        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);
        }
コード例 #20
0
        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);
        }
コード例 #21
0
        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);
        }
コード例 #22
0
        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);
        }
コード例 #23
0
        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));
        }
コード例 #24
0
        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);
        }
コード例 #25
0
        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);
        }
コード例 #26
0
        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);
        }
コード例 #27
0
        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);
        }
コード例 #28
0
        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);
        }
コード例 #29
0
        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));
        }
コード例 #30
0
        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);
        }