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


C# NodeWrapper.GetInteger方法代码示例

本文整理汇总了C#中Braintree.NodeWrapper.GetInteger方法的典型用法代码示例。如果您正苦于以下问题:C# NodeWrapper.GetInteger方法的具体用法?C# NodeWrapper.GetInteger怎么用?C# NodeWrapper.GetInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Braintree.NodeWrapper的用法示例。


在下文中一共展示了NodeWrapper.GetInteger方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: Modification

 internal Modification(NodeWrapper node)
 {
     Amount = node.GetDecimal("amount");
     Id = node.GetString("id");
     NeverExpires = node.GetBoolean("never-expires");
     NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles");
     Quantity = node.GetInteger("quantity");
 }
开发者ID:sdether,项目名称:braintree_dotnet,代码行数:8,代码来源:Modification.cs

示例3: Modification

 protected Modification(NodeWrapper node)
 {
     Amount = node.GetDecimal("amount");
     CreatedAt = node.GetDateTime("created-at");
     Description = node.GetString("description");
     Id = node.GetString("id");
     Kind = node.GetString("kind");
     MerchantId = node.GetString("merchant-id");
     Name = node.GetString("name");
     NeverExpires = node.GetBoolean("never-expires");
     NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles");
     Quantity = node.GetInteger("quantity");
     UpdatedAt = node.GetDateTime("updated-at");
 }
开发者ID:toantran,项目名称:braintree_dotnet,代码行数:14,代码来源:Modification.cs

示例4: Subscription

        public Subscription(NodeWrapper node, BraintreeService service)
        {
            Balance = node.GetDecimal("balance");
            BillingDayOfMonth = node.GetInteger("billing-day-of-month");
            BillingPeriodEndDate = node.GetDateTime("billing-period-end-date");
            BillingPeriodStartDate = node.GetDateTime("billing-period-start-date");
            CurrentBillingCycle = node.GetInteger("current-billing-cycle");
            DaysPastDue = node.GetInteger("days-past-due");
            Descriptor = new Descriptor(node.GetNode("descriptor"));
            FailureCount = node.GetInteger("failure-count");
            FirstBillingDate = node.GetDateTime("first-billing-date");
            Id = node.GetString("id");
            NextBillAmount = node.GetDecimal("next-bill-amount");
            NextBillingDate = node.GetDateTime("next-billing-date");
            NextBillingPeriodAmount = node.GetDecimal("next-billing-period-amount");
            NeverExpires = node.GetBoolean("never-expires");
            NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles");
            PaymentMethodToken = node.GetString("payment-method-token");
            PaidThroughDate = node.GetDateTime("paid-through-date");
            PlanId = node.GetString("plan-id");
            Price = node.GetDecimal("price");
            Status = (SubscriptionStatus)CollectionUtil.Find(SubscriptionStatus.STATUSES, node.GetString("status"), SubscriptionStatus.UNRECOGNIZED);
            HasTrialPeriod = node.GetBoolean("trial-period");
            TrialDuration = node.GetInteger("trial-duration");
            String trialDurationUnitStr = node.GetString("trial-duration-unit");
            if (trialDurationUnitStr != null) {
                TrialDurationUnit = (SubscriptionDurationUnit)CollectionUtil.Find(SubscriptionDurationUnit.ALL, trialDurationUnitStr, SubscriptionDurationUnit.UNRECOGNIZED);
            }
            MerchantAccountId = node.GetString("merchant-account-id");

            AddOns = new List<AddOn> ();
            foreach (NodeWrapper addOnResponse in node.GetList("add-ons/add-on")) {
                AddOns.Add(new AddOn(addOnResponse));
            }
            Discounts = new List<Discount> ();
            foreach (NodeWrapper discountResponse in node.GetList("discounts/discount")) {
                Discounts.Add(new Discount(discountResponse));
            }
            Transactions = new List<Transaction> ();
            foreach (NodeWrapper transactionResponse in node.GetList("transactions/transaction")) {
                Transactions.Add(new Transaction(transactionResponse, service));
            }
        }
开发者ID:toantran,项目名称:braintree_dotnet,代码行数:43,代码来源:Subscription.cs


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