Sha256: 6339f53943144861adad8ef8d37db2c6bf5a704d154847a75574c235b2a488e4

Contents?: true

Size: 844 Bytes

Versions: 11

Compression:

Stored size: 844 Bytes

Contents

module SendGridWebApi::SubUserModules
  class App < SendGridWebApi::SubUser
    APP_URL = "apiv2/customer.apps.json"
    
    def list options = {}
      options.merge!({:task => "getavailable"}) unless options[:task]
      query_api(APP_URL, options)
    end

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

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

    def current_settings options = {}
      options.merge!({:task => "getsettings"}) unless options[:task]
      query_api(APP_URL, options)
    end

    def customize options = {}
      options.merge!({:task => "setup"}) unless options[:task]
      query_post_api(APP_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/apps.rb
sendgrid_webapi-0.1.2 lib/sub_user/apps.rb
sendgrid_webapi-0.1.1 lib/sub_user/apps.rb
sendgrid_webapi-0.1.0 lib/sub_user/apps.rb
sendgrid_webapi-0.0.8 lib/sub_user/apps.rb
sendgrid_webapi-0.0.6 lib/sub_user/apps.rb
sendgrid_webapi-0.0.5 lib/sub_user/apps.rb
sendgrid_webapi-0.0.4 lib/sub_user/apps.rb
sendgrid_webapi-0.0.3 lib/sub_user/apps.rb
sendgrid_webapi-0.0.2 lib/sub_user/apps.rb
sendgrid_webapi-0.0.1 lib/sub_user/apps.rb