Skip to content

Latest commit

 

History

History
926 lines (683 loc) · 26.3 KB

File metadata and controls

926 lines (683 loc) · 26.3 KB

ConnectWise::ChargeCodesApi

All URIs are relative to http://na.myconnectwise.net/v4_6_release/apis/3.0

Method HTTP request Description
delete_time_charge_codes_by_id DELETE /time/chargeCodes/{id} Delete ChargeCode
get_time_charge_codes GET /time/chargeCodes Get List of ChargeCode
get_time_charge_codes_by_id GET /time/chargeCodes/{id} Get ChargeCode
get_time_charge_codes_by_id_info GET /time/chargeCodes/{id}/info Get ChargeCodeInfo
get_time_charge_codes_by_id_usages GET /time/chargeCodes/{id}/usages Get List of Usage Count
get_time_charge_codes_by_id_usages_list GET /time/chargeCodes/{id}/usages/list Get List of Usage
get_time_charge_codes_count GET /time/chargeCodes/count Get Count of ChargeCode
get_time_charge_codes_info GET /time/chargeCodes/info Get List of ChargeCodeInfo
get_time_charge_codes_info_count GET /time/chargeCodes/info/count Get Count of ChargeCodeInfo
patch_time_charge_codes_by_id PATCH /time/chargeCodes/{id} Patch ChargeCode
post_time_charge_codes POST /time/chargeCodes Post ChargeCode
put_time_charge_codes_by_id PUT /time/chargeCodes/{id} Put ChargeCode

delete_time_charge_codes_by_id

delete_time_charge_codes_by_id(id, client_id)

Delete ChargeCode

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
id = 56 # Integer | chargeCodeId
client_id = 'client_id_example' # String | 

begin
  # Delete ChargeCode
  api_instance.delete_time_charge_codes_by_id(id, client_id)
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->delete_time_charge_codes_by_id: #{e}"
end

Using the delete_time_charge_codes_by_id_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> delete_time_charge_codes_by_id_with_http_info(id, client_id)

begin
  # Delete ChargeCode
  data, status_code, headers = api_instance.delete_time_charge_codes_by_id_with_http_info(id, client_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->delete_time_charge_codes_by_id_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer chargeCodeId
client_id String

Return type

nil (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

get_time_charge_codes

<Array> get_time_charge_codes(client_id, opts)

Get List of ChargeCode

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get List of ChargeCode
  result = api_instance.get_time_charge_codes(client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes: #{e}"
end

Using the get_time_charge_codes_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> get_time_charge_codes_with_http_info(client_id, opts)

begin
  # Get List of ChargeCode
  data, status_code, headers = api_instance.get_time_charge_codes_with_http_info(client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<ChargeCode>>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

Array<ChargeCode>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

get_time_charge_codes_by_id

get_time_charge_codes_by_id(id, client_id, opts)

Get ChargeCode

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
id = 56 # Integer | chargeCodeId
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get ChargeCode
  result = api_instance.get_time_charge_codes_by_id(id, client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id: #{e}"
end

Using the get_time_charge_codes_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_time_charge_codes_by_id_with_http_info(id, client_id, opts)

begin
  # Get ChargeCode
  data, status_code, headers = api_instance.get_time_charge_codes_by_id_with_http_info(id, client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ChargeCode>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer chargeCodeId
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

ChargeCode

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

get_time_charge_codes_by_id_info

get_time_charge_codes_by_id_info(id, client_id, opts)

Get ChargeCodeInfo

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
id = 56 # Integer | chargeCodeId
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get ChargeCodeInfo
  result = api_instance.get_time_charge_codes_by_id_info(id, client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id_info: #{e}"
end

Using the get_time_charge_codes_by_id_info_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_time_charge_codes_by_id_info_with_http_info(id, client_id, opts)

begin
  # Get ChargeCodeInfo
  data, status_code, headers = api_instance.get_time_charge_codes_by_id_info_with_http_info(id, client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ChargeCodeInfo>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id_info_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer chargeCodeId
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

ChargeCodeInfo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

get_time_charge_codes_by_id_usages

<Array> get_time_charge_codes_by_id_usages(id, client_id, opts)

Get List of Usage Count

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
id = 56 # Integer | chargeCodeId
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get List of Usage Count
  result = api_instance.get_time_charge_codes_by_id_usages(id, client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id_usages: #{e}"
end

Using the get_time_charge_codes_by_id_usages_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> get_time_charge_codes_by_id_usages_with_http_info(id, client_id, opts)

begin
  # Get List of Usage Count
  data, status_code, headers = api_instance.get_time_charge_codes_by_id_usages_with_http_info(id, client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<Usage>>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id_usages_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer chargeCodeId
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

Array<Usage>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

get_time_charge_codes_by_id_usages_list

<Array> get_time_charge_codes_by_id_usages_list(id, client_id, opts)

Get List of Usage

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
id = 56 # Integer | chargeCodeId
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get List of Usage
  result = api_instance.get_time_charge_codes_by_id_usages_list(id, client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id_usages_list: #{e}"
end

Using the get_time_charge_codes_by_id_usages_list_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> get_time_charge_codes_by_id_usages_list_with_http_info(id, client_id, opts)

begin
  # Get List of Usage
  data, status_code, headers = api_instance.get_time_charge_codes_by_id_usages_list_with_http_info(id, client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<Usage>>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_by_id_usages_list_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer chargeCodeId
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

Array<Usage>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

get_time_charge_codes_count

get_time_charge_codes_count(client_id, opts)

Get Count of ChargeCode

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get Count of ChargeCode
  result = api_instance.get_time_charge_codes_count(client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_count: #{e}"
end

Using the get_time_charge_codes_count_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_time_charge_codes_count_with_http_info(client_id, opts)

begin
  # Get Count of ChargeCode
  data, status_code, headers = api_instance.get_time_charge_codes_count_with_http_info(client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Count>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_count_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

Count

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

get_time_charge_codes_info

<Array> get_time_charge_codes_info(client_id, opts)

Get List of ChargeCodeInfo

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get List of ChargeCodeInfo
  result = api_instance.get_time_charge_codes_info(client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_info: #{e}"
end

Using the get_time_charge_codes_info_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(<Array>, Integer, Hash)> get_time_charge_codes_info_with_http_info(client_id, opts)

begin
  # Get List of ChargeCodeInfo
  data, status_code, headers = api_instance.get_time_charge_codes_info_with_http_info(client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<ChargeCodeInfo>>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_info_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

Array<ChargeCodeInfo>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

get_time_charge_codes_info_count

get_time_charge_codes_info_count(client_id, opts)

Get Count of ChargeCodeInfo

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
client_id = 'client_id_example' # String | 
opts = {
  conditions: 'conditions_example', # String | 
  child_conditions: 'child_conditions_example', # String | 
  custom_field_conditions: 'custom_field_conditions_example', # String | 
  order_by: 'order_by_example', # String | 
  fields: 'fields_example', # String | 
  page: 56, # Integer | 
  page_size: 56, # Integer | 
  page_id: 56 # Integer | 
}

begin
  # Get Count of ChargeCodeInfo
  result = api_instance.get_time_charge_codes_info_count(client_id, opts)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_info_count: #{e}"
end

Using the get_time_charge_codes_info_count_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_time_charge_codes_info_count_with_http_info(client_id, opts)

begin
  # Get Count of ChargeCodeInfo
  data, status_code, headers = api_instance.get_time_charge_codes_info_count_with_http_info(client_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Count>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->get_time_charge_codes_info_count_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String
conditions String [optional]
child_conditions String [optional]
custom_field_conditions String [optional]
order_by String [optional]
fields String [optional]
page Integer [optional]
page_size Integer [optional]
page_id Integer [optional]

Return type

Count

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.connectwise.com+json; version=2025.1

patch_time_charge_codes_by_id

patch_time_charge_codes_by_id(id, client_id, patch_operation)

Patch ChargeCode

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
id = 56 # Integer | chargeCodeId
client_id = 'client_id_example' # String | 
patch_operation = [ConnectWise::PatchOperation.new] # Array<PatchOperation> | List of PatchOperation

begin
  # Patch ChargeCode
  result = api_instance.patch_time_charge_codes_by_id(id, client_id, patch_operation)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->patch_time_charge_codes_by_id: #{e}"
end

Using the patch_time_charge_codes_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> patch_time_charge_codes_by_id_with_http_info(id, client_id, patch_operation)

begin
  # Patch ChargeCode
  data, status_code, headers = api_instance.patch_time_charge_codes_by_id_with_http_info(id, client_id, patch_operation)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ChargeCode>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->patch_time_charge_codes_by_id_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer chargeCodeId
client_id String
patch_operation Array<PatchOperation> List of PatchOperation

Return type

ChargeCode

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.connectwise.com+json; version=2025.1

post_time_charge_codes

post_time_charge_codes(client_id, charge_code)

Post ChargeCode

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
client_id = 'client_id_example' # String | 
charge_code = ConnectWise::ChargeCode.new({name: 'name_example', company: ConnectWise::CompanyReference.new}) # ChargeCode | chargeCode

begin
  # Post ChargeCode
  result = api_instance.post_time_charge_codes(client_id, charge_code)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->post_time_charge_codes: #{e}"
end

Using the post_time_charge_codes_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> post_time_charge_codes_with_http_info(client_id, charge_code)

begin
  # Post ChargeCode
  data, status_code, headers = api_instance.post_time_charge_codes_with_http_info(client_id, charge_code)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ChargeCode>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->post_time_charge_codes_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String
charge_code ChargeCode chargeCode

Return type

ChargeCode

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.connectwise.com+json; version=2025.1

put_time_charge_codes_by_id

put_time_charge_codes_by_id(id, client_id, charge_code)

Put ChargeCode

Examples

require 'time'
require 'connect_wise'

api_instance = ConnectWise::ChargeCodesApi.new
id = 56 # Integer | chargeCodeId
client_id = 'client_id_example' # String | 
charge_code = ConnectWise::ChargeCode.new({name: 'name_example', company: ConnectWise::CompanyReference.new}) # ChargeCode | chargeCode

begin
  # Put ChargeCode
  result = api_instance.put_time_charge_codes_by_id(id, client_id, charge_code)
  p result
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->put_time_charge_codes_by_id: #{e}"
end

Using the put_time_charge_codes_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> put_time_charge_codes_by_id_with_http_info(id, client_id, charge_code)

begin
  # Put ChargeCode
  data, status_code, headers = api_instance.put_time_charge_codes_by_id_with_http_info(id, client_id, charge_code)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ChargeCode>
rescue ConnectWise::ApiError => e
  puts "Error when calling ChargeCodesApi->put_time_charge_codes_by_id_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
id Integer chargeCodeId
client_id String
charge_code ChargeCode chargeCode

Return type

ChargeCode

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.connectwise.com+json; version=2025.1