Module: AppStoreConnectApi::Domain::Users
- Included in:
- AppStoreConnectApi::Domain
- Defined in:
- lib/app_store_connect_api/domain/users.rb
Instance Method Summary collapse
- #add_user_visible_apps(user_id, visible_app_ids) ⇒ Object
- #delete_user(user_id) ⇒ Object
- #remove_user_visible_apps(user_id, visible_app_ids) ⇒ Object
- #replace_user_visible_apps(user_id, visible_app_ids) ⇒ Object
- #update_user(user_id, attributes = {}, relationships = {}) ⇒ Object
- #user(user_id, options = {}) ⇒ Object
- #user_visible_app_ids(user_id, options = {}) ⇒ Object
- #user_visible_apps(user_id, options = {}) ⇒ Object
- #users(options = {}) ⇒ Object
Instance Method Details
#add_user_visible_apps(user_id, visible_app_ids) ⇒ Object
40 41 42 |
# File 'lib/app_store_connect_api/domain/users.rb', line 40 def add_user_visible_apps(user_id, visible_app_ids) post "/v1/users/#{user_id}/relationships/visibleApps", data: Utils::RelationshipMapper.resource_keys(visible_app_ids, 'apps') end |
#delete_user(user_id) ⇒ Object
25 26 27 |
# File 'lib/app_store_connect_api/domain/users.rb', line 25 def delete_user(user_id) delete "/v1/users/#{user_id}" end |
#remove_user_visible_apps(user_id, visible_app_ids) ⇒ Object
50 51 52 |
# File 'lib/app_store_connect_api/domain/users.rb', line 50 def remove_user_visible_apps(user_id, visible_app_ids) delete "/v1/users/#{user_id}/relationships/visibleApps", data: Utils::RelationshipMapper.resource_keys(visible_app_ids, 'apps') end |
#replace_user_visible_apps(user_id, visible_app_ids) ⇒ Object
45 46 47 |
# File 'lib/app_store_connect_api/domain/users.rb', line 45 def replace_user_visible_apps(user_id, visible_app_ids) patch "/v1/users/#{user_id}/relationships/visibleApps", data: Utils::RelationshipMapper.resource_keys(visible_app_ids, 'apps') end |
#update_user(user_id, attributes = {}, relationships = {}) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/app_store_connect_api/domain/users.rb', line 17 def update_user(user_id, attributes = {}, relationships = {}) patch "/v1/users/#{user_id}", data: { attributes: attributes, relationships: Utils::RelationshipMapper.(relationships, 'visibleApps' => 'apps'), id: user_id, type: 'users' } end |
#user(user_id, options = {}) ⇒ Object
12 13 14 |
# File 'lib/app_store_connect_api/domain/users.rb', line 12 def user(user_id, = {}) get "/v1/users/#{user_id}", end |
#user_visible_app_ids(user_id, options = {}) ⇒ Object
35 36 37 |
# File 'lib/app_store_connect_api/domain/users.rb', line 35 def user_visible_app_ids(user_id, = {}) get "/v1/users/#{user_id}/relationships/visibleApps", end |
#user_visible_apps(user_id, options = {}) ⇒ Object
30 31 32 |
# File 'lib/app_store_connect_api/domain/users.rb', line 30 def user_visible_apps(user_id, = {}) get "/v1/users/#{user_id}/visibleApps", end |
#users(options = {}) ⇒ Object
7 8 9 |
# File 'lib/app_store_connect_api/domain/users.rb', line 7 def users( = {}) get '/v1/users', end |