Class: Zendesk2::HelpCenter::AccessPolicy

Inherits:
Object
  • Object
show all
Extended by:
Attributes
Includes:
Model
Defined in:
lib/zendesk2/help_center/access_policy.rb

Instance Attribute Summary collapse

Attributes included from Model

#errors

Instance Method Summary collapse

Methods included from Attributes

assoc_accessor, assoc_reader, assoc_writer

Methods included from Model

#destroy, #destroyed?, #missing_attributes, #save, #update!

Instance Attribute Details

#section_idObject

Returns the value of attribute section_id.



18
19
20
# File 'lib/zendesk2/help_center/access_policy.rb', line 18

def section_id
  @section_id
end

Instance Method Details

#managable_byString

Returns Category of users who can manage the section.

Returns:

  • (String)

    Category of users who can manage the section



10
# File 'lib/zendesk2/help_center/access_policy.rb', line 10

attribute :managable_by, type: :string

#required_tagsArray

Returns The tags a user must have to have access.

Returns:

  • (Array)

    The tags a user must have to have access



16
# File 'lib/zendesk2/help_center/access_policy.rb', line 16

attribute :required_tags, type: :array

#restricted_to_group_idsArray

Returns The ids of all groups who can access the section.

Returns:

  • (Array)

    The ids of all groups who can access the section



12
# File 'lib/zendesk2/help_center/access_policy.rb', line 12

attribute :restricted_to_group_ids, type: :array

#restricted_to_organization_idsArray

Returns The ids of all organizations who can access the section.

Returns:

  • (Array)

    The ids of all organizations who can access the section



14
# File 'lib/zendesk2/help_center/access_policy.rb', line 14

attribute :restricted_to_organization_ids, type: :array

#save!Object



21
22
23
24
25
26
# File 'lib/zendesk2/help_center/access_policy.rb', line 21

def save!
  requires :section_id

  response = cistern.update_help_center_access_policy('access_policy' => attributes, 'section_id' => section_id)
  merge_attributes(response.body['access_policy'])
end

#viewable_byString

Returns Category of users who can view the section.

Returns:

  • (String)

    Category of users who can view the section



8
# File 'lib/zendesk2/help_center/access_policy.rb', line 8

attribute :viewable_by, type: :string