module SmartHR::Client::PaymentPeriodMethods

Public Instance Methods

find_payment_period(id:, &block) click to toggle source

Get the payment period

@see developer.smarthr.jp/api/index.html#!/%E7%B5%A6%E4%B8%8E%E6%94%AF%E7%B5%A6%E5%BD%A2%E6%85%8B/getV1PaymentPeriodsId

@param id [String]

@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/payment_period_methods.rb, line 13
def find_payment_period(id:, &block)
  get("/payment_periods/#{id}", &block)
end
get_payment_periods(page: 1, per_page: 10, &block) click to toggle source

Get the list of payment periods

@see developer.smarthr.jp/api/index.html#!/%E7%B5%A6%E4%B8%8E%E6%94%AF%E7%B5%A6%E5%BD%A2%E6%85%8B/getV1PaymentPeriods

@param page [Integer] @param per_page [Integer]

@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/payment_period_methods.rb, line 29
def get_payment_periods(page: 1, per_page: 10, &block)
  get("/payment_periods",
    page: page,
    per_page: per_page,
    &block
  )
end