class Textmagic::REST::Invoices
Public Instance Methods
create(params={})
click to toggle source
Creating is not supported.
# File lib/textmagic-ruby/rest/invoices.rb 28 def create(params={}) 29 raise '`create` method is not supported for this resource.' 30 end
delete(uid)
click to toggle source
Deleting is not supported.
# File lib/textmagic-ruby/rest/invoices.rb 49 def delete(uid) 50 raise '`delete` method is not supported for this resource.' 51 end
get(uid)
click to toggle source
Getting is not supported.
# File lib/textmagic-ruby/rest/invoices.rb 35 def get(uid) 36 raise '`get` method by ID is not supported for this resource.' 37 end
list(params={})
click to toggle source
Get all user invoices. Returns PaginateResource
object, contains array of Invoices
objects.
The following params keys are supported:
- page
-
Fetch specified results page. Defaults 1
- limit
-
How many results on page. Defaults 10
Example:
@invoices = client.invoices.list
Calls superclass method
# File lib/textmagic-ruby/rest/invoices.rb 18 def list(params={}) 19 [:search, 'search'].each do |search| 20 params.delete search 21 end 22 super params 23 end
update(uid, params={})
click to toggle source
Updating is not supported.
# File lib/textmagic-ruby/rest/invoices.rb 42 def update(uid, params={}) 43 raise '`update` method is not supported for this resource.' 44 end