Method: Courier::ListsClient#get
- Defined in:
- lib/trycourier/lists/client.rb
#get(list_id:, request_options: nil) ⇒ Lists::List
Returns a list based on the list ID provided.
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/trycourier/lists/client.rb', line 51 def get(list_id:, request_options: nil) response = @request_client.conn.get("/lists/#{list_id}") do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? unless &..nil? req.headers["Authorization"] = . end req.headers = { **req.headers, **(&.additional_headers || {}) }.compact end Lists::List.from_json(json_object: response.body) end |