Example how to check credit balances on your account.
EzTextingClient client = new EzTextingClient("login", "password");
CreditBalance balance = client.CreditsApi.CheckBalance();
Console.WriteLine("balance: " + balance);Buy more credits for your account. You may purchase credits using a credit card you have stored in your Ez Texting account, or you may pass credit card details when you call the API. Example how to use stored credit card:
EzTextingClient client = new EzTextingClient("login", "password");
var request = new BuyCreditsRequest
{
Credits = 200,
CouponCode = "ABX32WE",
StoredCard = "4533"
};
BuyCreditsResponse response = client.CreditsApi.BuyCredits(request);
Console.WriteLine("buy credits with stored cc: " + response);as another option you can provide credit card details in request:
EzTextingClient client = new EzTextingClient("login", "password");
var request = new BuyCreditsRequest
{
CouponCode = "ABX32WE",
FirstName = "John",
LastName = "Doe",
State = "LA",
SecurityCode = "123",
ExpirationMonth = "11",
ExpirationYear = "2020",
Number = "411111111111",
City = "LA",
Country = "US",
Street = "1 Avenue",
Zip = "31331",
Type = CreditCardType.MasterCard
};
BuyCreditsResponse response = client.CreditsApi.BuyCredits(request);
Console.WriteLine("buy credits with new cc: " + response);