Skip to content

Commit

Permalink
Merge pull request #930 from Adyen/promote/main/to/v12.0.0
Browse files Browse the repository at this point in the history
Release v13.0.0
  • Loading branch information
AdyenAutomationBot authored Nov 7, 2023
2 parents 1d676a9 + 08271aa commit 929ec48
Show file tree
Hide file tree
Showing 240 changed files with 2,593 additions and 1,751 deletions.
2 changes: 1 addition & 1 deletion Adyen.IntegrationTest/CheckoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void PaymentLinksSuccessTest()
ShopperEmail = "[email protected]",
BillingAddress = address,
DeliveryAddress = address,
ExpiresAt = DateTime.Now.AddHours(4).ToString("yyyy-MM-ddTHH:mm:ss")
ExpiresAt = DateTime.Now.AddHours(4)
};
var createPaymentLinkResponse = _paymentLinksService.PaymentLinks(createPaymentLinkRequest);
PaymentLinksGetSuccessTest(createPaymentLinkResponse.Id);
Expand Down
8 changes: 4 additions & 4 deletions Adyen.Test/Adyen.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

<IsPackable>false</IsPackable>

<AssemblyVersion>12.0.0</AssemblyVersion>
<AssemblyVersion>13.0.0</AssemblyVersion>

<FileVersion>12.0.0-beta</FileVersion>
<FileVersion>13.0.0</FileVersion>

<Version>12.0.0-beta</Version>
<Version>13.0.0</Version>

<LangVersion>7.2</LangVersion>

<PackageVersion>12.0.0-beta</PackageVersion>
<PackageVersion>13.0.0</PackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
10 changes: 5 additions & 5 deletions Adyen.Test/CheckoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void CheckoutEndpointTestEnvironmentSuccessTest()
var checkout = new PaymentsService(client);
checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter();

ClientInterfaceSubstitute.Received().RequestAsync("https://checkout-test.adyen.com/v70/payments",
ClientInterfaceSubstitute.Received().RequestAsync("https://checkout-test.adyen.com/v71/payments",
Arg.Any<string>(), null, new HttpMethod("POST"), default);
}

Expand All @@ -49,7 +49,7 @@ public void CheckoutEndpointLiveEnvironmentSuccessTest()
checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter();

ClientInterfaceSubstitute.Received().RequestAsync(
"https://companyUrl-checkout-live.adyenpayments.com/checkout/v70/payments",
"https://companyUrl-checkout-live.adyenpayments.com/checkout/v71/payments",
Arg.Any<string>(), null, new HttpMethod("POST"), Arg.Any<CancellationToken>());
}

Expand Down Expand Up @@ -98,7 +98,7 @@ public void CheckoutEndpointLiveWithBasicAuthTest()
});
var checkout = new PaymentsService(client);
checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter();
ClientInterfaceSubstitute.Received().RequestAsync("https://live-url-checkout-live.adyenpayments.com/checkout/v70/payments",
ClientInterfaceSubstitute.Received().RequestAsync("https://live-url-checkout-live.adyenpayments.com/checkout/v71/payments",
Arg.Any<string>(), null, new HttpMethod("POST"), default);
}

Expand All @@ -117,7 +117,7 @@ public void CheckoutEndpointLiveWithAPIKeyTest()
});
var checkout = new PaymentsService(client);
checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter();
ClientInterfaceSubstitute.Received().RequestAsync("https://live-url-checkout-live.adyenpayments.com/checkout/v70/payments",
ClientInterfaceSubstitute.Received().RequestAsync("https://live-url-checkout-live.adyenpayments.com/checkout/v71/payments",
Arg.Any<string>(), null, new HttpMethod("POST"), Arg.Any<CancellationToken>());
}

Expand Down Expand Up @@ -570,7 +570,7 @@ public void PaymentLinksSuccess()
var paymentLinksResponse = checkout.PaymentLinks(createPaymentLinkRequest);
Assert.AreEqual(paymentLinksResponse.Url,
"https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=YW1vdW50TWlub3JW...JRA");
Assert.AreEqual(paymentLinksResponse.ExpiresAt, "2019-12-17T10:05:29Z");
Assert.AreEqual(paymentLinksResponse.ExpiresAt, new DateTime(2019,12,17,10,05,29));
Assert.AreEqual(paymentLinksResponse.Reference, "YOUR_ORDER_NUMBER");
Assert.IsNotNull(paymentLinksResponse.Amount);
}
Expand Down
9 changes: 0 additions & 9 deletions Adyen.Test/DisputesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,6 @@ public void DeleteDisputesSuccess()
var response = disputes.DeleteDisputeDefenseDocument(new DeleteDefenseDocumentRequest());
Assert.IsTrue(response.DisputeServiceResult.Success);
}

[TestMethod]
public void DownloadDisputesDefenceDocumentSuccess()
{
var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/disputes/download-defense-document.json");
var disputes = new DisputesService(client);
var response = disputes.DownloadDisputeDefenseDocument(new DownloadDefenseDocumentRequest());
Assert.IsTrue(response.DisputeServiceResult.Success);
}

[TestMethod]
public void RetrieveApplicableDefenseReasonsSuccess()
Expand Down
2 changes: 1 addition & 1 deletion Adyen.Test/ExtensionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void TestCheckoutLiveEndPoint()
var service = new PaymentsService(_client);
service.Donations(new DonationPaymentRequest());
ClientInterfaceSubstitute.Received().RequestAsync(
"https://prefix-checkout-live.adyenpayments.com/checkout/v70/donations",
"https://prefix-checkout-live.adyenpayments.com/checkout/v71/donations",
Arg.Any<string>(), null, HttpMethod.Post, default);
}

Expand Down
43 changes: 43 additions & 0 deletions Adyen.Test/WebhooksTests/NewWebhookHandlerTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Adyen.Model.ConfigurationWebhooks;
using Adyen.Model.ManagementWebhooks;
using Adyen.Model.TransactionWebhooks;
using Adyen.Webhooks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
Expand Down Expand Up @@ -217,5 +218,47 @@ public void Test_Management_Webhook_MerchantCreated()
Assert.AreEqual(data.RequestedLevel, "notApplicable");
Assert.AreEqual(data.Requested, true);
}

[TestMethod]
public void Test_TransactionWebhook_V4()
{
const string jsonPayload = @"{
'data': {
'id': 'EVJN42272224222B5JB8BRC84N686ZEUR',
'amount': {
'value': 7000,
'currency': 'EUR'
},
'status': 'booked',
'transfer': {
'id': 'JN4227222422265',
'reference': 'Split_item_1',
},
'valueDate': '2023-03-01T00:00:00+02:00',
'bookingDate': '2023-02-28T13:30:20+02:00',
'creationDate': '2023-02-28T13:30:05+02:00',
'accountHolder': {
'id': 'AH00000000000000000000001',
'description': 'Your description for the account holder',
'reference': 'Your reference for the account holder'
},
'balanceAccount': {
'id': 'BA00000000000000000000001',
'description': 'Your description for the balance account',
'reference': 'Your reference for the balance account'
},
'balancePlatform': 'YOUR_BALANCE_PLATFORM'
},
'type': 'balancePlatform.transaction.created',
'environment': 'test'
}";
Assert.IsFalse(_target.GetPaymentNotificationRequest(jsonPayload, out var dummy));
var response = _target.GetTransactionNotificationRequestV4(jsonPayload, out var webhook);
Assert.IsTrue(response);
Assert.AreEqual(webhook.Type, TransactionNotificationRequestV4.TypeEnum.BalancePlatformTransactionCreated);
Assert.IsTrue(webhook.Data.ValueDate.Equals(DateTime.Parse("2023-03-01T00:00:00+02:00")));
Assert.AreEqual(webhook.Data.BalanceAccount.Id, "BA00000000000000000000001");
Assert.AreEqual(webhook.Data.Status, Transaction.StatusEnum.Booked);
}
}
}
10 changes: 5 additions & 5 deletions Adyen/Adyen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Adyen</Copyright>

<Version>12.0.0-beta</Version>
<AssemblyVersion>12.0.0</AssemblyVersion>
<FileVersion>12.0.0-beta</FileVersion>
<Version>13.0.0</Version>
<AssemblyVersion>13.0.0</AssemblyVersion>
<FileVersion>13.0.0</FileVersion>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Description>The Adyen API Library for .net core enables you to work with Adyen APIs, Hosted Payment Pages and terminal api with any .net application.</Description>
<PackageProjectUrl>https://github.com/Adyen/adyen-dotnet-api-library</PackageProjectUrl>
<RepositoryUrl>https://github.com/Adyen/adyen-dotnet-api-library</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<PackageTags>12.0.0-beta</PackageTags>
<PackageTags>13.0.0</PackageTags>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Authors>Adyen</Authors>
Expand All @@ -28,7 +28,7 @@
<AssemblyOriginatorKeyFile>adyen-dotnet-api-library-key.snk</AssemblyOriginatorKeyFile>
<PackageIcon>adyen-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageVersion>12.0.0</PackageVersion>
<PackageVersion>13.0.0</PackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
Expand Down
14 changes: 13 additions & 1 deletion Adyen/Model/BinLookup/Recurring.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,19 @@ public enum TokenServiceEnum
/// Enum MCTOKENSERVICE for value: MCTOKENSERVICE
/// </summary>
[EnumMember(Value = "MCTOKENSERVICE")]
MCTOKENSERVICE = 2
MCTOKENSERVICE = 2,

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

/// <summary>
/// Enum TOKENSHARING for value: TOKEN_SHARING
/// </summary>
[EnumMember(Value = "TOKEN_SHARING")]
TOKENSHARING = 4

}

Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AbstractOpenAPISchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AccountInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AcctInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AchDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalData3DSecure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataAirline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataCarRental.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataLevel23.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataLodging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataOpenInvoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataOpi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataRatepay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataRetry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataRisk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataRiskStandalone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataSubMerchant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataTemporaryServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AdditionalDataWallets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/Address.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
2 changes: 1 addition & 1 deletion Adyen/Model/Checkout/AfterpayDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Adyen Checkout API
*
*
* The version of the OpenAPI document: 70
* The version of the OpenAPI document: 71
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
Expand Down
Loading

0 comments on commit 929ec48

Please sign in to comment.