本文整理汇总了C#中Braintree.NodeWrapper.GetList方法的典型用法代码示例。如果您正苦于以下问题:C# NodeWrapper.GetList方法的具体用法?C# NodeWrapper.GetList怎么用?C# NodeWrapper.GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Braintree.NodeWrapper
的用法示例。
在下文中一共展示了NodeWrapper.GetList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Plan
public Plan(NodeWrapper node)
{
if (node == null) return;
BillingDayOfMonth = node.GetInteger("billing-day-of-month");
BillingFrequency = node.GetInteger("billing-frequency");
CurrencyIsoCode = node.GetString("currency-iso-code");
Description = node.GetString("description");
Id = node.GetString("id");
Name = node.GetString("name");
NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles");
Price = node.GetDecimal("price");
TrialPeriod = node.GetBoolean("trial-period");
TrialDuration = node.GetInteger("trial-duration");
string trialDurationUnitStr = node.GetString("trial-duration-unit");
if (trialDurationUnitStr != null) {
TrialDurationUnit = (PlanDurationUnit) CollectionUtil.Find(PlanDurationUnit.ALL, trialDurationUnitStr, PlanDurationUnit.UNRECOGNIZED);
}
AddOns = new List<AddOn> ();
foreach (var addOnResponse in node.GetList("add-ons/add-on")) {
AddOns.Add(new AddOn(addOnResponse));
}
Discounts = new List<Discount> ();
foreach (var discountResponse in node.GetList("discounts/discount")) {
Discounts.Add(new Discount(discountResponse));
}
}
示例2: Customer
internal Customer(NodeWrapper node, BraintreeService service)
{
if (node == null) return;
Id = node.GetString("id");
FirstName = node.GetString("first-name");
LastName = node.GetString("last-name");
Company = node.GetString("company");
Email = node.GetString("email");
Phone = node.GetString("phone");
Fax = node.GetString("fax");
Website = node.GetString("website");
CreatedAt = node.GetDateTime("created-at");
UpdatedAt = node.GetDateTime("updated-at");
var creditCardXmlNodes = node.GetList("credit-cards/credit-card");
CreditCards = new CreditCard[creditCardXmlNodes.Count];
for (int i = 0; i < creditCardXmlNodes.Count; i++)
{
CreditCards[i] = new CreditCard(creditCardXmlNodes[i], service);
}
var addressXmlNodes = node.GetList("addresses/address");
Addresses = new Address[addressXmlNodes.Count];
for (int i = 0; i < addressXmlNodes.Count; i++)
{
Addresses[i] = new Address(addressXmlNodes[i]);
}
CustomFields = node.GetDictionary("custom-fields");
}
示例3: AndroidPayCard
protected internal AndroidPayCard(NodeWrapper node, IBraintreeGateway gateway)
{
CardType = node.GetString("virtual-card-type");
VirtualCardType = node.GetString("virtual-card-type");
SourceCardType = node.GetString("source-card-type");
Last4 = node.GetString("virtual-card-last-4");
SourceCardLast4 = node.GetString("source-card-last-4");
VirtualCardLast4 = node.GetString("virtual-card-last-4");
SourceDescription = node.GetString("source-description");
Bin = node.GetString("bin");
ExpirationMonth = node.GetString("expiration-month");
ExpirationYear = node.GetString("expiration-year");
GoogleTransactionId = node.GetString("google-transaction-id");
Token = node.GetString("token");
IsDefault = node.GetBoolean("default");
ImageUrl = node.GetString("image-url");
CustomerId = node.GetString("customer-id");
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], gateway);
}
}
示例4: SettlementBatchSummary
protected internal SettlementBatchSummary (NodeWrapper node)
{
records = new List<IDictionary<String, String>>();
foreach (var record in node.GetList("records/record"))
{
records.Add(record.GetDictionary("."));
}
}
示例5: All
public virtual List<Plan> All()
{
NodeWrapper response = new NodeWrapper(Service.Get("/plans"));
List<Plan> plans = new List<Plan>();
foreach (NodeWrapper node in response.GetList("plan"))
{
plans.Add(new Plan(node));
}
return plans;
}
示例6: All
public virtual List<AddOn> All()
{
var response = new NodeWrapper(Service.Get(Service.MerchantPath() + "/add_ons"));
var addOns = new List<AddOn>();
foreach (var node in response.GetList("add-on"))
{
addOns.Add(new AddOn(node));
}
return addOns;
}
示例7: All
public virtual List<Plan> All()
{
var response = new NodeWrapper(service.Get(service.MerchantPath() + "/plans"));
var plans = new List<Plan>();
foreach (var node in response.GetList("plan"))
{
plans.Add(new Plan(node));
}
return plans;
}
示例8: All
public virtual List<Discount> All()
{
var response = new NodeWrapper(service.Get(service.MerchantPath() + "/discounts"));
var discounts = new List<Discount>();
foreach (var node in response.GetList("discount"))
{
discounts.Add(new Discount(node));
}
return discounts;
}
示例9: FetchSubscriptions
private List<Subscription> FetchSubscriptions(SubscriptionSearchRequest query, String[] ids)
{
query.Ids.IncludedIn(ids);
NodeWrapper response = new NodeWrapper(Service.Post("/subscriptions/advanced_search", query));
List<Subscription> subscriptions = new List<Subscription>();
foreach (NodeWrapper node in response.GetList("subscription"))
{
subscriptions.Add(new Subscription(node, Service));
}
return subscriptions;
}
示例10: FetchCreditCardVerifications
private List<CreditCardVerification> FetchCreditCardVerifications(CreditCardVerificationSearchRequest query, String[] ids)
{
query.Ids.IncludedIn(ids);
NodeWrapper response = new NodeWrapper(Service.Post("/verifications/advanced_search", query));
List<CreditCardVerification> verifications = new List<CreditCardVerification>();
foreach (NodeWrapper node in response.GetList("verification"))
{
verifications.Add(new CreditCardVerification(node, Service));
}
return verifications;
}
示例11: FetchCreditCardVerifications
private List<CreditCardVerification> FetchCreditCardVerifications(CreditCardVerificationSearchRequest query, string[] ids)
{
query.Ids.IncludedIn(ids);
var response = new NodeWrapper(service.Post(service.MerchantPath() + "/verifications/advanced_search", query));
var verifications = new List<CreditCardVerification>();
foreach (var node in response.GetList("verification"))
{
verifications.Add(new CreditCardVerification(node, gateway));
}
return verifications;
}
示例12: FetchCustomers
private List<Customer> FetchCustomers(String[] ids)
{
IdsSearchRequest query = new IdsSearchRequest().
Ids.IncludedIn(ids);
NodeWrapper response = new NodeWrapper(Service.Post("/customers/advanced_search", query));
List<Customer> customers = new List<Customer>();
foreach (NodeWrapper node in response.GetList("customer"))
{
customers.Add(new Customer(node, Service));
}
return customers;
}
示例13: PayPalAccount
protected internal PayPalAccount(NodeWrapper node, BraintreeGateway gateway)
{
Email = node.GetString("email");
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], gateway);
}
}
示例14: Disbursement
public Disbursement(NodeWrapper node, BraintreeGateway gateway)
{
Id = node.GetString("id");
Amount = node.GetDecimal("amount");
ExceptionMessage = node.GetString("exception-message");
DisbursementDate = node.GetDateTime("disbursement-date");
FollowUpAction = node.GetString("follow-up-action");
MerchantAccount = new MerchantAccount(node.GetNode("merchant-account"));
TransactionIds = new List<string>();
foreach (var stringNode in node.GetList("transaction-ids/item"))
{
TransactionIds.Add(stringNode.GetString("."));
}
Success = node.GetBoolean("success");
Retry = node.GetBoolean("retry");
this.gateway = gateway;
}
示例15: Expired
public virtual ResourceCollection<CreditCard> Expired()
{
var response = new NodeWrapper(service.Post(service.MerchantPath() + "/payment_methods/all/expired_ids"));
return new ResourceCollection<CreditCard>(response, delegate(string[] ids) {
var query = new IdsSearchRequest().
Ids.IncludedIn(ids);
var fetchResponse = new NodeWrapper(service.Post(service.MerchantPath() + "/payment_methods/all/expired", query));
var creditCards = new List<CreditCard>();
foreach (var node in fetchResponse.GetList("credit-card"))
{
creditCards.Add(new CreditCard(node, gateway));
}
return creditCards;
});
}