Skip to content

Commit

Permalink
Release 7.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wallee-deployment-user committed Sep 15, 2023
1 parent 16b6d4e commit 6a074f8
Show file tree
Hide file tree
Showing 12 changed files with 654 additions and 34 deletions.
8 changes: 4 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 PostFinanceCheckout -Version 7.0.0
Install-Package PostFinanceCheckout -Version 7.0.1
# .NET CLI
dotnet add package PostFinanceCheckout --version 7.0.0
dotnet add package PostFinanceCheckout --version 7.0.1
# Paket CLI
paket add PostFinanceCheckout --version 7.0.0
paket add PostFinanceCheckout --version 7.0.1
# PackageReference
<PackageReference Include="PostFinanceCheckout" Version="7.0.0" />
<PackageReference Include="PostFinanceCheckout" Version="7.0.1" />
```

Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces:
Expand Down
9 changes: 7 additions & 2 deletions src/PostFinanceCheckout/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ private RestRequest PrepareRequest(
request.AddBody(postBody, contentType);
}

if (contentType != null)
{
request.AddHeader("Content-Type", contentType);
}

return request;
}

Expand All @@ -148,7 +153,7 @@ public Object CallApi(
{

Dictionary<String, String> defaultHeaderParams = new Dictionary<String, String>() {
{"x-meta-sdk-version", "7.0.0"},
{"x-meta-sdk-version", "7.0.1"},
{"x-meta-sdk-language", "csharp"},
{"x-meta-sdk-provider", "PostFinance Checkout"},
{"x-meta-sdk-language-version", Environment.Version.ToString()}
Expand Down Expand Up @@ -540,7 +545,7 @@ private String ToQueryString(List<KeyValuePair<string, string>> queryParams)
List<String> query = new List<String>();
foreach (var param in queryParams)
{
query.Add(param.Key + "=" + param.Value);
query.Add(param.Key + "=" + HttpUtility.UrlEncode(param.Value));
}
return "?" + string.Join("&", query.ToArray());
}
Expand Down
8 changes: 4 additions & 4 deletions src/PostFinanceCheckout/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "7.0.0";
public const string Version = "7.0.1";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -94,7 +94,7 @@ public Configuration(string applicationUserID, string authenticationKey, RestCli
_authenticationKey = authenticationKey;
_applicationUserID = applicationUserID;
_restClientOptions = restClientOptions;
UserAgent = "PostFinanceCheckout/7.0.0/csharp";
UserAgent = "PostFinanceCheckout/7.0.1/csharp";
BasePath = "https://checkout.postfinance.ch:443/api";
DefaultHeader = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
Expand Down Expand Up @@ -355,8 +355,8 @@ public static String ToDebugReport()
String report = "C# SDK (PostFinanceCheckout) Debug Report:\n";
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 7.0.0\n";
report += " SDK Package Version: 7.0.0\n";
report += " Version of the API: 7.0.1\n";
report += " SDK Package Version: 7.0.1\n";

return report;
}
Expand Down
4 changes: 2 additions & 2 deletions src/PostFinanceCheckout/Model/AbstractPaymentLinkUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ public AbstractPaymentLinkUpdate()
public string Language { get; set; }

/// <summary>
/// The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters.
/// The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. If no amount for the payment link is defined, the additional checkout page to enter the amount is shown to the consumer.
/// </summary>
/// <value>The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters.</value>
/// <value>The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. If no amount for the payment link is defined, the additional checkout page to enter the amount is shown to the consumer.</value>
[DataMember(Name="lineItems", EmitDefaultValue=false)]
public List<LineItemCreate> LineItems { get; set; }

Expand Down
30 changes: 15 additions & 15 deletions src/PostFinanceCheckout/Model/CardAuthenticationResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,34 @@ public enum CardAuthenticationResponse
{

/// <summary>
/// Enum ENROLLMENT_VERIFICATION_ERROR for value: ENROLLMENT_VERIFICATION_ERROR
/// Enum FULLY_AUTHENTICATED for value: FULLY_AUTHENTICATED
/// </summary>
[EnumMember(Value = "ENROLLMENT_VERIFICATION_ERROR")]
ENROLLMENT_VERIFICATION_ERROR,
[EnumMember(Value = "FULLY_AUTHENTICATED")]
FULLY_AUTHENTICATED,

/// <summary>
/// Enum NOT_ENROLLED for value: NOT_ENROLLED
/// Enum AUTHENTICATION_NOT_REQUIRED for value: AUTHENTICATION_NOT_REQUIRED
/// </summary>
[EnumMember(Value = "NOT_ENROLLED")]
NOT_ENROLLED,
[EnumMember(Value = "AUTHENTICATION_NOT_REQUIRED")]
AUTHENTICATION_NOT_REQUIRED,

/// <summary>
/// Enum AUTHENTICATION_ERROR for value: AUTHENTICATION_ERROR
/// Enum NOT_ENROLLED for value: NOT_ENROLLED
/// </summary>
[EnumMember(Value = "AUTHENTICATION_ERROR")]
AUTHENTICATION_ERROR,
[EnumMember(Value = "NOT_ENROLLED")]
NOT_ENROLLED,

/// <summary>
/// Enum AUTHENTICATION_NOT_REQUIRED for value: AUTHENTICATION_NOT_REQUIRED
/// Enum ENROLLMENT_ERROR for value: ENROLLMENT_ERROR
/// </summary>
[EnumMember(Value = "AUTHENTICATION_NOT_REQUIRED")]
AUTHENTICATION_NOT_REQUIRED,
[EnumMember(Value = "ENROLLMENT_ERROR")]
ENROLLMENT_ERROR,

/// <summary>
/// Enum FULLY_AUTHENTICATED for value: FULLY_AUTHENTICATED
/// Enum AUTHENTICATION_ERROR for value: AUTHENTICATION_ERROR
/// </summary>
[EnumMember(Value = "FULLY_AUTHENTICATED")]
FULLY_AUTHENTICATED
[EnumMember(Value = "AUTHENTICATION_ERROR")]
AUTHENTICATION_ERROR
}

}
15 changes: 15 additions & 0 deletions src/PostFinanceCheckout/Model/PaymentContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public PaymentContract()
[DataMember(Name="id", EmitDefaultValue=false)]
public long? Id { get; private set; }

/// <summary>
/// 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; }

/// <summary>
/// Gets or Sets RejectedOn
/// </summary>
Expand Down Expand Up @@ -139,6 +146,7 @@ public override string ToString()
sb.Append(" CreatedOn: ").Append(CreatedOn).Append("\n");
sb.Append(" ExternalId: ").Append(ExternalId).Append("\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" LastModifiedDate: ").Append(LastModifiedDate).Append("\n");
sb.Append(" RejectedOn: ").Append(RejectedOn).Append("\n");
sb.Append(" RejectionReason: ").Append(RejectionReason).Append("\n");
sb.Append(" StartTerminatingOn: ").Append(StartTerminatingOn).Append("\n");
Expand Down Expand Up @@ -220,6 +228,11 @@ public bool Equals(PaymentContract input)
(this.Id != null &&
this.Id.Equals(input.Id))
) &&
(
this.LastModifiedDate == input.LastModifiedDate ||
(this.LastModifiedDate != null &&
this.LastModifiedDate.Equals(input.LastModifiedDate))
) &&
(
this.RejectedOn == input.RejectedOn ||
(this.RejectedOn != null &&
Expand Down Expand Up @@ -282,6 +295,8 @@ public override int GetHashCode()
hashCode = hashCode * 59 + this.ExternalId.GetHashCode();
if (this.Id != null)
hashCode = hashCode * 59 + this.Id.GetHashCode();
if (this.LastModifiedDate != null)
hashCode = hashCode * 59 + this.LastModifiedDate.GetHashCode();
if (this.RejectedOn != null)
hashCode = hashCode * 59 + this.RejectedOn.GetHashCode();
if (this.RejectionReason != null)
Expand Down
4 changes: 2 additions & 2 deletions src/PostFinanceCheckout/Model/PaymentLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ public PaymentLink()
public string Language { get; private set; }

/// <summary>
/// The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters.
/// The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. If no amount for the payment link is defined, the additional checkout page to enter the amount is shown to the consumer.
/// </summary>
/// <value>The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters.</value>
/// <value>The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. If no amount for the payment link is defined, the additional checkout page to enter the amount is shown to the consumer.</value>
[DataMember(Name="lineItems", EmitDefaultValue=false)]
public List<LineItem> LineItems { get; private set; }

Expand Down
4 changes: 2 additions & 2 deletions src/PostFinanceCheckout/Model/PaymentLinkUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ public PaymentLinkUpdate(long? id, long? version)
public string Language { get; set; }

/// <summary>
/// The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters.
/// The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. If no amount for the payment link is defined, the additional checkout page to enter the amount is shown to the consumer.
/// </summary>
/// <value>The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters.</value>
/// <value>The line items allows to define the line items for this payment link. When the line items are defined they cannot be overridden through the request parameters. If no amount for the payment link is defined, the additional checkout page to enter the amount is shown to the consumer.</value>
[DataMember(Name="lineItems", EmitDefaultValue=false)]
public List<LineItemCreate> LineItems { get; set; }

Expand Down
104 changes: 104 additions & 0 deletions src/PostFinanceCheckout/Model/WebAppConfirmationRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = PostFinanceCheckout.Client.SwaggerDateConverter;

namespace PostFinanceCheckout.Model
{
/// <summary>
/// WebAppConfirmationRequest
/// </summary>
[DataContract]
public partial class WebAppConfirmationRequest : IEquatable<WebAppConfirmationRequest>
{
/// <summary>
/// Initializes a new instance of the <see cref="WebAppConfirmationRequest" /> class.
/// </summary>
public WebAppConfirmationRequest()
{
}

/// <summary>
/// The user returns to the web app after granting the permission. The HTTP request contains the code. Provide it here to confirm the web app installation.
/// </summary>
/// <value>The user returns to the web app after granting the permission. The HTTP request contains the code. Provide it here to confirm the web app installation.</value>
[DataMember(Name="code", EmitDefaultValue=false)]
public string Code { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class WebAppConfirmationRequest {\n");
sb.Append(" Code: ").Append(Code).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as WebAppConfirmationRequest);
}

/// <summary>
/// Returns true if WebAppConfirmationRequest instances are equal
/// </summary>
/// <param name="input">Instance of WebAppConfirmationRequest to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(WebAppConfirmationRequest input)
{
if (input == null)
return false;

return
(
this.Code == input.Code ||
(this.Code != null &&
this.Code.Equals(input.Code))
);
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Code != null)
hashCode = hashCode * 59 + this.Code.GetHashCode();
return hashCode;
}
}

}

}
Loading

0 comments on commit 6a074f8

Please sign in to comment.