Sha256: 6893105dec3ccb58df72f28c6a3040a196a74094f3eab65d6223eccf4535b50c

Contents?: true

Size: 735 Bytes

Versions: 44

Compression:

Stored size: 735 Bytes

Contents

# frozen_string_literal: true

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

    OBJECT_NAME = "application_fee".freeze

    nested_resource_class_methods :refund, operations: %i[create retrieve update list]

    # 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

44 entries across 44 versions & 1 rubygems

Version Path
stripe-4.18.0 lib/stripe/application_fee.rb
stripe-4.17.0 lib/stripe/application_fee.rb
stripe-4.16.0 lib/stripe/application_fee.rb
stripe-4.15.0 lib/stripe/application_fee.rb
stripe-4.14.0 lib/stripe/application_fee.rb
stripe-4.13.0 lib/stripe/application_fee.rb
stripe-4.12.0 lib/stripe/application_fee.rb
stripe-4.11.0 lib/stripe/application_fee.rb
stripe-4.10.0 lib/stripe/application_fee.rb
stripe-4.9.1 lib/stripe/application_fee.rb
stripe-4.9.0 lib/stripe/application_fee.rb
stripe-4.8.1 lib/stripe/application_fee.rb
stripe-4.8.0 lib/stripe/application_fee.rb
stripe-4.7.1 lib/stripe/application_fee.rb
stripe-4.7.0 lib/stripe/application_fee.rb
stripe-4.6.0 lib/stripe/application_fee.rb
stripe-4.5.0 lib/stripe/application_fee.rb
stripe-4.4.1 lib/stripe/application_fee.rb
stripe-4.4.0 lib/stripe/application_fee.rb
stripe-4.3.0 lib/stripe/application_fee.rb