Sha256: 5fb64901075dbe1c36f5b1f6e0e9c6434d8a6d504fd7437fc263c1d670e0a53c

Contents?: true

Size: 631 Bytes

Versions: 5

Compression:

Stored size: 631 Bytes

Contents

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

    OBJECT_NAME = "application_fee".freeze

    def self.resource_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 = {})
      refunds.create(params, opts)

      # 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
      refresh
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe-3.5.3 lib/stripe/application_fee.rb
stripe-3.5.2 lib/stripe/application_fee.rb
stripe-3.5.1 lib/stripe/application_fee.rb
stripe-3.5.0 lib/stripe/application_fee.rb
stripe-3.4.1 lib/stripe/application_fee.rb