module SmartHR::Client::MailFormatMethods

Public Instance Methods

find_mail_format(id:, embed_crew_input_forms: false, &block) click to toggle source

Get the mail format

@see developer.smarthr.jp/api/index.html#!/%E3%83%A1%E3%83%BC%E3%83%AB%E3%83%95%E3%82%A9%E3%83%BC%E3%83%9E%E3%83%83%E3%83%88/getV1MailFormatsId

@param id [String] @param embed_crew_input_forms [Boolean] Whether or not to embed crew input forms

@yield [response_body, response_header] if block was given, return response body and response header through block arguments @yieldparam response_body [Hashie::Mash] response body @yieldparam response_header [Hash<String, String>] response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

@return [Hashie::Mash]

# File lib/smarthr/client/mail_format_methods.rb, line 14
def find_mail_format(id:, embed_crew_input_forms: false, &block)
  get("/mail_formats/#{id}", embed: embed_crew_input_forms ? 'crew_input_forms' : nil, &block)
end
get_mail_formats(page: 1, per_page: 10, embed_crew_input_forms: false, &block) click to toggle source

Get the list of mail formats

@see developer.smarthr.jp/api/index.html#!/%E3%83%A1%E3%83%BC%E3%83%AB%E3%83%95%E3%82%A9%E3%83%BC%E3%83%9E%E3%83%83%E3%83%88/getV1MailFormats

@param page [Integer] @param per_page [Integer] @param embed_crew_input_forms [Boolean] Whether or not to embed crew input forms

@yield [response_body, response_header] if block was given, return response body and response header through block arguments @yieldparam response_body [Array<Hashie::Mash>] response body @yieldparam response_header [Hash<String, String>] response header (e.g. X-Rate-Limit-Limit, X-Rate-Limit-Reset, X-Rate-Limit-Remaining)

@return [Array<Hashie::Mash>]

# File lib/smarthr/client/mail_format_methods.rb, line 31
def get_mail_formats(page: 1, per_page: 10, embed_crew_input_forms: false, &block)
  get("/mail_formats",
    page: page,
    per_page: per_page,
    embed: embed_crew_input_forms ? 'crew_input_forms' : nil,
    &block
  )
end