class Docusigner::User

Public Instance Methods

as_json() click to toggle source

the create endpoint requires attributes to be nested under newUsers

Calls superclass method
# File lib/docusigner/user.rb, line 13
def as_json
  { "newUsers" => [super] }
end
update() click to toggle source

DocuSign does not permit this endpoint

# File lib/docusigner/user.rb, line 8
def update
  raise "Not permitted"
end

Protected Instance Methods

id_from_response(response) click to toggle source
# File lib/docusigner/user.rb, line 19
def id_from_response(response)
  json = JSON.parse(response.body)
  json["newUsers"].first["userId"]
end
load(attributes, remove_root = false) click to toggle source
Calls superclass method
# File lib/docusigner/user.rb, line 24
def load(attributes, remove_root = false)
  if attributes.is_a?(Array)
    attributes = attributes.first
  end
  super(attributes, remove_root)
end