Update initialize Method to Allow Setting salesforce_api_version
Change Description
This pull request updates the initialize method of the class to allow setting the salesforce_api_version, providing more flexibility in specifying the API version for the Salesforce Bulk API. If the salesforce_api_version is not explicitly set, it will default to 46.0.
Background:
Previously, the class used a constant SALESFORCE_API_VERSION set to 46.0, which limited the usage of this gem to API version 46.0 only. This lack of flexibility restricted the ability to use newer API features introduced in later versions.
Example Use Case:
One specific scenario where this limitation is problematic is when creating tasks with the owner_id set to a queue. This operation fails with API versions less than 48.0 because setting a task's owner_id to a queue is only supported in API version 48.0 and above.
By allowing the salesforce_api_version to be set during initialization, users can now specify the required API version to leverage newer features and avoid such issues.
Class Initialization Update:
Before:
The class used a constant SALESFORCE_API_VERSION set to '46.0' to initialize the Salesforce connection.
The initialize method accepted only one parameter, client.
Title
Update initialize Method to Allow Setting
salesforce_api_version
Change Description
This pull request updates the initialize method of the class to allow setting the
salesforce_api_version
, providing more flexibility in specifying the API version for the Salesforce Bulk API. If the salesforce_api_version is not explicitly set, it will default to 46.0.Background:
Previously, the class used a constant
SALESFORCE_API_VERSION
set to46.0
, which limited the usage of this gem to API version 46.0 only. This lack of flexibility restricted the ability to use newer API features introduced in later versions.Example Use Case:
One specific scenario where this limitation is problematic is when creating tasks with the owner_id set to a queue. This operation fails with API versions less than
48.0
because setting a task's owner_id to a queue is only supported in API version48.0
and above.By allowing the
salesforce_api_version
to be set during initialization, users can now specify the required API version to leverage newer features and avoid such issues.Class Initialization Update:
Before:
SALESFORCE_API_VERSION
set to'46.0'
to initialize the Salesforce connection.initialize
method accepted only one parameter,client
.After:
SALESFORCE_API_VERSION
has been removed.initialize
method has been updated to accept an optional second parameter,salesforce_api_version
, with a default value of"46.0"
.Summary of Changes:
SALESFORCE_API_VERSION
constant.initialize
method to accept an optionalsalesforce_api_version
parameter with a default value of"46.0"
.@connection
initialization to use thesalesforce_api_version
parameter instead of the constant.Benefits: