- Add support for Salesforce's Composite API and Composite Batch API (@meenie, @amacdougall)
- Improve the performance of counting numbers of query results with
Restforce::Collection#count, avoiding unnecessary API requests (@jhass)
- Handle the
INVALID_REPLICATION_DATEerror returned by Salesforce (@michaelwnyc) - Handle the
BIG_OBJECT_UNSUPPORTED_OPERATIONerror returned by Salesforce (@remon)
- Add official support for Ruby 3.0 (@timrogers)
- Drop support for Ruby 2.5, which has reached end-of-life (@timrogers)
- Handle the
QUERY_TIMEOUTerror returned by Salesforce (@timrogers) - Remove unnecessary development dependencies for the gem, which can just be in the project's
Gemfile(@timrogers)
- Handle the
API_DISABLED_FOR_ORGerror returned by Salesforce (@cmac) - Handle the
METHOD_NOT_ALLOWEDerror returned by Salesforce (@timrogers) - Handle the
APEX_ERRORerror returned by Salesforce (@timrogers)
- Handle the
CANNOT_EXECUTE_FLOW_TRIGGERerror returned by Salesforce (@almusavi, @timrogers)
- Handle the
INVALID_QUERY_LOCATORerror returned by Salesforce - Handle the
INVALID_OPERATION_WITH_EXPIRED_PASSWORDerror returned by Salesforce - Handle the
FIELD_INTEGRITY_EXCEPTIONerror returned by Salesforce - Handle the
FORBIDDENerror returned by Salesforce - Handle the
ILLEGAL_QUERY_PARAMETER_VALUEerror returned by Salesforce - Handle the
JSON_PARSER_ERRORerror returned by Salesforce
- Handle the undocumented
EXCEEDED_MAX_SEMIJOIN_SUBSELECTSerror returned by Salesforce (@embertel, @timrogers)
- Handle the undocumented
REQUEST_LIMIT_EXCEEDEDerror returned by Salesforce (@wkirkby, @timrogers) - Handle the undocumented
SERVER_UNAVAILABLEerror returned by Salesforce (@wkirkby, @timrogers) - Refactor the library to be compatible with Rubocop 0.90's cops (this shouldn't introduce any noticeable changes see #569 for detailed changes) (@timrogers)
- Handle the undocumented
API_CURRENTLY_DISABLEDerror returned by Salesforce (@ruipserra, @timrogers) - Handle the undocumented
MALFORMED_QUERYerror returned by Salesforce (@scottserok, @timrogers) - Handle the undocumented
INVALID_QUERY_FILTER_OPERATORerror returned by Salesforce (@Dantemss, @timrogers) - Add documentation and scripts for running the library's tests using Docker (@ryansch)
For instructions on upgrading from Restforce 4.x to 5.x, see our "Upgrading from Restforce 4.x to 5.x" guide.
⚠️ Define exception classes for Salesforce errors up-front instead of dynamically at runtime, running the risk that we might miss some errors which should be defined. If any errors are missed, they will be added in patch versions (e.g.5.0.1). For more details on this change, see the "Upgrading from Restforce 4.x to 5.x" guide (@presidentbeef, @timrogers).⚠️ Deprecate support for Ruby 2.4, since Ruby 2.4 reached its end-of-life in April 2020 (@timrogers)⚠️ Change the ancestry ofRestforce::UnauthorizedErrorso it inherits fromFaraday::ClientError, notRestforce::Error. This breaking change was required to expose the response body returned by the API as part of this error - see the non-breaking changes entry below for further details (@michaldbianchi).
- Add support for
lostisland/faradayv1.x, whilst maintaining support for v0.9.x (@ryansch) - Add
#empty?method toRestforce::Collection, returning whether they are any items in a collection (@bubaflub) - Allow opting-in to caching on a per-call basis with
Restforce::Client#with_caching(@swaincreates) - Expose the response body from Salesforce on
Restforce::UnauthorizedErrorandRestforce::NotFoundError(@michaeldbianchi) - Remove the unnecessary depending on the
jsongem, which has been part of the Ruby standard library since v1.9 (@vonTronje)
- Fix
NoMethodError: undefined method '[]' for nil:NilClasserror when generating objects to return (@apurkiss)
- Handle empty response bodies returned with authentication errors (@sylvandor)
- Fix Faraday deprecation warning in newer Faraday versions (
v0.17.1onwards) caused by inheriting from a deprecated class
- Add support for platform events, CDC, generic events, etc. in the Streaming API (@nathanKramer)
- Add support for JWT authentication (@nathanKramer, @tagCincy)
- Deprecate support for Ruby 2.3, since Ruby 2.3 reached its end-of-life in March 2019. (This is the only breaking change included in this version.)
- Add support for the Batch API (@gaiottino, @teoulas)
- Return specific exceptions for errors that might be returned from Salesforce.com - instead of getting a generic
Faraday::Error::ClientError, you might get something like aRestforce::EntityTooLargeError(@boblail) - Expose the full response in exceptions' messages to make debugging easier (@boblail)
- Properly escape IDs with spaces in them when working with existing records (@pushups)
- Add support for replaying missed messages when using the Salesforce Streaming API (@andreimaxim, @drteeth, @panozzaj)
- Fix
NoMethodErrorwhen upserting an existing record (@opti)
- Deprecate support for Ruby 2.0, 2.1 and 2.2, since even Ruby 2.2 reached its end-of-life in June 2018. (This is the only breaking change included in this version.)
- Fix
NoMethodErrorwhen trying to upsert a record using aFixnumas the external ID (@AlexandruCD) - Escape record IDs passed in to the client to identify records to find, delete, etc. (@jmdx)
- Stop relying on our middleware for Gzip compression if you're using
httpclient, since Faraday enables this automatically usinghttpclient's built-in support (@shivanshgaur) - Fix
get_updatedandget_deletedAPI calls by removing the erroneous leading forward slash from the path (@scottolsen) - Fix unpacking of dependent picklist options (@parkm)
See the v2 branch for this release.
- Escape record IDs passed in to the client to identify records to find, delete, etc. (@jmdx, @apanzerj)
- Raise an error where a custom external ID field name is supplied to
upsertandupsert!, but it is missing from the provided attributes (@velveret) - Use the Restforce client's configured SSL options for authentication requests (@jvdp)
- Fix bug where
upsertandupsert!mutate the provided attributes, previously fixed in v1.5.3 (@velveret)
- Ensure
Restforce::Middleware::Loggeris the last Faraday middleware to be called so everything is properly logged (including the effects of theGzipandCustomHeadersmiddlewares which were previously running after it) (@jonnymacs) - Suppress Hashie warnings when using Hashie v3.5.0 or later (see #295 for details) (@janraasch)
- Allow setting custom headers, required by parts of the Salesforce API, by specifiying a
:request_headersoption when instantiating the client (@moskeyombus) - Add support for
upserting using an ID (see the Salesforce docs for more details) (@ecbypi) - Relax
faradaydependency to allow upgrading to Faraday 1.0 (@tinogomes, @alexluke)
(This should have been a minor version rather than a patch version, following format MAJOR.MINOR.PATCH, since we use Semantic Versioning and this adds functionality. Sorry! @timrogers)
- Deprecate support for Ruby 1.9, since official support was dropped nearly two years ago, and it's causing problems with keeping our dependencies up to date
- Securely hash Salesforce credentials used in cache keys, so they aren't stored in the clear (@atmos)
- Relax
jsondependency for users of Ruby 2.0.0 onwards to allow a much wider range of versions (@timrogers, with thanks to @ccutrer and @janraasch)
- Added support for pre-released versions of Ruby 2.4.0 by relaxing the
jsongem dependency (@timrogers, with thanks to @ccutrer)
- Added ability to download documents attached to records, behaving like attachments (@jhelbig)
- Allow the Salesforce API version to be specified with a
SALESFORCE_API_VERSIONenvironment variable (@jhelbig)
- Added support for
get_deletedcall (@adambird)
(This should have been a minor version rather than a patch version, following format MAJOR.MINOR.PATCH, since we use Semantic Versioning and this adds functionality. Sorry! @timrogers)
- Raise a
Faraday::Error::ClientErrorfor300responses triggered by a conflicting external ID, providing access to the response, which contains an array of the conflicting IDs (@timrogers, @michaelminter) - Improve the consistency of
Faraday::Error::ClientErrors raised, so they all have a message with the same format (@timrogers)
- Raise a
Restforce::ServerErrorwhen Salesforce responds with a500due to an internal error (@greysteil) - Improving handling of response body in errors (@kuono)
- Always parse the JSON response before errors are raised to improve exceptions (@kouno)
- Added support for
get_updatedcall (@web-connect) - Respect Faraday adapter option in authentication middleware (@stenlarsson)
- Added support for
query_all,explainandlimitsAPI calls (which require a newerapi_versionthan the default of 26.0) (@theSteveMitchell, @zenchild) - Added support for
recentAPI call (@davebrace) - Changed
PROXY_URIenvironment variable toSALESFORCE_PROXY_URI(with warning toSTDOUTif the old variable is set) (@timrogers) - Implemented
version_guardinRestforce::Concerns::APIto standardise behaviour of API calls which require a particular version of the Salesforce API (@zenchild) - Fixed bug with construction of
Faraday::Error::ClientErrorexceptions (@debussyman) - Added support for specifying SSL options to be passed to Faraday (@jonathanrico)
- Added support for specifying a custom logger and log level (@ilyakatz)
- Improved experience for contributors to the gem with bootstrapping process (@rafalchmiel)
- Drop support for versions of Ruby earlier than 1.9.3, which were end-of-lifed long ago
- Take advantages of Ruby 1.9.3 syntax, and drop old Ruby 1.8 shims
- Enforce code style with Rubocop
- Fixed a bug with
update!andupsert!mutating provided attributes (@timrogers) - Added note about thread safety to
README.md(@epbarger) - Improved documentation for
selectinREADME.md(@theSteveMitchell) - Tweaked and improved consistency of
README.md(@timrogers) - Pass through blocks given to
Restforce.new(@jxa) - Add
#page_sizetoRestforce::Collection(@theSteveMitchell)
- Better autopagination performance #141 @th7
- Looser restrictions on hashie gem #123 @zenchild
- Upgrade faraday dependency to 0.9 #124 @zenchild
- Fixed a bug with HTTP 413 responses #75 @patronmanager
- Added support for the tooling API.
- Fixed a bug with EMSynchrony adapter.
- Added proxy support.
- Added support for lazily traversing paginated collections #61 by @nahiluhmot.
- Added support for proxies #60 by @wazoo.
-
Added ability to download attachments easily.
Example
attachment = client.query('select Id, Name, Body from Attachment').first File.open(attachment.Name, 'wb') { |f| f.write(attachment.Body) }
-
Added
urlmethod.Example
# Url to a record id client.url('0013000000rRz') # => https://na1.salesforce.com/0013000000rRz # Url to an object that responds to `to_sparam` record = Struct.new(:to_sparam).new('0013000000rRz') client.url('0013000000rRz') # => https://na1.salesforce.com/0013000000rRz
-
Added
picklist_valuesmethod.Example
client.picklist_values('Account', 'Type') client.picklist_values('Automobile__c', 'Model__c', :valid_for => 'Honda') -
Added CHANGELOG.md
-
Restforce::Client#inspectnow only prints out the options and not the Faraday connection. -
The Faraday adapter is now configurabled:
Example:
Restforce.configure do |config| config.adapter = :excon end -
The http connection read/open timeout is now configurabled.
Example:
Restforce.configure do |config| config.timeout = 300 end
- Fixed typo in method call.
- Minor cleanup.
- Moved decoding of signed requests into it's own class.
username,password,security_token,client_idandclient_secretoptions now obtain defaults from environment variables.- Add
headverb.
- Default api version changed from 24.0 to 26.0.
- Fixed tests for streaming api to work with latest versions of faye.
- Added .find method to obtain all fields from an sobject.