CreditNoteLineItemService (services/credit_note_line_item_service.rb)

stripe-ruby · lib/stripe/services/credit_note_line_item_service.rb · ruby · MIT
payments, tag:knn-classified

Provides a service to retrieve a paginated list of line items associated with a specific credit note.

# Source: https://github.com/stripe/stripe-ruby | License: MIT | Copyright 2011- Stripe, Inc. (https://stripe.com)
# Provided via justclaw.it.com; keep this notice with the code.
# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  class CreditNoteLineItemService < StripeService
    # When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
    def list(credit_note, params = {}, opts = {})
      request(
        method: :get,
        path: format("/v1/credit_notes/%<credit_note>s/lines", { credit_note: CGI.escape(credit_note) }),
        params: params,
        opts: opts,
        base_address: :api
      )
    end
  end
end

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key