diff --git a/lib/e_pochta_sms.rb b/lib/e_pochta_sms.rb index fc264de..a5c3b04 100644 --- a/lib/e_pochta_sms.rb +++ b/lib/e_pochta_sms.rb @@ -15,6 +15,32 @@ def create_address_book(params) end end + def check_campaign_price(params) + params['action'] = 'checkCampaignPrice' + + result = exec_command(params) + result = JSON.parse(result.body) + + if result.has_key? 'error' + false + else + result['result'] + end + end + + def get_addressbook(params) + params['action'] = 'getAddressbook' + + result = exec_command(params) + result = JSON.parse(result.body) + + if result.has_key? 'error' + false + else + result['result'] + end + end + def get_balance() params = {} params['action'] = 'getUserBalance'