当前位置: 首页>>代码示例>>C#>>正文


C# NodeWrapper.GetList方法代码示例

本文整理汇总了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));
     }
 }
开发者ID:ronin1,项目名称:braintree_dotnet,代码行数:26,代码来源:Plan.cs

示例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");
        }
开发者ID:toantran,项目名称:braintree_dotnet,代码行数:31,代码来源:Customer.cs

示例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);
            }
        }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:28,代码来源:AndroidPayCard.cs

示例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("."));
            }
        }
开发者ID:khorvat,项目名称:braintree_dotnet,代码行数:9,代码来源:SettlementBatchSummary.cs

示例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;
        }
开发者ID:zxed,项目名称:braintree_dotnet,代码行数:11,代码来源:PlanGateway.cs

示例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;
        }
开发者ID:richardlawley,项目名称:braintree_dotnet,代码行数:11,代码来源:AddOnGateway.cs

示例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;
        }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:11,代码来源:PlanGateway.cs

示例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;
        }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:11,代码来源:DiscountGateway.cs

示例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;
        }
开发者ID:khorvat,项目名称:braintree_dotnet,代码行数:13,代码来源:SubscriptionGateway.cs

示例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;
        }
开发者ID:zxed,项目名称:braintree_dotnet,代码行数:13,代码来源:CreditCardVerificationGateway.cs

示例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;
        }
开发者ID:Jammyhammy,项目名称:braintree_dotnet,代码行数:13,代码来源:CreditCardVerificationGateway.cs

示例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;
        }
开发者ID:sdether,项目名称:braintree_dotnet,代码行数:14,代码来源:CustomerGateway.cs

示例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);
            }
        }
开发者ID:kevlut,项目名称:braintree_dotnet,代码行数:16,代码来源:PayPalAccount.cs

示例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;
 }
开发者ID:ronin1,项目名称:braintree_dotnet,代码行数:17,代码来源:Disbursement.cs

示例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;
            });
        }
开发者ID:braintree,项目名称:braintree_dotnet,代码行数:18,代码来源:CreditCardGateway.cs


注:本文中的Braintree.NodeWrapper.GetList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。