Class: SendGrid::BccSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/sendgrid/helpers/mail/mail.rb

Instance Method Summary collapse

Constructor Details

#initialize(enable: nil, email: nil) ⇒ BccSettings

Returns a new instance of BccSettings.


318
319
320
321
# File 'lib/sendgrid/helpers/mail/mail.rb', line 318

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

Instance Method Details

#emailObject


335
336
337
# File 'lib/sendgrid/helpers/mail/mail.rb', line 335

def email
  @email
end

#email=(email) ⇒ Object


331
332
333
# File 'lib/sendgrid/helpers/mail/mail.rb', line 331

def email=(email)
  @email = email
end

#enableObject


327
328
329
# File 'lib/sendgrid/helpers/mail/mail.rb', line 327

def enable
  @enable
end

#enable=(enable) ⇒ Object


323
324
325
# File 'lib/sendgrid/helpers/mail/mail.rb', line 323

def enable=(enable)
  @enable = enable
end

#to_jsonObject


339
340
341
342
343
344
# File 'lib/sendgrid/helpers/mail/mail.rb', line 339

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