forked from mercadopago/sdk-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
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 mercadopago#89 from mercadopago/add-taxes
Add taxes
- Loading branch information
Showing
6 changed files
with
132 additions
and
65 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
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,15 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
namespace MercadoPago.Common | ||
{ | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum TaxType | ||
{ | ||
///<summary>IVA tax</summary> | ||
IVA, | ||
///<summary>INC tax</summary> | ||
INC | ||
} | ||
} |
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,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using MercadoPago.Common; | ||
|
||
namespace MercadoPago.DataStructures.Preference | ||
{ | ||
public struct Tax { | ||
#region Properties | ||
private TaxType? _type; | ||
private float? _value; | ||
#endregion | ||
|
||
#region Accessors | ||
/// <summary> | ||
/// Tax type | ||
/// </summary> | ||
public TaxType? Type { | ||
get { return _type; } | ||
set { _type = value; } | ||
} | ||
/// <summary> | ||
/// Tax value | ||
/// </summary> | ||
public float? Value { | ||
get { return _value; } | ||
set { _value = value; } | ||
} | ||
#endregion | ||
} | ||
} |
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