Module: Signnow::Operations::Update::ClassMethods
- Defined in:
- lib/signnow/operations/update.rb
Instance Method Summary collapse
-
#options_for_update(attributes) ⇒ Hash
Options for update overwrite this in the model to set security.
-
#update_attributes(attributes = {}) ⇒ Object
Updates a object.
Instance Method Details
#options_for_update(attributes) ⇒ Hash
Options for update overwrite this in the model to set security
29 30 31 32 33 34 35 36 |
# File 'lib/signnow/operations/update.rb', line 29 def (attributes) access_token = attributes.delete(:access_token) raise AuthenticationError unless access_token { auth_type: :user_token, auth_token: access_token } end |
#update_attributes(attributes = {}) ⇒ Object
Updates a object
9 10 11 12 13 |
# File 'lib/signnow/operations/update.rb', line 9 def update_attributes(attributes={}) id = attributes.delete(:id) response = Signnow.request(:put, nil, api_update_url(id), attributes, (attributes)) self.new(response["data"]) end |