Sha256: 1123472a7c15b7dc91ac45b18355768e2c992edc2430855e1be6d8d95bcde8c0

Contents?: true

Size: 425 Bytes

Versions: 4

Compression:

Stored size: 425 Bytes

Contents

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

module SendGrid4r
  module Factory
    #
    # SendGrid Web API v3 Condition Factory Class implementation
    #
    class ConditionFactory
      def create(field:, value:, operator:, and_or: nil)
        REST::MarketingCampaigns::Contacts::Segments::Condition.new(
          field,
          value,
          operator,
          and_or.nil? ? '' : and_or
        ).to_h
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sendgrid4r-1.15.0 lib/sendgrid4r/factory/condition_factory.rb
sendgrid4r-1.14.0 lib/sendgrid4r/factory/condition_factory.rb
sendgrid4r-1.13.0 lib/sendgrid4r/factory/condition_factory.rb
sendgrid4r-1.12.0 lib/sendgrid4r/factory/condition_factory.rb