Class: OrcaApi::UserService
- Defined in:
- lib/orca_api/user_service.rb
Overview
ユーザーを扱うサービスを表現したクラス
Instance Attribute Summary
Attributes inherited from Service
Instance Method Summary collapse
-
#create(params) ⇒ OrcaApi::Result
ユーザー作成.
-
#destroy(user_id) ⇒ OrcaApi::Result
ユーザー削除.
-
#list(base_date = "") ⇒ OrcaApi::Result
ユーザー一覧.
-
#update(user_id, params) ⇒ OrcaApi::Result
ユーザー更新.
Methods inherited from Service
Constructor Details
This class inherits a constructor from OrcaApi::Service
Constructor Details
This class inherits a constructor from OrcaApi::Service
Instance Method Details
#create(params) ⇒ OrcaApi::Result
ユーザー作成
38 39 40 41 42 43 44 |
# File 'lib/orca_api/user_service.rb', line 38 def create(params) req = { "Request_Number" => "02", "User_Information" => params } call req end |
#destroy(user_id) ⇒ OrcaApi::Result
ユーザー削除
74 75 76 77 78 79 80 81 82 |
# File 'lib/orca_api/user_service.rb', line 74 def destroy(user_id) req = { "Request_Number" => "04", "User_Information" => { "User_Id" => user_id } } call req end |
#list(base_date = "") ⇒ OrcaApi::Result
ユーザー一覧
17 18 19 20 21 22 23 |
# File 'lib/orca_api/user_service.rb', line 17 def list(base_date = "") req = { "Request_Number" => "01", "Base_Date" => base_date, } call req end |
#update(user_id, params) ⇒ OrcaApi::Result
ユーザー更新
58 59 60 61 62 63 64 |
# File 'lib/orca_api/user_service.rb', line 58 def update(user_id, params) req = { "Request_Number" => "03", "User_Information" => params.merge("User_Id" => user_id) } call req end |