Class: ZendeskAPI::View

Inherits:
Rule show all
Includes:
Conditions
Defined in:
lib/zendesk_api/resources.rb

Instance Attribute Summary

Attributes inherited from DataResource

#error, #error_message

Attributes inherited from Data

#association, #attributes, #errors, #response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Conditions

#add_all_condition, #add_any_condition, #all_conditions=, #any_conditions=

Methods included from Destroy

#destroy, #destroy!, #destroyed?, included

Methods included from Update

included

Methods included from Save

#clear_associations, #save, #save!, #save_associations

Methods included from ResponseHandler

#handle_response

Methods included from Create

included

Methods included from Read

included, #reload!

Methods included from Sideloading

included, #set_includes

Methods included from Verbs

#any, #delete, #post, #put

Methods inherited from Data

#==, #account_data, #attributes_for_save, #id, inherited, #initialize, #inspect, #loaded_associations, #method_missing, namespace, new_from_response, #new_record?, #path, #refresh_custom_fields_metadata, resource_name, resource_path, #respond_to_missing?, singular_resource_name, subclasses, #to_json, #to_s

Methods included from Associations

included, #wrap_resource

Constructor Details

This class inherits a constructor from ZendeskAPI::Data

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ZendeskAPI::Data

Class Method Details

.cbp_path_regexesObject



739
740
741
# File 'lib/zendesk_api/resources.rb', line 739

def self.cbp_path_regexes
  [/^views$/]
end

.preview(client, options = {}) ⇒ Object



735
736
737
# File 'lib/zendesk_api/resources.rb', line 735

def self.preview(client, options = {})
  Collection.new(client, ViewRow, options.merge(path: "views/preview", verb: :post))
end

Instance Method Details

#add_column(column) ⇒ Object



724
725
726
727
728
# File 'lib/zendesk_api/resources.rb', line 724

def add_column(column)
  columns = execution.columns.map(&:id)
  columns << column
  self.columns = columns
end

#columns=(columns) ⇒ Object



730
731
732
733
# File 'lib/zendesk_api/resources.rb', line 730

def columns=(columns)
  self.output ||= {}
  self.output[:columns] = columns
end