Sha256: 4a0529818aeb1e60ff82ce7a71049494e539a62a383ada348d18f448e78a47aa
Contents?: true
Size: 1.67 KB
Versions: 14
Compression:
Stored size: 1.67 KB
Contents
# File generated from our OpenAPI spec # frozen_string_literal: true module Stripe module Tax # Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes. # # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting) class Form < APIResource extend Stripe::APIOperations::List OBJECT_NAME = "tax.form" def self.object_name "tax.form" end # 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 self.list(filters = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/tax/forms", params: filters, opts: opts) end # Download the PDF for a tax form. def pdf(params = {}, opts = {}, &read_body_chunk_block) config = opts[:client]&.config || Stripe.config opts = { api_base: config.uploads_base }.merge(opts) request_stream( method: :get, path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(self["id"]) }), params: params, opts: opts, &read_body_chunk_block ) end # Download the PDF for a tax form. def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block) config = opts[:client]&.config || Stripe.config opts = { api_base: config.uploads_base }.merge(opts) execute_resource_request_stream( :get, format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }), params, opts, &read_body_chunk_block ) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems