Class: VendorsService::TagThai::UserInfoService

Inherits:
Object
  • Object
show all
Defined in:
app/services/vendors_service/tag_thai/user_info_service.rb

Constant Summary collapse

TAGTHAI_PARTNER_CODE =
'tagthai'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ UserInfoService

Initializes a new instance of the UserInfo service.

Parameters:

  • request (ActionDispatch::Request)

    The request object.



13
14
15
# File 'app/services/vendors_service/tag_thai/user_info_service.rb', line 13

def initialize(request)
  @request = request
end

Instance Attribute Details

#statusObject

Returns the value of attribute status.



8
9
10
# File 'app/services/vendors_service/tag_thai/user_info_service.rb', line 8

def status
  @status
end

Instance Method Details

#callHash

Performs the UserInfo service call.

Returns:

  • (Hash)

    The custom response hash.



20
21
22
23
24
25
26
# File 'app/services/vendors_service/tag_thai/user_info_service.rb', line 20

def call
  validate_request
  
  build_custom_response
rescue TagThaiError => e
  handle_error(e)
end