Sha256: 88d8e52366edae8144f3c0d0cb6ddfcd6a936effc86c93d2996c7f49c90ff96d

Contents?: true

Size: 475 Bytes

Versions: 6

Compression:

Stored size: 475 Bytes

Contents

# -*- encoding: utf-8 -*-

module SendGrid4r
  module Factory
    #
    # SendGrid Web API v3 Segment Factory Class implementation
    #
    class SegmentFactory
      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
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sendgrid4r-1.15.0 lib/sendgrid4r/factory/segment_factory.rb
sendgrid4r-1.14.0 lib/sendgrid4r/factory/segment_factory.rb
sendgrid4r-1.13.0 lib/sendgrid4r/factory/segment_factory.rb
sendgrid4r-1.12.0 lib/sendgrid4r/factory/segment_factory.rb
sendgrid4r-1.11.0 lib/sendgrid4r/factory/segment_factory.rb
sendgrid4r-1.10.0 lib/sendgrid4r/factory/segment_factory.rb