Class: Hipay::BusinessLines

Inherits:
Object
  • Object
show all
Defined in:
lib/hipay.rb

Instance Method Summary collapse

Constructor Details

#initialize(wsLogin, wsPassword, test: false) ⇒ BusinessLines

Returns a new instance of BusinessLines.



152
153
154
155
156
# File 'lib/hipay.rb', line 152

def initialize(wsLogin, wsPassword, test: false)
  @wsLogin = wsLogin
  @wsPassword = wsPassword
  @test = test
end

Instance Method Details

#build_basic_requestObject



165
166
167
# File 'lib/hipay.rb', line 165

def build_basic_request
  { wsLogin: @wsLogin, wsPassword: @wsPassword, locale: @locale }
end

#get(locale) ⇒ Object



158
159
160
161
162
163
# File 'lib/hipay.rb', line 158

def get(locale)
  @locale = locale
  operation = :get
  parameters = build_basic_request
  Hipay::call_api("business-lines-v2", operation, @test, { parameters: parameters })[:get_response][:get_result]
end