Sha256: 294c50dc6ec332ba0e953712ed8684164ba5b90e28e393fa1f30c2b592546356

Contents?: true

Size: 736 Bytes

Versions: 46

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

module Stripe
  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

46 entries across 46 versions & 1 rubygems

Version Path
stripe-5.37.0 lib/stripe/resources/tax_id.rb
stripe-5.36.0 lib/stripe/resources/tax_id.rb
stripe-5.35.0 lib/stripe/resources/tax_id.rb
stripe-5.34.0 lib/stripe/resources/tax_id.rb
stripe-5.33.0 lib/stripe/resources/tax_id.rb
stripe-5.32.1 lib/stripe/resources/tax_id.rb
stripe-5.32.0 lib/stripe/resources/tax_id.rb
stripe-5.31.0 lib/stripe/resources/tax_id.rb
stripe-5.30.0 lib/stripe/resources/tax_id.rb
stripe-5.29.1 lib/stripe/resources/tax_id.rb
stripe-5.29.0 lib/stripe/resources/tax_id.rb
stripe-5.28.0 lib/stripe/resources/tax_id.rb
stripe-5.27.0 lib/stripe/resources/tax_id.rb
stripe-5.26.0 lib/stripe/resources/tax_id.rb
stripe-5.25.0 lib/stripe/resources/tax_id.rb
stripe-5.24.0 lib/stripe/resources/tax_id.rb
stripe-5.23.1 lib/stripe/resources/tax_id.rb
stripe-5.23.0 lib/stripe/resources/tax_id.rb
stripe-5.22.0 lib/stripe/resources/tax_id.rb
stripe-5.21.0 lib/stripe/resources/tax_id.rb