Class: GramV1Client::Email

Inherits:
Base
  • Object
show all
Defined in:
lib/gram_v1_client/email.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

password, proxy, reload_config, site, user

Class Method Details

.element_path(id, prefix_options = {}, query_options = nil) ⇒ Object

Overwrite find_single from ActiveResource::Base to be able to use gram api (/accounts suffix) github.com/rails/activeresource/blob/master/lib/active_resource/base.rb#L991



18
19
20
21
# File 'lib/gram_v1_client/email.rb', line 18

def self.element_path(id, prefix_options = {}, query_options = nil)
   id += "/accounts"
   super(id, prefix_options, query_options)
end

Instance Method Details

#collection_path(prefix_options = {}, query_options = nil) ⇒ Object



23
24
25
26
# File 'lib/gram_v1_client/email.rb', line 23

def collection_path(prefix_options = {}, query_options = nil)
  id += "/accounts"
  super(id, prefix_options, query_options)
end

#to_paramObject

Overwrite to_param from ActiveResource::Base to be able to use gram api (id = hruid) github.com/rails/activeresource/blob/master/lib/active_resource/base.rb#L991



30
31
32
# File 'lib/gram_v1_client/email.rb', line 30

def to_param
  self.hruid
end