Class: Stripe::CountrySpecService

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

Defined Under Namespace

Classes: ListParams, RetrieveParams

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

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

Lists all Country Spec objects available in the API.



34
35
36
37
38
39
40
41
42
# File 'lib/stripe/services/country_spec_service.rb', line 34

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

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

Returns a Country Spec for a given Country code.



45
46
47
48
49
50
51
52
53
# File 'lib/stripe/services/country_spec_service.rb', line 45

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