Sha256: 1ecab189c3968791aa474c0a676c0f543e67ed52e0b336ce5f9d9b0f36583b36

Contents?: true

Size: 1008 Bytes

Versions: 11

Compression:

Stored size: 1008 Bytes

Contents

module SendGridWebApi::SubUserModules
  class Limit < SendGridWebApi::SubUser
    LIMIT_URL = "apiv2/customer.limit.json"
    
    def get options = {}
      options.merge!({:task => "retrieve"}) unless options[:task]
      query_api(LIMIT_URL, options)
    end

    def delete options = {}
      options.merge!({:task => "none"}) unless options[:task]
      query_api(LIMIT_URL, options)    
    end

    def reset options = {}
      options.merge!({:task => "recurring"}) unless options[:task]
      query_api(LIMIT_URL, options)    
    end

    def set_credits options = {}
      options.merge!({:task => "total"}) unless options[:task]
      query_api(LIMIT_URL, options)    
    end

    def increment_credits options = {}
      options.merge!({:task => "increment"}) unless options[:task]
      query_api(LIMIT_URL, options)    
    end

    def decrement_credits options = {}
      options.merge!({:task => "decrement"}) unless options[:task]
      query_api(LIMIT_URL, options)    
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sendgrid_webapi-0.2.0 lib/sub_user/limits.rb
sendgrid_webapi-0.1.2 lib/sub_user/limits.rb
sendgrid_webapi-0.1.1 lib/sub_user/limits.rb
sendgrid_webapi-0.1.0 lib/sub_user/limits.rb
sendgrid_webapi-0.0.8 lib/sub_user/limits.rb
sendgrid_webapi-0.0.6 lib/sub_user/limits.rb
sendgrid_webapi-0.0.5 lib/sub_user/limits.rb
sendgrid_webapi-0.0.4 lib/sub_user/limits.rb
sendgrid_webapi-0.0.3 lib/sub_user/limits.rb
sendgrid_webapi-0.0.2 lib/sub_user/limits.rb
sendgrid_webapi-0.0.1 lib/sub_user/limits.rb