0.0
Low commit activity in last 3 years
No release in over a year
This client implements methods to call the relevant CCD endpoints for the employment tribunals CCD system
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 2.0, >= 2.0.7
~> 10.0
~> 3.0
~> 0.71.0

Runtime

~> 2.2, >= 2.2.2
~> 2.0, >= 2.0.2
~> 6.2
~> 3.6
 Project Readme

EtCcdClient

The ET CCD Client is a ruby interface to the CCD API and the CCD UI API specifically for employment tribunals.

Note that this is general purpose CCD stuff, but this gem cannot claim to be a full CCD client as it only has methods specific to employment tribunal.

In general, the EtApiClient::Client is used for the main CCD API where the secret is known and the EtApiClient::UiClient is used to access the UI (front end) API where a username and password is known (generally in a test environment)

Installation

Add this line to your application's Gemfile:

gem 'et_ccd_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install et_ccd_client

Usage (Main CCD API)


client = EtApiClient::Client.new
client.login

client.caseworker_search_latest_by_reference('222000000100', case_type_id: 'EmpTrib_MVP_1.0_Manc')

Usage (UI API)

client = EtApiClient::UiClient.new
client.login

client.search_latest_by_reference('222000000100', case_type_id: 'EmpTrib_MVP_1.0_Manc')

Configuration

To configure the client, use a block like this :-

EtCcdClient.config do |c|
    c.auth_base_url = <value>
    c.idam_base_url = <value>
    c.data_store_base_url = <value>
    c.document_store_base_url = <value>
    c.document_store_url_rewrite = <false OR 4 element array containing source_host, source_port, dest_host, dest_port for rewriting - used in docker environment only>
    c.ecm_base_url = <value> (This is the ECM service known as docmosis but it is much more than that)
    c.jurisdiction_id = <value>
    c.microservice = <value>
    c.microservice_secret = <value>
    c.idam_ui_base_url = <value> (Only needed if using UI API)
    c.idam_ui_redirect_url = <value> (Only needed if using UI API)
    c.use_sidam = <value> (If true uses sidam - else tidam)
    c.sidam_username = <value> (Only needed if use_sidam is true)
    c.sidam_password = value (Only needed if use_sidam is true)
    c.user_id = <value> (Only needed if use_sidam is false)
    c.user_role = <value> (Only needed if use_sidam is false)
    c.pool_size = <value> The size of the connection pool (do not set lower than number of sidekiq threads)
    c.pool_timeout = <value) The time in seconds where we give up waiting for someone to release a client to the pool
    c.logger = Rails.logger (or any instance of an active support logger if you dont have rails)
end

If you don't set any of these, the defaults should work with local ccd-docker

If you don't set the logger, no logging output will be sent. If you share your rails logger or configure a new one, only debug output is set generally.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hmcts/et_ccd_client.

License

The gem is available as open source under the terms of the MIT License.