Class: SendGrid::SandBoxMode

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

Instance Method Summary collapse

Constructor Details

#initialize(enable: nil) ⇒ SandBoxMode

Returns a new instance of SandBoxMode.


368
369
370
# File 'lib/sendgrid/helpers/mail/mail.rb', line 368

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

Instance Method Details

#enableObject


376
377
378
# File 'lib/sendgrid/helpers/mail/mail.rb', line 376

def enable
  @enable
end

#enable=(enable) ⇒ Object


372
373
374
# File 'lib/sendgrid/helpers/mail/mail.rb', line 372

def enable=(enable)
  @enable = enable
end

#to_jsonObject


380
381
382
383
384
# File 'lib/sendgrid/helpers/mail/mail.rb', line 380

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