Sha256: c33aa3da266fe7d82de1cb5626ede34acafe77c925780cd15c7ee89b5a79fd31
Contents?: true
Size: 439 Bytes
Versions: 3
Compression:
Stored size: 439 Bytes
Contents
module Stripe module APIOperations module Update def save if @unsaved_values.length > 0 values = @unsaved_values.reduce({}) do |h, k| h.update(k => @values[k].nil? ? '' : @values[k]) end values.delete(:id) response, api_key = Stripe.request(:post, url, @api_key, values) refresh_from(response, api_key) end self end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
stripe-1.8.7 | lib/stripe/api_operations/update.rb |
stripe-1.8.6 | lib/stripe/api_operations/update.rb |
stripe-1.8.5 | lib/stripe/api_operations/update.rb |