Class: OSTSdk::Saas::Base

Inherits:
Object
  • Object
show all
Includes:
Util::ServicesHelper
Defined in:
lib/ost-sdk-ruby-stag/saas/base.rb

Direct Known Subclasses

TransactionKind

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::ServicesHelper

#current_time, #current_timestamp, #error_with_data, #exception_with_data, #perform_and_handle_exceptions, #success, #success_with_data

Constructor Details

#initialize(environment, credentials) ⇒ Base

Initialize

Parameters:

  • params (Hash)

    (mandatory) is a Hash



15
16
17
18
19
20
21
22
23
# File 'lib/ost-sdk-ruby-stag/saas/base.rb', line 15

def initialize(environment, credentials)

  fail 'missing param environment' if environment.nil?
  fail 'missing/invalid param credentials' if credentials.nil? ||
      credentials.class != OSTSdk::Util::APICredentials

  @http_helper = OSTSdk::Util::HTTPHelper.new(environment, credentials)

end

Instance Attribute Details

#http_helperObject (readonly)

Returns the value of attribute http_helper.



9
10
11
# File 'lib/ost-sdk-ruby-stag/saas/base.rb', line 9

def http_helper
  @http_helper
end