Sha256: 1999e837951c380db8b94550365f09968d97b5b8d08db6ca52324174107e6e78

Contents?: true

Size: 507 Bytes

Versions: 3

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

module Stripe
  class CreditNote < APIResource
    extend Stripe::APIOperations::List
    include Stripe::APIOperations::Save
    extend Stripe::APIOperations::Create

    OBJECT_NAME = "credit_note".freeze

    custom_method :void_credit_note, http_verb: :post, http_path: "void"

    def void_credit_note(params = {}, opts = {})
      url = resource_url + "/void"
      resp, opts = request(:post, url, params, opts)
      initialize_from(resp.data, opts)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stripe-4.16.0 lib/stripe/credit_note.rb
stripe-4.15.0 lib/stripe/credit_note.rb
stripe-4.14.0 lib/stripe/credit_note.rb