Skip to content

Commit 861103e

Browse files
Swagger documentation updated
1 parent b116dec commit 861103e

18 files changed

Lines changed: 453 additions & 142 deletions

TransactionProcessor.DataTransferObjects/DataTransferObject.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
{
33
using System;
44
using System.Diagnostics.CodeAnalysis;
5+
using Newtonsoft.Json;
56

67
/// <summary>
78
///
89
/// </summary>
910
[ExcludeFromCodeCoverage]
10-
public abstract class DataTransferObject
11+
public class DataTransferObject
1112
{
1213
#region Properties
1314

@@ -18,6 +19,7 @@ public abstract class DataTransferObject
1819
/// <value>
1920
/// The estate identifier.
2021
/// </value>
22+
[JsonProperty("estate_id")]
2123
public Guid EstateId { get; set; }
2224

2325
/// <summary>
@@ -26,6 +28,7 @@ public abstract class DataTransferObject
2628
/// <value>
2729
/// The merchant identifier.
2830
/// </value>
31+
[JsonProperty("merchant_id")]
2932
public Guid MerchantId { get; set; }
3033

3134
#endregion

TransactionProcessor.DataTransferObjects/LogonTransactionRequest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
using System;
44
using System.Diagnostics.CodeAnalysis;
5+
using Newtonsoft.Json;
56

67
/// <summary>
78
///
@@ -17,6 +18,7 @@ public class LogonTransactionRequest : DataTransferObject
1718
/// <value>
1819
/// The device identifier.
1920
/// </value>
21+
[JsonProperty("device_identifier")]
2022
public String DeviceIdentifier { get; set; }
2123

2224
/// <summary>
@@ -25,6 +27,7 @@ public class LogonTransactionRequest : DataTransferObject
2527
/// <value>
2628
/// The transaction date time.
2729
/// </value>
30+
[JsonProperty("transaction_date_time")]
2831
public DateTime TransactionDateTime { get; set; }
2932

3033
/// <summary>
@@ -33,6 +36,7 @@ public class LogonTransactionRequest : DataTransferObject
3336
/// <value>
3437
/// The transaction number.
3538
/// </value>
39+
[JsonProperty("transaction_number")]
3640
public String TransactionNumber { get; set; }
3741

3842
/// <summary>
@@ -41,6 +45,7 @@ public class LogonTransactionRequest : DataTransferObject
4145
/// <value>
4246
/// The type of the transaction.
4347
/// </value>
48+
[JsonProperty("transaction_type")]
4449
public String TransactionType { get; set; }
4550

4651
#endregion

TransactionProcessor.DataTransferObjects/LogonTransactionResponse.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
using System;
44
using System.Diagnostics.CodeAnalysis;
5+
using Newtonsoft.Json;
56

67
/// <summary>
78
///
@@ -17,6 +18,7 @@ public class LogonTransactionResponse
1718
/// <value>
1819
/// The estate identifier.
1920
/// </value>
21+
[JsonProperty("estate_id")]
2022
public Guid EstateId { get; set; }
2123

2224
/// <summary>
@@ -25,6 +27,7 @@ public class LogonTransactionResponse
2527
/// <value>
2628
/// The merchant identifier.
2729
/// </value>
30+
[JsonProperty("merchant_id")]
2831
public Guid MerchantId { get; set; }
2932

3033
/// <summary>
@@ -33,6 +36,7 @@ public class LogonTransactionResponse
3336
/// <value>
3437
/// The response code.
3538
/// </value>
39+
[JsonProperty("response_code")]
3640
public String ResponseCode { get; set; }
3741

3842
/// <summary>
@@ -41,6 +45,7 @@ public class LogonTransactionResponse
4145
/// <value>
4246
/// The response message.
4347
/// </value>
48+
[JsonProperty("response_message")]
4449
public String ResponseMessage { get; set; }
4550

4651
#endregion

TransactionProcessor.DataTransferObjects/MetadataContants.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public class MetadataContants
1414
/// <summary>
1515
/// The key name estate identifier
1616
/// </summary>
17-
public const String KeyNameEstateId = "estateId";
17+
public const String KeyNameEstateId = "estate_id";
1818

1919
/// <summary>
2020
/// The key name merchant identifier
2121
/// </summary>
22-
public const String KeyNameMerchantId = "merchantId";
22+
public const String KeyNameMerchantId = "merchant_id";
2323

2424
#endregion
2525
}

TransactionProcessor.DataTransferObjects/OperatorTotalRequest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
using System;
44
using System.Diagnostics.CodeAnalysis;
5+
using Newtonsoft.Json;
56

67
/// <summary>
78
///
@@ -17,6 +18,7 @@ public class OperatorTotalRequest
1718
/// <value>
1819
/// The contract identifier.
1920
/// </value>
21+
[JsonProperty("contract_id")]
2022
public Guid ContractId { get; set; }
2123

2224
/// <summary>
@@ -25,6 +27,7 @@ public class OperatorTotalRequest
2527
/// <value>
2628
/// The operator identifier.
2729
/// </value>
30+
[JsonProperty("operator_identifier")]
2831
public String OperatorIdentifier { get; set; }
2932

3033
/// <summary>
@@ -33,6 +36,7 @@ public class OperatorTotalRequest
3336
/// <value>
3437
/// The transaction count.
3538
/// </value>
39+
[JsonProperty("transaction_count")]
3640
public Int32 TransactionCount { get; set; }
3741

3842
/// <summary>
@@ -41,6 +45,7 @@ public class OperatorTotalRequest
4145
/// <value>
4246
/// The transaction value.
4347
/// </value>
48+
[JsonProperty("transaction_cvalue")]
4449
public Decimal TransactionValue { get; set; }
4550

4651
#endregion

TransactionProcessor.DataTransferObjects/ReconciliationRequest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Diagnostics.CodeAnalysis;
6+
using Newtonsoft.Json;
67

78
/// <summary>
89
///
@@ -19,6 +20,7 @@ public class ReconciliationRequest : DataTransferObject
1920
/// <value>
2021
/// The device identifier.
2122
/// </value>
23+
[JsonProperty("device_identifier")]
2224
public String DeviceIdentifier { get; set; }
2325

2426
/// <summary>
@@ -27,6 +29,7 @@ public class ReconciliationRequest : DataTransferObject
2729
/// <value>
2830
/// The operator totals.
2931
/// </value>
32+
[JsonProperty("operator_totals")]
3033
public List<OperatorTotalRequest> OperatorTotals { get; set; }
3134

3235
/// <summary>
@@ -35,6 +38,7 @@ public class ReconciliationRequest : DataTransferObject
3538
/// <value>
3639
/// The transaction count.
3740
/// </value>
41+
[JsonProperty("transaction_count")]
3842
public Int32 TransactionCount { get; set; }
3943

4044
/// <summary>
@@ -43,6 +47,7 @@ public class ReconciliationRequest : DataTransferObject
4347
/// <value>
4448
/// The transaction date time.
4549
/// </value>
50+
[JsonProperty("transaction_date_time")]
4651
public DateTime TransactionDateTime { get; set; }
4752

4853
/// <summary>
@@ -51,6 +56,7 @@ public class ReconciliationRequest : DataTransferObject
5156
/// <value>
5257
/// The transaction value.
5358
/// </value>
59+
[JsonProperty("transaction_value")]
5460
public Decimal TransactionValue { get; set; }
5561

5662
#endregion

TransactionProcessor.DataTransferObjects/ReconciliationResponse.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
using System;
44
using System.Diagnostics.CodeAnalysis;
5+
using Newtonsoft.Json;
56

67
[ExcludeFromCodeCoverage]
78
public class ReconciliationResponse
@@ -14,6 +15,7 @@ public class ReconciliationResponse
1415
/// <value>
1516
/// The estate identifier.
1617
/// </value>
18+
[JsonProperty("estate_id")]
1719
public Guid EstateId { get; set; }
1820

1921
/// <summary>
@@ -22,6 +24,7 @@ public class ReconciliationResponse
2224
/// <value>
2325
/// The merchant identifier.
2426
/// </value>
27+
[JsonProperty("merchant_id")]
2528
public Guid MerchantId { get; set; }
2629

2730
/// <summary>
@@ -30,6 +33,7 @@ public class ReconciliationResponse
3033
/// <value>
3134
/// The response code.
3235
/// </value>
36+
[JsonProperty("response_code")]
3337
public String ResponseCode { get; set; }
3438

3539
/// <summary>
@@ -38,6 +42,7 @@ public class ReconciliationResponse
3842
/// <value>
3943
/// The response message.
4044
/// </value>
45+
[JsonProperty("response_message")]
4146
public String ResponseMessage { get; set; }
4247

4348
#endregion

TransactionProcessor.DataTransferObjects/SaleTransactionRequest.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Diagnostics.CodeAnalysis;
6+
using Newtonsoft.Json;
67

78
[ExcludeFromCodeCoverage]
89
public class SaleTransactionRequest : DataTransferObject
@@ -15,6 +16,7 @@ public class SaleTransactionRequest : DataTransferObject
1516
/// <value>
1617
/// The additional transaction metadata.
1718
/// </value>
19+
[JsonProperty("additional_transaction_metadata")]
1820
public Dictionary<String, String> AdditionalTransactionMetadata { get; set; }
1921

2022
/// <summary>
@@ -23,6 +25,7 @@ public class SaleTransactionRequest : DataTransferObject
2325
/// <value>
2426
/// The contract identifier.
2527
/// </value>
28+
[JsonProperty("contact_id")]
2629
public Guid ContractId { get; set; }
2730

2831
/// <summary>
@@ -31,6 +34,7 @@ public class SaleTransactionRequest : DataTransferObject
3134
/// <value>
3235
/// The customer email address.
3336
/// </value>
37+
[JsonProperty("customer_email_address")]
3438
public String CustomerEmailAddress { get; set; }
3539

3640
/// <summary>
@@ -39,6 +43,7 @@ public class SaleTransactionRequest : DataTransferObject
3943
/// <value>
4044
/// The device identifier.
4145
/// </value>
46+
[JsonProperty("device_identifier")]
4247
public String DeviceIdentifier { get; set; }
4348

4449
/// <summary>
@@ -47,6 +52,7 @@ public class SaleTransactionRequest : DataTransferObject
4752
/// <value>
4853
/// The operator identifier.
4954
/// </value>
55+
[JsonProperty("operator_identifier")]
5056
public String OperatorIdentifier { get; set; }
5157

5258
/// <summary>
@@ -55,6 +61,7 @@ public class SaleTransactionRequest : DataTransferObject
5561
/// <value>
5662
/// The product identifier.
5763
/// </value>
64+
[JsonProperty("product_id")]
5865
public Guid ProductId { get; set; }
5966

6067
/// <summary>
@@ -63,6 +70,7 @@ public class SaleTransactionRequest : DataTransferObject
6370
/// <value>
6471
/// The transaction date time.
6572
/// </value>
73+
[JsonProperty("transaction_date_time")]
6674
public DateTime TransactionDateTime { get; set; }
6775

6876
/// <summary>
@@ -71,6 +79,7 @@ public class SaleTransactionRequest : DataTransferObject
7179
/// <value>
7280
/// The transaction number.
7381
/// </value>
82+
[JsonProperty("transaction_number")]
7483
public String TransactionNumber { get; set; }
7584

7685
/// <summary>
@@ -79,6 +88,7 @@ public class SaleTransactionRequest : DataTransferObject
7988
/// <value>
8089
/// The type of the transaction.
8190
/// </value>
91+
[JsonProperty("transaction_type")]
8292
public String TransactionType { get; set; }
8393

8494
#endregion

TransactionProcessor.DataTransferObjects/SaleTransactionResponse.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Diagnostics.CodeAnalysis;
6+
using Newtonsoft.Json;
67

78
[ExcludeFromCodeCoverage]
89
public class SaleTransactionResponse
@@ -15,6 +16,7 @@ public class SaleTransactionResponse
1516
/// <value>
1617
/// The estate identifier.
1718
/// </value>
19+
[JsonProperty("estate_id")]
1820
public Guid EstateId { get; set; }
1921

2022
/// <summary>
@@ -23,6 +25,7 @@ public class SaleTransactionResponse
2325
/// <value>
2426
/// The merchant identifier.
2527
/// </value>
28+
[JsonProperty("merchant_id")]
2629
public Guid MerchantId { get; set; }
2730

2831
/// <summary>
@@ -31,6 +34,7 @@ public class SaleTransactionResponse
3134
/// <value>
3235
/// The response code.
3336
/// </value>
37+
[JsonProperty("response_code")]
3438
public String ResponseCode { get; set; }
3539

3640
/// <summary>
@@ -39,6 +43,7 @@ public class SaleTransactionResponse
3943
/// <value>
4044
/// The response message.
4145
/// </value>
46+
[JsonProperty("response_message")]
4247
public String ResponseMessage { get; set; }
4348

4449
/// <summary>
@@ -47,6 +52,7 @@ public class SaleTransactionResponse
4752
/// <value>
4853
/// The additional transaction metadata.
4954
/// </value>
55+
[JsonProperty("additional_transaction_metadata")]
5056
public Dictionary<String, String> AdditionalTransactionMetadata { get; set; }
5157

5258
#endregion

TransactionProcessor.DataTransferObjects/TransactionProcessor.DataTransferObjects.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<ItemGroup>
88
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
9+
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.1.1" />
910
</ItemGroup>
1011

1112
</Project>

0 commit comments

Comments
 (0)