Class: Stripe::TaxIdService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/tax_id_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object

Creates a new account or customer tax_id object.



7
8
9
# File 'lib/stripe/services/tax_id_service.rb', line 7

def create(params = {}, opts = {})
  request(method: :post, path: "/v1/tax_ids", params: params, opts: opts, base_address: :api)
end

#delete(id, params = {}, opts = {}) ⇒ Object

Deletes an existing account or customer tax_id object.



12
13
14
15
16
17
18
19
20
# File 'lib/stripe/services/tax_id_service.rb', line 12

def delete(id, params = {}, opts = {})
  request(
    method: :delete,
    path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

#list(params = {}, opts = {}) ⇒ Object

Returns a list of tax IDs.



23
24
25
# File 'lib/stripe/services/tax_id_service.rb', line 23

def list(params = {}, opts = {})
  request(method: :get, path: "/v1/tax_ids", params: params, opts: opts, base_address: :api)
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieves an account or customer tax_id object.



28
29
30
31
32
33
34
35
36
# File 'lib/stripe/services/tax_id_service.rb', line 28

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end