module SendGrid4r::REST::MarketingCampaigns::Contacts::ReservedFields
Constants
- Field
- Fields
Public Class Methods
create_field(resp)
click to toggle source
# File lib/sendgrid4r/rest/marketing_campaigns/contacts/reserved_fields.rb, line 31 def self.create_field(resp) return resp if resp.nil? Field.new(resp['name'], resp['type']) end
create_fields(resp)
click to toggle source
# File lib/sendgrid4r/rest/marketing_campaigns/contacts/reserved_fields.rb, line 23 def self.create_fields(resp) return resp if resp.nil? reserved_fields = resp['reserved_fields'].map do |field| Contacts::ReservedFields.create_field(field) end Fields.new(reserved_fields) end
Public Instance Methods
get_reserved_fields(&block)
click to toggle source
# File lib/sendgrid4r/rest/marketing_campaigns/contacts/reserved_fields.rb, line 36 def get_reserved_fields(&block) resp = get(@auth, "#{BASE_URL}/contactdb/reserved_fields", &block) finish(resp, @raw_resp) do |r| Contacts::ReservedFields.create_fields(r) end end