Skip to content

Commit

Permalink
Release 1.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
WorldlineAcquiring committed Dec 11, 2024
1 parent ab58782 commit 6b9c5ff
Show file tree
Hide file tree
Showing 50 changed files with 647 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Worldline.Acquiring.Sdk</RootNamespace>
<AssemblyVersion>0.1.0</AssemblyVersion>
<Version>0.1.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<Version>1.0.0</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Company>Worldline</Company>
<Product>Worldline Acquiring .NET SDK integration tests</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Worldline.Acquiring.Sdk</RootNamespace>
<AssemblyVersion>0.1.0</AssemblyVersion>
<Version>0.1.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<Version>1.0.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Company>Worldline</Company>
<Product>Worldline Acquiring .NET SDK</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Worldline.Acquiring.Sdk</RootNamespace>
<AssemblyVersion>0.1.0</AssemblyVersion>
<Version>0.1.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<Version>1.0.0</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Company>Worldline</Company>
<Product>Worldline Acquiring .NET SDK unit tests</Product>
Expand Down
2 changes: 1 addition & 1 deletion Worldline.Acquiring.Sdk/Communication/MetadataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ internal class ServerMetaInfo
.Append(Environment.Version)
.ToString();

private const string SdkVersion = "0.1.0";
private const string SdkVersion = "1.0.0";

private const string ServerMetaInfoHeader = "X-WL-ServerMetaInfo";

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* This file was automatically generated.
*/
using System.Collections.Generic;
using System.Threading.Tasks;
using Worldline.Acquiring.Sdk.Communication;
using Worldline.Acquiring.Sdk.V1.Domain;

namespace Worldline.Acquiring.Sdk.V1.Acquirer.Merchant.Balanceinquiries
{
/// <summary>
/// BalanceInquiries client. Thread-safe.
/// </summary>
public class BalanceInquiriesClient : ApiResource
{
public BalanceInquiriesClient(ApiResource parent, IDictionary<string, string> pathContext) :
base(parent, pathContext)
{
}

/// <summary>
/// Resource /processing/v1/{acquirerId}/{merchantId}/balance-inquiries
/// - <a href="https://docs.acquiring.worldline-solutions.com/api-reference#tag/Balance-Inquiries/operation/processBalanceInquiry">Balance inquiry</a>
/// </summary>
/// <param name="body">ApiBalanceInquiryRequest</param>
/// <param name="context">CallContext</param>
/// <returns>ApiBalanceInquiryResponse</returns>
/// <exception cref="ValidationException">if the request was not correct and couldn't be processed (HTTP status code 400)</exception>
/// <exception cref="AuthorizationException">if the request was not allowed (HTTP status code 403)</exception>
/// <exception cref="ReferenceException">if an object was attempted to be referenced that doesn't exist or has been removed,
/// or there was a conflict (HTTP status code 404, 409 or 410)</exception>
/// <exception cref="PlatformException">if something went wrong at the Worldline Acquiring platform,
/// the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer,
/// or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)</exception>
/// <exception cref="ApiException">if the Worldline Acquiring platform returned any other error</exception>
public async Task<ApiBalanceInquiryResponse> ProcessBalanceInquiry(ApiBalanceInquiryRequest body, CallContext context = null)
{
var uri = InstantiateUri("/processing/v1/{acquirerId}/{merchantId}/balance-inquiries", null);
try
{
return await _communicator.Post<ApiBalanceInquiryResponse>(
uri,
null,
null,
body,
context).ConfigureAwait(false);
}
catch (ResponseException e)
{
object errorObject = _communicator.Marshaller.Unmarshal<ApiPaymentErrorResponse>(e.Body);
throw ExceptionFactory.CreateException(e.StatusCode, e.Body, errorObject, context);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
using System.Collections.Generic;
using Worldline.Acquiring.Sdk.V1.Acquirer.Merchant.Accountverifications;
using Worldline.Acquiring.Sdk.V1.Acquirer.Merchant.Balanceinquiries;
using Worldline.Acquiring.Sdk.V1.Acquirer.Merchant.Dynamiccurrencyconversion;
using Worldline.Acquiring.Sdk.V1.Acquirer.Merchant.Payments;
using Worldline.Acquiring.Sdk.V1.Acquirer.Merchant.Refunds;
Expand Down Expand Up @@ -38,6 +39,12 @@ public MerchantClient(ApiResource parent, IDictionary<string, string> pathContex
/// <returns>AccountVerificationsClient</returns>
public AccountVerificationsClient AccountVerifications => new AccountVerificationsClient(this, null);

/// <summary>
/// Resource /processing/v1/{acquirerId}/{merchantId}/balance-inquiries
/// </summary>
/// <returns>BalanceInquiriesClient</returns>
public BalanceInquiriesClient BalanceInquiries => new BalanceInquiriesClient(this, null);

/// <summary>
/// Resource /processing/v1/{acquirerId}/{merchantId}/operations/{operationId}/reverse
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Worldline.Acquiring.Sdk/V1/Domain/AmountData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class AmountData
/// <summary>
/// Amount of transaction formatted according to card scheme
/// specifications.
/// E.g. 100 for 1.00 EUR. Either this or amount must be present.
/// E.g. 100 for 1.00 EUR.
/// </summary>
public long? Amount { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class ApiAccountVerificationRequest
/// </summary>
public PaymentReferences References { get; set; }

public TerminalData TerminalData { get; set; }

/// <summary>
/// Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)<br />
/// It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ public class ApiAccountVerificationResponse

/// <summary>
/// The party that originated the response
/// Possible values are:
/// <list type="bullet">
/// <item><description>WORLDLINE</description></item>
/// <item><description>ISSUER</description></item>
/// <item><description>SCHEME</description></item>
/// <item><description>PARTNER</description></item>
/// </list>
/// </summary>
public string Responder { get; set; }

Expand All @@ -37,7 +44,13 @@ public class ApiAccountVerificationResponse
public string ResponseCode { get; set; }

/// <summary>
/// Category of response code.
/// Category of response code.<br />
/// Possible values are:
/// <list type="bullet">
/// <item><description>APPROVED</description></item>
/// <item><description>PARTIALLY_APPROVED</description></item>
/// <item><description>DECLINED</description></item>
/// </list>
/// </summary>
public string ResponseCodeCategory { get; set; }

Expand Down
15 changes: 14 additions & 1 deletion Worldline.Acquiring.Sdk/V1/Domain/ApiActionResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ public class ApiActionResponse

/// <summary>
/// The party that originated the response
/// Possible values are:
/// <list type="bullet">
/// <item><description>WORLDLINE</description></item>
/// <item><description>ISSUER</description></item>
/// <item><description>SCHEME</description></item>
/// <item><description>PARTNER</description></item>
/// </list>
/// </summary>
public string Responder { get; set; }

Expand All @@ -30,7 +37,13 @@ public class ApiActionResponse
public string ResponseCode { get; set; }

/// <summary>
/// Category of response code.
/// Category of response code.<br />
/// Possible values are:
/// <list type="bullet">
/// <item><description>APPROVED</description></item>
/// <item><description>PARTIALLY_APPROVED</description></item>
/// <item><description>DECLINED</description></item>
/// </list>
/// </summary>
public string ResponseCodeCategory { get; set; }

Expand Down
15 changes: 14 additions & 1 deletion Worldline.Acquiring.Sdk/V1/Domain/ApiActionResponseForRefund.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ public class ApiActionResponseForRefund

/// <summary>
/// The party that originated the response
/// Possible values are:
/// <list type="bullet">
/// <item><description>WORLDLINE</description></item>
/// <item><description>ISSUER</description></item>
/// <item><description>SCHEME</description></item>
/// <item><description>PARTNER</description></item>
/// </list>
/// </summary>
public string Responder { get; set; }

Expand All @@ -30,7 +37,13 @@ public class ApiActionResponseForRefund
public string ResponseCode { get; set; }

/// <summary>
/// Category of response code.
/// Category of response code.<br />
/// Possible values are:
/// <list type="bullet">
/// <item><description>APPROVED</description></item>
/// <item><description>PARTIALLY_APPROVED</description></item>
/// <item><description>DECLINED</description></item>
/// </list>
/// </summary>
public string ResponseCodeCategory { get; set; }

Expand Down
43 changes: 43 additions & 0 deletions Worldline.Acquiring.Sdk/V1/Domain/ApiBalanceInquiryRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* This file was automatically generated.
*/
using System;

namespace Worldline.Acquiring.Sdk.V1.Domain
{
public class ApiBalanceInquiryRequest
{
/// <summary>
/// Card data
/// </summary>
public CardPaymentDataForBalanceInquiry CardPaymentData { get; set; }

/// <summary>
/// Merchant Data
/// </summary>
public MerchantData Merchant { get; set; }

/// <summary>
/// A globally unique identifier of the operation, generated by you.<br />
/// We advise you to submit a UUID or an identifier composed of an arbitrary string
/// and a UUID/URL-safe Base64 UUID (RFC 4648 §5).<br />
/// It's used to detect duplicate requests or to reference an operation in
/// technical reversals.
/// </summary>
public string OperationId { get; set; }

/// <summary>
/// Payment References
/// </summary>
public PaymentReferences References { get; set; }

public TerminalData TerminalData { get; set; }

/// <summary>
/// Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)<br />
/// It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00)
/// or in UTC (ex: 2023-10-10T08:00Z)
/// </summary>
public DateTimeOffset TransactionTimestamp { get; set; }
}
}
65 changes: 65 additions & 0 deletions Worldline.Acquiring.Sdk/V1/Domain/ApiBalanceInquiryResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* This file was automatically generated.
*/
namespace Worldline.Acquiring.Sdk.V1.Domain
{
public class ApiBalanceInquiryResponse
{
/// <summary>
/// Authorization approval code
/// </summary>
public string AuthorizationCode { get; set; }

/// <summary>
/// Amount for the operation.
/// </summary>
public AmountData AvailableAmount { get; set; }

/// <summary>
/// A globally unique identifier of the operation, generated by you.<br />
/// We advise you to submit a UUID or an identifier composed of an arbitrary string
/// and a UUID/URL-safe Base64 UUID (RFC 4648 §5).<br />
/// It's used to detect duplicate requests or to reference an operation in
/// technical reversals.
/// </summary>
public string OperationId { get; set; }

/// <summary>
/// A set of references returned in responses
/// </summary>
public ApiReferencesForResponses References { get; set; }

/// <summary>
/// The party that originated the response
/// Possible values are:
/// <list type="bullet">
/// <item><description>WORLDLINE</description></item>
/// <item><description>ISSUER</description></item>
/// <item><description>SCHEME</description></item>
/// <item><description>PARTNER</description></item>
/// </list>
/// </summary>
public string Responder { get; set; }

/// <summary>
/// Numeric response code, e.g. 0000, 0005
/// </summary>
public string ResponseCode { get; set; }

/// <summary>
/// Category of response code.<br />
/// Possible values are:
/// <list type="bullet">
/// <item><description>APPROVED</description></item>
/// <item><description>PARTIALLY_APPROVED</description></item>
/// <item><description>DECLINED</description></item>
/// </list>
/// </summary>
public string ResponseCodeCategory { get; set; }

/// <summary>
/// Description of the response code
/// </summary>
public string ResponseCodeDescription { get; set; }
}
}
7 changes: 7 additions & 0 deletions Worldline.Acquiring.Sdk/V1/Domain/ApiCaptureRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ public class ApiCaptureRequest
/// </summary>
public string OperationId { get; set; }

/// <summary>
/// Payment References
/// </summary>
public PaymentReferences References { get; set; }

public TerminalData TerminalData { get; set; }

/// <summary>
/// Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)<br />
/// It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ public class ApiCaptureRequestForRefund
/// </summary>
public string OperationId { get; set; }

/// <summary>
/// Payment References
/// </summary>
public PaymentReferences References { get; set; }

public TerminalData TerminalData { get; set; }

/// <summary>
/// Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)<br />
/// It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00)
Expand Down
2 changes: 2 additions & 0 deletions Worldline.Acquiring.Sdk/V1/Domain/ApiIncrementRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class ApiIncrementRequest
/// </summary>
public string OperationId { get; set; }

public TerminalData TerminalData { get; set; }

/// <summary>
/// Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)<br />
/// It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00)
Expand Down
2 changes: 2 additions & 0 deletions Worldline.Acquiring.Sdk/V1/Domain/ApiPaymentRefundRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class ApiPaymentRefundRequest
/// </summary>
public PaymentReferences References { get; set; }

public TerminalData TerminalData { get; set; }

/// <summary>
/// Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)<br />
/// It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00)
Expand Down
2 changes: 2 additions & 0 deletions Worldline.Acquiring.Sdk/V1/Domain/ApiPaymentRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public class ApiPaymentRequest
/// </summary>
public PaymentReferences References { get; set; }

public TerminalData TerminalData { get; set; }

/// <summary>
/// Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)<br />
/// It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00)
Expand Down
Loading

0 comments on commit 6b9c5ff

Please sign in to comment.