Class: Userlist::Push::Company

Inherits:
Resource
  • Object
show all
Defined in:
lib/userlist/push/company.rb

Instance Attribute Summary

Attributes inherited from Resource

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

resource_name, #respond_to_missing?

Constructor Details

#initialize(attributes = {}) ⇒ Company

Returns a new instance of Company.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
# File 'lib/userlist/push/company.rb', line 8

def initialize(attributes = {})
  raise ArgumentError, 'Missing required attributes hash' unless attributes
  raise ArgumentError, 'Missing required parameter :identifier' unless attributes[:identifier]

  super
end

Dynamic Method Handling

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

Class Method Details

.endpointObject



4
5
6
# File 'lib/userlist/push/company.rb', line 4

def self.endpoint
  '/companies'
end