Sha256: 62a563a2fa1c6c9e2557d80b61539809c530e308e378ded84ce876fa13580009

Contents?: true

Size: 376 Bytes

Versions: 7

Compression:

Stored size: 376 Bytes

Contents

module Paysio
  module Actions
    module Update
      def update(attrs = {})
        response = Paysio::Client.request(:put, path, attrs)
        response["error"].blank? ? refresh_from(response.to_hash) : response
      end

      def save
        @previously_changed = changes
        @changed_attributes.clear
        update(changed_attributes)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
paysio-1.0.10 lib/paysio/actions/update.rb
paysio-1.0.9 lib/paysio/actions/update.rb
paysio-1.0.8 lib/paysio/actions/update.rb
paysio-1.0.7 lib/paysio/actions/update.rb
paysio-1.0.6 lib/paysio/actions/update.rb
paysio-1.0.5 lib/paysio/actions/update.rb
paysio-1.0.4 lib/paysio/actions/update.rb