Class: SendGrid4r::CLI::Campaign::Contact::CustomField

Inherits:
SgThor
  • Object
show all
Defined in:
lib/sendgrid4r/cli/campaign/contact/custom_field.rb

Overview

SendGrid Web API v3 Marketing Campaigns

Instance Method Summary collapse

Methods inherited from SgThor

#initialize

Constructor Details

This class inherits a constructor from SendGrid4r::CLI::SgThor

Instance Method Details

#createObject



11
12
13
14
15
# File 'lib/sendgrid4r/cli/campaign/contact/custom_field.rb', line 11

def create
  puts @client.post_custom_field(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end

#deleteObject



34
35
36
37
38
# File 'lib/sendgrid4r/cli/campaign/contact/custom_field.rb', line 34

def delete
  puts @client.delete_custom_field(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end

#getObject



26
27
28
29
30
# File 'lib/sendgrid4r/cli/campaign/contact/custom_field.rb', line 26

def get
  puts @client.get_custom_field(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end

#listObject



18
19
20
21
22
# File 'lib/sendgrid4r/cli/campaign/contact/custom_field.rb', line 18

def list
  puts @client.get_custom_fields
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end