Sha256: b0b11923c3345aeeb0879157551c1688706e0535e508f3492e0317ec6a2ac60f

Contents?: true

Size: 630 Bytes

Versions: 15

Compression:

Stored size: 630 Bytes

Contents

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

    OBJECT_NAME = 'application_fee'

    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={})
      self.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
      self.refresh
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
stripe-3.3.2 lib/stripe/application_fee.rb
stripe-3.3.1 lib/stripe/application_fee.rb
stripe-3.3.0 lib/stripe/application_fee.rb
stripe-3.2.0 lib/stripe/application_fee.rb
stripe-3.1.0 lib/stripe/application_fee.rb
stripe-3.0.3 lib/stripe/application_fee.rb
stripe-3.0.1 lib/stripe/application_fee.rb
stripe-3.0.0 lib/stripe/application_fee.rb
stripe-2.12.0 lib/stripe/application_fee.rb
stripe-2.11.0 lib/stripe/application_fee.rb
stripe-2.10.0 lib/stripe/application_fee.rb
stripe-2.9.0 lib/stripe/application_fee.rb
stripe-2.8.0 lib/stripe/application_fee.rb
stripe-2.7.0 lib/stripe/application_fee.rb
stripe-2.6.0 lib/stripe/application_fee.rb