lib/zendesk2/help_center/article.rb in zendesk2-1.12.0 vs lib/zendesk2/help_center/article.rb in zendesk2-1.13.0
- old
+ new
@@ -43,10 +43,14 @@
attribute :url, type: :string # ro:yes required:no
# @return [Integer] The number of votes cast on this article
attribute :vote_count, type: :integer # ro:yes required:no
# @return [Integer] The total sum of votes on this article
attribute :vote_sum, type: :integer # ro:yes required:no
+ # @return [Integer] The id of the user segment which defines who can see this article
+ attribute :user_segment_id, type: :integer, default: nil # ro:no required:yes
+ # @return [Integer] The id of the permission group which defines who can edit and publish this article
+ attribute :permission_group_id, type: :integer # ro:no required:yes
assoc_accessor :section, collection: :help_center_sections
def translations
requires :identity
@@ -60,10 +64,10 @@
cistern.help_center_subscriptions(content_id: identity, content_type: 'article')
end
def save!
response = if new_record?
- requires :title, :locale, :section_id
+ requires :title, :locale, :section_id, :permission_group_id
cistern.create_help_center_article('article' => attributes)
else
requires :identity