Sha256: 15873816807b20703c349c01571184cacbb27542e545e1d5a0bced8385e9b403
Contents?: true
Size: 655 Bytes
Versions: 11
Compression:
Stored size: 655 Bytes
Contents
module Clicksign module API class Batch extend Requests REQUEST_PATH = '/api/v1/batches' ATTRIBUTES = [:signer_key, :document_keys, :summary] class << self def create(token:, params: {}) post( REQUEST_PATH, body(params), token, ) end def body(params) params = params.transform_keys(&:to_sym) batch = ATTRIBUTES.each.with_object({}) do |attribute, hash| hash[attribute] = params[attribute] if params.has_key?(attribute) end body = { batch: batch } end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems