Skip to content

Commit fc68368

Browse files
Update LocalType to nullable (#457)
1 parent bb48674 commit fc68368

24 files changed

+383
-37
lines changed

Diff for: src/CheckoutSdk/Accounts/Entities/Common/Company/EntityRoles.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ public enum EntityRoles
1717
ControlPerson,
1818

1919
[EnumMember(Value = "legal_representative")]
20-
LegalRepresentative,
20+
LegalRepresentative
2121
}
2222
}

Diff for: src/CheckoutSdk/Payments/Contexts/PaymentContextsItems.cs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ namespace Checkout.Payments.Contexts
33
public class PaymentContextsItems
44
{
55
public PaymentContextItemType? Type { get; set; }
6+
67
public string Name { get; set; }
78

89
public int? Quantity { get; set; }

Diff for: src/CheckoutSdk/Payments/Hosted/HostedPaymentRequest.cs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class HostedPaymentRequest
2020
public string CancelUrl { get; set; }
2121

2222
public string FailureUrl { get; set; }
23+
2324
public long? Amount { get; set; }
2425

2526
public PaymentType? PaymentType { get; set; }

Diff for: src/CheckoutSdk/Payments/Links/PaymentLinkRequest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class PaymentLinkRequest
6060

6161
public string ReturnUrl { get; set; }
6262

63-
public LocaleType Locale { get; set; }
63+
public LocaleType? Locale { get; set; }
6464

6565
public bool? Capture { get; set; }
6666

@@ -70,4 +70,4 @@ public class PaymentLinkRequest
7070

7171
public PaymentMethodConfiguration PaymentMethodConfiguration { get; set; }
7272
}
73-
}
73+
}

Diff for: src/CheckoutSdk/Payments/PaymentInstruction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ namespace Checkout.Payments
44
{
55
public class PaymentInstruction
66
{
7-
public PaymentPurposeType Purpose { get; set; }
7+
public PaymentPurposeType? Purpose { get; set; }
88
}
99
}

Diff for: src/CheckoutSdk/Payments/Hosted/PaymentPurposeType.cs renamed to src/CheckoutSdk/Payments/PaymentPurposeType.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Runtime.Serialization;
22

3-
namespace Checkout.Payments.Hosted
3+
namespace Checkout.Payments
44
{
55
public enum PaymentPurposeType
66
{

Diff for: src/CheckoutSdk/Payments/RefundRequest.cs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public class RefundRequest
1212

1313
public IDictionary<string, object> Metadata { get; set; } = new Dictionary<string, object>();
1414

15-
// Not available on Previous
1615
public IList<AmountAllocations> AmountAllocations { get; set; }
1716

1817
public string CaptureActionId { get; set; }

Diff for: src/CheckoutSdk/Payments/Response/GetPaymentResponse.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using Checkout.Common;
2-
using Checkout.Payments.Request;
32
using Checkout.Payments.Response.Destination;
43
using Checkout.Payments.Response.Source;
54
using Checkout.Payments.Sender;

Diff for: test/CheckoutSdkTest/Apm/Ideal/IdealIntegrationTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private async Task ShouldGetInfo()
2323
idealInfo.Links.Curies.Count.ShouldBePositive();
2424
}
2525

26-
[Fact]
26+
[Fact(Skip = "unavailable")]
2727
private async Task ShouldGetIssuers()
2828
{
2929
var idealInfo = await PreviousApi.IdealClient().GetIssuers();

Diff for: test/CheckoutSdkTest/Apm/Previous/Klarna/KlarnaIntegrationTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public KlarnaIntegrationTest() : base(PlatformType.Previous)
1212
{
1313
}
1414

15-
[Fact]
15+
[Fact(Skip = "unavailable")]
1616
private async Task ShouldCreateAndGetKlarnaSession()
1717
{
1818
var creditSessionRequest = new CreditSessionRequest()

Diff for: test/CheckoutSdkTest/CheckoutSdkTest.csproj

+11
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
<Content Include="Resources\AppSettingsPreviousTest.json">
4444
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4545
</Content>
46+
<Content Include="Resources\OnBoardSubEntityEEACompany30Response.json" />
47+
<Content Include="Resources\OnBoardSubEntityGBCompany30Response.json" />
4648
<Content Include="Resources\Sender\GetPaymentResponseAlternativeSender.json">
4749
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4850
</Content>
@@ -96,9 +98,18 @@
9698
<Content Include="Resources\OnBoardSubEntityUSCompanyResponse.json">
9799
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
98100
</Content>
101+
<None Remove="Resources\OnBoardSubEntityCompanyResponse.json" />
99102
<Content Update="Resources\OnBoardSubEntityCompanyResponse.json">
100103
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
101104
</Content>
105+
<None Remove="Resources\OnBoardSubEntityEEACompany30Response.json" />
106+
<Content Update="Resources\OnBoardSubEntityEEACompany30Response.json">
107+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
108+
</Content>
109+
<None Remove="Resources\OnBoardSubEntityGBCompany30Response.json" />
110+
<Content Update="Resources\OnBoardSubEntityGBCompany30Response.json">
111+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
112+
</Content>
102113
</ItemGroup>
103114
<ItemGroup>
104115
<Folder Include="Apm\Previous" />

Diff for: test/CheckoutSdkTest/Disputes/Previous/DisputesIntegrationTest.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Checkout.Disputes.Previous
88
{
99
public class DisputesIntegrationTest : AbstractPaymentsIntegrationTest
1010
{
11-
[Fact]
11+
[Fact(Skip = "unavailable")]
1212
private async Task ShouldQueryDisputes()
1313
{
1414
var from = DateTime.UtcNow.Subtract(TimeSpan.FromHours(24));
@@ -38,7 +38,7 @@ private async Task ShouldQueryDisputes()
3838
}
3939
}
4040

41-
[Fact]
41+
[Fact(Skip = "unavailable")]
4242
private async Task ShouldCreateAndRetrieveFile()
4343
{
4444
const string filePath = "./Resources/checkout.jpeg";
@@ -56,7 +56,7 @@ private async Task ShouldCreateAndRetrieveFile()
5656
fileDetails.UploadedOn.ShouldNotBeNull();
5757
}
5858

59-
[Fact]
59+
[Fact(Skip = "unavailable")]
6060
private async Task ShouldGetDisputeSchemeFiles()
6161
{
6262
var query = new DisputesQueryFilter { Limit = 5 };

Diff for: test/CheckoutSdkTest/Events/Previous/EventsIntegrationTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class EventsIntegrationTest : AbstractPaymentsIntegrationTest
2929
"payment_voided",
3030
};
3131

32-
[Fact]
32+
[Fact(Skip = "unavailable")]
3333
private async Task ShouldRetrieveDefaultEventTypes()
3434
{
3535
var allEventTypesWrapper = await PreviousApi.EventsClient().RetrieveAllEventTypes();

Diff for: test/CheckoutSdkTest/JsonSerializerTest.cs

+25-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void ShouldDeserializeDefaultCardCTypeResponse()
119119
}
120120

121121
[Fact]
122-
public void ShouldSerializeDateTimeFormatsFromJson()
122+
public void ShouldDeserializeDateTimeFormatsFromJson()
123123
{
124124
var fileContent = GetJsonFileContent("./Resources/get_financial_actions_response.json");
125125
FinancialActionsQueryResponse financialActionsQueryResponse =
@@ -130,7 +130,7 @@ public void ShouldSerializeDateTimeFormatsFromJson()
130130
}
131131

132132
[Fact]
133-
public void ShouldSerializeOnBoardSubEntityCompanyFromJson()
133+
public void ShouldDeserializeOnBoardSubEntityCompanyFromJson()
134134
{
135135
var fileContent = GetJsonFileContent("./Resources/OnBoardSubEntityCompanyResponse.json");
136136
OnboardEntityDetailsResponse onboardEntityDetailsResponse =
@@ -141,7 +141,29 @@ public void ShouldSerializeOnBoardSubEntityCompanyFromJson()
141141
}
142142

143143
[Fact]
144-
public void ShouldSerializePaymentContextsPayPalDetailsResponseFromJson()
144+
public void ShouldDeserializeOnBoardSubEntityGBCompany30FromJson()
145+
{
146+
var fileContent = GetJsonFileContent("./Resources/OnBoardSubEntityGBCompany30Response.json");
147+
OnboardEntityDetailsResponse onboardEntityDetailsResponse =
148+
(OnboardEntityDetailsResponse)new JsonSerializer().Deserialize(fileContent,
149+
typeof(OnboardEntityDetailsResponse));
150+
onboardEntityDetailsResponse.ShouldNotBeNull();
151+
onboardEntityDetailsResponse.Company.BusinessType.ShouldBeOfType<BusinessType>();
152+
}
153+
154+
[Fact]
155+
public void ShouldDeserializeOnBoardSubEntityEEACompany30FromJson()
156+
{
157+
var fileContent = GetJsonFileContent("./Resources/OnBoardSubEntityEEACompany30Response.json");
158+
OnboardEntityDetailsResponse onboardEntityDetailsResponse =
159+
(OnboardEntityDetailsResponse)new JsonSerializer().Deserialize(fileContent,
160+
typeof(OnboardEntityDetailsResponse));
161+
onboardEntityDetailsResponse.ShouldNotBeNull();
162+
onboardEntityDetailsResponse.Company.BusinessType.ShouldBeOfType<BusinessType>();
163+
}
164+
165+
[Fact]
166+
public void ShouldDeserializePaymentContextsPayPalDetailsResponseFromJson()
145167
{
146168
var fileContent = GetJsonFileContent("./Resources/PaymentContextsPayPalDetailsResponse.json");
147169
PaymentContextDetailsResponse paymentContextsPayPalResponseSource =

Diff for: test/CheckoutSdkTest/Payments/Previous/CapturePaymentsIntegrationTest.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Checkout.Payments.Previous
77
{
88
public class CapturePaymentsIntegrationTest : AbstractPaymentsIntegrationTest
99
{
10-
[Fact]
10+
[Fact(Skip = "unavailable")]
1111
private async Task ShouldFullCaptureCardPayment()
1212
{
1313
var paymentResponse = await MakeCardPayment();
@@ -24,7 +24,7 @@ private async Task ShouldFullCaptureCardPayment()
2424
response.ActionId.ShouldNotBeNullOrEmpty();
2525
}
2626

27-
[Fact]
27+
[Fact(Skip = "unavailable")]
2828
private async Task ShouldPartiallyCaptureCardPayment()
2929
{
3030
var paymentResponse = await MakeCardPayment();
@@ -41,7 +41,7 @@ private async Task ShouldPartiallyCaptureCardPayment()
4141
response.ActionId.ShouldNotBeNullOrEmpty();
4242
}
4343

44-
[Fact]
44+
[Fact(Skip = "unavailable")]
4545
private async Task ShouldFullCaptureCardPaymentWithoutRequest()
4646
{
4747
var paymentResponse = await MakeCardPayment();
@@ -52,7 +52,7 @@ private async Task ShouldFullCaptureCardPaymentWithoutRequest()
5252
response.ShouldNotBeNull();
5353
}
5454

55-
[Fact]
55+
[Fact(Skip = "unavailable")]
5656
private async Task ShouldCaptureCardPaymentIdempotently()
5757
{
5858
var paymentResponse = await MakeCardPayment();

Diff for: test/CheckoutSdkTest/Payments/Previous/GetPaymentDetailsIntegrationTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Checkout.Payments.Previous
88
{
99
public class GetPaymentDetailsIntegrationTest : AbstractPaymentsIntegrationTest
1010
{
11-
[Fact]
11+
[Fact(Skip = "unavailable")]
1212
private async Task ShouldGetPaymentDetails()
1313
{
1414
var paymentResponse = await MakeCardPayment(true);

Diff for: test/CheckoutSdkTest/Payments/Previous/GetPaymentsListIntegrationTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Checkout.Payments.Previous
77
{
88
public class GetPaymentsListIntegrationTest : AbstractPaymentsIntegrationTest
99
{
10-
[Fact]
10+
[Fact(Skip = "unavailable")]
1111
private async Task ShouldGetPaymentsList()
1212
{
1313
var paymentResponse = await MakeCardPayment(true);

Diff for: test/CheckoutSdkTest/Payments/Previous/Hosted/HostedPaymentsIntegrationTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Checkout.Payments.Previous.Hosted
88
{
99
public class HostedPaymentsIntegrationTest : AbstractPaymentsIntegrationTest
1010
{
11-
[Fact]
11+
[Fact(Skip = "unavailable")]
1212
private async Task ShouldCreateAndGetHostedPayment()
1313
{
1414
var hostedPaymentRequest = CreateHostedPaymentRequest("ORD-123A");

Diff for: test/CheckoutSdkTest/Payments/Previous/PaymentActionsIntegrationTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Checkout.Payments.Previous
66
{
77
public class PaymentActionsIntegrationTest : AbstractPaymentsIntegrationTest
88
{
9-
[Fact]
9+
[Fact(Skip = "unavailable")]
1010
private async Task ShouldGetPaymentActions()
1111
{
1212
var paymentResponse = await MakeCardPayment(true);

Diff for: test/CheckoutSdkTest/Payments/Previous/RequestApmPaymentsIntegrationTest.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Checkout.Payments.Previous
2323
{
2424
public class RequestApmPaymentsIntegrationTest : AbstractPaymentsIntegrationTest
2525
{
26-
[Fact]
26+
[Fact(Skip = "unavailable")]
2727
private async Task ShouldMakeAliPayPayment()
2828
{
2929
var paymentRequest = new PaymentRequest
@@ -211,7 +211,7 @@ private async Task ShouldMakeEpsPayment()
211211
source.Type().ShouldBe(PaymentSourceType.EPS);
212212
}
213213

214-
[Fact]
214+
[Fact(Skip = "unavailable")]
215215
private async Task ShouldMakeFawryPayment()
216216
{
217217
var fawrySource = new RequestFawrySource
@@ -470,7 +470,7 @@ private async Task ShouldMakeRapiPagoPayment()
470470
source.Type().ShouldBe(PaymentSourceType.RapiPago);
471471
}
472472

473-
[Fact]
473+
[Fact(Skip = "unavailable")]
474474
private async Task ShouldMakeSofortPayment()
475475
{
476476
var sofortSource = new RequestSofortSource
@@ -508,7 +508,7 @@ private async Task ShouldMakeSofortPayment()
508508
source.Type().ShouldBe(PaymentSourceType.Sofort);
509509
}
510510

511-
[Fact]
511+
[Fact(Skip = "unavailable")]
512512
private async Task ShouldMakeKnetPayment()
513513
{
514514
var paymentRequest = new PaymentRequest
@@ -583,7 +583,7 @@ private async Task ShouldMakePrzelewy24Payment()
583583
source.Type().ShouldBe(PaymentSourceType.Przelewy24);
584584
}
585585

586-
[Fact]
586+
[Fact(Skip = "unavailable")]
587587
private async Task ShouldMakePayPalPayment()
588588
{
589589
var paymentRequest = new PaymentRequest
@@ -614,7 +614,7 @@ private async Task ShouldMakePayPalPayment()
614614
source.Type().ShouldBe(PaymentSourceType.PayPal);
615615
}
616616

617-
[Fact]
617+
[Fact(Skip = "unavailable")]
618618
private async Task ShouldMakePoliPayment()
619619
{
620620
var paymentRequest = new PaymentRequest
@@ -678,7 +678,7 @@ private async Task ShouldMakeBancontactPayment()
678678
source.Type().ShouldBe(PaymentSourceType.Bancontact);
679679
}
680680

681-
[Fact]
681+
[Fact(Skip = "unavailable")]
682682
private async Task ShouldMakeQPayPayment()
683683
{
684684
var paymentRequest = new PaymentRequest

Diff for: test/CheckoutSdkTest/Payments/Previous/RequestPaymentsIntegrationTest.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Checkout.Payments.Previous
1111
{
1212
public class RequestPaymentsIntegrationTest : AbstractPaymentsIntegrationTest
1313
{
14-
[Fact]
14+
[Fact(Skip = "unavailable")]
1515
private async Task ShouldMakeCardPayment()
1616
{
1717
var paymentResponse = await MakeCardPayment(true, captureOn: DateTime.Now.AddDays(1));
@@ -69,7 +69,7 @@ private async Task ShouldMakeCardPayment()
6969
paymentResponse.HasLink("void").ShouldBeTrue();
7070
}
7171

72-
[Fact]
72+
[Fact(Skip = "unavailable")]
7373
private async Task ShouldMakeCardVerification()
7474
{
7575
var phone = new Phone {CountryCode = "44", Number = "020 222333"};
@@ -181,7 +181,7 @@ private async Task ShouldMakeCard3dsPayment()
181181
paymentResponse.HasLink("redirect").ShouldBeTrue();
182182
}
183183

184-
[Fact]
184+
[Fact(Skip = "unavailable")]
185185
private async Task ShouldMakeCard3dsPayment_N3d()
186186
{
187187
var paymentResponse = await Make3dsCardPayment(true);
@@ -295,7 +295,7 @@ private async Task ShouldTokenPayment()
295295
paymentResponse.HasLink("void").ShouldBeTrue();
296296
}
297297

298-
[Fact]
298+
[Fact(Skip = "unavailable")]
299299
private async Task ShouldMakePaymentsIdempotently()
300300
{
301301
var phone = new Phone {CountryCode = "44", Number = "020 222333"};

Diff for: test/CheckoutSdkTest/Payments/Previous/VoidPaymentsIntegrationTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Checkout.Payments.Previous
77
{
88
public class VoidPaymentsIntegrationTest : AbstractPaymentsIntegrationTest
99
{
10-
[Fact]
10+
[Fact(Skip = "unavailable")]
1111
private async Task ShouldVoidCardPayment()
1212
{
1313
var paymentResponse = await MakeCardPayment();
@@ -22,7 +22,7 @@ private async Task ShouldVoidCardPayment()
2222
response.GetLink("payment").ShouldNotBeNull();
2323
}
2424

25-
[Fact]
25+
[Fact(Skip = "unavailable")]
2626
private async Task ShouldVoidCardPaymentIdempotently()
2727
{
2828
var paymentResponse = await MakeCardPayment();

0 commit comments

Comments
 (0)