Skip to content

Commit 7340137

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # IPPDotNetDevKitCSV3/Code/App.config # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Core/Intuit.Ipp.Core.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.DataService/Intuit.Ipp.DataService.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.EntitlementService.Test/App.config # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.EntitlementService.Test/Intuit.Ipp.EntitlementService.Test.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.EntitlementService/Intuit.Ipp.EntitlementService.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.GlobalTaxService/Intuit.Ipp.GlobalTaxService.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.OAuth2PlatformClient/Client/OAuth2Client.cs # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.PlatformService/Intuit.Ipp.PlatformService.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.PlatformService/Properties/Resources.resx # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.QueryFilter/Intuit.Ipp.QueryFilter.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.ReportService.Test/Properties/AssemblyInfo.cs # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.ReportService/Intuit.Ipp.ReportService.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Security/Intuit.Ipp.Security.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Utility.Test/App.config # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Utility/Common/CoreConstants.cs # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.WebHooksService/Intuit.Ipp.WebHooksService.csproj # IPPDotNetDevKitCSV3/Code/Intuit.Ipp.WebhooksService.Test/Properties/AssemblyInfo.cs # IPPDotNetDevKitCSV3/Code/VersionInfo.cs # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.Data/CDMEntities/Fms.cs # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension/Schema7.4.0/EntitlementsResponse.xsd # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension/Schema7.4.0/Finance.xsd # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension/Schema7.4.0/IntuitBaseTypes.xsd # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension/Schema7.4.0/IntuitNamesTypes.xsd # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension/Schema7.4.0/IntuitRestServiceDef.xsd # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension/Schema7.4.0/Report.xsd # IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension/Schema7.4.0/SalesTax.xsd
2 parents ff77dc7 + 0f85b1e commit 7340137

File tree

75 files changed

+1482
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1482
-95
lines changed

IPPDotNetDevKitCSV3/Code/.vs/config/applicationhost.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@
162162
</site>
163163
<site name="IDGOauthSample" id="2">
164164
<application path="/" applicationPool="Clr4IntegratedAppPool">
165-
<virtualDirectory path="/" physicalPath="C:\Users\nshrivastava\Documents\Git\QuickBooks-V3-DotNET-SDK\IPPDotNetDevKitCSV3\Sample app for testing SDK\OAuth1\IDG Oauth Sample\IDGOauthSample" />
165+
<virtualDirectory path="/" physicalPath="C:\Users\nshrivastava\Documents\Git\QuickBooks-V3-DotNET-SDKMaster\IPPDotNetDevKitCSV3\Sample app for testing SDK\OAuth1\IDG Oauth Sample\IDGOauthSample" />
166166
</application>
167167
<bindings>
168168
<binding protocol="http" bindingInformation="*:65281:localhost" />
169169
</bindings>
170170
</site>
171171
<site name="MVC Manual Code Flow Client" id="3">
172172
<application path="/" applicationPool="Clr4IntegratedAppPool">
173-
<virtualDirectory path="/" physicalPath="C:\Users\nshrivastava\Documents\Git\QuickBooks-V3-DotNET-SDK\IPPDotNetDevKitCSV3\Sample app for testing SDK\OAuth2\MvcCodeFlowClientManual" />
173+
<virtualDirectory path="/" physicalPath="C:\Users\nshrivastava\Documents\Git\QuickBooks-V3-DotNET-SDKMaster\IPPDotNetDevKitCSV3\Sample app for testing SDK\OAuth2\MvcCodeFlowClientManual" />
174174
</application>
175175
<bindings>
176176
<binding protocol="http" bindingInformation="*:27353:localhost" />

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Core/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Core/Resources/resources.designer.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Core/Resources/resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="ArgumentCannotBeGreaterThanBaseline" xml:space="preserve">
121121
<value>The specified argument {0} cannot be greater than its ceiling value of {1}.</value>

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Exception/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="BatchItemsExceededExceptionDefaultMessage" xml:space="preserve">
121121
<value>Number of Items in Batch Request exceeded the permissible limit.</value>

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.GlobalTaxService/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="BatchIdAlreadyUsed" xml:space="preserve">
121121
<value>This Batch Id is already used within this batch.</value>
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
////********************************************************************
2+
// <copyright file="LogRequestsToDisk.cs" company="Intuit">
3+
/*******************************************************************************
4+
* Copyright 2016 Intuit
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*******************************************************************************/
18+
19+
// <summary>This file contains logic for Logging API Requests/Responses To Disk</summary>
20+
////********************************************************************
21+
22+
namespace Intuit.Ipp.OAuth2PlatformClient
23+
{
24+
using System;
25+
using System.Globalization;
26+
using System.IO;
27+
using System.Text;
28+
29+
30+
/// <summary>
31+
/// Logs API Requests/Responses To Disk
32+
/// </summary>
33+
public class LogRequestsToDisk
34+
{
35+
/// <summary>
36+
/// Initializes a new instance of the <see cref="LogRequestsToDisk"/> class.
37+
/// </summary>
38+
public LogRequestsToDisk()
39+
: this(false, null)
40+
{
41+
}
42+
43+
/// <summary>
44+
/// Initializes a new instance of the <see cref="LogRequestsToDisk"/> class.
45+
/// </summary>
46+
/// <param name="enableServiceRequestLogging">Value indicating whether to log request response messages.</param>
47+
/// <param name="serviceRequestLoggingLocation">Request Response logging locationl</param>
48+
public LogRequestsToDisk(bool enableServiceRequestLogging, string serviceRequestLoggingLocation)
49+
{
50+
this.EnableServiceRequestsLogging = enableServiceRequestLogging;
51+
this.ServiceRequestLoggingLocation = serviceRequestLoggingLocation;
52+
}
53+
54+
/// <summary>
55+
/// Gets a value indicating whether Service Requests Logging should be enabled.
56+
/// </summary>
57+
internal bool EnableLogging { get; private set; }
58+
59+
/// <summary>
60+
/// Gets the Service Request Logging Location.
61+
/// </summary>
62+
internal string LoggingLocation { get; private set; }
63+
64+
/// <summary>
65+
/// Logs the Platform Request to Disk.
66+
/// </summary>
67+
/// <param name="xml">The xml to log.</param>
68+
/// <param name="isRequest">Specifies whether the xml is request or response.</param>
69+
public void LogPlatformRequests(bool enableLogging, string xml, bool isRequest)
70+
{
71+
if (this.EnableServiceRequestsLogging)
72+
{
73+
if (string.IsNullOrWhiteSpace(this.ServiceRequestLoggingLocation))
74+
{
75+
this.ServiceRequestLoggingLocation = Path.GetTempPath();
76+
}
77+
78+
string filePath = string.Empty;
79+
if (isRequest)
80+
{
81+
filePath = string.Format(CultureInfo.InvariantCulture, "{0}{1}OAuth2Request-{2}.txt", this.ServiceRequestLoggingLocation, "/", DateTime.Now.Ticks.ToString(CultureInfo.InvariantCulture));
82+
}
83+
else
84+
{
85+
filePath = string.Format(CultureInfo.InvariantCulture, "{0}{1}OAuth2Response-{2}.txt", this.ServiceRequestLoggingLocation,"/", DateTime.Now.Ticks.ToString(CultureInfo.InvariantCulture));
86+
}
87+
88+
try
89+
{
90+
Encoding encoder = Encoding.GetEncoding("utf-8", new EncoderExceptionFallback(), new DecoderExceptionFallback());
91+
byte[] data = encoder.GetBytes(xml);
92+
using (FileStream fs = new FileStream(filePath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite))
93+
{
94+
fs.Write(data, 0, data.Length);
95+
}
96+
}
97+
catch (System.Exception exception)
98+
{
99+
IdsException idsException = new IdsException("Exception has been generated. Check inner exception for details.", exception);
100+
IdsExceptionManager.HandleException(idsException);
101+
}
102+
}
103+
}
104+
}
105+
}

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.QueryFilter/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="CommunicationErrorMessage" xml:space="preserve">
121121
<value>There was an error while communicating with the Ids Server.</value>

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.ReportService/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="CommunicationErrorMessage" xml:space="preserve">
121121
<value>There was an error while communicating with the Ids Server.</value>

IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Retry/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=7.5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=7.5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
<data name="ArgumentCannotBeGreaterThanBaseline" xml:space="preserve">
121121
<value>The specified argument {0} cannot be greater than its ceiling value of {1}.</value>

0 commit comments

Comments
 (0)