Class: PlateApi::PlateObject::Site
- Defined in:
- lib/plate_api/plate_object/site.rb
Constant Summary
Constants inherited from Base
Base::HasManyRelations, Base::HasOneRelations
Instance Attribute Summary
Attributes inherited from Base
#attributes, #id, #object_handler, #relations
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#==, #api_name, #delete, #initialize, #inspect, #method_missing, #reload, #respond_to_missing?, #to_s, #update
Constructor Details
This class inherits a constructor from PlateApi::PlateObject::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PlateApi::PlateObject::Base
Class Method Details
.api_name ⇒ Object
16 17 18 |
# File 'lib/plate_api/plate_object/site.rb', line 16 def self.api_name "sites" end |
.parent_class ⇒ Object
20 21 22 |
# File 'lib/plate_api/plate_object/site.rb', line 20 def self.parent_class Company end |
Instance Method Details
#create_attachment(file, extra_parameters = {}) ⇒ Object
24 25 26 27 28 |
# File 'lib/plate_api/plate_object/site.rb', line 24 def (file, extra_parameters={}) raise ArgumentError.new("No File is given as input") unless file.is_a? File parameters = extra_parameters.merge({file: file}) @object_handler.api_connector.handler(PlateApi::PlateObject::Attachment).create(self, parameters, :post_multipart) end |