Class: Alman::Calendar
- Inherits:
-
ApiResource
- Object
- ApiResource
- Alman::Calendar
- Defined in:
- lib/alman/resources/calendar.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#created_at_rfc822 ⇒ Object
Returns the value of attribute created_at_rfc822.
-
#details ⇒ Object
Returns the value of attribute details.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#updated_at_rfc822 ⇒ Object
Returns the value of attribute updated_at_rfc822.
Attributes inherited from ApiResource
Class Method Summary collapse
- .all(params = {}, headers = {}) ⇒ Object
- .create(params = {}, headers = {}) ⇒ Object
- .retrieve(calendar_id, params = {}, headers = {}) ⇒ Object
- .update(calendar_id, params = {}, headers = {}) ⇒ Object
Instance Method Summary collapse
- #delete(params = {}, headers = {}) ⇒ Object
- #refresh(params = {}, headers = {}) ⇒ Object
- #save(params = {}, headers = {}) ⇒ Object
- #vacancies ⇒ Object
Methods inherited from ApiResource
add_api_attribute, api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, client, #determine_api_attribute_value, determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json
Constructor Details
This class inherits a constructor from Alman::ApiResource
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/alman/resources/calendar.rb', line 3 def created_at @created_at end |
#created_at_rfc822 ⇒ Object
Returns the value of attribute created_at_rfc822.
4 5 6 |
# File 'lib/alman/resources/calendar.rb', line 4 def created_at_rfc822 @created_at_rfc822 end |
#details ⇒ Object
Returns the value of attribute details.
5 6 7 |
# File 'lib/alman/resources/calendar.rb', line 5 def details @details end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/alman/resources/calendar.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/alman/resources/calendar.rb', line 7 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
8 9 10 |
# File 'lib/alman/resources/calendar.rb', line 8 def object @object end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
9 10 11 |
# File 'lib/alman/resources/calendar.rb', line 9 def updated_at @updated_at end |
#updated_at_rfc822 ⇒ Object
Returns the value of attribute updated_at_rfc822.
10 11 12 |
# File 'lib/alman/resources/calendar.rb', line 10 def updated_at_rfc822 @updated_at_rfc822 end |
Class Method Details
.all(params = {}, headers = {}) ⇒ Object
12 13 14 15 |
# File 'lib/alman/resources/calendar.rb', line 12 def self.all(params={}, headers={}) res = client.calendars.all(params, headers) res end |
.create(params = {}, headers = {}) ⇒ Object
27 28 29 30 |
# File 'lib/alman/resources/calendar.rb', line 27 def self.create(params={}, headers={}) res = client.calendars.create(params, headers) res end |
.retrieve(calendar_id, params = {}, headers = {}) ⇒ Object
17 18 19 20 |
# File 'lib/alman/resources/calendar.rb', line 17 def self.retrieve(calendar_id, params={}, headers={}) res = client.calendars.retrieve(calendar_id, params, headers) res end |
.update(calendar_id, params = {}, headers = {}) ⇒ Object
22 23 24 25 |
# File 'lib/alman/resources/calendar.rb', line 22 def self.update(calendar_id, params={}, headers={}) res = client.calendars.update(calendar_id, params, headers) res end |
Instance Method Details
#delete(params = {}, headers = {}) ⇒ Object
37 38 39 40 |
# File 'lib/alman/resources/calendar.rb', line 37 def delete(params={}, headers={}) res = client.calendars.delete(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end |
#refresh(params = {}, headers = {}) ⇒ Object
32 33 34 35 |
# File 'lib/alman/resources/calendar.rb', line 32 def refresh(params={}, headers={}) res = client.calendars.retrieve(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end |
#save(params = {}, headers = {}) ⇒ Object
46 47 48 49 50 |
# File 'lib/alman/resources/calendar.rb', line 46 def save(params={}, headers={}) params = ParamsBuilder.merge(api_attributes, params) res = client.calendars.update(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end |
#vacancies ⇒ Object
42 43 44 |
# File 'lib/alman/resources/calendar.rb', line 42 def vacancies() CalendarVacanciesEndpoint.new(client, self) end |