Class: Zendesk::Resource
- Inherits:
-
Object
- Object
- Zendesk::Resource
- Includes:
- Constants, Properties
- Defined in:
- lib/zendesk/resource.rb
Constant Summary
Constants included from Constants
Constants::PRIORITY, Constants::RESTRICTION, Constants::ROLE, Constants::STATUS, Constants::TICKET_TYPE, Constants::VIA
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Resource
constructor
TODO: Make load file as optional.
- #load_data(xml_stream) ⇒ Object
Methods included from Properties
Constructor Details
#initialize(attrs = {}) ⇒ Resource
TODO: Make load file as optional
7 8 9 10 |
# File 'lib/zendesk/resource.rb', line 7 def initialize(attrs = {}) load_attributes(attrs) load_properties(attrs) end |
Class Method Details
.create(attrs = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/zendesk/resource.rb', line 16 def self.create(attrs = {}) instance = new(attrs) instance.save instance end |