Esempio n. 1
0
        public ContactSet(OPS_envelope response)
        {
            var contacts = (dt_assoc)OpsObjectHelper.GetResponseAttributeItem(response, "contact_set").Item;

            if (contacts != null)
            {
                var adminContact   = OpsObjectHelper.GetItemFromArray(contacts, "admin");
                var billingContact = OpsObjectHelper.GetItemFromArray(contacts, "billing");
                var ownerContact   = OpsObjectHelper.GetItemFromArray(contacts, "owner");
                var techContact    = OpsObjectHelper.GetItemFromArray(contacts, "tech");

                if (adminContact != null)
                {
                    admin = new Contact(adminContact);
                }
                if (billingContact != null)
                {
                    billing = new Contact(billingContact);
                }
                if (ownerContact != null)
                {
                    owner = new Contact(ownerContact);
                }
                if (techContact != null)
                {
                    tech = new Contact(techContact);
                }
            }
        }
        public GetDeletedDomainsResponse(string xml) : base(xml)
        {
            if (IsSuccess)
            {
                del_domains = new List <DeletedDomain>();
                var delDomainsArray = (dt_array)OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "del_domains").Item;

                foreach (item i in delDomainsArray.Items)
                {
                    var array  = (dt_assoc)i.Item;
                    var domain = new DeletedDomain
                    {
                        delete_date = OpsObjectHelper.ConvertToDateTime(OpsObjectHelper.GetItemFromArray(array, "delete_date").Text),
                        expire_date = OpsObjectHelper.ConvertToDateTime(OpsObjectHelper.GetItemFromArray(array, "expire_date").Text),
                        name        = OpsObjectHelper.GetItemFromArray(array, "name").Text,
                        reason      = OpsObjectHelper.GetItemFromArray(array, "reason").Text
                    };
                    del_domains.Add(domain);
                }

                page      = Convert.ToInt32(OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "page").Text);
                page_size = Convert.ToInt32(OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "page_size").Text);
                total     = Convert.ToInt32(OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "total").Text);
            }
        }
Esempio n. 3
0
        public TldData(OPS_envelope response)
        {
            var tldDataItem = OpsObjectHelper.GetResponseAttributeItem(response, "tld_data");

            if (tldDataItem != null)
            {
                var tldData = (dt_assoc)tldDataItem.Item;
                if (tldData != null)
                {
                    var auRegistrantInfoItem = OpsObjectHelper.GetItemFromArray(tldData, "au_registrant_info");
                    if (auRegistrantInfoItem != null)
                    {
                        au_registrant_info = new AuRegistrantInfo(auRegistrantInfoItem);
                    }

                    var brRegisterNumberItem = OpsObjectHelper.GetItemFromArray(tldData, "br_register_number");
                    if (brRegisterNumberItem != null)
                    {
                        br_register_number = brRegisterNumberItem.Text;
                    }

                    var cedInfoItem = OpsObjectHelper.GetItemFromArray(tldData, "ced_info");
                    if (cedInfoItem != null)
                    {
                        ced_info = new CedInfo(cedInfoItem);
                    }

                    var iprDataItem = OpsObjectHelper.GetItemFromArray(tldData, "ipr_data");
                    if (iprDataItem != null)
                    {
                        ipr_data = new IprData(iprDataItem);
                    }

                    var itRegistrantInfoItem = OpsObjectHelper.GetItemFromArray(tldData, "it_registrant_info");
                    if (itRegistrantInfoItem != null)
                    {
                        it_registrant_info = new ItRegistrantInfo(itRegistrantInfoItem);
                    }

                    var nexusItem = OpsObjectHelper.GetItemFromArray(tldData, "nexus");
                    if (nexusItem != null)
                    {
                        nexus = new Nexus(nexusItem);
                    }

                    var professionalDataItem = OpsObjectHelper.GetItemFromArray(tldData, "professional_data");
                    if (professionalDataItem != null)
                    {
                        professional_data = new ProfessionalData(professionalDataItem);
                    }

                    var registrantExtraInfoItem = OpsObjectHelper.GetItemFromArray(tldData, "registrant_extra_info");
                    if (registrantExtraInfoItem != null)
                    {
                        registrant_extra_info = new RegistrantExtraInfo(registrantExtraInfoItem);
                    }
                }
            }
        }
Esempio n. 4
0
 public GetBalanceResponse(string xml) : base(xml)
 {
     if (IsSuccess)
     {
         balance      = Convert.ToDouble(OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "balance").Text);
         hold_balance = Convert.ToDouble(OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "hold_balance").Text);
     }
 }
Esempio n. 5
0
 public BelongsToRspResponse(string responseXml) : base(responseXml)
 {
     if (IsSuccess)
     {
         belongs_to_rsp = OpsObjectHelper.SrsBoolToNetBool(OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "belongs_to_rsp").Text);
         var domainExpiryNode = OpsObjectHelper.GetResponseAttributeItem(ResponseEnvelope, "domain_expdate");
         if (domainExpiryNode != null)
         {
             domain_expdate = OpsObjectHelper.ConvertToNullableDateTime(domainExpiryNode.Text);
         }
     }
 }