Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/NEW_TASK.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/OrderCloud.SDK/Generated/ErrorCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ public static class Promotion
public const string ExpirationPrecedsStart = "Promotion.ExpirationPrecedsStart";
/// <summary>Promotion is expired.</summary>
public const string Expired = "Promotion.Expired";
/// <summary>Promotion cannot be used on this order.</summary>
/// <summary>Order does not meet eligibility requirements for this promotion.</summary>
public const string NotEligible = "Promotion.NotEligible";
/// <summary>Promotion is not yet valid.</summary>
public const string NotYetValid = "Promotion.NotYetValid";
Expand Down
41 changes: 38 additions & 3 deletions src/OrderCloud.SDK/Generated/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ public class AccessTokenBasic : OrderCloudModel
/// <summary>Access token of the access token basic.</summary>
public string access_token { get => GetProp<string>("access_token"); set => SetProp<string>("access_token", value); }
}
public class AddedPromo : OrderCloudModel
{
/// <summary>ID of the added promo. Can only contain characters Aa-Zz, 0-9, -, and _.</summary>
public string ID { get => GetProp<string>("ID"); set => SetProp<string>("ID", value); }
/// <summary>ID of the line item. Can only contain characters Aa-Zz, 0-9, -, and _.</summary>
public string LineItemID { get => GetProp<string>("LineItemID"); set => SetProp<string>("LineItemID", value); }
/// <summary>Amount of the added promo.</summary>
public decimal Amount { get => GetProp<decimal>("Amount"); set => SetProp<decimal>("Amount", value); }
}
public class Address : OrderCloudModel
{
/// <summary>ID of the address. Can only contain characters Aa-Zz, 0-9, -, and _. Searchable: priority level 1. Sortable: priority level 2.</summary>
Expand Down Expand Up @@ -1027,13 +1036,16 @@ public class ExtendedOrder : OrderCloudModel
public decimal TaxCost { get => GetProp<decimal>("TaxCost"); set => SetProp<decimal>("TaxCost", value); }
/// <summary>Gratuity of the extended order. Must be at least 0. Sortable.</summary>
public decimal Gratuity { get => GetProp<decimal>("Gratuity", 0); set => SetProp<decimal>("Gratuity", value); }
/// <summary>Fees associated with order or line items</summary>
[ApiReadOnly]
public decimal Fees { get => GetProp<decimal>("Fees", 0); set => SetProp<decimal>("Fees", value); }
/// <summary>Sum of all Promotion.Amounts applied to the order.</summary>
[ApiReadOnly]
public decimal PromotionDiscount { get => GetProp<decimal>("PromotionDiscount"); set => SetProp<decimal>("PromotionDiscount", value); }
/// <summary>Inherited from the user placing the order.</summary>
[ApiReadOnly]
public string Currency { get => GetProp<string>("Currency"); set => SetProp<string>("Currency", value); }
/// <summary>Subtotal + TaxCost + ShippingCost + Gratuity - PromotionDiscount</summary>
/// <summary>Subtotal + TaxCost + ShippingCost + Gratuity + Fees - PromotionDiscount</summary>
[ApiReadOnly]
public decimal Total { get => GetProp<decimal>("Total"); set => SetProp<decimal>("Total", value); }
/// <summary>True if this Order has been passed from the Buyer to the Marketplace Owner.</summary>
Expand Down Expand Up @@ -1771,13 +1783,16 @@ public class Order : OrderCloudModel
public decimal TaxCost { get => GetProp<decimal>("TaxCost"); set => SetProp<decimal>("TaxCost", value); }
/// <summary>Gratuity of the order. Must be at least 0. Sortable.</summary>
public decimal Gratuity { get => GetProp<decimal>("Gratuity", 0); set => SetProp<decimal>("Gratuity", value); }
/// <summary>Fees associated with order or line items</summary>
[ApiReadOnly]
public decimal Fees { get => GetProp<decimal>("Fees", 0); set => SetProp<decimal>("Fees", value); }
/// <summary>Sum of all Promotion.Amounts applied to the order.</summary>
[ApiReadOnly]
public decimal PromotionDiscount { get => GetProp<decimal>("PromotionDiscount"); set => SetProp<decimal>("PromotionDiscount", value); }
/// <summary>Inherited from the user placing the order.</summary>
[ApiReadOnly]
public string Currency { get => GetProp<string>("Currency"); set => SetProp<string>("Currency", value); }
/// <summary>Subtotal + TaxCost + ShippingCost + Gratuity - PromotionDiscount</summary>
/// <summary>Subtotal + TaxCost + ShippingCost + Gratuity + Fees - PromotionDiscount</summary>
[ApiReadOnly]
public decimal Total { get => GetProp<decimal>("Total"); set => SetProp<decimal>("Total", value); }
/// <summary>True if this Order has been passed from the Buyer to the Marketplace Owner.</summary>
Expand Down Expand Up @@ -1872,6 +1887,8 @@ public class OrderCalculateResponse : OrderCloudModel
public decimal? ShippingTotal { get => GetProp<decimal?>("ShippingTotal"); set => SetProp<decimal?>("ShippingTotal", value); }
/// <summary>Tax total of the order calculate response.</summary>
public decimal? TaxTotal { get => GetProp<decimal?>("TaxTotal"); set => SetProp<decimal?>("TaxTotal", value); }
/// <summary>Fee total of the order calculate response.</summary>
public decimal? FeeTotal { get => GetProp<decimal?>("FeeTotal"); set => SetProp<decimal?>("FeeTotal", value); }
/// <summary>Http status code of the order calculate response.</summary>
public int? HttpStatusCode { get => GetProp<int?>("HttpStatusCode"); set => SetProp<int?>("HttpStatusCode", value); }
/// <summary>Unhandled error body of the order calculate response.</summary>
Expand Down Expand Up @@ -1997,7 +2014,7 @@ public class OrderReturn : OrderCloudModel
/// <summary>Last updated of the order return. Sortable.</summary>
[ApiReadOnly]
public DateTimeOffset LastUpdated { get => GetProp<DateTimeOffset>("LastUpdated"); set => SetProp<DateTimeOffset>("LastUpdated", value); }
/// <summary>Refund amount of the order return.</summary>
/// <summary>Sum of all RefundAmounts for Items. This value can be overridden by a user with the OrderAdmin role. To remove the override set the value to null.</summary>
public decimal? RefundAmount { get => GetProp<decimal?>("RefundAmount"); set => SetProp<decimal?>("RefundAmount", value); }
/// <summary>Comments of the order return. Max length 2000 characters.</summary>
public string Comments { get => GetProp<string>("Comments"); set => SetProp<string>("Comments", value); }
Expand Down Expand Up @@ -2799,6 +2816,24 @@ public class PromotionOverride : OrderCloudModel
/// <summary>Overrides the promotion's calculated discount to this amount.</summary>
public decimal Amount { get => GetProp<decimal>("Amount"); set => SetProp<decimal>("Amount", value); }
}
public class RefreshPromosResponse : OrderCloudModel
{
/// <summary>Promotions that were auto-applied.</summary>
public IList<AddedPromo> PromosAdded { get => GetProp<IList<AddedPromo>>("PromosAdded", new List<AddedPromo>()); set => SetProp<IList<AddedPromo>>("PromosAdded", value); }
/// <summary>Promotions that were removed due to ineligibility or other reason.</summary>
public IList<RemovedPromo> PromosRemoved { get => GetProp<IList<RemovedPromo>>("PromosRemoved", new List<RemovedPromo>()); set => SetProp<IList<RemovedPromo>>("PromosRemoved", value); }
}
public class RemovedPromo : OrderCloudModel
{
/// <summary>Error code of the removed promo.</summary>
public string ErrorCode { get => GetProp<string>("ErrorCode"); set => SetProp<string>("ErrorCode", value); }
/// <summary>ID of the removed promo. Can only contain characters Aa-Zz, 0-9, -, and _.</summary>
public string ID { get => GetProp<string>("ID"); set => SetProp<string>("ID", value); }
/// <summary>ID of the line item. Can only contain characters Aa-Zz, 0-9, -, and _.</summary>
public string LineItemID { get => GetProp<string>("LineItemID"); set => SetProp<string>("LineItemID", value); }
/// <summary>Reason of the removed promo.</summary>
public string Reason { get => GetProp<string>("Reason"); set => SetProp<string>("Reason", value); }
}
public class SearchIngestion : OrderCloudModel
{
/// <summary>Domain of the search ingestion. Required.</summary>
Expand Down
18 changes: 14 additions & 4 deletions src/OrderCloud.SDK/Generated/Resources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,15 @@ public interface ICartResource
/// <param name="promoCode">Promo code of the cart.</param>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task DeletePromotionAsync(string promoCode, string accessToken = null);
/// <summary>AutoApply eligible promotions. Apply up to 100 eligible promotions to the cart.</summary>
/// <summary>Auto-apply promotions to the cart. Apply up to 100 eligible promotions where AutoApply=true.</summary>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<Order> ApplyPromotionsAsync(string accessToken = null);
/// <summary>AutoApply eligible promotions. Apply up to 100 eligible promotions to the cart.</summary>
/// <summary>Auto-apply promotions to the cart. Apply up to 100 eligible promotions where AutoApply=true.</summary>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<TOrder> ApplyPromotionsAsync<TOrder>(string accessToken = null) where TOrder : Order;
/// <summary>Refresh promotions on the cart. Re-calculates promotion discounts, removes promotions that are no longer valid, and adds eligible promotions where AutoApply=true (up to limit of 100)</summary>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<RefreshPromosResponse> RefreshPromotionsAsync(string accessToken = null);
/// <summary>Update cart FromUser. Only FirstName, LastName, and Email can be updated. Primarily used to facilitate guest checkout scenarios.</summary>
/// <param name="partialUser">The object that will be partially serialized to JSON and sent in the request body.</param>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Expand Down Expand Up @@ -4505,16 +4508,21 @@ public interface IOrdersResource
/// <param name="promoCode">Promo code of the order.</param>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<TOrder> RemovePromotionAsync<TOrder>(OrderDirection direction, string orderID, string promoCode, string accessToken = null) where TOrder : Order;
/// <summary>AutoApply eligible promotions. Apply up to 100 eligible promotions to an order.</summary>
/// <summary>Auto-apply promotions to an order. Apply up to 100 eligible promotions where AutoApply=true.</summary>
/// <param name="direction">Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.</param>
/// <param name="orderID">ID of the order.</param>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<Order> ApplyPromotionsAsync(OrderDirection direction, string orderID, string accessToken = null);
/// <summary>AutoApply eligible promotions. Apply up to 100 eligible promotions to an order.</summary>
/// <summary>Auto-apply promotions to an order. Apply up to 100 eligible promotions where AutoApply=true.</summary>
/// <param name="direction">Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.</param>
/// <param name="orderID">ID of the order.</param>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<TOrder> ApplyPromotionsAsync<TOrder>(OrderDirection direction, string orderID, string accessToken = null) where TOrder : Order;
/// <summary>Refresh promotions on an order. Re-calculates promotion discounts, removes promotions that are no longer valid, and adds eligible promotions where AutoApply=true (up to limit of 100)</summary>
/// <param name="direction">Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.</param>
/// <param name="orderID">ID of the order.</param>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<RefreshPromosResponse> RefreshPromotionsAsync(OrderDirection direction, string orderID, string accessToken = null);
/// <summary>Validate an order in its current state.</summary>
/// <param name="direction">Direction of the order, from the current user's perspective. Possible values: incoming, outgoing, all.</param>
/// <param name="orderID">ID of the order.</param>
Expand Down Expand Up @@ -7081,6 +7089,7 @@ internal CartResource(OrderCloudClient client) : base(client) { }
public Task DeletePromotionAsync(string promoCode, string accessToken = null) => Request("v1", "cart", "promotions", promoCode).WithOAuthBearerToken(accessToken).DeleteAsync();
public Task<Order> ApplyPromotionsAsync(string accessToken = null) => ApplyPromotionsAsync<Order>(accessToken);
public Task<TOrder> ApplyPromotionsAsync<TOrder>(string accessToken = null) where TOrder : Order => Request("v1", "cart", "applypromotions").WithOAuthBearerToken(accessToken).PostAsync(null).ReceiveJson<TOrder>();
public Task<RefreshPromosResponse> RefreshPromotionsAsync(string accessToken = null) => Request("v1", "cart", "refreshpromotions").WithOAuthBearerToken(accessToken).PostAsync(null).ReceiveJson<RefreshPromosResponse>();
public Task<Order> PatchFromUserAsync(PartialUser partialUser, string accessToken = null) => PatchFromUserAsync<Order>(partialUser, accessToken);
public Task<TOrder> PatchFromUserAsync<TOrder>(PartialUser partialUser, string accessToken = null) where TOrder : Order => Request("v1", "cart", "fromuser").WithOAuthBearerToken(accessToken).PatchJsonAsync(ValidateModel(partialUser)).ReceiveJson<TOrder>();
public Task<ListPage<Payment>> ListPaymentsAsync(string search = null, string searchOn = null, string sortBy = null, int page = 1, int pageSize = 20, object filters = null, string accessToken = null) => ListPaymentsAsync<Payment>(search, searchOn, sortBy, page, pageSize, filters, accessToken);
Expand Down Expand Up @@ -7763,6 +7772,7 @@ internal OrdersResource(OrderCloudClient client) : base(client) { }
public Task<TOrder> RemovePromotionAsync<TOrder>(OrderDirection direction, string orderID, string promoCode, string accessToken = null) where TOrder : Order => Request("v1", "orders", direction, orderID, "promotions", promoCode).WithOAuthBearerToken(accessToken).DeleteAsync().ReceiveJson<TOrder>();
public Task<Order> ApplyPromotionsAsync(OrderDirection direction, string orderID, string accessToken = null) => ApplyPromotionsAsync<Order>(direction, orderID, accessToken);
public Task<TOrder> ApplyPromotionsAsync<TOrder>(OrderDirection direction, string orderID, string accessToken = null) where TOrder : Order => Request("v1", "orders", direction, orderID, "applypromotions").WithOAuthBearerToken(accessToken).PostAsync(null).ReceiveJson<TOrder>();
public Task<RefreshPromosResponse> RefreshPromotionsAsync(OrderDirection direction, string orderID, string accessToken = null) => Request("v1", "orders", direction, orderID, "refreshpromotions").WithOAuthBearerToken(accessToken).PostAsync(null).ReceiveJson<RefreshPromosResponse>();
public Task ValidateAsync(OrderDirection direction, string orderID, string accessToken = null) => Request("v1", "orders", direction, orderID, "validate").WithOAuthBearerToken(accessToken).PostAsync(null);
}

Expand Down
Loading