Class: TableauServerClient::Resources::Subscription
- Defined in:
- lib/tableau_server_client/resources/subscription.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
attr_reader, attributes, #attributes, #delete!, extract_attributes, extract_site_path, #initialize, location, #location, #path, plural_resource_name, resource_name, #server_url, #site_id, #site_path
Methods included from TableauServerClient::RequestBuilder
Constructor Details
This class inherits a constructor from TableauServerClient::Resources::Resource
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/tableau_server_client/resources/subscription.rb', line 8 def id @id end |
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
8 9 10 |
# File 'lib/tableau_server_client/resources/subscription.rb', line 8 def subject @subject end |
Class Method Details
.from_collection_response(client, path, xml) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/tableau_server_client/resources/subscription.rb', line 18 def self.from_collection_response(client, path, xml) xml.xpath("//xmlns:subscriptions/xmlns:subscription").each do |s| id = s['id'] yield from_response(client, "#{path}/#{id}", s) end end |
.from_response(client, path, xml) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/tableau_server_client/resources/subscription.rb', line 10 def self.from_response(client, path, xml) attrs = extract_attributes(xml) attrs['content_id'] = xml.xpath("xmlns:content")[0]['id'] attrs['schedule_id'] = xml.xpath("xmlns:schedule")[0]['id'] attrs['user_id'] = xml.xpath("xmlns:user")[0]['id'] new(client, path, attrs) end |
Instance Method Details
#content ⇒ Object
25 26 27 |
# File 'lib/tableau_server_client/resources/subscription.rb', line 25 def content raise NotImplementedError end |