Class: Clicksign::API::Signer
- Inherits:
-
Object
- Object
- Clicksign::API::Signer
- Extended by:
- Requests
- Defined in:
- lib/clicksign/api/signer.rb
Constant Summary collapse
- REQUEST_PATH =
'/api/v1/signers/'- ATTRIBUTES =
[ :email, :auths, :name, :documentation, :birthday, :has_documentation, :phone_number, :delivery ]
Class Method Summary collapse
Methods included from Requests
Class Method Details
.body(params) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/clicksign/api/signer.rb', line 20 def body(params) signer = ATTRIBUTES.each.with_object({}) do |key, hash| hash[key] = params[key] if params.has_key?(key) end body = { signer: signer } end |
.create(params) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/clicksign/api/signer.rb', line 13 def create(params) post( REQUEST_PATH, body(params) ) end |