Module: Payable::Writeable

Included in:
Work, Worker
Defined in:
lib/payable/writeable.rb

Instance Method Summary collapse

Instance Method Details

#create(params = {}) ⇒ Object



3
4
5
6
7
8
# File 'lib/payable/writeable.rb', line 3

def create(params = {})
  client = params.delete(:client){ Payable.client }
  new client.post(api_url.join(collection), params).body
rescue Faraday::ClientError => e
  raise InvalidRequest.new(e.response), e.message
end