Sha256: c049b1c34deb8bb618cd0d2f49ac9a314af9210ac43a55d7f2129fe9bf789ef2
Contents?: true
Size: 1.07 KB
Versions: 74
Compression:
Stored size: 1.07 KB
Contents
module RockRMS class Client module Batch def list_batches(options = {}) res = get(batches_path, options) Response::Batch.format(res) end def find_batch(id) res = get(batches_path(id)) Response::Batch.format(res) end def create_batch( name:, start_time:, end_time:, foreign_key: nil, campus_id: nil, status: 1 ) options = { 'Name' => name, 'BatchStartDateTime' => start_time, 'CampusId' => campus_id, 'BatchEndDateTime' => end_time, 'ForeignKey' => foreign_key, 'Status' => status } post(batches_path, options) end def update_batch(id, options = {}) options = options.collect { |k, v| [k.to_s, v] }.to_h patch(batches_path(id), options) end def delete_batch(id) delete(batches_path(id)) end private def batches_path(id = nil) id ? "FinancialBatches/#{id}" : 'FinancialBatches' end end end end
Version data entries
74 entries across 74 versions & 1 rubygems