Skip to content

Commit

Permalink
Merge pull request #125 from intuit/IDG3491
Browse files Browse the repository at this point in the history
Added support for new entities TaxPayment and CreditCardPayment
  • Loading branch information
nimisha84 authored Mar 5, 2020
2 parents 06071c3 + 5c8ce4b commit d480edd
Show file tree
Hide file tree
Showing 29 changed files with 2,676 additions and 1,503 deletions.
4 changes: 2 additions & 2 deletions IPPDotNetDevKitCSV3/Code/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<PackageIcon>$(MSBuildThisFileDirectory)logo.png</PackageIcon>
<OutputPath>$(SolutionDir)artifacts\bin</OutputPath>
<Copyright>Copyright © 2019 Intuit, Inc.</Copyright>
<AssemblyVersion>10.0.0.3</AssemblyVersion>
<FileVersion>10.0.0.3</FileVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
<FileVersion>11.0.0.0</FileVersion>
<Company>Intuit</Company>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
<value>Please specify a valid directory path.</value>
</data>
<data name="DefaultMinorVersionValue" xml:space="preserve">
<value>43</value>
<value>47</value>
</data>
<data name="ArgumentCannotBeGreaterThanBaseline" xml:space="preserve">
<value>The specified argument {0} cannot be greater than its ceiling value of {1}.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down Expand Up @@ -58,7 +58,7 @@
},

"MinorVersion": {
"Qbo": "37"
"Qbo": "47"
}
},
"WebhooksService": {
Expand Down
21 changes: 20 additions & 1 deletion IPPDotNetDevKitCSV3/Code/Intuit.Ipp.DataService/AsyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,11 @@ public void FindAllAsync<T>(T entity) where T : IEntity
AsyncRestHandler asyncRestHandler = new AsyncRestHandler(this.serviceContext);
asyncRestHandler.OnCallCompleted += new EventHandler<AsyncCallCompletedEventArgs>(this.FindAllAsyncCompleted<IEntity>);
FindAllCallCompletedEventArgs findAllCompletedEventArgs = new FindAllCallCompletedEventArgs();

string resourceString = entity.GetType().Name;
if (resourceString.ToLower(CultureInfo.InvariantCulture) == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
try
{
string uri = string.Format(CultureInfo.InvariantCulture, "{0}/company/{1}/{2}", CoreConstants.VERSION, this.serviceContext.RealmId, resourceString.ToLower(CultureInfo.InvariantCulture));
Expand Down Expand Up @@ -232,6 +235,10 @@ public void AddAsync<T>(T entity) where T : IEntity
asyncRestHandler.OnCallCompleted += new EventHandler<AsyncCallCompletedEventArgs>(this.AddAsyncompleted);
CallCompletedEventArgs<IEntity> callCompletedEventArgs = new CallCompletedEventArgs<IEntity>();
string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);
if (resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
this.requestedEntity = entity;
try
{
Expand Down Expand Up @@ -280,6 +287,10 @@ public void UpdateAsync<T>(T entity) where T : IEntity
asyncRestHandler.OnCallCompleted += new EventHandler<AsyncCallCompletedEventArgs>(this.UpdateAsyncCompleted);
CallCompletedEventArgs<IEntity> callCompletedEventArgs = new CallCompletedEventArgs<IEntity>();
string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);
if (resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
this.requestedEntity = entity;
try
{
Expand Down Expand Up @@ -427,6 +438,10 @@ public void DeleteAsync<T>(T entity) where T : IEntity
asyncRestHandler.OnCallCompleted += new EventHandler<AsyncCallCompletedEventArgs>(this.DeleteAsyncCompleted);
CallCompletedEventArgs<IEntity> callCompletedEventArgs = new CallCompletedEventArgs<IEntity>();
string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);
if (resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
this.requestedEntity = entity;
try
{
Expand Down Expand Up @@ -755,6 +770,10 @@ public void FindByIdAsync<T>(T entity) where T : IEntity

id = intuitEntity.Id;
string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);
if (resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
this.requestedEntity = entity;
try
{
Expand Down
24 changes: 21 additions & 3 deletions IPPDotNetDevKitCSV3/Code/Intuit.Ipp.DataService/DataService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ public T Add<T>(T entity) where T : IEntity
}

string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);
if(resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}

// Builds resource Uri
string uri = string.Format(CultureInfo.InvariantCulture, "{0}/company/{1}/{2}", CoreConstants.VERSION, this.serviceContext.RealmId, resourceString);
Expand Down Expand Up @@ -266,7 +270,10 @@ public T Delete<T>(T entity) where T : IEntity
}

string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);

if (resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
// Builds resource Uri
string uri = string.Format(CultureInfo.InvariantCulture, "{0}/company/{1}/{2}?operation=delete", CoreConstants.VERSION, this.serviceContext.RealmId, resourceString);

Expand Down Expand Up @@ -404,7 +411,10 @@ public T Update<T>(T entity) where T : IEntity
}

string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);

if (resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
// Builds resource Uri
string uri = string.Format(CultureInfo.InvariantCulture, "{0}/company/{1}/{2}", CoreConstants.VERSION, this.serviceContext.RealmId, resourceString);

Expand Down Expand Up @@ -793,7 +803,10 @@ public T FindById<T>(T entity) where T : IEntity

string id = string.Empty;
string resourceString = entity.GetType().Name.ToLower(CultureInfo.InvariantCulture);

if (resourceString == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
// Convert to role base to get the Id property which is required to Find the entity.
IntuitEntity intuitEntity = entity as IntuitEntity;
if (intuitEntity == null)
Expand Down Expand Up @@ -957,6 +970,11 @@ public ReadOnlyCollection<T> FindAll<T>(T entity, int startPosition = 1, int max

ServicesHelper.ValidateEntity(entity, serviceContext);
string resourceString = entity.GetType().Name;

if (resourceString.ToLower(CultureInfo.InvariantCulture) == "creditcardpaymenttxn")
{
resourceString = "creditcardpayment";
}
List<T> entities = new List<T>();

if (resourceString == "TaxClassification")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"Oauth2Keys": {
"AccessToken": "{ACCESSTOKEN}",
"RefreshToken": "{REFRESHTOKEN}",
"RealmId": "{REALMID}",
"ClientId": "{CLIENTID}",
"ClientSecret": "{CLIENTSECRET}",
"AccessToken": "",
"RefreshToken": "",
"RealmId": "",
"ClientId": "",
"ClientSecret": "",
"RedirectUrl": "https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl",
"QBOBaseUrl": "{SANDBOXBASEURLQBO}",
"QBOBaseUrl": "https://sandbox-quickbooks.api.intuit.com/",
"Environment": "sandbox"

},
Expand All @@ -28,7 +28,7 @@
"Mode": {
"Oauth": {
"Enable": "false",
"AccessToken": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..bkgPC6RblKC35RxkTxPqsA.4lRp7lY9j-MOSSW6mD17Siz1YoeHFpj82MZUTnpXPqqP42qC1NhhtOmeZNYeRUqeoTcp4vrhUCxj36xKNJnT4u8uhS514XTGQNw1_XCL6E5kSeXPpsv1c07g1wBdFk1_kUlgv43RX0sUKwYj-ljp-v-3lHSHngv179C5g0RCkOToQ_PiRBF6jwgHWyh2cbQVK1zD1obJdViSLhxAICPEbRjbH7Rs_TdM69rAzKlf853h-CWpg-RyDH6kkIlPcP22rxv0E1ogmfQKM5hohXimVe02hwr_LXbLrZn3PlwdA8Zbc65HDV1ZSltZqFiGU1yAASSlNLBFuEeYqgBkhzdS9sT_t3g9JJktaF7g7Ef5nV2zM2aCswojA547PXksX1YXbYI7rP5425HIbNn_fefTip_O0T5Y_ikhiWY17DQsn8hqZLzBDaTEyH6c0eQAR3Y3uhEqks-55Vmk9U8leZ6VCs685otrTEtZL3bil7gAzFnU1zhEL1d2K3aBsCcuseQM4D6feNZvPQjqHB8XSqKz4Gr_r-9qpBnEM_STnJoMcwrP2CDLEcZLkn7u9AToVi3wRvWMwTNgqeMTY2_frIdd_PS3TpSbH5dScwkMGQX-UAvd-8npHd9hvuZk2C6su9TEC7o8hWJkAk_ZcTqE-m87E5ZfcktPGw1nisPo1BDjlgnTeyQwtx1u7llBiZPFrB4_2Nx8BuavdMGtug1nVKAKom8K_WDzuPjUGblynnv0mD2JUz1_t_ZcKBpgUwq6YVPqWd5xf2-kbcuVDAonrzYSDy-dnL0vmwE9KGwfSYtPUkU.IGbSvuEvTMUCDUFhwZobKg"
"AccessToken": ""
},
//not supported -added for backward compatibility
"Custom": {
Expand Down Expand Up @@ -58,7 +58,7 @@
},

"MinorVersion": {
"Qbo": "37"
"Qbo": "47"
}
},
"WebhooksService": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ internal static ServiceContext InitializeQBOServiceContextUsingoAuth()

reqValidator = new OAuth2RequestValidator(AuthorizationKeysQBO.accessTokenQBO);
context = new ServiceContext(AuthorizationKeysQBO.realmIdIAQBO, IntuitServicesType.QBO, reqValidator);
context.IppConfiguration.MinorVersion.Qbo = "43";
context.IppConfiguration.MinorVersion.Qbo = "47";
DataService.DataService service = new DataService.DataService(context);
var compinfo= service.FindAll<CompanyInfo>(new CompanyInfo());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,36 @@ internal static Company CreateCompany(ServiceContext context)
return company;
}

internal static CreditCardPaymentTxn CreateCreditCardPayment(ServiceContext qboContextoAuth)
{
CreditCardPaymentTxn creditCardPaymentTxn = new CreditCardPaymentTxn();
creditCardPaymentTxn.AmountSpecified = true;
creditCardPaymentTxn.Amount = 10;
creditCardPaymentTxn.CreditCardAccountRef = new ReferenceType {
Value="101",
name="TestCArd"
};
creditCardPaymentTxn.BankAccountRef = new ReferenceType
{
Value = "35",
name = "Checking"
};
creditCardPaymentTxn.TxnDate =new DateTime(2019,11,21);
creditCardPaymentTxn.CurrencyRef = new ReferenceType {
Value="USD",
name="United State Dollar"
};
creditCardPaymentTxn.PrivateNote = "Testing123";
return creditCardPaymentTxn;
}


internal static CreditCardPaymentTxn UpdateCreditCardPayment(ServiceContext context, CreditCardPaymentTxn entity)
{
//update the properties of entity
entity.Amount=entity.Amount+100;
return entity;
}
internal static Company UpdateCompany(ServiceContext context, Company entity)
{
//update the properties of entity
Expand Down Expand Up @@ -1998,6 +2026,18 @@ internal static TaxRate CreateTaxRate(ServiceContext context)
return taxRate;
}

internal static TaxPayment CreateTaxPayment(ServiceContext qboContextoAuth)
{
TaxPayment taxPayment = new TaxPayment();
taxPayment.PaymentDate = DateTime.UtcNow;
taxPayment.PaymentAccountRef = new ReferenceType {
name = "cash and cash equivalents-BAS Payment",
Value ="57"
};
taxPayment.PaymentAmount = 100;
return taxPayment;
}



internal static TaxRate UpdateTaxRate(ServiceContext context, TaxRate entity)
Expand Down Expand Up @@ -9940,6 +9980,19 @@ internal static void VerifyClassSparseUpdate(Class expected, Class actual)
Assert.AreEqual(expected.FullyQualifiedName, actual.FullyQualifiedName);
}

internal static void VerifyCreditCardPayment(CreditCardPaymentTxn expected, CreditCardPaymentTxn actual)
{
Assert.AreEqual(expected.PrivateNote, actual.PrivateNote);
Assert.AreEqual(expected.Amount, actual.Amount);
Assert.AreEqual(expected.CreditCardAccountRef.name, actual.CreditCardAccountRef.name);
}

internal static void VerifyTaxPayment(TaxPayment expected, TaxPayment actual)
{
Assert.AreEqual(expected.Id, actual.Id);

}

internal static void VerifyPayment(Payment expected, Payment actual)
{
//Assert.AreEqual(expected.CustomerRef.name, actual.CustomerRef.name);
Expand Down
Loading

0 comments on commit d480edd

Please sign in to comment.