Skip to content

Commit

Permalink
Release 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wallee-deployment-user committed Feb 7, 2023
1 parent 35509f7 commit 5e15031
Show file tree
Hide file tree
Showing 172 changed files with 1,253 additions and 1,051 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ Install-Package JsonSubTypes
## Installation
```
# Package Manager
Install-Package Wallee -Version 5.1.0
Install-Package Wallee -Version 5.2.0
# .NET CLI
dotnet add package Wallee --version 5.1.0
dotnet add package Wallee --version 5.2.0
# Paket CLI
paket add Wallee --version 5.1.0
paket add Wallee --version 5.2.0
# PackageReference
<PackageReference Include="Wallee" Version="5.1.0" />
<PackageReference Include="Wallee" Version="5.2.0" />
```

Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
Expand All @@ -49,6 +49,19 @@ using Wallee.Model;

<a name="getting-started"></a>
## Getting Started
Instantiate a configuration like so:
```csharp
new Configuration(this.applicationUserID, this.authenticationKey)
```
Or if you want to customize the RestSharp client that's being used underneath (e.g set the proxy), use the overloaded constructor:
```csharp
new Configuration(this.applicationUserID, this.authenticationKey, new RestClientOptions()
{
Proxy = new WebProxy("http://example.com")
});
```

Timeout is customizable separately via the ```Configuration.TimeOut``` property.

```csharp
using System;
Expand Down
23 changes: 6 additions & 17 deletions src/Wallee/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,12 @@ public ApiClient(Configuration config)
{
Configuration = config;

RestClient = new RestClient(Configuration.BasePath);
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" /> class
/// with default configuration.
/// </summary>
/// <param name="basePath">The base path.</param>
public ApiClient(String basePath = "https://app-wallee.com:443/api")
{
if (String.IsNullOrEmpty(basePath))
if (String.IsNullOrEmpty(Configuration.BasePath))
throw new ArgumentException("basePath cannot be empty");

var options = new RestClientOptions(basePath)
{
MaxTimeout = 600000
};
var options = Configuration.RestClientOptions;
options.BaseUrl = new Uri(Configuration.BasePath);
options.MaxTimeout = 600000;
RestClient = new RestClient(options);
}

Expand Down Expand Up @@ -159,7 +148,7 @@ public Object CallApi(
{

Dictionary<String, String> defaultHeaderParams = new Dictionary<String, String>() {
{"x-meta-sdk-version", "5.1.0"},
{"x-meta-sdk-version", "5.2.0"},
{"x-meta-sdk-language", "csharp"},
{"x-meta-sdk-provider", "wallee"},
{"x-meta-sdk-language-version", Environment.Version.ToString()}
Expand Down Expand Up @@ -564,7 +553,7 @@ private String ToQueryString(List<KeyValuePair<string, string>> queryParams)
/// https://docs.microsoft.com/en-us/dotnet/api/system.net.httpwebrequest.timeout?view=netcore-3.1
/// </summary>
public void ResetTimeout(){
RestClient.Options.MaxTimeout = 100 * 1000;
Configuration.Timeout = 25;
}

}
Expand Down
37 changes: 31 additions & 6 deletions src/Wallee/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using System.IO;
using System.Linq;
using System.Text;
using RestSharp;


namespace Wallee.Client
{
Expand All @@ -19,7 +21,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "5.1.0";
public const string Version = "5.2.0";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -80,7 +82,8 @@ public class Configuration : IReadableConfiguration
/// </summary>
/// <param name="applicationUserID">The ID of application user.</param>
/// <param name="authenticationKey">The secret authentication key.</param>
public Configuration(string applicationUserID, string authenticationKey)
/// <param name="restClientOptions">Rest client options for authentication key.</param>
public Configuration(string applicationUserID, string authenticationKey, RestClientOptions restClientOptions)
{
if(applicationUserID == null){
throw new ArgumentException("Parameter cannot be null", "applicationUserID");
Expand All @@ -90,7 +93,8 @@ public Configuration(string applicationUserID, string authenticationKey)
}
_authenticationKey = authenticationKey;
_applicationUserID = applicationUserID;
UserAgent = "Wallee/5.1.0/csharp";
_restClientOptions = restClientOptions;
UserAgent = "Wallee/5.2.0/csharp";
BasePath = "https://app-wallee.com:443/api";
DefaultHeader = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
Expand All @@ -99,6 +103,16 @@ public Configuration(string applicationUserID, string authenticationKey)
Timeout = 25;
}


/// <summary>
/// Initializes a new instance of the <see cref="Configuration" /> class
/// </summary>
/// <param name="applicationUserID">The ID of application user.</param>
/// <param name="authenticationKey">The secret authentication key.</param>
public Configuration(string applicationUserID, string authenticationKey) : this(applicationUserID, authenticationKey, new RestClientOptions())
{
}

#endregion Constructors


Expand Down Expand Up @@ -154,6 +168,17 @@ public string AuthenticationKey
get { return _authenticationKey; }
}

private readonly RestClientOptions _restClientOptions;

/// <summary>
/// Gets the Rest Client Options.
/// </summary>
/// <value>The rest client options.</value>
public RestClientOptions RestClientOptions
{
get { return _restClientOptions; }
}

/// <summary>
/// Gets or sets the default header.
/// </summary>
Expand Down Expand Up @@ -321,7 +346,7 @@ public void AddDefaultHeader(string key, string value)
/// <returns></returns>
public ApiClient CreateApiClient()
{
return new ApiClient(BasePath) { Configuration = this };
return new ApiClient(this);
}


Expand All @@ -333,8 +358,8 @@ public static String ToDebugReport()
String report = "C# SDK (Wallee) Debug Report:\n";
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 5.1.0\n";
report += " SDK Package Version: 5.1.0\n";
report += " Version of the API: 5.2.0\n";
report += " SDK Package Version: 5.2.0\n";

return report;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractAccountUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public AbstractAccountUpdate()
}

/// <summary>
/// Gets or Sets LastModifiedDate
/// The date and time when the object was last modified.
/// </summary>
/// <value>The date and time when the object was last modified.</value>
[DataMember(Name="lastModifiedDate", EmitDefaultValue=false)]
public DateTime? LastModifiedDate { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractApplicationUserUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class AbstractApplicationUserUpdate : IEquatable<AbstractApplicationUserUpdate>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public CreationEntityState? State { get; set; }
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractCustomerActive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ public AbstractCustomerActive()
public string GivenName { get; set; }

/// <summary>
/// Gets or Sets Language
/// The language that is linked to the object.
/// </summary>
/// <value>The language that is linked to the object.</value>
[DataMember(Name="language", EmitDefaultValue=false)]
public string Language { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractHumanUserUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class AbstractHumanUserUpdate : IEquatable<AbstractHumanUserUpdate>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public CreationEntityState? State { get; set; }
/// <summary>
Expand Down
6 changes: 4 additions & 2 deletions src/Wallee/Model/AbstractSpaceUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class AbstractSpaceUpdate : IEquatable<AbstractSpaceUpdate>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public CreationEntityState? State { get; set; }
/// <summary>
Expand All @@ -33,8 +34,9 @@ public AbstractSpaceUpdate()
}

/// <summary>
/// Gets or Sets LastModifiedDate
/// The date and time when the object was last modified.
/// </summary>
/// <value>The date and time when the object was last modified.</value>
[DataMember(Name="lastModifiedDate", EmitDefaultValue=false)]
public DateTime? LastModifiedDate { get; set; }

Expand Down
6 changes: 4 additions & 2 deletions src/Wallee/Model/AbstractSubscriptionAffiliateUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class AbstractSubscriptionAffiliateUpdate : IEquatable<AbstractSubscriptionAffiliateUpdate>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public CreationEntityState? State { get; set; }
/// <summary>
Expand All @@ -33,8 +34,9 @@ public AbstractSubscriptionAffiliateUpdate()
}

/// <summary>
/// Gets or Sets Language
/// The language that is linked to the object.
/// </summary>
/// <value>The language that is linked to the object.</value>
[DataMember(Name="language", EmitDefaultValue=false)]
public string Language { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractSubscriptionProductActive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class AbstractSubscriptionProductActive : IEquatable<AbstractSubscriptionProductActive>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public SubscriptionProductState? State { get; set; }
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractTokenUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ public AbstractTokenUpdate()
public bool? EnabledForOneClickPayment { get; set; }

/// <summary>
/// Gets or Sets Language
/// The language that is linked to the object.
/// </summary>
/// <value>The language that is linked to the object.</value>
[DataMember(Name="language", EmitDefaultValue=false)]
public string Language { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractTransactionPending.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ public AbstractTransactionPending()
public string InvoiceMerchantReference { get; set; }

/// <summary>
/// Gets or Sets Language
/// The language that is linked to the object.
/// </summary>
/// <value>The language that is linked to the object.</value>
[DataMember(Name="language", EmitDefaultValue=false)]
public string Language { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractWebhookListenerUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class AbstractWebhookListenerUpdate : IEquatable<AbstractWebhookListenerUpdate>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public CreationEntityState? State { get; set; }
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion src/Wallee/Model/AbstractWebhookUrlUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class AbstractWebhookUrlUpdate : IEquatable<AbstractWebhookUrlUpdate>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public CreationEntityState? State { get; set; }
/// <summary>
Expand Down
18 changes: 10 additions & 8 deletions src/Wallee/Model/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ namespace Wallee.Model
public partial class Account : IEquatable<Account>
{
/// <summary>
/// Gets or Sets State
/// The object&#39;s current state.
/// </summary>
/// <value>The object&#39;s current state.</value>
[DataMember(Name="state", EmitDefaultValue=false)]
public AccountState? State { get; private set; }
/// <summary>
Expand Down Expand Up @@ -82,15 +83,16 @@ public Account()
public DateTime? DeletedOn { get; private set; }

/// <summary>
/// The ID is the primary key of the entity. The ID identifies the entity uniquely.
/// A unique identifier for the object.
/// </summary>
/// <value>The ID is the primary key of the entity. The ID identifies the entity uniquely.</value>
/// <value>A unique identifier for the object.</value>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; private set; }

/// <summary>
/// Gets or Sets LastModifiedDate
/// The date and time when the object was last modified.
/// </summary>
/// <value>The date and time when the object was last modified.</value>
[DataMember(Name="lastModifiedDate", EmitDefaultValue=false)]
public DateTime? LastModifiedDate { get; private set; }

Expand All @@ -109,9 +111,9 @@ public Account()
public Account ParentAccount { get; private set; }

/// <summary>
/// The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.
/// The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.
/// </summary>
/// <value>The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.</value>
/// <value>The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.</value>
[DataMember(Name="plannedPurgeDate", EmitDefaultValue=false)]
public DateTime? PlannedPurgeDate { get; private set; }

Expand Down Expand Up @@ -139,9 +141,9 @@ public Account()


/// <summary>
/// The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
/// The version is used for optimistic locking and incremented whenever the object is updated.
/// </summary>
/// <value>The version number indicates the version of the entity. The version is incremented whenever the entity is changed.</value>
/// <value>The version is used for optimistic locking and incremented whenever the object is updated.</value>
[DataMember(Name="version", EmitDefaultValue=false)]
public int? Version { get; private set; }

Expand Down
4 changes: 2 additions & 2 deletions src/Wallee/Model/AnalyticsQueryExecution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public AnalyticsQueryExecution()
public FailureReason FailureReason { get; private set; }

/// <summary>
/// The ID is the primary key of the entity. The ID identifies the entity uniquely.
/// A unique identifier for the object.
/// </summary>
/// <value>The ID is the primary key of the entity. The ID identifies the entity uniquely.</value>
/// <value>A unique identifier for the object.</value>
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; private set; }

Expand Down
Loading

0 comments on commit 5e15031

Please sign in to comment.