Permalink
Browse files

Added getmsgcharge feature using message_charge API method

  • Loading branch information...
alhafoudh authored and lukeredpath committed Jan 19, 2010
1 parent e65b3f3 commit 7e9ba27b3c35a7348c2fd4df8a452398fc780b97
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/clickatell/api.rb
View
@@ -99,6 +99,11 @@ def message_status(message_id)
response = execute_command('querymsg', 'http', :apimsgid => message_id)
parse_response(response)['Status']
end
+
+ def message_charge(message_id)
+ response = execute_command('getmsgcharge', 'http', :apimsgid => message_id)
+ parse_response(response)['charge'].to_f
+ end
# Returns the number of credits remaining as a float.
def account_balance

0 comments on commit 7e9ba27

Please sign in to comment.