-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
188436c
commit a6e113a
Showing
23 changed files
with
1,104 additions
and
45 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
* @braintree/sdk | ||
* @braintree/team-sdk-server |
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,32 @@ | ||
using System; | ||
using System.ComponentModel; | ||
|
||
namespace Braintree | ||
{ | ||
|
||
public enum Kind | ||
{ | ||
[Description("refund")] REFUND, | ||
[Description("dispute")] DISPUTE, | ||
[Description("unrecognized")] UNRECOGNIZED | ||
} | ||
|
||
public class Adjustment | ||
{ | ||
public virtual decimal? Amount { get; protected set; } | ||
public virtual DateTime? ProjectedDisbursementDate { get; protected set; } | ||
public virtual DateTime? ActualDisbursementDate { get; protected set; } | ||
public virtual Kind Kind { get; protected set; } | ||
|
||
protected internal Adjustment(NodeWrapper node) | ||
{ | ||
Amount = node.GetDecimal("amount"); | ||
ProjectedDisbursementDate = node.GetDateTime("projected_disbursement_date"); | ||
ActualDisbursementDate = node.GetDateTime("actual_disbursement_date"); | ||
Kind = node.GetEnum("kind", Kind.UNRECOGNIZED); | ||
} | ||
|
||
[Obsolete("Mock Use Only")] | ||
protected internal Adjustment() { } | ||
} | ||
} |
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,31 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using System.Collections.Generic; | ||
|
||
namespace Braintree | ||
{ | ||
|
||
public class Installment | ||
{ | ||
public virtual string Id { get; protected set; } | ||
public virtual decimal? Amount { get; protected set; } | ||
public virtual DateTime? ProjectedDisbursementDate { get; protected set; } | ||
public virtual DateTime? ActualDisbursementDate { get; protected set; } | ||
public virtual List<Adjustment> Adjustments { get; protected set; } | ||
|
||
protected internal Installment(NodeWrapper node) | ||
{ | ||
Amount = node.GetDecimal("amount"); | ||
Id = node.GetString("id"); | ||
ProjectedDisbursementDate = node.GetDateTime("projected_disbursement_date"); | ||
ActualDisbursementDate = node.GetDateTime("actual_disbursement_date"); | ||
Adjustments = new List<Adjustment>(); | ||
foreach (var adjustmentNode in node.GetList("adjustments/adjustment")) { | ||
Adjustments.Add(new Adjustment(adjustmentNode)); | ||
} | ||
} | ||
|
||
[Obsolete("Mock Use Only")] | ||
protected internal Installment() { } | ||
} | ||
} |
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,25 @@ | ||
namespace Braintree | ||
{ | ||
public class InstallmentRequest : Request | ||
{ | ||
public string Count { get; set; } | ||
|
||
public override string ToXml(string root) | ||
{ | ||
return BuildRequest(root).ToXml(); | ||
} | ||
|
||
public override string ToQueryString(string root) | ||
{ | ||
return BuildRequest(root).ToQueryString(); | ||
} | ||
|
||
protected virtual RequestBuilder BuildRequest(string root) | ||
{ | ||
var builder = new RequestBuilder(root); | ||
builder.AddElement("count", Count); | ||
return builder; | ||
} | ||
} | ||
} | ||
|
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
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
Oops, something went wrong.