Method: Textmagic::REST::Users#spending_stat
- Defined in:
- lib/textmagic-ruby/rest/users.rb
#spending_stat(params = {}) ⇒ Object
Return account spending statistics. Returns a PaginateResource object contains array of SpendingStat objects.
The following params keys are supported:
- page
-
Fetch specified results page. Defaults 1
- limit
-
How many results on page. Defaults 10
- start
-
Start date in unix timestamp format. Default is 7 days ago.
- end
-
End date in unix timestamp format. Default is now.
Example:
@spend_stat = client.users.spending_stat
70 71 72 73 74 |
# File 'lib/textmagic-ruby/rest/users.rb', line 70 def spending_stat(params={}) path = '/stats/spending' response = @client.get path, params PaginateResource.new path, @client, response, SpendingStat end |