Class: Wes::Data::API::Model::BrandUser
- Inherits:
-
Base
- Object
- Base
- Wes::Data::API::Model::BrandUser
show all
- Defined in:
- lib/wes/data/api/model/brand_user.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Wes::Data::API::Model::Base
Instance Method Details
#brands ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/wes/data/api/model/brand_user.rb', line 18
def brands
route = [routes.brand_user, id, routes.brands].join("/")
map_objects(
client.get(route),
Wes::Data::API::Model::Brand
)
end
|
#update(changes) ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/wes/data/api/model/brand_user.rb', line 9
def update(changes)
route = [routes.brand_user, id].join("/")
attributes = client.put(
route, attributes.to_h.merge(changes)
).first
self
end
|