-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#v3.2.2001.1-rc - Refunds refactor (#69)
* - Refunds refactored * - Version upgrade
- Loading branch information
Antonio Buedo
authored
Jan 10, 2020
1 parent
bd279b2
commit c4b0e35
Showing
28 changed files
with
439 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Binary file not shown.
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
Binary file not shown.
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
Binary file not shown.
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
Binary file not shown.
Binary file not shown.
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
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,18 @@ | ||
using System; | ||
|
||
namespace BitPaySDK.Exceptions | ||
{ | ||
public class RefundCancellationException : BitPayException | ||
{ | ||
private const string BitPayCode = "BITPAY-REFUND-CANCELLATION"; | ||
private const string BitPayMessage = "Failed to cancel refund"; | ||
|
||
public RefundCancellationException() : base(BitPayCode, BitPayMessage) | ||
{ | ||
} | ||
|
||
public RefundCancellationException(Exception ex) : base(BitPayCode, BitPayMessage, ex) | ||
{ | ||
} | ||
} | ||
} |
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,18 @@ | ||
using System; | ||
|
||
namespace BitPaySDK.Exceptions | ||
{ | ||
public class RefundCreationException : BitPayException | ||
{ | ||
private const string BitPayCode = "BITPAY-REFUND-CREATE"; | ||
private const string BitPayMessage = "Failed to create refund"; | ||
|
||
public RefundCreationException() : base(BitPayCode, BitPayMessage) | ||
{ | ||
} | ||
|
||
public RefundCreationException(Exception ex) : base(BitPayCode, BitPayMessage, ex) | ||
{ | ||
} | ||
} | ||
} |
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,28 @@ | ||
using System; | ||
|
||
namespace BitPaySDK.Exceptions | ||
{ | ||
public class RefundException : BitPayException | ||
{ | ||
private const string BitPayMessage = "An unexpected error occured while trying to manage the refund"; | ||
private readonly string _bitpayCode = "BITPAY-REFUND-GENERIC"; | ||
|
||
public RefundException() : base(BitPayMessage) | ||
{ | ||
BitpayCode = _bitpayCode; | ||
} | ||
|
||
public RefundException(Exception ex) : base(BitPayMessage, ex) | ||
{ | ||
BitpayCode = _bitpayCode; | ||
} | ||
|
||
public RefundException(string bitpayCode, string message) : base(bitpayCode, message) | ||
{ | ||
} | ||
|
||
public RefundException(string bitpayCode, string message, Exception cause) : base(bitpayCode, message, cause) | ||
{ | ||
} | ||
} | ||
} |
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,18 @@ | ||
using System; | ||
|
||
namespace BitPaySDK.Exceptions | ||
{ | ||
public class RefundQueryException : RefundException | ||
{ | ||
private const string BitPayCode = "BITPAY-REFUND-GET"; | ||
private const string BitPayMessage = "Failed to retrieve refund"; | ||
|
||
public RefundQueryException() : base(BitPayCode, BitPayMessage) | ||
{ | ||
} | ||
|
||
public RefundQueryException(Exception ex) : base(BitPayCode, BitPayMessage, ex) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.