Sha256: c2785e7ab9338bddbc7e73c7f4c154ec724532cd610590987e0db7447b94a29f

Contents?: true

Size: 1.36 KB

Versions: 6

Compression:

Stored size: 1.36 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  module Tax
    class FormService < StripeService
      # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
      def list(params = {}, opts = {})
        request(method: :get, path: "/v1/tax/forms", params: params, opts: opts, base_address: :api)
      end

      # Download the PDF for a tax form.
      def pdf(id, params = {}, opts = {}, &read_body_chunk_block)
        opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
        request_stream(
          method: :get,
          path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
          params: params,
          opts: opts,
          base_address: :files,
          &read_body_chunk_block
        )
      end

      # Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information.
      def retrieve(id, params = {}, opts = {})
        request(
          method: :get,
          path: format("/v1/tax/forms/%<id>s", { id: CGI.escape(id) }),
          params: params,
          opts: opts,
          base_address: :api
        )
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stripe-13.3.0.pre.beta.1 lib/stripe/services/tax/form_service.rb
stripe-13.2.0.pre.beta.3 lib/stripe/services/tax/form_service.rb
stripe-13.2.0.pre.beta.2 lib/stripe/services/tax/form_service.rb
stripe-13.2.0.pre.beta.1 lib/stripe/services/tax/form_service.rb
stripe-13.1.0.pre.beta.3 lib/stripe/services/tax/form_service.rb
stripe-13.1.0.pre.beta.2 lib/stripe/services/tax/form_service.rb