Class: Amiando::Partner
Overview
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
-
.create(attributes) ⇒ Partner
Creates a partner.
-
.find(id) ⇒ Partner
Find a partner.
-
.update(id, attributes) ⇒ Result
Updates the partner.
Methods inherited from Resource
#==, #extract_attributes_from, #initialize, method_missing, #populate_create
Methods included from Attributes
#[], #id, included, #method_missing, #respond_to?, #type
Methods included from Autorun
Constructor Details
This class inherits a constructor from Amiando::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Amiando::Attributes
Class Method Details
.create(attributes) ⇒ Partner
Creates a partner.
12 13 14 15 16 17 18 19 |
# File 'lib/amiando/partner.rb', line 12 def self.create(attributes) object = new post object, '/api/partner/create', :params => attributes, :populate_method => :populate_create object end |
.find(id) ⇒ Partner
Find a partner
41 42 43 44 45 46 |
# File 'lib/amiando/partner.rb', line 41 def self.find(id) object = new get object, "/api/partner/#{id}" object end |
.update(id, attributes) ⇒ Result
Updates the partner.
28 29 30 31 32 33 |
# File 'lib/amiando/partner.rb', line 28 def self.update(id, attributes) object = Result.new post object, "/api/partner/#{id}", :params => attributes object end |