Class: SendGrid::BccSettings

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BccSettings.



7
8
9
10
# File 'lib/sendgrid/helpers/mail/bcc_settings.rb', line 7

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

Instance Attribute Details

#emailObject

Returns the value of attribute email.



5
6
7
# File 'lib/sendgrid/helpers/mail/bcc_settings.rb', line 5

def email
  @email
end

#enableObject

Returns the value of attribute enable.



5
6
7
# File 'lib/sendgrid/helpers/mail/bcc_settings.rb', line 5

def enable
  @enable
end

Instance Method Details

#to_jsonObject



12
13
14
15
16
17
# File 'lib/sendgrid/helpers/mail/bcc_settings.rb', line 12

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