class Zendesk2::Brand

Public Instance Methods

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

  cistern.destroy_brand('brand' => { 'id' => identity })
end
save!() click to toggle source
# File lib/zendesk2/brand.rb, line 39
def save!
  data = if new_record?
           requires :name

           cistern.create_brand('brand' => attributes)
         else
           requires :identity

           cistern.update_brand('brand' => attributes)
         end.body['brand']

  merge_attributes(data)
end