Skip to content

Commit f6b2320

Browse files
authored
Merge pull request #8 from danielwestendorf/add-support-for-clientId-header
Add support for clientId header now required by Connectwise
2 parents d0b97ad + 5d384b8 commit f6b2320

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ ConnectWise.configure do |config|
5757
config.host = 'api-na.myconnectwise.net' # your connectwise url
5858
config.base_path = '/v4_6_release/apis/3.0' # Or alternative code base release
5959
config.scheme = 'https'
60+
config.client_id = 'XXXX'
6061
end
6162

6263
api_instance = ConnectWise::AccountingBatchesApi.new
@@ -2523,4 +2524,3 @@ Class | Method | HTTP request | Description
25232524
### BasicAuth
25242525

25252526
- **Type**: HTTP basic authentication
2526-

lib/connectwise-ruby-sdk/api_client.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def initialize(config = Configuration.default)
2323
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
2424
@default_headers = {
2525
'Content-Type' => "application/json",
26-
'User-Agent' => @user_agent
26+
'User-Agent' => @user_agent,
27+
'clientId' => @config.client_id
2728
}
2829
end
2930

lib/connectwise-ruby-sdk/configuration.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ class Configuration
2020
# config.api_key['api_key'] = 'xxx'
2121
attr_accessor :api_key
2222

23+
# Defines the clientId header to send with requests
24+
#
25+
# @return [String]
26+
attr_accessor :client_id
27+
28+
2329
# Defines API key prefixes used with API Key authentications.
2430
#
2531
# @return [Hash] key: parameter name, value: API key prefix

0 commit comments

Comments
 (0)