protected internal MerchantAccount(NodeWrapper node)
 {
   Id = node.GetString("id");
   CurrencyIsoCode = node.GetString("currency-iso-code");
   Status = (MerchantAccountStatus) CollectionUtil.Find(MerchantAccountStatus.ALL, node.GetString("status"), null);
   NodeWrapper masterNode = node.GetNode("master-merchant-account");
   if (masterNode != null)
       MasterMerchantAccount = new MerchantAccount(masterNode);
   else
       MasterMerchantAccount = null;
   NodeWrapper individualNode = node.GetNode("individual");
   if (individualNode != null)
       IndividualDetails = new MerchantAccountIndividualDetails(individualNode);
   else
       IndividualDetails = null;
   NodeWrapper businessNode = node.GetNode("business");
   if (businessNode != null)
       BusinessDetails = new MerchantAccountBusinessDetails(businessNode);
   else
       BusinessDetails = null;
   NodeWrapper fundingNode = node.GetNode("funding");
   if (fundingNode != null)
       FundingDetails = new MerchantAccountFundingDetails(fundingNode);
   else
       FundingDetails = null;
 }
Exemplo n.º 2
0
        protected internal MerchantAccount(NodeWrapper node)
        {
            NodeWrapper merchantAccountNode = node.GetNode("merchant-account");

            if (merchantAccountNode != null)
            {
                node = merchantAccountNode;
            }

            Id = node.GetString("id");
            CurrencyIsoCode = node.GetString("currency-iso-code");
            Status          = node.GetEnum <MerchantAccountStatus>("status");
            IsDefault       = node.GetBoolean("default");

            NodeWrapper masterNode = node.GetNode("master-merchant-account");

            if (masterNode != null)
            {
                MasterMerchantAccount = new MerchantAccount(masterNode);
            }
            else
            {
                MasterMerchantAccount = null;
            }
            NodeWrapper individualNode = node.GetNode("individual");

            if (individualNode != null)
            {
                IndividualDetails = new MerchantAccountIndividualDetails(individualNode);
            }
            else
            {
                IndividualDetails = null;
            }
            NodeWrapper businessNode = node.GetNode("business");

            if (businessNode != null)
            {
                BusinessDetails = new MerchantAccountBusinessDetails(businessNode);
            }
            else
            {
                BusinessDetails = null;
            }
            NodeWrapper fundingNode = node.GetNode("funding");

            if (fundingNode != null)
            {
                FundingDetails = new MerchantAccountFundingDetails(fundingNode);
            }
            else
            {
                FundingDetails = null;
            }
        }
Exemplo n.º 3
0
        protected internal MerchantAccount(NodeWrapper node)
        {
            Id = node.GetString("id");
            CurrencyIsoCode = node.GetString("currency-iso-code");
            Status          = (MerchantAccountStatus)CollectionUtil.Find(MerchantAccountStatus.ALL, node.GetString("status"), null);
            NodeWrapper masterNode = node.GetNode("master-merchant-account");

            if (masterNode != null)
            {
                MasterMerchantAccount = new MerchantAccount(masterNode);
            }
            else
            {
                MasterMerchantAccount = null;
            }
            NodeWrapper individualNode = node.GetNode("individual");

            if (individualNode != null)
            {
                IndividualDetails = new MerchantAccountIndividualDetails(individualNode);
            }
            else
            {
                IndividualDetails = null;
            }
            NodeWrapper businessNode = node.GetNode("business");

            if (businessNode != null)
            {
                BusinessDetails = new MerchantAccountBusinessDetails(businessNode);
            }
            else
            {
                BusinessDetails = null;
            }
            NodeWrapper fundingNode = node.GetNode("funding");

            if (fundingNode != null)
            {
                FundingDetails = new MerchantAccountFundingDetails(fundingNode);
            }
            else
            {
                FundingDetails = null;
            }
        }