Module: SmartHR::Client::CrewCustomFieldTemplateGroupMethods

Included in:
SmartHR::Client
Defined in:
lib/smarthr/client/crew_custom_field_template_group_methods.rb

Instance Method Summary collapse

Instance Method Details

#create_crew_custom_field_template_group(body:) {|response_body, response_header| ... } ⇒ Hashie::Mash

Create a new crew custom field template group

Parameters:

  • body (Hash)

Yields:

  • (response_body, response_header)

    if block was given, return response body and response header through block arguments

Yield Parameters:

  • response_body (Hashie::Mash)

    response body

  • response_header (Hash<String, String>)

    response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

Returns:

  • (Hashie::Mash)

See Also:



80
81
82
# File 'lib/smarthr/client/crew_custom_field_template_group_methods.rb', line 80

def create_crew_custom_field_template_group(body:, &block)
  post("/crew_custom_field_template_groups", body, &block)
end

#destroy_crew_custom_field_template_group(id:) {|response_body, response_header| ... } ⇒ Object

Delete the crew custom field template group

Parameters:

  • id (String)

Yields:

  • (response_body, response_header)

    if block was given, return response body and response header through block arguments

Yield Parameters:

  • response_body (Hashie::Mash)

    response body

  • response_header (Hash<String, String>)

    response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

See Also:



11
12
13
# File 'lib/smarthr/client/crew_custom_field_template_group_methods.rb', line 11

def destroy_crew_custom_field_template_group(id:, &block)
  delete("/crew_custom_field_template_groups/#{id}", &block)
end

#find_crew_custom_field_template_group(id:, embed_templates: false) {|response_body, response_header| ... } ⇒ Hashie::Mash

Get the crew custom field template group

Parameters:

  • id (String)
  • embed_templates (Boolean) (defaults to: false)

    Whether or not to embed templates

Yields:

  • (response_body, response_header)

    if block was given, return response body and response header through block arguments

Yield Parameters:

  • response_body (Hashie::Mash)

    response body

  • response_header (Hash<String, String>)

    response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

Returns:

  • (Hashie::Mash)

See Also:



27
28
29
# File 'lib/smarthr/client/crew_custom_field_template_group_methods.rb', line 27

def find_crew_custom_field_template_group(id:, embed_templates: false, &block)
  get("/crew_custom_field_template_groups/#{id}", embed: embed_templates ? 'templates' : nil, &block)
end

#get_crew_custom_field_template_groups(page: 1, per_page: 10, embed_templates: false) {|response_body, response_header| ... } ⇒ Array<Hashie::Mash>

Get the list of crew custom field template groups

Parameters:

  • page (Integer) (defaults to: 1)
  • per_page (Integer) (defaults to: 10)
  • embed_templates (Boolean) (defaults to: false)

    Whether or not to embed templates

Yields:

  • (response_body, response_header)

    if block was given, return response body and response header through block arguments

Yield Parameters:

  • response_body (Array<Hashie::Mash>)

    response body

  • response_header (Hash<String, String>)

    response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

Returns:

  • (Array<Hashie::Mash>)

See Also:



60
61
62
63
64
65
66
67
# File 'lib/smarthr/client/crew_custom_field_template_group_methods.rb', line 60

def get_crew_custom_field_template_groups(page: 1, per_page: 10, embed_templates: false, &block)
  get("/crew_custom_field_template_groups",
    page: page,
    per_page: per_page,
    embed: embed_templates ? 'templates' : nil,
    &block
  )
end

#update_crew_custom_field_template_group(id:, body:) {|response_body, response_header| ... } ⇒ Hashie::Mash

Change the data of the specified group

Parameters:

  • id (String)
  • body (Hash)

Yields:

  • (response_body, response_header)

    if block was given, return response body and response header through block arguments

Yield Parameters:

  • response_body (Hashie::Mash)

    response body

  • response_header (Hash<String, String>)

    response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

Returns:

  • (Hashie::Mash)

See Also:



43
44
45
# File 'lib/smarthr/client/crew_custom_field_template_group_methods.rb', line 43

def update_crew_custom_field_template_group(id:, body:, &block)
  patch("/crew_custom_field_template_groups/#{id}", body, &block)
end