Sha256: 95d4f59ada51e0e37e06bc3ffb00d47d9b6893c83a0058478d82769d3c5228d8

Contents?: true

Size: 743 Bytes

Versions: 13

Compression:

Stored size: 743 Bytes

Contents

# frozen_string_literal: true

module Stripe
  class TaxId < APIResource
    include Stripe::APIOperations::Delete
    extend Stripe::APIOperations::List

    OBJECT_NAME = "tax_id".freeze

    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

13 entries across 13 versions & 2 rubygems

Version Path
stripe-4.24.0 lib/stripe/resources/tax_id.rb
stripe-4.23.0 lib/stripe/resources/tax_id.rb
stripe-4.22.1 lib/stripe/resources/tax_id.rb
stripe-4.22.0 lib/stripe/resources/tax_id.rb
bongloy-4.21.3 lib/stripe/resources/tax_id.rb
stripe-4.21.3 lib/stripe/resources/tax_id.rb
stripe-4.21.2 lib/stripe/resources/tax_id.rb
stripe-4.21.1 lib/stripe/resources/tax_id.rb
stripe-4.21.0 lib/stripe/resources/tax_id.rb
stripe-4.20.1 lib/stripe/resources/tax_id.rb
stripe-4.20.0 lib/stripe/resources/tax_id.rb
stripe-4.19.0 lib/stripe/resources/tax_id.rb
stripe-4.18.1 lib/stripe/tax_id.rb