-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
36 additions
and
14 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,18 +10,18 @@ namespace SpeedyDelete | |
class Program | ||
{ | ||
|
||
static string USERNAME = "[email protected]"; | ||
static string PASSWORD = "Zuora001"; | ||
String username = ""; | ||
String password = ""; | ||
|
||
static string ENDPOINT = "https://www.zuora.com/apps/services/a/38.0"; | ||
String ENDPOINT = "https://apisandbox.zuora.com/apps/services/a/38.0"; | ||
private zuora.ZuoraService binding; | ||
string querystring = "SELECT id from Account where createdbyid = '2c92a0fb394cb92c013968fb16fb619c'"; | ||
string delObject = "Account"; | ||
String querystring = "SELECT id from account"; | ||
String delObject = "account"; | ||
// | ||
//Vars | ||
// | ||
int numThreads = 20; | ||
int numToDelete = 50; | ||
int numThreads = 64; | ||
int numToDelete = 5; | ||
DateTime dt = new DateTime(2012, 6, 11); | ||
//string querystring; | ||
|
||
|
@@ -48,7 +48,31 @@ public Program() | |
|
||
binding = new zuora.ZuoraService(); | ||
binding.Url = ENDPOINT; | ||
binding.Timeout = 300000; | ||
binding.Timeout = 600000; | ||
|
||
Console.WriteLine("Enter user name: "); | ||
username = Console.ReadLine(); | ||
|
||
Console.WriteLine("Enter password: "); | ||
password = Console.ReadLine(); | ||
|
||
Console.WriteLine("Enter query string: "); | ||
querystring = Console.ReadLine(); | ||
|
||
Console.WriteLine("Enter Object thats being deleted"); | ||
delObject = Console.ReadLine(); | ||
|
||
Console.WriteLine("Production or Sandbox? Enter P or S"); | ||
String pors = Console.ReadLine(); | ||
if (pors == "S") | ||
{ | ||
ENDPOINT = "https://apisandbox.zuora.com/apps/services/a/38.0"; | ||
} | ||
else if(pors == "P") | ||
{ | ||
ENDPOINT = "https://www.zuora.com/apps/services/a/38.0"; | ||
} | ||
|
||
qResult = new QueryResult(); | ||
} | ||
// | ||
|
@@ -61,6 +85,7 @@ public void startDelete() | |
zObject[] queryRes = doQuery(); | ||
|
||
Console.WriteLine("Size: " + queryRes.Length); | ||
Console.WriteLine("Press Enter to Continue..." + queryRes.Length); | ||
Console.ReadKey(); | ||
|
||
handleQuery(queryRes); | ||
|
@@ -203,7 +228,7 @@ private bool login() | |
{ | ||
//execute the login placing the results | ||
//in a LoginResult object | ||
zuora.LoginResult loginResult = binding.login(USERNAME, PASSWORD); | ||
zuora.LoginResult loginResult = binding.login(username, password); | ||
|
||
//set the session id header for subsequent calls | ||
binding.SessionHeaderValue = new zuora.SessionHeader(); | ||
|
@@ -244,10 +269,7 @@ private string update(zObject acc) | |
} | ||
|
||
private bool delete(String type, string[] ids) | ||
{ | ||
|
||
|
||
|
||
{ | ||
DeleteResult[] result = binding.delete(type, ids); | ||
for (int i = 0; i < result.Length; i++) | ||
{ | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+730 Bytes
(110%)
SpeedyDelete/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+8.4 KB
SpeedyDelete/obj/x86/Debug/SpeedyDelete.csprojResolveAssemblyReference.cache
Binary file not shown.
Binary file not shown.
Binary file not shown.