Sha256: f11d5c94215d08b7a5c8546be5554f12ceddc90155bde6826c95fe0c6cde0246

Contents?: true

Size: 570 Bytes

Versions: 8

Compression:

Stored size: 570 Bytes

Contents

module Stripe
  class ApplicationFee < APIResource
    extend Stripe::APIOperations::List

    def self.url
      '/v1/application_fees'
    end

    # If you don't need access to an updated fee object after the refund, it's
    # more performant to just call `fee.refunds.create` directly.
    def refund(params={}, opts={})
      self.refunds.create

      # now that a refund has been created, we expect the state of this object
      # to change as well (i.e. `refunded` will now be `true`) so refresh it
      # from the server
      self.refresh
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
stripe-1.36.0 lib/stripe/application_fee.rb
stripe-1.35.1 lib/stripe/application_fee.rb
stripe-1.35.0 lib/stripe/application_fee.rb
stripe-1.34.0 lib/stripe/application_fee.rb
stripe-1.33.1 lib/stripe/application_fee.rb
stripe-1.33.0 lib/stripe/application_fee.rb
stripe-1.32.1 lib/stripe/application_fee.rb
stripe-1.32.0 lib/stripe/application_fee.rb