Method: Inkdit::Contract.create
- Defined in:
- lib/inkdit/contract.rb
.create(client, owner, params) ⇒ Contract
create a new contract.
13 14 15 16 17 18 |
# File 'lib/inkdit/contract.rb', line 13 def self.create(client, owner, params) response = client.post owner.contracts_link, { :body => params.to_json, :headers => { 'Content-Type' => 'application/json' } } raise Inkdit::Error.new(response) unless response.status == 201 self.new(client, response.parsed) end |