Sha256: d29245ccca8839c71b9931ff755f49622584c65aa48f1c3373c18cdf7606a715

Contents?: true

Size: 353 Bytes

Versions: 9

Compression:

Stored size: 353 Bytes

Contents

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

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
stripe-1.26.0 lib/stripe/api_operations/update.rb
stripe-1.25.0 lib/stripe/api_operations/update.rb
stripe-1.24.0 lib/stripe/api_operations/update.rb
stripe-1.23.0 lib/stripe/api_operations/update.rb
stripe-1.22.0 lib/stripe/api_operations/update.rb
stripe-1.21.0 lib/stripe/api_operations/update.rb
stripe-1.20.4 lib/stripe/api_operations/update.rb
stripe-1.20.3 lib/stripe/api_operations/update.rb
stripe-1.20.2 lib/stripe/api_operations/update.rb