lib/myjohndeere/map_layer_summary.rb in myjohndeere-0.0.2 vs lib/myjohndeere/map_layer_summary.rb in myjohndeere-0.0.3
- old
+ new
@@ -22,19 +22,10 @@
}
],
metadata: metadata.map { |md| md.to_hash },
dateCreated: (date_created || Time.now).strftime("%Y-%m-%dT%H:%M:%S.%LZ")
}
- response = access_token.execute_request(:post,
- build_resouce_base_path!(self.list_resource_path, {field_id: field_id, organization_id: organization_id}),
- body: body
- )
- #{"Content-Type"=>"text/plain", "X-Deere-Handling-Server"=>"ldxtc4", "X-Frame-Options"=>"SAMEORIGIN", "Location"=>"https://sandboxapi.deere.com/platform/mapLayerSummaries/c5e9317e-eda6-48d3-acc8-c3bca3424858", "X-Deere-Elapsed-Ms"=>"362", "Vary"=>"Accept-Encoding", "Expires"=>"Wed, 13 Sep 2017 22:00:45 GMT", "Cache-Control"=>"max-age=0, no-cache", "Pragma"=>"no-cache", "Date"=>"Wed, 13 Sep 2017 22:00:45 GMT", "Transfer-Encoding"=>"chunked", "Connection"=>"close, Transfer-Encoding"}
- id = get_created_id_from_response_headers(self.base_jd_resource, response)
- if id.nil?
- return nil
- else
- return self.new(HashUtils.deep_stringify_keys({"id" => id}.merge(body)))
- end
+
+ return send_create(access_token, body, {field_id: field_id, organization_id: organization_id})
end
end
end
\ No newline at end of file