Class: Stripe::Tax::RegistrationService

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

Defined Under Namespace

Classes: CreateParams, ListParams, RetrieveParams, UpdateParams

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 Tax Registration object.



2071
2072
2073
2074
2075
2076
2077
2078
2079
# File 'lib/stripe/services/tax/registration_service.rb', line 2071

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

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

Returns a list of Tax Registration objects.



2082
2083
2084
2085
2086
2087
2088
2089
2090
# File 'lib/stripe/services/tax/registration_service.rb', line 2082

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

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

Returns a Tax Registration object.



2093
2094
2095
2096
2097
2098
2099
2100
2101
# File 'lib/stripe/services/tax/registration_service.rb', line 2093

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

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

Updates an existing Tax Registration object.

A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.



2106
2107
2108
2109
2110
2111
2112
2113
2114
# File 'lib/stripe/services/tax/registration_service.rb', line 2106

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