Sha256: 68ac8c98d34b70cd5d3253d0c87f2ea4126e3f31b6e804db5226763807bf4bfb
Contents?: true
Size: 1.12 KB
Versions: 32
Compression:
Stored size: 1.12 KB
Contents
# frozen_string_literal: true module FinApps module REST class UserInstitutions < FinAppsCore::REST::Resources # :nodoc: def list super END_POINT end def create(site_id, params) not_blank(site_id, :site_id) not_blank(params, :params) path = "institutions/site/#{ERB::Util.url_encode(site_id)}/add" super params, path end def show(id) not_blank(id, :id) super(id, user_institutions_path(id)) end def credentials_update(id, params) update id, params, 'credentials' end def mfa_update(id, params) update id, params, 'mfa' end def destroy(id) not_blank(id, :id) super(id, user_institutions_path(id)) end private END_POINT = 'institutions/consumer' def update(id, params, method) not_blank(id, :id) not_blank(params, :params) path = "#{user_institutions_path(id)}/#{method}" super params, path end def user_institutions_path(id) "#{END_POINT}/#{ERB::Util.url_encode(id)}" end end end end
Version data entries
32 entries across 32 versions & 1 rubygems