Sha256: b23d4e173887ddb109491933c6e8455f2a0c7ef1bc4df7a54f8e18938f06f284
Contents?: true
Size: 620 Bytes
Versions: 11
Compression:
Stored size: 620 Bytes
Contents
module Clicksign module API class Notifier extend Requests REQUEST_PATH = '/api/v1/notifications' ATTRIBUTES = [:request_signature_key, :message, :url] class << self def notify(token:, params: {}) post( REQUEST_PATH, body(params), token ) end def body(params) params = params.transform_keys(&:to_sym) ATTRIBUTES.each.with_object({}) do |attribute, hash| hash[attribute] = params[attribute] if params.has_key?(attribute) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems