Sha256: a39b28938e38c16512a523c8ec02b2fcacd0d15863c7fdcd3825358d547439ea

Contents?: true

Size: 1.21 KB

Versions: 20

Compression:

Stored size: 1.21 KB

Contents

module GovDelivery::TMS #:nodoc:
  # An EmailRecipient is used in conjunction with an EmailMessage to send email.
  #
  # @attr email [String] The recipient email address
  # @attr macros [Hash] A dictionary of key/value pairs to resolve in the subject and body as macros. This value can be nil.
  #
  # @example Sending a message
  #    email_message = client.email_messages.build(:subject => "Great news!", :body => "You win! <a href='http://example.com/'>click here</a>.")
  #    email_message.recipients.build(:email => "john@example.com")
  #    email_message.recipients.build(:email => "jeff@example.com")
  #    email_message.post
  #    email_message.get
  #
  class EmailRecipient
    include InstanceResource

    # @!parse attr_accessor :email, :macros
    writeable_attributes :email, :macros

    # @!parse attr_reader :completed_at, :status, :error_message
    readonly_attributes :completed_at, :status, :error_message

    ##
    # A CollectionResource of EmailRecipientOpens for this EmailRecipient
    readonly_collection_attribute :opens, 'EmailRecipientOpens'

    ##
    # A CollectionResource of EmailRecipientClicks for this EmailRecipient
    readonly_collection_attribute :clicks, 'EmailRecipientClicks'
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
govdelivery-tms-3.0.0 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-2.8.4 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-2.8.3 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.10.1 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.10.0 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.9.4 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.9.3 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.9.2 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.9.0 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.14 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.13 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.12 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.11 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.10 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.9 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.8 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.7 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.5 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.4 lib/govdelivery/tms/resource/email_recipient.rb
govdelivery-tms-0.8.3 lib/govdelivery/tms/resource/email_recipient.rb