Sha256: 023521fa21d450ca59e7e7b547f64f2a6bbe89c85d25f05e3b5c6a72d5825248

Contents?: true

Size: 723 Bytes

Versions: 1

Compression:

Stored size: 723 Bytes

Contents

class Application < Sinatra::Application
  swagger_path '/v1/organizations/{id}' do
    operation :get, description: 'Get organization https://www.mollie.com/en/docs/reference/organizations/get', tags: ['Organizations'] do
      parameter name: :id, in: 'path', description: 'Organization id', type: :string
      parameter name: :testmode, in: 'query', description: 'Test mode', type: :boolean
      security api_key: []
      response 200, description: 'Successful response'
      response 500, description: 'Unexpected error'
    end
  end

  get '/v1/organizations/:id' do
    organization = client.organizations.get(params[:id], testmode: params[:testmode])
    JSON.pretty_generate(organization.attributes)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mollie-api-ruby-2.2.1 examples/apis/organizations.rb