Sha256: 5dfc6649adb85ad314da89d8aa719ba76de654e5833bc341e9fa9475af3da7e4

Contents?: true

Size: 582 Bytes

Versions: 4

Compression:

Stored size: 582 Bytes

Contents

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

module SendGrid4r
  module REST
    #
    # SendGrid Web API v3 Suppression Management
    #
    module Sm
      include SendGrid4r::REST::Request

      RecipientEmails = Struct.new(:recipient_emails)
      RecipientEmail = Struct.new(:recipient_email)

      def self.create_recipient_emails(resp)
        return resp if resp.nil?
        RecipientEmails.new(resp['recipient_emails'])
      end

      def self.create_recipient_email(resp)
        return resp if resp.nil?
        RecipientEmail.new(resp['recipient_email'])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sendgrid4r-1.8.1 lib/sendgrid4r/rest/sm/sm.rb
sendgrid4r-1.8.0 lib/sendgrid4r/rest/sm/sm.rb
sendgrid4r-1.7.1 lib/sendgrid4r/rest/sm/sm.rb
sendgrid4r-1.7.0 lib/sendgrid4r/rest/sm/sm.rb