Created
September 16, 2015 18:46
-
-
Save iaintshine/1f0a5dcf9d1bb68b1e3f to your computer and use it in GitHub Desktop.
BaseCRM Ruby gem - sample code that shows how to filter by custom field value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
Bundler.setup | |
require 'logger' | |
require 'basecrm' | |
access_token = "BASECRM_ACCESS_TOKEN" | |
client = BaseCRM::Client.new(access_token: access_token, | |
verbose: true, | |
logger: Logger.new(STDOUT)) | |
result = client.deals.where({ | |
custom_fields: { | |
filterable_custom_field: "test" | |
} | |
}) | |
puts result | |
result = client.deals.where({ | |
"custom_fields[filterable_custom_field]" => "test" | |
}) | |
puts result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment