Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.vs/WHMCS API/v15/.suo
#	API.cs
#	Enums.cs
#	WHMCS API.csproj
#	bin/Release/WHMCS API.dll
#	bin/Release/WHMCS API.pdb
#	obj/Release/CoreCompileInputs.cache
#	obj/Release/WHMCS API.csproj.FileListAbsolute.txt
#	obj/Release/WHMCS API.dll
#	obj/Release/WHMCS API.pdb
  • Loading branch information
PedroCavaleiro committed Feb 7, 2017
2 parents 58133a4 + 8546d0b commit 10f31bf
Show file tree
Hide file tree
Showing 6 changed files with 300 additions and 0 deletions.
3 changes: 3 additions & 0 deletions API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public GetClientsDetails GetClientsDetails(int ClientID = -1, string ClientEmail
else
throw new Exception("An API Error occurred", new Exception(result["message"].ToString()));
}
<<<<<<< HEAD

/// <summary>
/// Get the orders (for all clients/specific client/specific order/specific status)
Expand Down Expand Up @@ -161,5 +162,7 @@ public GetTransactions GetTransactions(int InvoiceID = -1, int ClientID = -1, st

return JsonConvert.DeserializeObject<GetTransactions>(_call.MakeCall(data));
}
=======
>>>>>>> origin/master
}
}
276 changes: 276 additions & 0 deletions AddClientsDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace WHMCS_API
{
public class Client
{

[JsonProperty("userid")]
public int UserID { get; set; }

[JsonProperty("id")]
public int ID { get; set; }

[JsonProperty("uuid")]
public string UUID { get; set; }

[JsonProperty("firstname")]
public string Firstname { get; set; }

[JsonProperty("lastname")]
public string Lastname { get; set; }

[JsonProperty("fullname")]
public string FullName { get; set; }

[JsonProperty("companyname")]
public string CompanyName { get; set; }

[JsonProperty("email")]
public string Email { get; set; }

[JsonProperty("address1")]
public string Address1 { get; set; }

[JsonProperty("address2")]
public string Address2 { get; set; }

[JsonProperty("city")]
public string City { get; set; }

[JsonProperty("fullstate")]
public string FullState { get; set; }

[JsonProperty("state")]
public string State { get; set; }

[JsonProperty("postcode")]
public string PostCode { get; set; }

[JsonProperty("countrycode")]
public string CountryCode { get; set; }

[JsonProperty("country")]
public string Country { get; set; }

[JsonProperty("phonenumber")]
public string PhoneNumber { get; set; }

[JsonProperty("password")]
public string Password { get; set; }

[JsonProperty("statecode")]
public string StateCode { get; set; }

[JsonProperty("countryname")]
public string CountryName { get; set; }

[JsonProperty("phonecc")]
public int PhoneCC { get; set; }

[JsonProperty("phonenumberformatted")]
public string PhoneNumberFormatted { get; set; }

[JsonProperty("billingcid")]
public int BillingCID { get; set; }

[JsonProperty("notes")]
public string Notes { get; set; }

[JsonProperty("twofaenabled")]
public bool TwoFactorEnabled { get; set; }

[JsonProperty("currency")]
public int Currency { get; set; }

[JsonProperty("defaultgateway")]
public string DefaultGateway { get; set; }

[JsonProperty("cctype")]
public string CreditCardType { get; set; }

[JsonProperty("cclastfour")]
public string CreditCardLastFourDigits { get; set; }

[JsonProperty("securityqid")]
public int SecurityQuestionID { get; set; }

[JsonProperty("securityqans")]
public string SecurityQuestionAnswer { get; set; }

[JsonProperty("groupid")]
public int GroupID { get; set; }

[JsonProperty("status")]
public string Status { get; set; }

[JsonProperty("credit")]
public string Credit { get; set; }

[JsonProperty("taxexempt")]
public bool TexExempt { get; set; }

[JsonProperty("latefeeoveride")]
public bool LateFeeOveride { get; set; }

[JsonProperty("overideduenotices")]
public bool OverideDueNotices { get; set; }

[JsonProperty("separateinvoices")]
public bool SeparateInvoices { get; set; }

[JsonProperty("disableautocc")]
public bool DisableAutoCC { get; set; }

[JsonProperty("emailoptout")]
public bool EmailOptOut { get; set; }

[JsonProperty("overrideautoclose")]
public bool OverideAutoClose { get; set; }

[JsonProperty("allowSingleSignOn")]
public int AllowSingleSignOn { get; set; }

[JsonProperty("language")]
public string Language { get; set; }

[JsonProperty("lastlogin")]
public string LastLogin { get; set; }

[JsonProperty("currency_code")]
public string Currency_Code { get; set; }
}

public class Stats
{

[JsonProperty("numdueinvoices")]
public string NumberDueInvoices { get; set; }

[JsonProperty("dueinvoicesbalance")]
public string DueInvoicesBalance { get; set; }

[JsonProperty("income")]
public string Income { get; set; }

[JsonProperty("incredit")]
public bool InCredit { get; set; }

[JsonProperty("creditbalance")]
public string CreditBalance { get; set; }

[JsonProperty("numoverdueinvoices")]
public string NumberOverdueInvoices { get; set; }

[JsonProperty("overdueinvoicesbalance")]
public string OverudeInvoicesBalance { get; set; }

[JsonProperty("numDraftInvoices")]
public int NumDraftInvoices { get; set; }

[JsonProperty("draftInvoicesBalance")]
public string DraftInvoicesBalance { get; set; }

[JsonProperty("numpaidinvoices")]
public string NumPaidInvoices { get; set; }

[JsonProperty("paidinvoicesamount")]
public string PaidInvoicesAmount { get; set; }

[JsonProperty("numunpaidinvoices")]
public int NumUnpaidInvoices { get; set; }

[JsonProperty("unpaidinvoicesamount")]
public string UnPaidInvoicesAmount { get; set; }

[JsonProperty("numcancelledinvoices")]
public int numcancelledinvoices { get; set; }

[JsonProperty("cancelledinvoicesamount")]
public string CancelledInvoicesAmount { get; set; }

[JsonProperty("numrefundedinvoices")]
public int NumRefundedInvoices { get; set; }

[JsonProperty("refundedinvoicesamount")]
public string RefundedInvoicesAmount { get; set; }

[JsonProperty("numcollectionsinvoices")]
public int NumCollectionsInvoices { get; set; }

[JsonProperty("collectionsinvoicesamount")]
public string CollectionsInvoicesAmount { get; set; }

[JsonProperty("productsnumactivehosting")]
public string ProductsNumActiveHosting { get; set; }

[JsonProperty("productsnumhosting")]
public int ProductsNumHosting { get; set; }

[JsonProperty("productsnumactivereseller")]
public int ProductsNumActiveReseller { get; set; }

[JsonProperty("productsnumreseller")]
public int ProductNumReseller { get; set; }

[JsonProperty("productsnumactiveservers")]
public int ProductsNumActiveServers { get; set; }

[JsonProperty("productsnumservers")]
public int ProductsNumServers { get; set; }

[JsonProperty("productsnumactiveother")]
public int ProductsNumActiveOther { get; set; }

[JsonProperty("productsnumother")]
public int ProductsOther { get; set; }

[JsonProperty("productsnumactive")]
public int ProductsNumActive { get; set; }

[JsonProperty("productsnumtotal")]
public int ProductsNumTotal { get; set; }

[JsonProperty("numactivedomains")]
public string NumActiveDomains { get; set; }

[JsonProperty("numdomains")]
public int NumDomains { get; set; }

[JsonProperty("numacceptedquotes")]
public int NumAcceptedQuotes { get; set; }

[JsonProperty("numquotes")]
public int NumQuotes { get; set; }

[JsonProperty("numtickets")]
public int NumTickets { get; set; }

[JsonProperty("numactivetickets")]
public int NumActiveTickets { get; set; }

[JsonProperty("numaffiliatesignups")]
public string NumAffiliateSignups { get; set; }

[JsonProperty("isAffiliate")]
public bool IsAffiliate { get; set; }
}

public class GetClientsDetails
{

[JsonProperty("result")]
public string Result { get; set; }

[JsonProperty("client")]
public Client Client { get; set; }

[JsonProperty("stats")]
public Stats Stats { get; set; }
}
}
7 changes: 7 additions & 0 deletions Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public enum GetClientsDetailsParams
[StringValue("stats")] Stats
}

<<<<<<< HEAD
public enum GetOrdersParams
{
[StringValue("limitstart")] LimitStart,
Expand All @@ -75,6 +76,8 @@ public enum GetTransactionsParams
[StringValue("transid")] TransactionID
}

=======
>>>>>>> origin/master
/// <summary>
/// Actions Supported by the WHMCS API that are implemented in this Wrapper
/// </summary>
Expand All @@ -83,9 +86,13 @@ public enum Actions
[StringValue("ValidateLogin")] ValidateLogin,
[StringValue("DomainWhois")] DomainWhois,
[StringValue("AddClient")] AddClient,
<<<<<<< HEAD
[StringValue("GetClientsDetails")] GetClientsDetails,
[StringValue("GetOrders")] GetOrders,
[StringValue("GetTransactions")] GetTransactions
=======
[StringValue("GetClientsDetails")] GetClientsDetails
>>>>>>> origin/master
}
}

Expand Down
7 changes: 7 additions & 0 deletions WHMCS API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,20 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AddClient.cs" />
<<<<<<< HEAD
<Compile Include="GetClientsDetails.cs" />
=======
<Compile Include="AddClientsDetails.cs" />
>>>>>>> origin/master
<Compile Include="API.cs" />
<Compile Include="Call.cs" />
<Compile Include="DomainWhoIs.cs" />
<Compile Include="Enums.cs" />
<<<<<<< HEAD
<Compile Include="GetOrders.cs" />
<Compile Include="GetTransactions.cs" />
=======
>>>>>>> origin/master
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ValidateLogin.cs" />
</ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions obj/Release/CoreCompileInputs.cache
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<<<<<<< HEAD
6c3f1616b75e387981e8bc28f6eca8ccfc0bd29b
=======
5eb4fb84540e61ea2545bd966a0bb918182bb6f4
>>>>>>> origin/master
3 changes: 3 additions & 0 deletions obj/Release/WHMCS API.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ C:\Users\pmcav\Source\Repos\whmcs-api\bin\Release\WHMCS API.dll
C:\Users\pmcav\Source\Repos\whmcs-api\bin\Release\WHMCS API.pdb
C:\Users\pmcav\Source\Repos\whmcs-api\bin\Release\Newtonsoft.Json.dll
C:\Users\pmcav\Source\Repos\whmcs-api\bin\Release\Newtonsoft.Json.xml
<<<<<<< HEAD
C:\Users\pmcav\Source\Repos\whmcs-api\obj\Release\WHMCS API.csprojResolveAssemblyReference.cache
=======
>>>>>>> origin/master
C:\Users\pmcav\Source\Repos\whmcs-api\obj\Release\WHMCS API.dll
C:\Users\pmcav\Source\Repos\whmcs-api\obj\Release\WHMCS API.pdb

0 comments on commit 10f31bf

Please sign in to comment.