Class: PowerBI::Profile
Instance Attribute Summary
Attributes inherited from Object
#id
Instance Method Summary
collapse
Methods inherited from Object
instantiate_from_data, #reload, #set_attributes
Constructor Details
#initialize(tenant, parent, id = nil) ⇒ Profile
4
5
6
|
# File 'lib/power-bi/profile.rb', line 4
def initialize(tenant, parent, id = nil)
super(tenant, id)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class PowerBI::Object
Instance Method Details
#data_to_attributes(data) ⇒ Object
12
13
14
15
16
17
|
# File 'lib/power-bi/profile.rb', line 12
def data_to_attributes(data)
{
id: data[:id],
display_name: data[:displayName],
}
end
|
19
20
21
22
23
|
# File 'lib/power-bi/profile.rb', line 19
def delete
@tenant.delete("/profiles/#{@id}", use_profile: false)
@tenant.profiles.reload
true
end
|
#get_data(id) ⇒ Object
8
9
10
|
# File 'lib/power-bi/profile.rb', line 8
def get_data(id)
@tenant.get("/profiles/#{id}", use_profile: false)
end
|