Skip to content

Commit

Permalink
updates for latest api version
Browse files Browse the repository at this point in the history
  • Loading branch information
djsteinmetz committed Sep 5, 2024
1 parent 5345805 commit 72c143a
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/OrderCloud.SDK/Generated/ErrorCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public static class Category
public const string InvalidDepth = "Category.InvalidDepth";
/// <summary>Buyer not specified.</summary>
public const string NoBuyer = "Category.NoBuyer";
/// <summary>Cannot assign a child product to a category in a catalog different from parent one.</summary>
public const string CannotAssignChildProduct = "Category.CannotAssignChildProduct";
}
public static class CreditCard
{
Expand Down Expand Up @@ -606,7 +608,11 @@ public static class Promotion
public const string NotActive = "Promotion.NotActive";
/// <summary>LineItemLevel must be true in order to use ItemLimitPerOrder.</summary>
public const string CannotSetItemLimitPerOrder = "Promotion.CannotSetItemLimitPerOrder";
/// <summary>LineItemLevel must be true and ItemLimitPerOrder must have a value in order to use ItemSortBy.</summary>
/// <summary>LineItemLevel must be true in order to use QuantityLimitPerOrder.</summary>
public const string CannotSetQuantityLimitPerOrder = "Promotion.CannotSetQuantityLimitPerOrder";
/// <summary>QuantityLimitPerOrder is not supported in conjuction with ItemLimitPerOrder.</summary>
public const string CannotSetQuantityAndItemLimitPerOrder = "Promotion.CannotSetQuantityAndItemLimitPerOrder";
/// <summary>LineItemLevel must be true and ItemLimitPerOrder or QuantityLimitPerOrder must have a value in order to use ItemSortBy.</summary>
public const string CannotSetItemSortBy = "Promotion.CannotSetItemSortBy";
}
public static class Registration
Expand Down
8 changes: 6 additions & 2 deletions src/OrderCloud.SDK/Generated/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,9 @@ public class OrderPromotion : OrderCloudModel
/// <summary>The number of times this promotion has been applied to an order.</summary>
[ApiReadOnly]
public int RedemptionCount { get => GetProp<int>("RedemptionCount"); set => SetProp<int>("RedemptionCount", value); }
/// <summary>Can only be used when LineItemLevel is true. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.</summary>
/// <summary>Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.</summary>
public int? QuantityLimitPerOrder { get => GetProp<int?>("QuantityLimitPerOrder"); set => SetProp<int?>("QuantityLimitPerOrder", value); }
/// <summary>Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.</summary>
public int? ItemLimitPerOrder { get => GetProp<int?>("ItemLimitPerOrder"); set => SetProp<int?>("ItemLimitPerOrder", value); }
/// <summary>Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.</summary>
public string ItemSortBy { get => GetProp<string>("ItemSortBy"); set => SetProp<string>("ItemSortBy", value); }
Expand Down Expand Up @@ -2403,7 +2405,9 @@ public class Promotion : OrderCloudModel
/// <summary>The number of times this promotion has been applied to an order.</summary>
[ApiReadOnly]
public int RedemptionCount { get => GetProp<int>("RedemptionCount"); set => SetProp<int>("RedemptionCount", value); }
/// <summary>Can only be used when LineItemLevel is true. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.</summary>
/// <summary>Can only be used when LineItemLevel is true and ItemLimitPerOrder does not have a value. When defined the ValueExpression will be the discount applied to each qualifying quantity of eligible items. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.</summary>
public int? QuantityLimitPerOrder { get => GetProp<int?>("QuantityLimitPerOrder"); set => SetProp<int?>("QuantityLimitPerOrder", value); }
/// <summary>Can only be used when LineItemLevel is true and QuantityLimitPerOrder does not have a value. Limits the number of items the promotion will apply to when eligible. When no ItemSortBy is defined, items will be sorted by DateAdded ascending.</summary>
public int? ItemLimitPerOrder { get => GetProp<int?>("ItemLimitPerOrder"); set => SetProp<int?>("ItemLimitPerOrder", value); }
/// <summary>Comma delimited list of properties to sort by. Can only be used when ItemLimitPerOrder is true. Used to determine the order in which the promotion is applied to the specified limit of items. Use ! to reverse sort order on a property.</summary>
public string ItemSortBy { get => GetProp<string>("ItemSortBy"); set => SetProp<string>("ItemSortBy", value); }
Expand Down
13 changes: 13 additions & 0 deletions src/OrderCloud.SDK/Generated/Resources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,16 @@ public interface IEntitySyncsResource
/// <param name="entitySyncConfig">The object that will be 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>
Task<EntitySyncConfig> SaveAdminUsersEntitySyncConfigAsync(EntitySyncConfig entitySyncConfig, string accessToken = null);
/// <summary>Get the entity sync delivery configuration for InventoryRecords Get the entity sync delivery configuration for InventoryRecords</summary>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task<EntitySyncConfig> GetInventoryRecordEntitySyncConfigAsync(string accessToken = null);
/// <summary>Delete the entity sync delivery configuration for InventoryRecords Delete the entity sync delivery configuration for InventoryRecords</summary>
/// <param name="accessToken">Optional. Use to provide an existing token instead of authenticating implicitly.</param>
Task DeleteInventoryRecordEntitySyncConfigAsync(string accessToken = null);
/// <summary>Create or update the entity sync delivery configuration for InventoryRecords Create or update the entity sync delivery configuration for InventoryRecords</summary>
/// <param name="entitySyncConfig">The object that will be 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>
Task<EntitySyncConfig> SaveInventoryRecordEntitySyncConfigAsync(EntitySyncConfig entitySyncConfig, string accessToken = null);
}

public interface IErrorConfigsResource
Expand Down Expand Up @@ -6967,6 +6977,9 @@ internal EntitySyncsResource(OrderCloudClient client) : base(client) { }
public Task<EntitySyncConfig> GetAdminUsersEntitySyncConfigAsync(string accessToken = null) => Request("v1", "integrations", "entitysync", "adminusers").WithOAuthBearerToken(accessToken).GetJsonAsync<EntitySyncConfig>();
public Task DeleteAdminUsersEntitySyncConfigAsync(string accessToken = null) => Request("v1", "integrations", "entitysync", "adminusers").WithOAuthBearerToken(accessToken).DeleteAsync();
public Task<EntitySyncConfig> SaveAdminUsersEntitySyncConfigAsync(EntitySyncConfig entitySyncConfig, string accessToken = null) => Request("v1", "integrations", "entitysync", "adminusers").WithOAuthBearerToken(accessToken).PutJsonAsync(ValidateModel(entitySyncConfig)).ReceiveJson<EntitySyncConfig>();
public Task<EntitySyncConfig> GetInventoryRecordEntitySyncConfigAsync(string accessToken = null) => Request("v1", "integrations", "entitysync", "products", "inventoryrecords").WithOAuthBearerToken(accessToken).GetJsonAsync<EntitySyncConfig>();
public Task DeleteInventoryRecordEntitySyncConfigAsync(string accessToken = null) => Request("v1", "integrations", "entitysync", "products", "inventoryrecords").WithOAuthBearerToken(accessToken).DeleteAsync();
public Task<EntitySyncConfig> SaveInventoryRecordEntitySyncConfigAsync(EntitySyncConfig entitySyncConfig, string accessToken = null) => Request("v1", "integrations", "entitysync", "products", "inventoryrecords").WithOAuthBearerToken(accessToken).PutJsonAsync(ValidateModel(entitySyncConfig)).ReceiveJson<EntitySyncConfig>();
}

public class ErrorConfigsResource : OrderCloudResource, IErrorConfigsResource
Expand Down
18 changes: 18 additions & 0 deletions src/OrderCloud.SDK/Generated/WebhookPayloads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,24 @@ public class SaveAdminUsersEntitySyncConfig : WebhookPayload<EntitySyncConfig, E
public class SaveAdminUsersEntitySyncConfig<TConfigData, TEntitySyncConfig> : WebhookPayload<TEntitySyncConfig, TEntitySyncConfig, object, TConfigData>
where TEntitySyncConfig : EntitySyncConfig
{ }
/// <summary>Webhook payload sent by OrderCloud on DELETE v1/integrations/entitysync/products/inventoryrecords.</summary>
[SentOn("DELETE", "v1/integrations/entitysync/products/inventoryrecords")]
public class DeleteInventoryRecordEntitySyncConfig : WebhookPayload<object, object, object, dynamic> { }
/// <summary>Webhook payload sent by OrderCloud on DELETE v1/integrations/entitysync/products/inventoryrecords.</summary>
/// <typeparam name="TConfigData">Specific type of the ConfigData. If not using a custom type, use the non-generic payload type instead.</typeparam>
[SentOn("DELETE", "v1/integrations/entitysync/products/inventoryrecords")]
public class DeleteInventoryRecordEntitySyncConfig<TConfigData> : WebhookPayload<object, object, object, TConfigData>
{ }
/// <summary>Webhook payload sent by OrderCloud on PUT v1/integrations/entitysync/products/inventoryrecords.</summary>
[SentOn("PUT", "v1/integrations/entitysync/products/inventoryrecords")]
public class SaveInventoryRecordEntitySyncConfig : WebhookPayload<EntitySyncConfig, EntitySyncConfig, object, dynamic> { }
/// <summary>Webhook payload sent by OrderCloud on PUT v1/integrations/entitysync/products/inventoryrecords.</summary>
/// <typeparam name="TConfigData">Specific type of the ConfigData. If not using a custom type, specify dynamic.</typeparam>
/// <typeparam name="TEntitySyncConfig">Specific type of the EntitySyncConfig. If not using a custom type, specify EntitySyncConfig.</typeparam>
[SentOn("PUT", "v1/integrations/entitysync/products/inventoryrecords")]
public class SaveInventoryRecordEntitySyncConfig<TConfigData, TEntitySyncConfig> : WebhookPayload<TEntitySyncConfig, TEntitySyncConfig, object, TConfigData>
where TEntitySyncConfig : EntitySyncConfig
{ }
}
public static class ErrorConfigs
{
Expand Down
2 changes: 1 addition & 1 deletion src/OrderCloud.SDK/OrderCloud.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- https://docs.microsoft.com/en-us/dotnet/core/tools/csproj -->
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>0.14.1</Version>
<Version>0.14.2</Version>
<PackageId>OrderCloud.SDK</PackageId>
<Title>OrderCloud SDK</Title>
<Authors>Todd Menier</Authors>
Expand Down

0 comments on commit 72c143a

Please sign in to comment.