Module: SmartHR::Client::DependentMethods
- Included in:
- SmartHR::Client
- Defined in:
- lib/smarthr/client/dependent_methods.rb
Instance Method Summary collapse
-
#create_crew_dependent(crew_id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Create a new crew dependent.
-
#destroy_crew_dependent(crew_id:, id:) {|response_body, response_header| ... } ⇒ Object
Delete the crew dependent.
-
#find_crew_dependent(crew_id:, id:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get the crew dependent.
-
#get_crew_dependents(crew_id:, page: 1, per_page: 10) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of crew dependents.
-
#update_crew_dependent(crew_id:, id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change the data of the specified crew dependent.
Instance Method Details
#create_crew_dependent(crew_id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Create a new crew dependent
82 83 84 |
# File 'lib/smarthr/client/dependent_methods.rb', line 82 def create_crew_dependent(crew_id:, body:, &block) post("/crews/#{crew_id}/dependents", body, &block) end |
#destroy_crew_dependent(crew_id:, id:) {|response_body, response_header| ... } ⇒ Object
Delete the crew dependent
12 13 14 |
# File 'lib/smarthr/client/dependent_methods.rb', line 12 def destroy_crew_dependent(crew_id:, id:, &block) delete("/crews/#{crew_id}/dependents/#{id}", &block) end |
#find_crew_dependent(crew_id:, id:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Get the crew dependent
28 29 30 |
# File 'lib/smarthr/client/dependent_methods.rb', line 28 def find_crew_dependent(crew_id:, id:, &block) get("/crews/#{crew_id}/dependents/#{id}", &block) end |
#get_crew_dependents(crew_id:, page: 1, per_page: 10) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>
Get the list of crew dependents
62 63 64 65 66 67 68 |
# File 'lib/smarthr/client/dependent_methods.rb', line 62 def get_crew_dependents(crew_id:, page: 1, per_page: 10, &block) get("/crews/#{crew_id}/dependents", page: page, per_page: per_page, &block ) end |
#update_crew_dependent(crew_id:, id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash
Change the data of the specified crew dependent
45 46 47 |
# File 'lib/smarthr/client/dependent_methods.rb', line 45 def update_crew_dependent(crew_id:, id:, body:, &block) patch("/crews/#{crew_id}/dependents/#{id}", body, &block) end |