Sha256: b56b99b21d70a53ef1d53c52d5ffcf8c5671d64356d946e2f886c1a7058f7ae4

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  module Treasury
    # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal.
    class CreditReversal < APIResource
      extend Stripe::APIOperations::Create
      extend Stripe::APIOperations::List

      OBJECT_NAME = "treasury.credit_reversal"

      # Reverses a ReceivedCredit and creates a CreditReversal object.
      def self.create(params = {}, opts = {})
        request_stripe_object(
          method: :post,
          path: "/v1/treasury/credit_reversals",
          params: params,
          opts: opts
        )
      end

      # Returns a list of CreditReversals.
      def self.list(filters = {}, opts = {})
        request_stripe_object(
          method: :get,
          path: "/v1/treasury/credit_reversals",
          params: filters,
          opts: opts
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stripe-10.9.0.pre.beta.1 lib/stripe/resources/treasury/credit_reversal.rb
stripe-10.8.0 lib/stripe/resources/treasury/credit_reversal.rb