Sha256: edfa906d68cb1f46d4ec4d009a1f9e4642170c96316a28d642f2860ffbd5fdb4

Contents?: true

Size: 1.62 KB

Versions: 47

Compression:

Stored size: 1.62 KB

Contents

# File generated from our OpenAPI spec
# frozen_string_literal: true

module Stripe
  # You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers) or account.
  # Customer and account tax IDs get displayed on related invoices and credit notes.
  #
  # Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids)
  class TaxId < APIResource
    extend Stripe::APIOperations::Create
    include Stripe::APIOperations::Delete
    extend Stripe::APIOperations::List

    OBJECT_NAME = "tax_id"
    def self.object_name
      "tax_id"
    end

    # Creates a new account or customer tax_id object.
    def self.create(params = {}, opts = {})
      request_stripe_object(method: :post, path: "/v1/tax_ids", params: params, opts: opts)
    end

    # Deletes an existing account or customer tax_id object.
    def self.delete(id, params = {}, opts = {})
      request_stripe_object(
        method: :delete,
        path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(id) }),
        params: params,
        opts: opts
      )
    end

    # Deletes an existing account or customer tax_id object.
    def delete(params = {}, opts = {})
      request_stripe_object(
        method: :delete,
        path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(self["id"]) }),
        params: params,
        opts: opts
      )
    end

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

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
stripe-13.3.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-13.2.0 lib/stripe/resources/tax_id.rb
stripe-13.1.2 lib/stripe/resources/tax_id.rb
stripe-13.2.0.pre.beta.3 lib/stripe/resources/tax_id.rb
stripe-13.2.0.pre.beta.2 lib/stripe/resources/tax_id.rb
stripe-13.1.1 lib/stripe/resources/tax_id.rb
stripe-13.2.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-13.1.0 lib/stripe/resources/tax_id.rb
stripe-13.0.2 lib/stripe/resources/tax_id.rb
stripe-13.1.0.pre.beta.3 lib/stripe/resources/tax_id.rb
stripe-13.0.1 lib/stripe/resources/tax_id.rb
stripe-13.1.0.pre.beta.2 lib/stripe/resources/tax_id.rb
stripe-13.0.0 lib/stripe/resources/tax_id.rb
stripe-12.7.0.pre.beta.2 lib/stripe/resources/tax_id.rb
stripe-12.7.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-12.6.0 lib/stripe/resources/tax_id.rb
stripe-12.6.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-12.5.0 lib/stripe/resources/tax_id.rb
stripe-12.5.0.pre.beta.2 lib/stripe/resources/tax_id.rb
stripe-12.5.0.pre.beta.1 lib/stripe/resources/tax_id.rb