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
2 changes: 1 addition & 1 deletion src/OrderCloud.SDK.Tests/SdkTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ private class CustomConfigData
public int Bar { get; set; }
}

class CustomUser : User<CustomXP> { }
class CustomUser : OrderUser<CustomXP> { }
class CustomAddress : Address<CustomXP> { }
class CustomLineItem : LineItem<CustomXP, LineItemProduct, LineItemVariant, CustomAddress, CustomAddress> { }
class CustomOrder : Order<CustomXP, CustomUser, CustomAddress> { }
Expand Down
58 changes: 24 additions & 34 deletions src/OrderCloud.SDK/Generated/ErrorCodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,27 +183,6 @@ public static class ErrorConfig
/// <summary>The error or validation message cannot be sent because the associated delivery configuration is disabled.</summary>
public const string DeliveryConfigDisabled = "ErrorConfig.DeliveryConfigDisabled";
}
public static class Synchronize
{
/// <summary>EntitySync for AdminUsers is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForAdminUsersNotEnabled = "Synchronize.EntitySyncForAdminUsersNotEnabled";
/// <summary>EntitySync for Categories is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForCategoryNotEnabled = "Synchronize.EntitySyncForCategoryNotEnabled";
/// <summary>EntitySync for Buyer is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForBuyerNotEnabled = "Synchronize.EntitySyncForBuyerNotEnabled";
/// <summary>EntitySync for BuyerUserGroup is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForBuyerUserGroupNotEnabled = "Synchronize.EntitySyncForBuyerUserGroupNotEnabled";
/// <summary>EntitySync for BuyerUsers is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForBuyerUsersNotEnabled = "Synchronize.EntitySyncForBuyerUsersNotEnabled";
/// <summary>EntitySync for InventoryRecords is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForInventoryRecordNotEnabled = "Synchronize.EntitySyncForInventoryRecordNotEnabled";
/// <summary>EntitySync for Supplier is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForSupplierNotEnabled = "Synchronize.EntitySyncForSupplierNotEnabled";
/// <summary>EntitySync for SupplierUsers is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForSupplierUsersNotEnabled = "Synchronize.EntitySyncForSupplierUsersNotEnabled ";
/// <summary>ProductSync is not configured or the delivery configuration is disabled.</summary>
public const string ProductSyncNotEnabled = "Synchronize.ProductSyncNotEnabled";
}
public static class Expression
{
/// <summary>Function has invalid number of arguments.</summary>
Expand Down Expand Up @@ -377,10 +356,6 @@ public static class OneTimePasswordRequest
{
/// <summary>Username or email is required.</summary>
public const string UsernameOrEmailRequired = "OneTimePasswordRequest.UsernameOrEmailRequired";
/// <summary>No one-time password was sent because accounts associated with this username or email are locked, inactive, or do not have an associated email.</summary>
public const string OTPNotSent = "OneTimePasswordRequest.OTPNotSent";
/// <summary>No users with the supplied username or email could be found for the specified API client.</summary>
public const string UserNotFoundForClient = "OneTimePasswordRequest.UserNotFoundForClient";
}
public static class Order
{
Expand Down Expand Up @@ -696,20 +671,14 @@ public static class Promotion
}
public static class PromotionIntegration
{
/// <summary>Failed to evaluate integration promotion.</summary>
/// <summary>A failed or invalid response was returned from the promotion integration.</summary>
public const string FailedToEvaluate = "PromotionIntegration.FailedToEvaluate";
/// <summary>Promotion integration returned the error.</summary>
public const string EvaluationErrorReturned = "PromotionIntegration.EvaluationErrorReturned";
/// <summary>Cannot delete a promotion integration if promotions exist where ValueExpression = null.</summary>
public const string CannotDeletePromotionIntegration = "PromotionIntegration.CannotDeletePromotionIntegration";
/// <summary>PromotionID in the response does not match any PromosRequested ID in the Promotion Integration payload.</summary>
public const string PromotionIDMismatch = "PromotionIntegration.PromotionIDMismatch";
/// <summary>LineItemId is required for LineItemLevel promotion.</summary>
/// <summary>LineItemID is required on the accepted promotion because it is an item-level promotion.</summary>
public const string LineItemIdRequired = "PromotionIntegration.LineItemIdRequired";
/// <summary>LineItemId must be null for not LineItemLevel promotion.</summary>
/// <summary>LineItemID is not allowed on the accepted promotion because it is an order-level promotion.</summary>
public const string LineItemIdMustBeNull = "PromotionIntegration.LineItemIdMustBeNull";
/// <summary>Promotion cannot be used on this order.</summary>
public const string NotEligible = "PromotionIntegration.NotEligible";
}
public static class Registration
{
Expand Down Expand Up @@ -793,6 +762,27 @@ public static class SubscriptionIntegration
/// <summary>You have exceeded the maximum number of subscription integration runs per hour.</summary>
public const string ExceedsSelfServiceLimit = "SubscriptionIntegration.ExceedsSelfServiceLimit";
}
public static class Synchronize
{
/// <summary>EntitySync for AdminUsers is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForAdminUsersNotEnabled = "Synchronize.EntitySyncForAdminUsersNotEnabled";
/// <summary>EntitySync for Categories is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForCategoryNotEnabled = "Synchronize.EntitySyncForCategoryNotEnabled";
/// <summary>EntitySync for Buyer is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForBuyerNotEnabled = "Synchronize.EntitySyncForBuyerNotEnabled";
/// <summary>EntitySync for BuyerUserGroup is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForBuyerUserGroupNotEnabled = "Synchronize.EntitySyncForBuyerUserGroupNotEnabled";
/// <summary>EntitySync for BuyerUsers is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForBuyerUsersNotEnabled = "Synchronize.EntitySyncForBuyerUsersNotEnabled";
/// <summary>EntitySync for InventoryRecords is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForInventoryRecordNotEnabled = "Synchronize.EntitySyncForInventoryRecordNotEnabled";
/// <summary>EntitySync for Supplier is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForSupplierNotEnabled = "Synchronize.EntitySyncForSupplierNotEnabled";
/// <summary>EntitySync for SupplierUsers is not configured or the delivery configuration is disabled.</summary>
public const string EntitySyncForSupplierUsersNotEnabled = "Synchronize.EntitySyncForSupplierUsersNotEnabled";
/// <summary>ProductSync is not configured or the delivery configuration is disabled.</summary>
public const string ProductSyncNotEnabled = "Synchronize.ProductSyncNotEnabled";
}
public static class TrackingEvent
{
/// <summary>Only one TrackingEvent of a given type is permitted for the same ApiClient.</summary>
Expand Down
76 changes: 68 additions & 8 deletions src/OrderCloud.SDK/Generated/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ public class ExtendedOrder : OrderCloudModel
public string ID { get => GetProp<string>("ID"); set => SetProp<string>("ID", value); }
/// <summary>User placing the order.</summary>
[ApiReadOnly]
public User FromUser { get => GetProp<User>("FromUser"); set => SetProp<User>("FromUser", value); }
public OrderUser FromUser { get => GetProp<OrderUser>("FromUser"); set => SetProp<OrderUser>("FromUser", value); }
/// <summary>ID of the Buyer placing the order, or the marketplace owner when an order is being forwarded. Mainly useful to the marketplace owner or supplier receiving it.</summary>
public string FromCompanyID { get => GetProp<string>("FromCompanyID"); set => SetProp<string>("FromCompanyID", value); }
/// <summary>ID of the marketplace owner or supplier receiving the order, only writable on create. Mainly useful to the user placing it.</summary>
Expand Down Expand Up @@ -1114,11 +1114,11 @@ public class ExtendedOrder : OrderCloudModel
}
/// <typeparam name="Txp">Specific type of the xp property. If not using a custom type, specify dynamic.</typeparam>
/// <typeparam name="TLineItems">Specific type of the LineItems property. If not using a custom type, specify LineItem.</typeparam>
/// <typeparam name="TFromUser">Specific type of the FromUser property. If not using a custom type, specify User.</typeparam>
/// <typeparam name="TFromUser">Specific type of the FromUser property. If not using a custom type, specify OrderUser.</typeparam>
/// <typeparam name="TBillingAddress">Specific type of the BillingAddress property. If not using a custom type, specify Address.</typeparam>
public class ExtendedOrder<Txp, TLineItems, TFromUser, TBillingAddress> : ExtendedOrder
where TLineItems : LineItem
where TFromUser : User
where TFromUser : OrderUser
where TBillingAddress : Address
{
/// <summary>Container for extended (custom) properties of the extended order.</summary>
Expand Down Expand Up @@ -1786,7 +1786,7 @@ public class Order : OrderCloudModel
public string ID { get => GetProp<string>("ID"); set => SetProp<string>("ID", value); }
/// <summary>User placing the order.</summary>
[ApiReadOnly]
public User FromUser { get => GetProp<User>("FromUser"); set => SetProp<User>("FromUser", value); }
public OrderUser FromUser { get => GetProp<OrderUser>("FromUser"); set => SetProp<OrderUser>("FromUser", value); }
/// <summary>ID of the Buyer placing the order, or the marketplace owner when an order is being forwarded. Mainly useful to the marketplace owner or supplier receiving it.</summary>
public string FromCompanyID { get => GetProp<string>("FromCompanyID"); set => SetProp<string>("FromCompanyID", value); }
/// <summary>ID of the marketplace owner or supplier receiving the order, only writable on create. Mainly useful to the user placing it.</summary>
Expand Down Expand Up @@ -1860,10 +1860,10 @@ public class Order : OrderCloudModel
public dynamic xp { get => GetProp<dynamic>("xp", new ExpandoObject()); set => SetProp<dynamic>("xp", value); }
}
/// <typeparam name="Txp">Specific type of the xp property. If not using a custom type, specify dynamic.</typeparam>
/// <typeparam name="TFromUser">Specific type of the FromUser property. If not using a custom type, specify User.</typeparam>
/// <typeparam name="TFromUser">Specific type of the FromUser property. If not using a custom type, specify OrderUser.</typeparam>
/// <typeparam name="TBillingAddress">Specific type of the BillingAddress property. If not using a custom type, specify Address.</typeparam>
public class Order<Txp, TFromUser, TBillingAddress> : Order
where TFromUser : User
where TFromUser : OrderUser
where TBillingAddress : Address
{
/// <summary>Container for extended (custom) properties of the order.</summary>
Expand Down Expand Up @@ -2191,6 +2191,59 @@ public class OrderSyncConfig : OrderCloudModel
/// <summary>Config data of the order sync config.</summary>
public object ConfigData { get => GetProp<object>("ConfigData"); set => SetProp<object>("ConfigData", value); }
}
public class OrderUser : OrderCloudModel
{
/// <summary>ID of the order user. Can only contain characters Aa-Zz, 0-9, -, and _. Searchable: priority level 1. Sortable.</summary>
public string ID { get => GetProp<string>("ID"); set => SetProp<string>("ID", value); }
/// <summary>ID of the company.</summary>
[ApiReadOnly]
public string CompanyID { get => GetProp<string>("CompanyID"); set => SetProp<string>("CompanyID", value); }
/// <summary>Must be unique across all organizations.</summary>
[Required]
public string Username { get => GetProp<string>("Username"); set => SetProp<string>("Username", value); }
/// <summary>Password of the order user.</summary>
[ApiWriteOnly]
public string Password { get => GetProp<string>("Password"); set => SetProp<string>("Password", value); }
/// <summary>First name of the order user. Required. Max length 100 characters. Searchable: priority level 4. Sortable: priority level 2.</summary>
[Required]
public string FirstName { get => GetProp<string>("FirstName"); set => SetProp<string>("FirstName", value); }
/// <summary>Last name of the order user. Required. Max length 100 characters. Searchable: priority level 3. Sortable: priority level 1.</summary>
[Required]
public string LastName { get => GetProp<string>("LastName"); set => SetProp<string>("LastName", value); }
/// <summary>Email of the order user. Required. Max length 200 characters. Searchable: priority level 5. Sortable.</summary>
[Required]
public string Email { get => GetProp<string>("Email"); set => SetProp<string>("Email", value); }
/// <summary>Phone of the order user. Max length 100 characters.</summary>
public string Phone { get => GetProp<string>("Phone"); set => SetProp<string>("Phone", value); }
/// <summary>Terms accepted of the order user.</summary>
public DateTimeOffset? TermsAccepted { get => GetProp<DateTimeOffset?>("TermsAccepted"); set => SetProp<DateTimeOffset?>("TermsAccepted", value); }
/// <summary>If false, authentication is prohibited.</summary>
[Required]
public bool Active { get => GetProp<bool>("Active"); set => SetProp<bool>("Active", value); }
/// <summary>Container for extended (custom) properties of the order user.</summary>
public dynamic xp { get => GetProp<dynamic>("xp", new ExpandoObject()); set => SetProp<dynamic>("xp", value); }
/// <summary>List of roles currently available to the user via all security profile assignments.</summary>
[ApiReadOnly]
public IReadOnlyList<string> AvailableRoles { get => GetProp<IReadOnlyList<string>>("AvailableRoles"); set => SetProp<IReadOnlyList<string>>("AvailableRoles", value); }
/// <summary>Most specific locale assigned to the user, if any.</summary>
[ApiReadOnly]
public Locale Locale { get => GetProp<Locale>("Locale"); set => SetProp<Locale>("Locale", value); }
/// <summary>Date created of the order user. Sortable.</summary>
[ApiReadOnly]
public DateTimeOffset? DateCreated { get => GetProp<DateTimeOffset?>("DateCreated"); set => SetProp<DateTimeOffset?>("DateCreated", value); }
/// <summary>Accurate within a few minutes. Includes impersonation activity.</summary>
[ApiReadOnly]
public DateTimeOffset? LastActive { get => GetProp<DateTimeOffset?>("LastActive"); set => SetProp<DateTimeOffset?>("LastActive", value); }
/// <summary>Can be used in conjunction with SecurityProfile.PasswordConfig to enforce password reset schedules.</summary>
[ApiReadOnly]
public DateTimeOffset? PasswordLastSetDate { get => GetProp<DateTimeOffset?>("PasswordLastSetDate"); set => SetProp<DateTimeOffset?>("PasswordLastSetDate", value); }
}
/// <typeparam name="Txp">Specific type of the xp property. If not using a custom type, use the non-generic OrderUser class instead.</typeparam>
public class OrderUser<Txp> : OrderUser
{
/// <summary>Container for extended (custom) properties of the order user.</summary>
public new Txp xp { get => GetProp<Txp>("xp"); set => SetProp<Txp>("xp", value); }
}
public class OrderWorksheet : OrderCloudModel
{
/// <summary>Order of the order worksheet.</summary>
Expand Down Expand Up @@ -3588,6 +3641,9 @@ public class TrackingEvent : OrderCloudModel
}
public class User : OrderCloudModel
{
/// <summary>Number of times the user failed authentication due to incorrect password since last successful attempt, or since being unlocked.</summary>
[ApiReadOnly]
public int FailedLoginAttempts { get => GetProp<int>("FailedLoginAttempts"); set => SetProp<int>("FailedLoginAttempts", value); }
/// <summary>ID of the user. Can only contain characters Aa-Zz, 0-9, -, and _. Searchable: priority level 1. Sortable.</summary>
public string ID { get => GetProp<string>("ID"); set => SetProp<string>("ID", value); }
/// <summary>ID of the company.</summary>
Expand Down Expand Up @@ -3891,10 +3947,10 @@ public class PartialMeUser<Txp> : PartialMeUser
public class PartialOpenIdConnect : OpenIdConnect, IPartial { }
public class PartialOrder : Order, IPartial { }
/// <typeparam name="Txp">Specific type of the xp property. If not using a custom type, specify dynamic.</typeparam>
/// <typeparam name="TFromUser">Specific type of the FromUser property. If not using a custom type, specify User.</typeparam>
/// <typeparam name="TFromUser">Specific type of the FromUser property. If not using a custom type, specify OrderUser.</typeparam>
/// <typeparam name="TBillingAddress">Specific type of the BillingAddress property. If not using a custom type, specify Address.</typeparam>
public class PartialOrder<Txp, TFromUser, TBillingAddress> : PartialOrder
where TFromUser : User
where TFromUser : OrderUser
where TBillingAddress : Address
{ }
public class PartialOrderReturn : OrderReturn, IPartial { }
Expand All @@ -3903,6 +3959,10 @@ public class PartialOrderReturn<Txp> : PartialOrderReturn
{ }
public class PartialOrderReturnItem : OrderReturnItem, IPartial { }
public class PartialOrderSyncConfig : OrderSyncConfig, IPartial { }
public class PartialOrderUser : OrderUser, IPartial { }
/// <typeparam name="Txp">Specific type of the xp property. If not using a custom type, use the non-generic PartialOrderUser class instead.</typeparam>
public class PartialOrderUser<Txp> : PartialOrderUser
{ }
public class PartialPasswordConfig : PasswordConfig, IPartial { }
public class PartialPayment : Payment, IPartial { }
/// <typeparam name="Txp">Specific type of the xp property. If not using a custom type, specify dynamic.</typeparam>
Expand Down
Loading