-
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
aa49316
commit 8be5443
Showing
15 changed files
with
166 additions
and
7 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
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,39 @@ | ||
using System; | ||
|
||
namespace Braintree | ||
{ | ||
public class ApplePayCard : PaymentMethod | ||
{ | ||
public String CardType { get; protected set; } | ||
public String Last4 { get; protected set; } | ||
public String ExpirationMonth { get; protected set; } | ||
public String ExpirationYear { get; protected set; } | ||
public String Token { get; protected set; } | ||
public Boolean? IsDefault { get; protected set; } | ||
public String ImageUrl { get; protected set; } | ||
public DateTime? CreatedAt { get; protected set; } | ||
public DateTime? UpdatedAt { get; protected set; } | ||
public Subscription[] Subscriptions { get; protected set; } | ||
|
||
protected internal ApplePayCard(NodeWrapper node, BraintreeService service) | ||
{ | ||
CardType = node.GetString("card-type"); | ||
Last4 = node.GetString("last-4"); | ||
ExpirationMonth = node.GetString("expiration-month"); | ||
ExpirationYear = node.GetString("expiration-year"); | ||
Token = node.GetString("token"); | ||
IsDefault = node.GetBoolean("default"); | ||
ImageUrl = node.GetString("image-url"); | ||
|
||
CreatedAt = node.GetDateTime("created-at"); | ||
UpdatedAt = node.GetDateTime("updated-at"); | ||
|
||
var subscriptionXmlNodes = node.GetList("subscriptions/subscription"); | ||
Subscriptions = new Subscription[subscriptionXmlNodes.Count]; | ||
for (int i = 0; i < subscriptionXmlNodes.Count; i++) | ||
{ | ||
Subscriptions[i] = new Subscription(subscriptionXmlNodes[i], service); | ||
} | ||
} | ||
} | ||
} |
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,22 @@ | ||
using System; | ||
|
||
namespace Braintree | ||
{ | ||
public class ApplePayDetails | ||
{ | ||
public String CardType { get; protected set; } | ||
public String CardholderName { get; protected set; } | ||
public String ExpirationMonth { get; protected set; } | ||
public String ExpirationYear { get; protected set; } | ||
public String Token { get; protected set; } | ||
|
||
protected internal ApplePayDetails(NodeWrapper node) | ||
{ | ||
CardType = node.GetString("card-type"); | ||
CardholderName = node.GetString("cardholder-name"); | ||
ExpirationMonth = node.GetString("expiration-month"); | ||
ExpirationYear = node.GetString("expiration-year"); | ||
Token = node.GetString("token"); | ||
} | ||
} | ||
} |
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
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