class Zendesk2::HelpCenter::Subscription

Public Instance Methods

destroy!() click to toggle source
# File lib/zendesk2/help_center/subscription.rb, line 27
def destroy!
  requires :identity

  cistern.destroy_help_center_subscription('subscription' => attributes)
end
save!() click to toggle source
# File lib/zendesk2/help_center/subscription.rb, line 33
def save!
  response = if new_record?
               requires :content_id, :content_type

               cistern.create_help_center_subscription('subscription' => attributes)
             else
               requires :identity

               cistern.update_help_center_subscription('subscription' => attributes)
             end

  merge_attributes(response.body['subscription'])
end