-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v6.4. Replaced ApplicableProductList and ApplicableProduct. Added lis…
…ting Promotion Tiers (#36) Refactored filters
- Loading branch information
1 parent
cca889a
commit b09b1d3
Showing
31 changed files
with
127 additions
and
91 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#if VOUCHERIFYCLIENT && APIASYNC | ||
using System; | ||
using System.Threading.Tasks; | ||
using Voucherify.Core.Communication; | ||
using Voucherify.Core.Extensions; | ||
|
||
namespace Voucherify.Client.ApiEndpoints | ||
{ | ||
public class Promotions : EndpointBase | ||
{ | ||
public Promotions(Api api) : base(api) | ||
{ | ||
} | ||
|
||
public async Task<DataModel.PromotionTierList> List(DataModel.Queries.PromotionTiersFilter filter) | ||
{ | ||
UriBuilder uriBuilder = UriBuilderExtension.WithQuery(this.client.GetUriBuilder("/promotions/tiers"), filter); | ||
return await this.client.DoGetRequest<DataModel.PromotionTierList>(uriBuilder.Uri).ConfigureAwait(false); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#if VOUCHERIFYCLIENT && !APIASYNC | ||
using System; | ||
using Voucherify.Core.Communication; | ||
using Voucherify.Core.Extensions; | ||
|
||
namespace Voucherify.Client.ApiEndpoints | ||
{ | ||
public class Promotions : EndpointBase | ||
{ | ||
public Promotions(Api api) : base(api) | ||
{ | ||
} | ||
|
||
public void List(DataModel.Queries.PromotionTiersFilter filter, Action<ApiResponse<DataModel.PromotionTierList>> callback) | ||
{ | ||
UriBuilder uriBuilder = UriBuilderExtension.WithQuery(this.client.GetUriBuilder("/promotions/tiers"), filter); | ||
this.client.DoGetRequest<DataModel.PromotionTierList>(uriBuilder.Uri, callback); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace Voucherify.Core.DataModel | ||
{ | ||
[JsonObject] | ||
public class PageFilter | ||
{ | ||
[JsonProperty(PropertyName = "limit")] | ||
public int? Limit { get; set; } | ||
|
||
[JsonProperty(PropertyName = "page")] | ||
public int? Page { get; set; } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#if VOUCHERIFYSERVER || VOUCHERIFYCLIENT | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Voucherify.DataModel.Queries | ||
{ | ||
[JsonObject] | ||
public class PromotionTiersFilter : Core.DataModel.PageFilter | ||
{ | ||
[JsonProperty(PropertyName = "is_available")] | ||
public bool? IsAvailable { get; set; } | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters