module CTAAggregatorClient::CTAResource
Public Instance Methods
create(attributes)
click to toggle source
# File lib/cta_aggregator_client/cta_resource.rb, line 14 def create(attributes) if relationships relationship_data = { relationships => attributes.delete(relationships) } end API::Client.create(resource_name, attributes, relationship_data) end
delete(uuid)
click to toggle source
# File lib/cta_aggregator_client/cta_resource.rb, line 27 def delete(uuid) API::Client.delete(resource_name, uuid) end
find(uuid)
click to toggle source
# File lib/cta_aggregator_client/cta_resource.rb, line 10 def find(uuid) API::Client.find(resource_name, uuid) end
list(filters = {})
click to toggle source
# File lib/cta_aggregator_client/cta_resource.rb, line 6 def list(filters = {}) API::Client.list(resource_name, filters) end
relationships()
click to toggle source
# File lib/cta_aggregator_client/cta_resource.rb, line 35 def relationships nil end
resource_name()
click to toggle source
# File lib/cta_aggregator_client/cta_resource.rb, line 31 def resource_name raise NotImplementedError end
update(attributes)
click to toggle source
# File lib/cta_aggregator_client/cta_resource.rb, line 22 def update(attributes) uuid = attributes.delete(:id) API::Client.update(resource_name, uuid, attributes) end