Class: Layer::Announcement

Inherits:
Resource show all
Extended by:
Operations::Create::ClassMethods
Includes:
Operations::Create
Defined in:
lib/layer/announcement.rb

Overview

Note:

This is only available via the Platform API.

Examples:

Layer::Announcement.create({ recipients: 'everyone', sender: { name: 'Server' }, parts: [{ body: 'Hello!', mime_type: 'text/plain' }]})

See Also:

Instance Attribute Summary

Attributes inherited from Resource

#attributes, #client

Instance Method Summary collapse

Methods included from Operations::Create::ClassMethods

create

Methods inherited from Resource

class_name, from_response, #id, #initialize, #respond_to_missing?, url, #url

Constructor Details

This class inherits a constructor from Layer::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Layer::Resource

Instance Method Details

#sent_atObject


12
13
14
# File 'lib/layer/announcement.rb', line 12

def sent_at
  Time.parse(attributes['sent_at'])
end