Class: EY::ServicesAPI::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/ey_services_api/service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#connectionObject

Returns the value of attribute connection.



5
6
7
# File 'lib/ey_services_api/service.rb', line 5

def connection
  @connection
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/ey_services_api/service.rb', line 6

def url
  @url
end

Instance Method Details

#destroyObject



14
15
16
# File 'lib/ey_services_api/service.rb', line 14

def destroy
  connection.destroy_service(self.url)
end

#update(atts) ⇒ Object



8
9
10
11
12
# File 'lib/ey_services_api/service.rb', line 8

def update(atts)
  new_atts = self.to_hash.merge(atts)
  connection.update_service(self.url, new_atts)
  update_from_hash(new_atts)
end