Hiya,
When deserializing to an enum right now its mandatory to have the fields match the string exactly (AFAIK).
This however stops me from adhering to proper C# guidelines concerning naming and so on.
For example:
public enum OrderItemCouponType
{
Bol = 0,
// ReSharper disable InconsistentNaming
percent = 1,
fixed_product = 2,
fixed_cart = 3,
percent_product = 4,
// ReSharper restore InconsistentNaming
Unknown = 5,
Eol = 6
}
Should really be:
public enum OrderItemCouponType
{
Bol = 0,
Percent = 1,
FixedProduct = 2,
FixedCart = 3,
PercentProduct = 4,
Unknown = 5,
Eol = 6
}
I'd imagine reusing the PhpProperty for this like
public enum OrderItemCouponType
{
Bol = 0,
[PhpProperty("percent")]
Percent = 1,
[PhpProperty("fixes_product")]
FixedProduct = 2,
[PhpProperty("fixed_cart")]
FixedCart = 3,
[PhpProperty("percent_product")]
PercentProduct = 4,
Unknown = 5,
Eol = 6
}
Let me know what you think.
Hiya,
When deserializing to an enum right now its mandatory to have the fields match the string exactly (AFAIK).
This however stops me from adhering to proper C# guidelines concerning naming and so on.
For example:
Should really be:
I'd imagine reusing the
PhpPropertyfor this likeLet me know what you think.