class SendGrid4r::Factory::SegmentFactory
SendGrid Web API v3 Segment Factory
Class implementation
Public Instance Methods
create(name: nil, list_id: nil, conditions:)
click to toggle source
# File lib/sendgrid4r/factory/segment_factory.rb, line 8 def create(name: nil, list_id: nil, conditions:) segment = REST::MarketingCampaigns::Contacts::Segments::Segment.new( nil, name, list_id, conditions, nil ) segment.to_h.reject { |_key, value| value.nil? } end