diff --git a/box/apis/v2/management/ebics_users.rb b/box/apis/v2/management/ebics_users.rb index b666e58..5142ad9 100644 --- a/box/apis/v2/management/ebics_users.rb +++ b/box/apis/v2/management/ebics_users.rb @@ -22,9 +22,6 @@ class EbicsUsers < Grape::API content_type :html, "text/html" namespace "/management/accounts/:iban" do - params do - requires :iban, type: String, desc: "IBAN for the account" - end before do unless env["box.admin"] error!({message: "Unauthorized access. Please provide a valid organization management token!"}, 401) @@ -35,11 +32,6 @@ class EbicsUsers < Grape::API error!({message: "Your organization does not have an account with given IBAN!"}, 404) end - desc "Service", hidden: true - get "/" do - {message: "not yet implemented"} - end - resource :ebics_users do ### ### GET /management/accounts/DExx/ebics_users/1/ini_letter @@ -86,7 +78,9 @@ class EbicsUsers < Grape::API produces: ["application/vnd.ebicsbox-v2+json"] params do + requires :iban, type: String, desc: "IBAN for the account" end + get do present @account.ebics_users, with: Entities::EbicsUser end @@ -103,6 +97,7 @@ class EbicsUsers < Grape::API produces: ["application/vnd.ebicsbox-v2+json"] params do + requires :iban, type: String, desc: "IBAN for the account" requires :user_id, type: Integer, desc: "Internal user identifier to associate the ebics_user with", documentation: {param_type: "body"} requires :ebics_user, type: String, unique_ebics_user: true, desc: "EBICS user to represent" end