lib/myjohndeere/map_layer_summary.rb in myjohndeere-0.0.6 vs lib/myjohndeere/map_layer_summary.rb in myjohndeere-0.0.7
- old
+ new
@@ -1,7 +1,8 @@
module MyJohnDeere
class MapLayerSummary < OrganizationOwnedResource
+ self.supports_delete = true
self.base_jd_resource = "mapLayerSummaries"
self.list_resource_path = "organizations/%{organization_id}/fields/%{field_id}/#{self.base_jd_resource}"
self.retrieve_resource_path = self.base_jd_resource
attributes_to_pull_from_json(:id, :title, :text, :metadata, :dateCreated, :lastModifiedDate)
@@ -16,10 +17,10 @@
text: caption,
links: [
owning_organization_link_item(organization_id),
{
rel: "contributionDefinition",
- uri: "#{MyJohnDeere.configuration.endpoint}/#{MyJohnDeere.configuration.contribution_definition_id}"
+ uri: "#{MyJohnDeere.configuration.endpoint}/contributionDefinitions/#{MyJohnDeere.configuration.contribution_definition_id}"
}
],
metadata: metadata.map { |md| md.to_hash },
dateCreated: (date_created || Time.now).strftime("%Y-%m-%dT%H:%M:%S.%LZ")
}
\ No newline at end of file