-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #472 from nofrixion/feature/MOOV-3952-payout-docum…
…ents MOOV-3952: Add PayoutDocuments collection props
- Loading branch information
Showing
5 changed files
with
143 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// ----------------------------------------------------------------------------- | ||
// Filename: PayoutDocumentTypesEnum.cs | ||
// | ||
// Description: Enum for the different types of payout documents. | ||
// | ||
// Author(s): | ||
// Axel Granillo ([email protected]) | ||
// | ||
// History: | ||
// 28 11 2024 Axel Granillo Created, Remote, Mexico City, Mexico. | ||
// | ||
// License: | ||
// MIT. | ||
// ----------------------------------------------------------------------------- | ||
|
||
namespace NoFrixion.MoneyMoov.Enums; | ||
|
||
/// <summary> | ||
/// Enum for the different types of payout documents. | ||
/// </summary> | ||
public enum PayoutDocumentTypesEnum | ||
{ | ||
/// <summary> | ||
/// Default general value. | ||
/// </summary> | ||
Other, | ||
|
||
/// <summary> | ||
/// Invoice. | ||
/// </summary> | ||
Invoice, | ||
|
||
/// <summary> | ||
/// Purchase order. | ||
/// </summary> | ||
PurchaseOrder, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// ----------------------------------------------------------------------------- | ||
// Filename: PayoutDocument.cs | ||
// | ||
// Description: Contains details of a payout document. | ||
// | ||
// Author(s): | ||
// Axel Granillo ([email protected]) | ||
// | ||
// History: | ||
// 28 11 2024 Axel Granillo Created, Remote, Mexico City, Mexico. | ||
// | ||
// License: | ||
// MIT. | ||
// ----------------------------------------------------------------------------- | ||
|
||
using NoFrixion.MoneyMoov.Enums; | ||
|
||
namespace NoFrixion.MoneyMoov.Models; | ||
|
||
/// <summary> | ||
/// Used for returning a payout document. | ||
/// </summary> | ||
public class PayoutDocument : PayoutDocumentCreate | ||
{ | ||
/// <summary> | ||
/// Internal ID of the document. | ||
/// </summary> | ||
public Guid ID { get; set; } | ||
|
||
/// <summary> | ||
/// Date of insertion. | ||
/// </summary> | ||
public DateTimeOffset Inserted { get; set; } | ||
} |
60 changes: 60 additions & 0 deletions
60
src/NoFrixion.MoneyMoov/Models/Payouts/PayoutDocumentCreate.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,60 @@ | ||
// ----------------------------------------------------------------------------- | ||
// Filename: PayoutDocumentCreate.cs | ||
// | ||
// Description: Contains details of a payout document. | ||
// | ||
// Author(s): | ||
// Axel Granillo ([email protected]) | ||
// | ||
// History: | ||
// 28 11 2024 Axel Granillo Created, Remote, Mexico City, Mexico. | ||
// | ||
// License: | ||
// MIT. | ||
// ----------------------------------------------------------------------------- | ||
|
||
using System.ComponentModel.DataAnnotations; | ||
using NoFrixion.MoneyMoov.Enums; | ||
|
||
namespace NoFrixion.MoneyMoov.Models; | ||
|
||
/// <summary> | ||
/// Document associated with a payout. | ||
/// </summary> | ||
public class PayoutDocumentCreate | ||
{ | ||
/// <summary> | ||
/// Type of the document. | ||
/// </summary> | ||
[Required] | ||
public PayoutDocumentTypesEnum DocumentType { get; set; } = PayoutDocumentTypesEnum.Other; | ||
|
||
/// <summary> | ||
/// Used to identify the document. | ||
/// </summary> | ||
[Required] | ||
[MaxLength(128)] | ||
public string? Title { get; set; } | ||
|
||
/// <summary> | ||
/// Additional information about the document. Optional. | ||
/// </summary> | ||
[MaxLength(256)] | ||
public string? Description { get; set; } | ||
|
||
/// <summary> | ||
/// Currency of the document, if applicable. Optional. | ||
/// </summary> | ||
public CurrencyTypeEnum? Currency { get; set; } | ||
|
||
/// <summary> | ||
/// Amount of the document, if applicable. Optional. | ||
/// </summary> | ||
public decimal? Amount { get; set; } | ||
|
||
/// <summary> | ||
/// Allows to associate an external ID to the document. Optional. | ||
/// </summary> | ||
[MaxLength(128)] | ||
public string? ExternalID { get; set; } | ||
} |