Module: GMO::PG

Defined in:
lib/gmo-pg.rb,
lib/gmo-pg/util.rb,
lib/gmo-pg/error.rb,
lib/gmo-pg/version.rb,
lib/gmo-pg/dispatcher.rb,
lib/gmo-pg/api_endpoint.rb,
lib/gmo-pg/http_resource/errors.rb,
lib/gmo-pg/dispatcher/shorthands.rb,
lib/gmo-pg/http_resource/payload.rb,
lib/gmo-pg/api_endpoint/exec_tran.rb,
lib/gmo-pg/api_endpoint/save_card.rb,
lib/gmo-pg/api_endpoint/tds2_auth.rb,
lib/gmo-pg/api_endpoint/alter_tran.rb,
lib/gmo-pg/api_endpoint/entry_tran.rb,
lib/gmo-pg/api_endpoint/change_tran.rb,
lib/gmo-pg/api_endpoint/delete_card.rb,
lib/gmo-pg/api_endpoint/save_member.rb,
lib/gmo-pg/api_endpoint/search_card.rb,
lib/gmo-pg/api_endpoint/secure_tran.rb,
lib/gmo-pg/api_endpoint/tds2_result.rb,
lib/gmo-pg/api_endpoint/traded_card.rb,
lib/gmo-pg/api_endpoint/search_trade.rb,
lib/gmo-pg/api_endpoint/secure_tran2.rb,
lib/gmo-pg/api_endpoint/delete_member.rb,
lib/gmo-pg/api_endpoint/search_member.rb,
lib/gmo-pg/api_endpoint/tds2_auth_app.rb,
lib/gmo-pg/api_endpoint/update_member.rb,
lib/gmo-pg/api_endpoint/tds2_result_app.rb,
lib/gmo-pg/http_resource/generic_request.rb,
lib/gmo-pg/http_resource/generic_response.rb,
lib/gmo-pg/http_resource/payload/typecast.rb,
lib/gmo-pg/api_endpoint/search_card_detail.rb

Defined Under Namespace

Modules: APIEndpoint, AlterTran, ChangeTran, DeleteCard, DeleteMember, EntryTran, ExecTran, SaveCard, SaveMember, SearchCard, SearchCardDetail, SearchMember, SearchTrade, SecureTran, SecureTran2, Tds2Auth, Tds2AuthApp, Tds2Result, Tds2ResultApp, TradedCard, UpdateMember, Util Classes: APIError, APIServerError, AuthorizationError, CardError, ConnectionError, Dispatcher, Error, Errors, GenericRequest, GenericResponse, HTTPError, Payload

Constant Summary collapse

VERSION =
'1.1.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.base_urlObject

Returns the value of attribute base_url.



16
17
18
# File 'lib/gmo-pg.rb', line 16

def base_url
  @base_url
end

.open_timeoutObject

Returns the value of attribute open_timeout.



16
17
18
# File 'lib/gmo-pg.rb', line 16

def open_timeout
  @open_timeout
end

.proxyObject

Returns the value of attribute proxy.



16
17
18
# File 'lib/gmo-pg.rb', line 16

def proxy
  @proxy
end

.raise_on_api_errorObject

Returns the value of attribute raise_on_api_error.



16
17
18
# File 'lib/gmo-pg.rb', line 16

def raise_on_api_error
  @raise_on_api_error
end

.read_timeoutObject

Returns the value of attribute read_timeout.



16
17
18
# File 'lib/gmo-pg.rb', line 16

def read_timeout
  @read_timeout
end

Class Method Details

.connect(base_url = self.base_url, &block) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/gmo-pg.rb', line 19

def self.connect(base_url = self.base_url, &block)
  dispatcher = Dispatcher.new(base_url) do |d|
    d.open_timeout       = open_timeout
    d.read_timeout       = read_timeout
    d.raise_on_api_error = raise_on_api_error
    d.use_proxy proxy if proxy
  end
  dispatcher.connect(&block)
end