Sha256: 886970cbab8524687b1174d942d2b5dfc08c7eff352a28c27855e96c2040ea7b

Contents?: true

Size: 371 Bytes

Versions: 9

Compression:

Stored size: 371 Bytes

Contents

module Payjp
  module APIOperations
    module Update
      def save(params = {}, opts = {})
        values = self.class.serialize_params(self).merge(params)

        if values.length > 0
          values.delete(:id)

          response, opts = request(:post, url, values, opts)
          refresh_from(response, opts)
        end
        self
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
payjp-0.0.16 lib/payjp/api_operations/update.rb
payjp-0.0.14 lib/payjp/api_operations/update.rb
payjp-0.0.13 lib/payjp/api_operations/update.rb
payjp-0.0.12 lib/payjp/api_operations/update.rb
payjp-0.0.10 lib/payjp/api_operations/update.rb
payjp-0.0.9 lib/payjp/api_operations/update.rb
payjp-0.0.8 lib/payjp/api_operations/update.rb
payjp-0.0.7 lib/payjp/api_operations/update.rb
payjp-0.0.6 lib/payjp/api_operations/update.rb