class MyJohnDeere::File
Public Class Methods
create(access_token, organization_id, name: nil)
click to toggle source
# File lib/myjohndeere/file.rb, line 16 def self.create(access_token, organization_id, name: nil) raise ArgumentError.new("You must pass a name for the file") if name.nil? body = { name: name } response = send_create(access_token, body, {organization_id: organization_id}) return nil if response.nil? response.organization_id = organization_id return response end
new(json_object, access_token = nil)
click to toggle source
Calls superclass method
# File lib/myjohndeere/file.rb, line 8 def initialize(json_object, access_token = nil) super(json_object, access_token) end
Public Instance Methods
upload_url()
click to toggle source
# File lib/myjohndeere/file.rb, line 12 def upload_url() "#{MyJohnDeere.configuration.endpoint}/#{self.class.build_resource_base_path!("#{self.class.retrieve_resource_path}/#{self.id}")}" end