Class: IIJ::Sakagura::GP::Client

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/iij/sakagura/gp/client.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{
  :endpoint => 'https://gp.api.iij.jp/',
  :api_version => '20130901'
}

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.



15
16
17
18
# File 'lib/iij/sakagura/gp/client.rb', line 15

def initialize(opts = {})
  opts = DEFAULT_OPTIONS.merge(opts)
  @client = ::IIJ::Sakagura::Core::QueryClient.new(opts)
end

Instance Method Details

#gp(gp_service_code) ⇒ Object



22
23
24
# File 'lib/iij/sakagura/gp/client.rb', line 22

def gp(gp_service_code)
  GP.new(self, gp_service_code)
end

#gp_service_code_listObject



26
27
28
# File 'lib/iij/sakagura/gp/client.rb', line 26

def gp_service_code_list
  post("GetGpServiceCodeList")["GpServiceCodeList"]
end