forked from XeroAPI/XeroAPI.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EndpointModelBase for models that can be GET/PUT/POSTED directled…
…; All other models are children. Tidy up model .cs files.
- Loading branch information
Dan Barratt
committed
May 31, 2012
1 parent
619129c
commit 6f015ca
Showing
22 changed files
with
902 additions
and
904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class Account : ModelBase | ||
{ | ||
[ItemId] | ||
public Guid AccountID { get; set; } | ||
|
||
public string Code { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string Status { get; set; } | ||
|
||
public string Type { get; set; } | ||
|
||
public string TaxType { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
public string Class { get; set; } | ||
|
||
public string SystemAccount { get; set; } | ||
|
||
public bool? EnablePaymentsToAccount { get; set; } | ||
|
||
public string BankAccountNumber { get; set; } | ||
|
||
public string CurrencyCode { get; set; } | ||
|
||
public string ReportingCode { get; set; } | ||
|
||
public string ReportingCodeName { get; set; } | ||
|
||
// Added for v2.14 | ||
public bool ShowInExpenseClaims { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return string.Format("Account:{0}", Code); | ||
} | ||
} | ||
|
||
|
||
public class Accounts : ModelList<Account> | ||
{ | ||
} | ||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class Account : EndpointModelBase | ||
{ | ||
[ItemId] | ||
public Guid AccountID { get; set; } | ||
|
||
public string Code { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string Status { get; set; } | ||
|
||
public string Type { get; set; } | ||
|
||
public string TaxType { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
public string Class { get; set; } | ||
|
||
public string SystemAccount { get; set; } | ||
|
||
public bool? EnablePaymentsToAccount { get; set; } | ||
|
||
public string BankAccountNumber { get; set; } | ||
|
||
public string CurrencyCode { get; set; } | ||
|
||
public string ReportingCode { get; set; } | ||
|
||
public string ReportingCodeName { get; set; } | ||
|
||
// Added for v2.14 | ||
public bool ShowInExpenseClaims { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return string.Format("Account:{0}", Code); | ||
} | ||
} | ||
|
||
|
||
public class Accounts : ModelList<Account> | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class BankTransaction : ModelBase | ||
{ | ||
[ItemId] | ||
public Guid? BankTransactionID { get; set; } | ||
|
||
public Account BankAccount { get; set; } | ||
|
||
public string Type { get; set; } | ||
|
||
public string Reference { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
public string ExternalLinkProviderName { get; set; } | ||
|
||
public bool IsReconciled { get; set; } | ||
|
||
public decimal? CurrencyRate { get; set; } | ||
|
||
public Contact Contact { get; set; } | ||
|
||
public DateTime? Date { get; set; } | ||
|
||
public DateTime? DueDate { get; set; } | ||
|
||
public virtual Guid? BrandingThemeID { get; set; } | ||
|
||
public virtual string Status { get; set; } | ||
|
||
public LineAmountType LineAmountTypes { get; set; } | ||
|
||
public virtual LineItems LineItems { get; set; } | ||
|
||
public virtual decimal? SubTotal { get; set; } | ||
|
||
public virtual decimal? TotalTax { get; set; } | ||
|
||
public virtual decimal? Total { get; set; } | ||
|
||
[ItemUpdatedDate] | ||
public DateTime? UpdatedDateUTC { get; set; } | ||
|
||
public virtual string CurrencyCode { get; set; } | ||
|
||
public DateTime? FullyPaidOnDate { get; set; } | ||
} | ||
|
||
|
||
public class BankTransactions : ModelList<BankTransaction> | ||
{ | ||
} | ||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class BankTransaction : EndpointModelBase | ||
{ | ||
[ItemId] | ||
public Guid? BankTransactionID { get; set; } | ||
|
||
public Account BankAccount { get; set; } | ||
|
||
public string Type { get; set; } | ||
|
||
public string Reference { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
public string ExternalLinkProviderName { get; set; } | ||
|
||
public bool IsReconciled { get; set; } | ||
|
||
public decimal? CurrencyRate { get; set; } | ||
|
||
public Contact Contact { get; set; } | ||
|
||
public DateTime? Date { get; set; } | ||
|
||
public DateTime? DueDate { get; set; } | ||
|
||
public virtual Guid? BrandingThemeID { get; set; } | ||
|
||
public virtual string Status { get; set; } | ||
|
||
public LineAmountType LineAmountTypes { get; set; } | ||
|
||
public virtual LineItems LineItems { get; set; } | ||
|
||
public virtual decimal? SubTotal { get; set; } | ||
|
||
public virtual decimal? TotalTax { get; set; } | ||
|
||
public virtual decimal? Total { get; set; } | ||
|
||
[ItemUpdatedDate] | ||
public DateTime? UpdatedDateUTC { get; set; } | ||
|
||
public virtual string CurrencyCode { get; set; } | ||
|
||
public DateTime? FullyPaidOnDate { get; set; } | ||
} | ||
|
||
|
||
public class BankTransactions : ModelList<BankTransaction> | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class BrandingTheme : ModelBase | ||
{ | ||
[ItemId] | ||
public Guid BrandingThemeID { get; set; } | ||
|
||
[ItemNumber] | ||
public string Name { get; set; } | ||
|
||
public int SortOrder { get; set; } | ||
|
||
[ItemUpdatedDate] | ||
public DateTime CreatedDateUTC { get; set; } | ||
} | ||
|
||
public class BrandingThemes : ModelList<BrandingTheme> | ||
{ | ||
} | ||
} | ||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class BrandingTheme : EndpointModelBase | ||
{ | ||
[ItemId] | ||
public Guid BrandingThemeID { get; set; } | ||
|
||
[ItemNumber] | ||
public string Name { get; set; } | ||
|
||
public int SortOrder { get; set; } | ||
|
||
[ItemUpdatedDate] | ||
public DateTime CreatedDateUTC { get; set; } | ||
} | ||
|
||
public class BrandingThemes : ModelList<BrandingTheme> | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class Contact : ModelBase | ||
{ | ||
[ItemId] | ||
public Guid ContactID { get; set; } | ||
|
||
[ItemNumber] | ||
public string ContactNumber { get; set; } | ||
|
||
[ItemUpdatedDate] | ||
public DateTime? UpdatedDateUTC { get; set; } | ||
|
||
public string ContactStatus { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string FirstName { get; set; } | ||
|
||
public string LastName { get; set; } | ||
|
||
public string EmailAddress { get; set; } | ||
|
||
public string SkypeUserName { get; set; } | ||
|
||
public string BankAccountDetails { get; set; } | ||
|
||
public string TaxNumber { get; set; } | ||
|
||
public string AccountsReceivableTaxType { get; set; } | ||
|
||
public string AccountsPayableTaxType { get; set; } | ||
|
||
public Addresses Addresses { get; set; } | ||
|
||
public Phones Phones { get; set; } | ||
|
||
public ContactGroups ContactGroups { get; set; } | ||
|
||
[ReadOnly] | ||
public bool IsSupplier { get; set; } | ||
|
||
[ReadOnly] | ||
public bool IsCustomer { get; set; } | ||
|
||
public string DefaultCurrency { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return string.Format("Contact:{0}", Name); | ||
} | ||
} | ||
|
||
public class Contacts : ModelList<Contact> | ||
{ | ||
} | ||
|
||
using System; | ||
|
||
namespace XeroApi.Model | ||
{ | ||
public class Contact : EndpointModelBase | ||
{ | ||
[ItemId] | ||
public Guid ContactID { get; set; } | ||
|
||
[ItemNumber] | ||
public string ContactNumber { get; set; } | ||
|
||
[ItemUpdatedDate] | ||
public DateTime? UpdatedDateUTC { get; set; } | ||
|
||
public string ContactStatus { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string FirstName { get; set; } | ||
|
||
public string LastName { get; set; } | ||
|
||
public string EmailAddress { get; set; } | ||
|
||
public string SkypeUserName { get; set; } | ||
|
||
public string BankAccountDetails { get; set; } | ||
|
||
public string TaxNumber { get; set; } | ||
|
||
public string AccountsReceivableTaxType { get; set; } | ||
|
||
public string AccountsPayableTaxType { get; set; } | ||
|
||
public Addresses Addresses { get; set; } | ||
|
||
public Phones Phones { get; set; } | ||
|
||
public ContactGroups ContactGroups { get; set; } | ||
|
||
[ReadOnly] | ||
public bool IsSupplier { get; set; } | ||
|
||
[ReadOnly] | ||
public bool IsCustomer { get; set; } | ||
|
||
public string DefaultCurrency { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return string.Format("Contact:{0}", Name); | ||
} | ||
} | ||
|
||
public class Contacts : ModelList<Contact> | ||
{ | ||
} | ||
|
||
} |
Oops, something went wrong.