Class: SendGrid4r::CLI::Settings::Partner
- Inherits:
-
SendGrid4r::CLI::SgThor
- Object
- Thor
- SendGrid4r::CLI::SgThor
- SendGrid4r::CLI::Settings::Partner
- Defined in:
- lib/sendgrid4r/cli/settings/partner.rb
Overview
SendGrid Web API v3 Settings Partner
Instance Method Summary collapse
Methods inherited from SendGrid4r::CLI::SgThor
Constructor Details
This class inherits a constructor from SendGrid4r::CLI::SgThor
Instance Method Details
#list ⇒ Object
10 11 12 13 14 |
# File 'lib/sendgrid4r/cli/settings/partner.rb', line 10 def list puts @client.get_partner_settings(parameterise()) rescue RestClient::ExceptionWithResponse => e puts e.inspect end |
#new_relic(action) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/sendgrid4r/cli/settings/partner.rb', line 18 def new_relic(action) case action when 'get' puts @client.get_settings_new_relic when 'enable', 'disabple' params = parameterise() params[:enabled] = action == 'enable' puts @client.patch_settings_new_relic(params: params) else puts "error: #{action} is not supported in action parameter" end rescue RestClient::ExceptionWithResponse => e puts e.inspect end |