Class: SendGrid::ASM

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

Instance Method Summary collapse

Constructor Details

#initialize(group_id: nil, groups_to_display: nil) ⇒ ASM

Returns a new instance of ASM.


448
449
450
451
# File 'lib/sendgrid/helpers/mail/mail.rb', line 448

def initialize(group_id: nil, groups_to_display: nil)
  @group_id = group_id
  @groups_to_display = groups_to_display
end

Instance Method Details

#group_idObject


457
458
459
# File 'lib/sendgrid/helpers/mail/mail.rb', line 457

def group_id
  @group_id
end

#group_id=(group_id) ⇒ Object


453
454
455
# File 'lib/sendgrid/helpers/mail/mail.rb', line 453

def group_id=(group_id)
  @group_id = group_id
end

#groups_to_displayObject


465
466
467
# File 'lib/sendgrid/helpers/mail/mail.rb', line 465

def groups_to_display
  @groups_to_display
end

#groups_to_display=(groups_to_display) ⇒ Object


461
462
463
# File 'lib/sendgrid/helpers/mail/mail.rb', line 461

def groups_to_display=(groups_to_display)
  @groups_to_display = groups_to_display
end

#to_jsonObject


469
470
471
472
473
474
# File 'lib/sendgrid/helpers/mail/mail.rb', line 469

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