Class: SendGrid::SandBoxMode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enable: nil) ⇒ SandBoxMode

Returns a new instance of SandBoxMode.



21
22
23
# File 'lib/sendgrid/helpers/mail/bypass_list_management.rb', line 21

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

Instance Attribute Details

#enableObject

Returns the value of attribute enable.



19
20
21
# File 'lib/sendgrid/helpers/mail/bypass_list_management.rb', line 19

def enable
  @enable
end

Instance Method Details

#to_jsonObject



25
26
27
28
29
# File 'lib/sendgrid/helpers/mail/bypass_list_management.rb', line 25

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