Class: BusinessCentral::Object::Picture

Inherits:
Base
  • Object
show all
Defined in:
lib/business_central/object/picture.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#create, #destroy, #find_all, #find_by_id, #initialize, #method_missing, #respond_to_missing?, #where

Constructor Details

This class inherits a constructor from BusinessCentral::Object::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BusinessCentral::Object::Base

Instance Method Details

#update(id, data) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/business_central/object/picture.rb', line 8

def update(id, data)
  object = find_all
  Request.call(:patch, @client, "#{build_url(object_id: id)}/content", etag: object[:etag], params: {}) do |request|
    request['Content-Type'] = 'application/octet-stream'
    request.body = data
  end
end