-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
WorldlineAcquiring
committed
Dec 11, 2024
1 parent
ab58782
commit 6b9c5ff
Showing
50 changed files
with
647 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
Worldline.Acquiring.Sdk/V1/Acquirer/Merchant/Balanceinquiries/BalanceInquiriesClient.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
Worldline.Acquiring.Sdk/V1/Domain/ApiBalanceInquiryRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
65
Worldline.Acquiring.Sdk/V1/Domain/ApiBalanceInquiryResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.