You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
Instead of declaring string properties that are string constants like this:
var invoice = new Invoice
{
Type = "ACCREC",
Status = "DRAFT",
Contact = contact
...
}
Why not something like this:
var invoice = new Invoice
{
Type = InvoiceType.AccountsReceivable,
Status = InvoiceStatus.Draft,
Contact = contact
...
}
Implementation could be something like this:
namespace XeroApi.Model.Constants
{
public class InvoiceType
{
public static string AccountsReceivable {
get {return "ACCREC"};
}
public static string AccountsPayable {
get {return "ACCPAY"};
}
}
}
Let me know if you guys think its a good idea and I'll submit a pull request :)
The text was updated successfully, but these errors were encountered:
Instead of declaring string properties that are string constants like this:
Why not something like this:
Implementation could be something like this:
Let me know if you guys think its a good idea and I'll submit a pull request :)
The text was updated successfully, but these errors were encountered: