Skip to content

Commit

Permalink
Merge pull request #45 from tofer/feature/common-interfaces
Browse files Browse the repository at this point in the history
Add common interfaces for most *Ret types
  • Loading branch information
jsgoupil committed Jun 6, 2020
2 parents c294ff1 + 3eb9f31 commit 2644a55
Show file tree
Hide file tree
Showing 13 changed files with 2,343 additions and 296 deletions.
11 changes: 11 additions & 0 deletions src/QbXml/Objects/IQbAddress.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace QbSync.QbXml.Objects
{
public interface IQbAddress : IQbAddressBlock
{
string City { get; set; }
string State { get; set; }
string PostalCode { get; set; }
string Country { get; set; }
string Addr1 { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/QbXml/Objects/IQbAddressBlock.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace QbSync.QbXml.Objects
{
public interface IQbAddressBlock
{
string Addr1 { get; set; }
string Addr2 { get; set; }
string Addr3 { get; set; }
string Addr4 { get; set; }
string Addr5 { get; set; }
}
}
15 changes: 15 additions & 0 deletions src/QbXml/Objects/IQbCommInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace QbSync.QbXml.Objects
{
public interface IQbCommInfo
{
string Phone { get; set; }
string Mobile { get; set; }
string Pager { get; set; }
string AltPhone { get; set; }
string Fax { get; set; }
string Email { get; set; }
string Cc { get; set; }
string Contact { get; set; }
string AltContact { get; set; }
}
}
11 changes: 11 additions & 0 deletions src/QbXml/Objects/IQbContactInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace QbSync.QbXml.Objects
{
public interface IQbContactInfo
{
string Salutation { get; set; }
string FirstName { get; set; }
string MiddleName { get; set; }
string LastName { get; set; }
string JobTitle { get; set; }
}
}
10 changes: 10 additions & 0 deletions src/QbXml/Objects/IQbListRet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace QbSync.QbXml.Objects
{
/// <summary>
/// Interface for common properties to all QuickBooks List ret objects.
/// </summary>
public interface IQbListRet : IQbRet
{
string ListID { get; }
}
}
11 changes: 11 additions & 0 deletions src/QbXml/Objects/IQbPersonName.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace QbSync.QbXml.Objects
{
public interface IQbPersonName
{
string Salutation { get; set; }
string FirstName { get; set; }
string MiddleName { get; set; }
string LastName { get; set; }
string Suffix { get; set; }
}
}
1 change: 1 addition & 0 deletions src/QbXml/Objects/IQbRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
/// </summary>
public interface IQbRequest
{
string requestID { get; set; }
}
}
12 changes: 12 additions & 0 deletions src/QbXml/Objects/IQbResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,17 @@ public interface IQbResponse
/// </summary>
string statusSeverity { get; set; }
}

/// <summary>
/// An interface indicating if the class is a response.
/// </summary>
/// <typeparam name="TResultRet">The *Ret result object type included in the response</typeparam>
public interface IQbResponse<out TResultRet> : IQbResponse
{
/// <summary>
/// Gets the value of the *Ret result object from the response.
/// </summary>
TResultRet GetRetResult();
}
}
#pragma warning restore IDE1006
14 changes: 14 additions & 0 deletions src/QbXml/Objects/IQbRet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace QbSync.QbXml.Objects
{
/// <summary>
/// Interface for common properties to all QuickBooks ret objects.
/// </summary>
public interface IQbRet
{
DATETIMETYPE TimeCreated { get; }

DATETIMETYPE TimeModified { get; }

string EditSequence { get; }
}
}
14 changes: 14 additions & 0 deletions src/QbXml/Objects/IQbTxnRet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace QbSync.QbXml.Objects
{
/// <summary>
/// Interface for common properties to all QuickBooks Txn ret objects.
/// </summary>
public interface IQbTxnRet : IQbRet
{
string TxnID { get; }

string TxnNumber { get; }

DATETYPE TxnDate { get; }
}
}
Loading

0 comments on commit 2644a55

Please sign in to comment.