Class: Hipay::WebsiteTopics

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of WebsiteTopics.



172
173
174
175
176
# File 'lib/hipay.rb', line 172

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

Instance Method Details

#build_basic_requestObject



186
187
188
# File 'lib/hipay.rb', line 186

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

#get(locale, businessLineId) ⇒ Object



178
179
180
181
182
183
184
# File 'lib/hipay.rb', line 178

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