lib/clicksign/api/documents_signers.rb in clicksign-api-1.1.1 vs lib/clicksign/api/documents_signers.rb in clicksign-api-1.1.2.alpha
- old
+ new
@@ -15,18 +15,16 @@
body(params),
token
)
end
- def batch_create(token:, batch:)
- batch.map do |params|
- create(token: token, params: params)
+ def batch_create(token:, params:)
+ params[:batch].map do |single_params|
+ create(token: token, params: single_params)
end
end
def body(params)
- params = params.transform_keys(&:to_sym)
-
list = ATTRIBUTES.each.with_object({}) do |key, hash|
hash[key] = params[key] if params.has_key?(key)
end
body = { list: list }