Module: SmartHR::Client::EmploymentTypeMethods
- Included in:
- SmartHR::Client
- Defined in:
- lib/smarthr/client/employment_type_methods.rb
Instance Method Summary collapse
-
#create_employment_type(body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Create a new employment type.
-
#destroy_employment_type(id:) {|response_body, response_header| ... } ⇒ Object
Delete the crew custom field template group.
-
#find_employment_type(id:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get the employment type.
-
#get_employment_types(page: 1, per_page: 10) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of employment types.
-
#update_employment_type(id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change the data of the specified group.
Instance Method Details
#create_employment_type(body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Create a new employment type
77 78 79 |
# File 'lib/smarthr/client/employment_type_methods.rb', line 77 def create_employment_type(body:, &block) post("/employment_types", body, &block) end |
#destroy_employment_type(id:) {|response_body, response_header| ... } ⇒ Object
Delete the crew custom field template group
11 12 13 |
# File 'lib/smarthr/client/employment_type_methods.rb', line 11 def destroy_employment_type(id:, &block) delete("/employment_types/#{id}", &block) end |
#find_employment_type(id:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get the employment type
26 27 28 |
# File 'lib/smarthr/client/employment_type_methods.rb', line 26 def find_employment_type(id:, &block) get("/employment_types/#{id}", &block) end |
#get_employment_types(page: 1, per_page: 10) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of employment types
58 59 60 61 62 63 64 |
# File 'lib/smarthr/client/employment_type_methods.rb', line 58 def get_employment_types(page: 1, per_page: 10, &block) get("/employment_types", page: page, per_page: per_page, &block ) end |
#update_employment_type(id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change the data of the specified group
42 43 44 |
# File 'lib/smarthr/client/employment_type_methods.rb', line 42 def update_employment_type(id:, body:, &block) patch("/employment_types/#{id}", body, &block) end |