Skip to content

Commit b8160e2

Browse files
WIP responses
1 parent adab53f commit b8160e2

File tree

58 files changed

+190
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+190
-177
lines changed

src/CheckoutSdk/HandlePaymentsAndPayouts/Payments/POSTPayments/Requests/UnreferencedRefundRequest/Destination/CardDestination/CardDestination.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public CardDestination() : base(DestinationType.Card)
2727
/// <summary>
2828
/// The card's expiration month.
2929
/// [Required]
30-
/// [ 1 .. 2 ] characters
30+
/// [ 1 .. 2 ] characters [ 1 .. 12 ]
3131
/// </summary>
3232
public int ExpiryMonth { get; set; }
3333

src/CheckoutSdk/HandlePaymentsAndPayouts/Payments/POSTPayments/Requests/UnreferencedRefundRequest/Destination/Common/AccountHolder/Common/BillingAddress/BillingAddress.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class BillingAddress
3636
/// The address state.
3737
/// [Optional]
3838
/// [ 2 .. 3 ] characters
39-
/// [ 2 .. 3 ]
4039
/// </summary>
4140
public string State { get; set; }
4241

src/CheckoutSdk/HandlePaymentsAndPayouts/Payments/POSTPayments/Requests/UnreferencedRefundRequest/Destination/NetworkTokenDestination/NetworkTokenDestination.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ public NetworkTokenDestination() : base(DestinationType.NetworkToken)
2727
/// The network token's expiration month.
2828
/// [Required]
2929
/// [ 1 .. 2 ] characters >= 1
30-
/// [ 1 .. 2 ] characters
31-
/// [ 1 .. 2 ]
3230
/// >= 1
3331
/// </summary>
3432
public int ExpiryMonth { get; set; }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.Requ
44
/// Request a payment or payout Response 202
55
/// Payment asynchronous or further action required
66
/// </summary>
7-
public class RequestAPaymentOrPayoutResponse202
7+
public class RequestAPaymentOrPayoutResponse
88
{
99

1010
}

src/CheckoutSdk/HandlePaymentsAndPayouts/Payments/POSTPayments/Responses/RequestAPaymentOrPayoutResponseOk/Customer/Phone/Phone.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using Checkout.Common;
2+
13
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponseOk.Customer.
24
Phone
35
{
@@ -12,7 +14,7 @@ public class Phone
1214
/// [Optional]
1315
/// [ 1 .. 7 ] characters
1416
/// </summary>
15-
public string CountryCode { get; set; }
17+
public CountryCode? CountryCode { get; set; }
1618

1719
/// <summary>
1820
/// The phone number. Required if source.type is tamara.

src/CheckoutSdk/HandlePaymentsAndPayouts/Payments/POSTPayments/Responses/RequestAPaymentOrPayoutResponseOk/Customer/Summary/Summary.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System;
2+
13
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponseOk.Customer.
24
Summary
35
{
@@ -12,33 +14,33 @@ public class Summary
1214
/// [Optional]
1315
/// <date>
1416
/// </summary>
15-
public string RegistrationDate { get; set; }
17+
public DateTime? RegistrationDate { get; set; }
1618

1719
/// <summary>
1820
/// The date of the customer's first transaction.
1921
/// [Optional]
2022
/// <date>
2123
/// </summary>
22-
public string FirstTransactionDate { get; set; }
24+
public DateTime? FirstTransactionDate { get; set; }
2325

2426
/// <summary>
2527
/// The date of the customer's last payment.
2628
/// [Optional]
2729
/// <date>
2830
/// </summary>
29-
public string LastPaymentDate { get; set; }
31+
public DateTime? LastPaymentDate { get; set; }
3032

3133
/// <summary>
3234
/// The total number of orders made by the customer.
3335
/// [Optional]
3436
/// </summary>
35-
public int TotalOrderCount { get; set; }
37+
public int? TotalOrderCount { get; set; }
3638

3739
/// <summary>
3840
/// The amount of the customer's last payment.
3941
/// [Optional]
4042
/// </summary>
41-
public double LastPaymentAmount { get; set; }
43+
public long? LastPaymentAmount { get; set; }
4244

4345
/// <summary>
4446
/// Specifies whether the customer is a premium customer.
@@ -62,6 +64,6 @@ public class Summary
6264
/// The lifetime value is an indicator of how valuable the relationship with the customer is to your company.
6365
/// [Optional]
6466
/// </summary>
65-
public double LifetimeValue { get; set; }
67+
public long? LifetimeValue { get; set; }
6668
}
6769
}

src/CheckoutSdk/HandlePaymentsAndPayouts/Payments/POSTPayments/Responses/RequestAPaymentOrPayoutResponseOk/Processing/Processing.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class Processing
8282
/// Error codes provided by partner
8383
/// [Optional]
8484
/// </summary>
85-
public IList<object> PartnerErrorCodes { get; set; }
85+
public IList<string> PartnerErrorCodes { get; set; }
8686

8787
/// <summary>
8888
/// Error description provided by partner
@@ -107,7 +107,7 @@ public class Processing
107107
/// [Optional]
108108
/// >= 0
109109
/// </summary>
110-
public int SurchargeAmount { get; set; }
110+
public int? SurchargeAmount { get; set; }
111111

112112
/// <summary>
113113
/// The type of Primary Account Number (PAN) used for the payment. DPAN indicates network token was used, FPAN
@@ -120,6 +120,6 @@ public class Processing
120120
/// The flag indicating if Checkout Network Token was available for the payment
121121
/// [Optional]
122122
/// </summary>
123-
public bool CkoNetworkTokenAvailable { get; set; }
123+
public bool? CkoNetworkTokenAvailable { get; set; }
124124
}
125125
}
Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponse201
1+
using Checkout.Common;
2+
using Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponseOk.Source;
3+
using Newtonsoft.Json;
4+
using System;
5+
6+
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponseOk
27
{
38
/// <summary>
49
/// Request a payment or payout Response 201
510
/// Payment processed successfully
611
/// </summary>
7-
public class RequestAPaymentOrPayoutResponse201
12+
public class RequestAPaymentOrPayoutResponseOk : Resource
813
{
9-
1014
/// <summary>
1115
/// The payment's unique identifier
1216
/// [Required]
1317
/// </summary>
14-
public any Id { get; set; }
18+
public string Id { get; set; }
1519

1620
/// <summary>
1721
/// The unique identifier for the action performed against this payment
@@ -25,7 +29,7 @@ public class RequestAPaymentOrPayoutResponse201
2529
/// The payment amount.
2630
/// [Required]
2731
/// </summary>
28-
public int Amount { get; set; }
32+
public long Amount { get; set; }
2933

3034
/// <summary>
3135
/// The three-letter ISO currency code of the payment
@@ -59,13 +63,6 @@ public class RequestAPaymentOrPayoutResponse201
5963
/// </summary>
6064
public DateTime ProcessedOn { get; set; }
6165

62-
/// <summary>
63-
/// The links related to the payment
64-
/// [Required]
65-
/// >= 2
66-
/// </summary>
67-
public Links Links { get; set; }
68-
6966
/// <summary>
7067
/// The full amount from the original authorization, if a partial authorization was requested and approved.
7168
/// [Optional]
@@ -94,13 +91,14 @@ public class RequestAPaymentOrPayoutResponse201
9491
/// Provides 3D Secure enrollment status if the payment was downgraded to non-3D Secure
9592
/// [Optional]
9693
/// </summary>
97-
public Threeds Threeds { get; set; }
94+
[JsonProperty(PropertyName = "3ds")]
95+
public Threeds.Threeds Threeds { get; set; }
9896

9997
/// <summary>
10098
/// Returns the payment's risk assessment results
10199
/// [Optional]
102100
/// </summary>
103-
public Risk Risk { get; set; }
101+
public Risk.Risk Risk { get; set; }
104102

105103
/// <summary>
106104
/// The source of the payment
@@ -112,13 +110,13 @@ public class RequestAPaymentOrPayoutResponse201
112110
/// The customer associated with the payment, if provided in the request
113111
/// [Optional]
114112
/// </summary>
115-
public Customer Customer { get; set; }
113+
public Customer.Customer Customer { get; set; }
116114

117115
/// <summary>
118116
/// The payment balances
119117
/// [Optional]
120118
/// </summary>
121-
public Balances Balances { get; set; }
119+
public Balances.Balances Balances { get; set; }
122120

123121
/// <summary>
124122
/// Your reference for the payment
@@ -130,13 +128,13 @@ public class RequestAPaymentOrPayoutResponse201
130128
/// The details of the subscription.
131129
/// [Optional]
132130
/// </summary>
133-
public Subscription Subscription { get; set; }
131+
public Subscription.Subscription Subscription { get; set; }
134132

135133
/// <summary>
136134
/// Returns information related to the processing of the payment
137135
/// [Optional]
138136
/// </summary>
139-
public Processing Processing { get; set; }
137+
public Processing.Processing Processing { get; set; }
140138

141139
/// <summary>
142140
/// The final Electronic Commerce Indicator (ECI) security level used to authorize the payment. Applicable for
@@ -155,7 +153,6 @@ public class RequestAPaymentOrPayoutResponse201
155153
/// Configuration relating to asynchronous retries
156154
/// [Optional]
157155
/// </summary>
158-
public Retry Retry { get; set; }
159-
156+
public Retry.Retry Retry { get; set; }
160157
}
161-
}
158+
}
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponse201.Retry
1+
using System;
2+
3+
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponseOk.Retry
24
{
35
/// <summary>
46
/// retry
57
/// Configuration relating to asynchronous retries
68
/// </summary>
79
public class Retry
810
{
9-
1011
/// <summary>
1112
/// Default: 6 The maximum number of authorization retry attempts, excluding the initial authorization.
12-
/// [Optional]
1313
/// [ 1 .. 15 ]
1414
/// </summary>
1515
public int MaxAttempts { get; set; } = 6;
@@ -19,14 +19,13 @@ public class Retry
1919
/// [Optional]
2020
/// <date-time>
2121
/// </summary>
22-
public DateTime EndsOn { get; set; }
22+
public DateTime? EndsOn { get; set; }
2323

2424
/// <summary>
2525
/// A timestamp of the date on which the next authorization attempt will take place, in ISO 8601 format.
2626
/// [Optional]
2727
/// <date-time>
2828
/// </summary>
29-
public DateTime NextAttemptOn { get; set; }
30-
29+
public DateTime? NextAttemptOn { get; set; }
3130
}
32-
}
31+
}
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponse201.Risk
1+
namespace Checkout.HandlePaymentsAndPayouts.Payments.POSTPayments.Responses.RequestAPaymentOrPayoutResponseOk.Risk
22
{
33
/// <summary>
44
/// risk
55
/// Returns the payment's risk assessment results
66
/// </summary>
77
public class Risk
88
{
9-
109
/// <summary>
1110
/// Default: false Whether or not the payment was flagged by a risk check
1211
/// [Optional]
1312
/// </summary>
14-
public bool Flagged { get; set; } = false;
13+
public bool? Flagged { get; set; } = false;
1514

1615
/// <summary>
1716
/// The risk score calculated by our Fraud Detection engine. Absent if not enough data provided.
1817
/// [Optional]
1918
/// [ 0 .. 100 ]
2019
/// </summary>
21-
public int Score { get; set; }
22-
20+
public int? Score { get; set; }
2321
}
24-
}
22+
}

0 commit comments

Comments
 (0)