All URIs are relative to https://api-na.myconnectwise.net/v4_6_release/apis/3.0
Method | HTTP request | Description |
---|---|---|
sales_opportunities_count_get | GET /sales/opportunities/count | |
sales_opportunities_get | GET /sales/opportunities | |
sales_opportunities_id_convert_to_agreement_post | POST /sales/opportunities/{id}/convertToAgreement | |
sales_opportunities_id_convert_to_project_post | POST /sales/opportunities/{id}/convertToProject | |
sales_opportunities_id_convert_to_sales_order_post | POST /sales/opportunities/{id}/convertToSalesOrder | |
sales_opportunities_id_convert_to_service_ticket_post | POST /sales/opportunities/{id}/convertToServiceTicket | |
sales_opportunities_id_delete | DELETE /sales/opportunities/{id} | |
sales_opportunities_id_get | GET /sales/opportunities/{id} | |
sales_opportunities_id_patch | PATCH /sales/opportunities/{id} | |
sales_opportunities_id_put | PUT /sales/opportunities/{id} | |
sales_opportunities_post | POST /sales/opportunities |
Count sales_opportunities_count_get(opts)
Get Opportunities Count
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
opts = {
conditions: "conditions_example" # String |
}
begin
result = api_instance.sales_opportunities_count_get(opts)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_count_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
conditions | String | [optional] |
- Content-Type: Not defined
- Accept: application/json
Array<Opportunity> sales_opportunities_get(opts)
Get Opportunities
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
opts = {
conditions: "conditions_example" # String |
order_by: "order_by_example", # String |
page: 56, # Integer |
page_size: 56 # Integer |
}
begin
result = api_instance.sales_opportunities_get(opts)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
conditions | String | [optional] | |
order_by | String | [optional] | |
page | Integer | [optional] | |
page_size | Integer | [optional] |
- Content-Type: Not defined
- Accept: application/json
Agreement sales_opportunities_id_convert_to_agreement_post(id, conversion)
Convert Opportunity To Agreement
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
conversion = Connectwise::OpportunityToAgreementConversion.new # OpportunityToAgreementConversion |
begin
result = api_instance.sales_opportunities_id_convert_to_agreement_post(id, conversion)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_convert_to_agreement_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ||
conversion | OpportunityToAgreementConversion |
- Content-Type: application/json
- Accept: application/json
Project sales_opportunities_id_convert_to_project_post(id, conversion)
Convert Opportunity To Project
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
conversion = Connectwise::OpportunityToProjectConversion.new # OpportunityToProjectConversion |
begin
result = api_instance.sales_opportunities_id_convert_to_project_post(id, conversion)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_convert_to_project_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ||
conversion | OpportunityToProjectConversion |
- Content-Type: application/json
- Accept: application/json
Order sales_opportunities_id_convert_to_sales_order_post(id, conversion)
Convert Opportunity To Sales Order
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
conversion = Connectwise::OpportunityToSalesOrderConversion.new # OpportunityToSalesOrderConversion |
begin
result = api_instance.sales_opportunities_id_convert_to_sales_order_post(id, conversion)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_convert_to_sales_order_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ||
conversion | OpportunityToSalesOrderConversion |
- Content-Type: application/json
- Accept: application/json
Ticket sales_opportunities_id_convert_to_service_ticket_post(id, conversion)
Convert Opportunity To Service Ticket
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
conversion = Connectwise::OpportunityToServiceTicketConversion.new # OpportunityToServiceTicketConversion |
begin
result = api_instance.sales_opportunities_id_convert_to_service_ticket_post(id, conversion)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_convert_to_service_ticket_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ||
conversion | OpportunityToServiceTicketConversion |
- Content-Type: application/json
- Accept: application/json
sales_opportunities_id_delete(id)
Delete Opportunity By Id
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
begin
api_instance.sales_opportunities_id_delete(id)
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer |
nil (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Opportunity sales_opportunities_id_get(id)
Get Opportunity By Id
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
begin
result = api_instance.sales_opportunities_id_get(id)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer |
- Content-Type: Not defined
- Accept: application/json
Opportunity sales_opportunities_id_patch(id, operations)
Update Opportunity
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
operations = [Connectwise::PatchOperation.new] # Array<PatchOperation> |
begin
result = api_instance.sales_opportunities_id_patch(id, operations)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_patch: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ||
operations | Array<PatchOperation> |
- Content-Type: application/json
- Accept: application/json
Opportunity sales_opportunities_id_put(id, opportunity)
Replace Opportunity
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
id = 56 # Integer |
opportunity = Connectwise::Opportunity.new # Opportunity |
begin
result = api_instance.sales_opportunities_id_put(id, opportunity)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_id_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ||
opportunity | Opportunity |
- Content-Type: application/json
- Accept: application/json
Opportunity sales_opportunities_post(opportunity)
Create Opportunity
# load the gem
require 'connectwise-ruby-sdk'
# setup authorization
Connectwise.configure do |config|
# Configure HTTP basic authorization: BasicAuth
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
end
api_instance = Connectwise::OpportunitiesApi.new
opportunity = Connectwise::Opportunity.new # Opportunity |
begin
result = api_instance.sales_opportunities_post(opportunity)
p result
rescue Connectwise::ApiError => e
puts "Exception when calling OpportunitiesApi->sales_opportunities_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
opportunity | Opportunity |
- Content-Type: application/json
- Accept: application/json