Sha256: f161f4d8400bc776991cb110b27d22956115a1233e2b62b39ebf7a7fef319c40

Contents?: true

Size: 338 Bytes

Versions: 13

Compression:

Stored size: 338 Bytes

Contents

require 'json'

module SendGrid
  class BccSettings
    attr_accessor :enable, :email

    def initialize(enable: nil, email: nil)
      @enable = enable
      @email = email
    end

    def to_json(*)
      {
        'enable' => enable,
        'email' => email
      }.delete_if { |_, value| value.to_s.strip == '' }
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sendgrid-ruby-6.7.0 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.6.2 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.6.1 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.6.0 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.5.2 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.5.1 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.5.0 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.4.0 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.3.9 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.3.8 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.3.7 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.3.6 lib/sendgrid/helpers/mail/bcc_settings.rb
sendgrid-ruby-6.3.5 lib/sendgrid/helpers/mail/bcc_settings.rb