Class: Alman::Vacancy
- Inherits:
-
ApiResource
- Object
- ApiResource
- Alman::Vacancy
- Defined in:
- lib/alman/resources/vacancy.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.
-
#end_at ⇒ Object
Returns the value of attribute end_at.
-
#end_at_rfc822 ⇒ Object
Returns the value of attribute end_at_rfc822.
-
#id ⇒ Object
Returns the value of attribute id.
-
#object ⇒ Object
Returns the value of attribute object.
-
#start_at ⇒ Object
Returns the value of attribute start_at.
-
#start_at_rfc822 ⇒ Object
Returns the value of attribute start_at_rfc822.
-
#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
Instance Method Summary collapse
- #bookings ⇒ Object
- #delete(params = {}, headers = {}) ⇒ Object
- #refresh(params = {}, headers = {}) ⇒ 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/vacancy.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/vacancy.rb', line 4 def created_at_rfc822 @created_at_rfc822 end |
#end_at ⇒ Object
Returns the value of attribute end_at.
5 6 7 |
# File 'lib/alman/resources/vacancy.rb', line 5 def end_at @end_at end |
#end_at_rfc822 ⇒ Object
Returns the value of attribute end_at_rfc822.
6 7 8 |
# File 'lib/alman/resources/vacancy.rb', line 6 def end_at_rfc822 @end_at_rfc822 end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/alman/resources/vacancy.rb', line 7 def id @id end |
#object ⇒ Object
Returns the value of attribute object.
8 9 10 |
# File 'lib/alman/resources/vacancy.rb', line 8 def object @object end |
#start_at ⇒ Object
Returns the value of attribute start_at.
9 10 11 |
# File 'lib/alman/resources/vacancy.rb', line 9 def start_at @start_at end |
#start_at_rfc822 ⇒ Object
Returns the value of attribute start_at_rfc822.
10 11 12 |
# File 'lib/alman/resources/vacancy.rb', line 10 def start_at_rfc822 @start_at_rfc822 end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
11 12 13 |
# File 'lib/alman/resources/vacancy.rb', line 11 def updated_at @updated_at end |
#updated_at_rfc822 ⇒ Object
Returns the value of attribute updated_at_rfc822.
12 13 14 |
# File 'lib/alman/resources/vacancy.rb', line 12 def updated_at_rfc822 @updated_at_rfc822 end |
Class Method Details
.retrieve(vacancy_id, params = {}, headers = {}) ⇒ Object
14 15 16 17 |
# File 'lib/alman/resources/vacancy.rb', line 14 def self.retrieve(vacancy_id, params={}, headers={}) res = client.vacancies.retrieve(vacancy_id, params, headers) res end |
Instance Method Details
#bookings ⇒ Object
29 30 31 |
# File 'lib/alman/resources/vacancy.rb', line 29 def bookings() VacancyBookingsEndpoint.new(client, self) end |
#delete(params = {}, headers = {}) ⇒ Object
24 25 26 27 |
# File 'lib/alman/resources/vacancy.rb', line 24 def delete(params={}, headers={}) res = client.vacancies.delete(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end |
#refresh(params = {}, headers = {}) ⇒ Object
19 20 21 22 |
# File 'lib/alman/resources/vacancy.rb', line 19 def refresh(params={}, headers={}) res = client.vacancies.retrieve(id, params, headers) self.refresh_from(res.json, res.api_method, res.client) end |