Exemplo n.º 1
0
 /// <remarks/>
 public void OrderDomainBackOrdersAsync(string sCLTRID, Credential credential, Shopper shopper, DomainBackOrder[] items, string sROID, object userState) {
     if ((this.OrderDomainBackOrdersOperationCompleted == null)) {
         this.OrderDomainBackOrdersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOrderDomainBackOrdersOperationCompleted);
     }
     this.InvokeAsync("OrderDomainBackOrders", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 sROID}, this.OrderDomainBackOrdersOperationCompleted, userState);
 }
Exemplo n.º 2
0
 public string OrderDomainBackOrders(string sCLTRID, Credential credential, Shopper shopper, DomainBackOrder[] items, string sROID) {
     object[] results = this.Invoke("OrderDomainBackOrders", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 sROID});
     return ((string)(results[0]));
 }
Exemplo n.º 3
0
 /// <remarks/>
 public void OrderDomainBackOrdersAsync(string sCLTRID, Credential credential, Shopper shopper, DomainBackOrder[] items, string sROID) {
     this.OrderDomainBackOrdersAsync(sCLTRID, credential, shopper, items, sROID, null);
 }
Exemplo n.º 4
0
 public string OrderResourceRenewals(string sCLTRID, Credential credential, Shopper shopper, ResourceRenewal[] items, string sROID) {
     object[] results = this.Invoke("OrderResourceRenewals", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 sROID});
     return ((string)(results[0]));
 }
Exemplo n.º 5
0
 /// <remarks/>
 public void OrderResourceRenewalsAsync(string sCLTRID, Credential credential, Shopper shopper, ResourceRenewal[] items, string sROID) {
     this.OrderResourceRenewalsAsync(sCLTRID, credential, shopper, items, sROID, null);
 }
Exemplo n.º 6
0
 /// <remarks/>
 public void OrderPrivateDomainRenewalsAsync(string sCLTRID, Credential credential, Shopper shopper, DomainRenewal[] items, ResourceRenewal[] dbpItems, string sROID) {
     this.OrderPrivateDomainRenewalsAsync(sCLTRID, credential, shopper, items, dbpItems, sROID, null);
 }
Exemplo n.º 7
0
 /// <remarks/>
 public void OrderDomainPrivacyAsync(string sCLTRID, Credential credential, Shopper shopper, DomainByProxy[] items, string sROID) {
     this.OrderDomainPrivacyAsync(sCLTRID, credential, shopper, items, sROID, null);
 }
Exemplo n.º 8
0
 public string OrderDomains(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID) {
     object[] results = this.Invoke("OrderDomains", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 dbpItems,
                 sROID});
     return ((string)(results[0]));
 }
Exemplo n.º 9
0
 /// <remarks/>
 public void OrderDomainsAsync(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID) {
     this.OrderDomainsAsync(sCLTRID, credential, shopper, items, dbpItems, sROID, null);
 }
Exemplo n.º 10
0
 /// <remarks/>
 public void OrderCreditsAsync(string sCLTRID, Credential credential, Shopper shopper, OrderItem[] items, string sROID) {
     this.OrderCreditsAsync(sCLTRID, credential, shopper, items, sROID, null);
 }
Exemplo n.º 11
0
		private void Transfer()
		{
			Shopper newShopper = new Shopper()
			{
				user = "******",
				pwd = "ghijk",
				firstname = "Joe",
				lastname = "Smith",
				email = "*****@*****.**",
				phone = "+1.7775551212"
			};
			ContactInfo newRegistrant = new ContactInfo()
			{
				fname = "Joe",
				lname = "Smith",
				email = "*****@*****.**",
				sa1 = "1 S. Main St.",
				city = "Oakland",
				sp = "California",
				pc = "97123",
				cc = "United States",
				phone = "+1.7775551212"
			};

			DomainTransfer[] dtArray = new DomainTransfer[1];
			dtArray[0] = new DomainTransfer()
			{
				sld = "example",
				tld = "com",
				order = new OrderItem()
				{
					productid = (int)ProductID.TransferDotCOM
				}
			};

			string trid = Guid.NewGuid().ToString();
			string responseXml =
				wapi.OrderDomainTransfers(trid, cred, newShopper, dtArray, null);
			otherTransactionIDs.Add(trid);
		}
Exemplo n.º 12
0
		private void Renew()
		{
			DomainRenewal[] drArray = new DomainRenewal[2];
			for (int i = 0; i < domainNames.Length; i++)
			{
				string tld = Helpers.GetTopLevelDomain(domainNames[i]);
				drArray[i] = new DomainRenewal()
				{
					resourceid = pollResponse.Items.Find(item => item.ROID == "domain" && item.RIID == i.ToString()).ResourceID,
					tld = tld,
					sld = Helpers.GetSecondLevelDomain(domainNames[i]),
					period = 1,
					order = new OrderItem()
					{
						productid = (int)GetProductID(tld, 1, true),
						duration = 1,
						quantity = 1,
						riid = i.ToString()
					}
				};
			}

			PollResponse p = new PollResponse(
				wapi.Poll(this.orderPrivacyTransactionID, cred, null));

			Shopper shopper = new Shopper() { user = userID.ToString(), dbpuser = dbpuserID.ToString(), dbppwd = "defgh" };

			ResourceRenewal rr = new ResourceRenewal()
			{
				resourceid = p.Items[0].ResourceID,
				order = new OrderItem()
				{
					productid = (int)ProductID.PrivateRegistrationServicesRenewalAPI,
					duration = 1,
					quantity = 1
				}
			};

			string trid = Guid.NewGuid().ToString();
			string resp1 =
				wapi.OrderPrivateDomainRenewals(trid, cred, shopper, drArray, new ResourceRenewal[] { rr }, null);

			otherTransactionIDs.Add(trid);
		}
Exemplo n.º 13
0
		private void PurchasePrivacy()
		{
			string pollResponseXml = wapi.Poll(this.orderDomainTransactionID, cred, null);
			pollResponse = new PollResponse(pollResponseXml);
			if (this.orderDomainTransactionID != pollResponse.UniqueClientTransactionID) throw new InvalidResponseException(pollResponseXml);

			Shopper s = new Shopper();
			s.user = this.userID.ToString();
			s.dbpuser = "******";
			s.dbppwd = "defgh";
			s.dbpemail = "*****@*****.**";

			DomainByProxy dbp = new DomainByProxy()
			{
				sld = "example",
				tld = "us",
				resourceid = pollResponse.Items.Find(i => i.ROID == "domain" && i.RIID == "0").ResourceID,
				order = new OrderItem()
				{
					duration = 1,
					productid = (int)ProductID.PrivateRegistrationServicesAPI
				}
			};
			string response = wapi.OrderDomainPrivacy(this.orderPrivacyTransactionID, cred, s, new DomainByProxy[] { dbp }, null);
			OrderDomainPrivacyResponse r = new OrderDomainPrivacyResponse(response);
			if (this.orderPrivacyTransactionID != r.UniqueClientTransactionID) throw new InvalidResponseException(response);
			dbpuserID = r.DbpUserID;
		}
Exemplo n.º 14
0
		private void Register()
		{
			ContactInfo registrant = new ContactInfo()
			{
				fname = "Artemus",
				lname = "Gordon",
				email = "*****@*****.**",
				phone = "+1.8885551212",
				sa1 = "2 N. Main St.",
				city = "Valdosta",
				sp = "Georgia",
				pc = "17123",
				cc = "United States",
			};

			DomainRegistration[] drArray = new DomainRegistration[this.domainNames.Length];
			for (int i = 0; i < this.domainNames.Length; i++)
			{
				string topLevelDomain = Helpers.GetTopLevelDomain(this.domainNames[i]);
				drArray[i] = new DomainRegistration()
				{
					nsArray = new NS[] { new NS() { name = "ns1.example.com" }, new NS() { name = "ns2.example.com" } },
					registrant = registrant,
					order = new OrderItem() { productid = (int)GetProductID(topLevelDomain, RegistrationPeriodInYears, false), riid = i.ToString() },
					tld = topLevelDomain,
					sld = Helpers.GetSecondLevelDomain(this.domainNames[i]),
					period = RegistrationPeriodInYears
				};

				if (topLevelDomain == "us")
				{
					drArray[i].nexus = new Nexus()
					{
						category = "citizen of US",
						use = "personal",
						country = "us"
					};
				}
			}

			Shopper shopper = new Shopper();
			if (this.userID > 0)
			{
				shopper.user = userID.ToString();
			}
			else
			{
				shopper.user = "******";
				shopper.pwd = "abcde";
				shopper.email = "*****@*****.**";
				shopper.firstname = "Artemus";
				shopper.lastname = "Gordon";
				shopper.phone = "+1.8885551212"; // country code . number
			}

			string returnXml = wapi.OrderDomains(orderDomainTransactionID, cred, shopper, drArray, null, "domain");
			RegisterDomainsResponse r = new RegisterDomainsResponse(returnXml);
			if (this.orderDomainTransactionID != r.UniqueClientTransactionID) throw new InvalidResponseException(returnXml);
			this.OrderID = r.OrderID;
			this.userID = r.ShopperID;
		}