Sha256: d29b78a5903933a3bbaa2c8ca9089d836c0b0907a6e3a6ff0caa7c61485d0022

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 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).
  # A customer's tax IDs are displayed on invoices and credit notes issued for the customer.
  #
  # Related guide: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids)
  class TaxId < APIResource
    include Stripe::APIOperations::Delete
    extend Stripe::APIOperations::List

    OBJECT_NAME = "tax_id"

    def resource_url
      if !respond_to?(:customer) || customer.nil?
        raise NotImplementedError,
              "Tax IDs cannot be accessed without a customer ID."
      end
      "#{Customer.resource_url}/#{CGI.escape(customer)}/tax_ids" \
      "/#{CGI.escape(id)}"
    end

    def self.retrieve(_id, _opts = {})
      raise NotImplementedError,
            "Tax IDs cannot be retrieved without a customer ID. Retrieve a " \
            "tax ID using `Customer.retrieve_tax_id('customer_id', " \
            "'tax_id_id')`"
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
stripe-9.4.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-9.3.0 lib/stripe/resources/tax_id.rb
stripe-9.3.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-9.2.0 lib/stripe/resources/tax_id.rb
stripe-9.2.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-9.1.0 lib/stripe/resources/tax_id.rb
stripe-9.0.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-9.0.0 lib/stripe/resources/tax_id.rb
stripe-8.8.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-8.7.0 lib/stripe/resources/tax_id.rb
stripe-8.7.0.pre.beta.3 lib/stripe/resources/tax_id.rb
stripe-8.7.0.pre.beta.2 lib/stripe/resources/tax_id.rb
stripe-8.7.0.pre.beta.1 lib/stripe/resources/tax_id.rb
stripe-8.6.0 lib/stripe/resources/tax_id.rb
stripe-8.6.0.pre.beta.6 lib/stripe/resources/tax_id.rb
stripe-8.6.0.pre.beta.5 lib/stripe/resources/tax_id.rb
stripe-8.6.0.pre.beta.4 lib/stripe/resources/tax_id.rb