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.



37
38
39
40
41
42
43
44
45
# File 'lib/stripe/services/country_spec_service.rb', line 37

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.



48
49
50
51
52
53
54
55
56
# File 'lib/stripe/services/country_spec_service.rb', line 48

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