<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ruby client get_by_id yields &amp;quot;User no implicit conversion of Symbol into Integer&amp;quot; in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953845#M72453</link>
    <description>&lt;P&gt;This is Ruby right? If yes, then base on the documentation this is the correct syntax:&lt;BR /&gt;&lt;BR /&gt;api_client.crm.companies.basic_api.get_crm_v3_objects_companies_company_id(company_id: "123", archived: false)&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 09:02:34 GMT</pubDate>
    <dc:creator>ChrisMagtoto</dc:creator>
    <dc:date>2024-04-03T09:02:34Z</dc:date>
    <item>
      <title>ruby client get_by_id yields "User no implicit conversion of Symbol into Integer"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953552#M72435</link>
      <description>&lt;P&gt;the current ruby client seems to be generated from a swagger description.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetching company details with get_by_id seems broken though. i'm not managing to get it working. listing all companies works fine for your info.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i keep hitting this error "&lt;SPAN&gt;no implicit conversion of Symbol into Integer" . i wen't looking in the source but i don't seem to find the source. the code is not trivial to read as it's generated code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if anyone knows how to get company details with the latest ruby gem code for a given id, please share &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 19:54:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953552#M72435</guid>
      <dc:creator>khandekyn</dc:creator>
      <dc:date>2024-04-02T19:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: ruby client get_by_id yields "User no implicit conversion of Symbol into Integer"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953770#M72446</link>
      <description>&lt;P&gt;Are you passing the id as an integer or a string?&lt;BR /&gt;&lt;BR /&gt;Try passing the id as a string:&lt;BR /&gt;id = "{id}"&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 05:18:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953770#M72446</guid>
      <dc:creator>ChrisMagtoto</dc:creator>
      <dc:date>2024-04-03T05:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: ruby client get_by_id yields "User no implicit conversion of Symbol into Integer"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953779#M72447</link>
      <description>i actually tried all possible variants&lt;BR /&gt;&lt;BR /&gt;123&lt;BR /&gt;“123”&lt;BR /&gt;id: “123”&lt;BR /&gt;id: 123&lt;BR /&gt;{id: 123}&lt;BR /&gt;{id: “123”}&lt;BR /&gt;…&lt;BR /&gt;&lt;BR /&gt;see below for actual outputs.&lt;BR /&gt;from that output it seems te system really expects just 1 argument (which i can’t read in the code) and it needs to be a primitive string or int, because the code generation tries to load an inexistent class in the other cases.&lt;BR /&gt;&lt;BR /&gt;i also tried for several ruby versions: 3.0, 3.2 … same results&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;koen&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;```&lt;BR /&gt;irb(main):001&amp;gt; c = Hubspot::Client.new(access_token: ENV["HUBSPOT_ACCESS_TOKEN"])&lt;BR /&gt;=&amp;gt; #&amp;lt;:client:0x000000010761a780&amp;gt;"pat-eu1-8e5f2c79-11e9-4bc1-9678-7708c19ab0b2"}&amp;gt;&lt;BR /&gt;irb(main):002&amp;gt; c.crm.companies.basic_api.get_by_id(1)&lt;BR /&gt;/Users/koenhandekyn/.rbenv/versions/3.2.3/lib/ruby/gems/3.2.0/gems/hubspot-api-client-17.2.0/lib/hubspot/discovery/base_api_client.rb:135:in `[]': no implicit conversion of Symbol into Integer (TypeError)&lt;BR /&gt;&lt;BR /&gt;params_with_defaults[:opts] ||= {}&lt;BR /&gt;^^^^^^^^^^^^^&lt;BR /&gt;irb(main):003&amp;gt; c.crm.companies.basic_api.get_by_id("1")&lt;BR /&gt;/Users/koenhandekyn/.rbenv/versions/3.2.3/lib/ruby/gems/3.2.0/gems/hubspot-api-client-17.2.0/lib/hubspot/discovery/base_api_client.rb:135:in `[]': no implicit conversion of Symbol into Integer (TypeError)&lt;BR /&gt;&lt;BR /&gt;params_with_defaults[:opts] ||= {}&lt;BR /&gt;^^^^^^^^^^^^^&lt;BR /&gt;irb(main):004&amp;gt; c.crm.companies.basic_api.get_by_id(id: 1)&lt;BR /&gt;&amp;lt;&amp;gt;:38:in `require': cannot load such file -- hubspot/codegen/crm/companies/models/company_id (LoadError)&lt;BR /&gt;irb(main):005&amp;gt; c.crm.companies.basic_api.get_by_id(id: "1")&lt;BR /&gt;&amp;lt;&amp;gt;:38:in `require': cannot load such file -- hubspot/codegen/crm/companies/models/company_id (LoadError)&lt;BR /&gt;irb(main):006&amp;gt; c.crm.companies.basic_api.get_by_id({id: "1"})&lt;BR /&gt;&amp;lt;&amp;gt;:38:in `require': cannot load such file -- hubspot/codegen/crm/companies/models/company_id (LoadError)&lt;BR /&gt;irb(main):007&amp;gt; c.crm.companies.basic_api.get_by_id({id: 1})&lt;BR /&gt;&amp;lt;&amp;gt;:38:in `require': cannot load such file -- hubspot/codegen/crm/companies/models/company_id (LoadError)&lt;BR /&gt;irb(main):008&amp;gt; c.crm.companies.basic_api.get_by_id(1, opts: {})&lt;BR /&gt;/Users/koenhandekyn/.rbenv/versions/3.2.3/lib/ruby/gems/3.2.0/gems/hubspot-api-client-17.2.0/lib/hubspot/discovery/base_api_client.rb:133:in `block (2 levels) in define_api_methods': wrong number of arguments (given 2, expected 0..1) (ArgumentError)&lt;BR /&gt;irb(main):009&amp;gt; c.crm.companies.basic_api.get_by_id(1, {})&lt;BR /&gt;/Users/koenhandekyn/.rbenv/versions/3.2.3/lib/ruby/gems/3.2.0/gems/hubspot-api-client-17.2.0/lib/hubspot/discovery/base_api_client.rb:133:in `block (2 levels) in define_api_methods': wrong number of arguments (given 2, expected 0..1) (ArgumentError)&lt;BR /&gt;```&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Apr 2024 05:32:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953779#M72447</guid>
      <dc:creator>khandekyn</dc:creator>
      <dc:date>2024-04-03T05:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: ruby client get_by_id yields "User no implicit conversion of Symbol into Integer"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953845#M72453</link>
      <description>&lt;P&gt;This is Ruby right? If yes, then base on the documentation this is the correct syntax:&lt;BR /&gt;&lt;BR /&gt;api_client.crm.companies.basic_api.get_crm_v3_objects_companies_company_id(company_id: "123", archived: false)&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 09:02:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/953845#M72453</guid>
      <dc:creator>ChrisMagtoto</dc:creator>
      <dc:date>2024-04-03T09:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: ruby client get_by_id yields "User no implicit conversion of Symbol into Integer"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/954497#M72495</link>
      <description>thanks for the tip but just tried but getting an undefined method error&lt;BR /&gt;i’m calling it on the basic_api object&lt;BR /&gt;&lt;BR /&gt;undefined method `get_crm_v3_objects_companies_company_id' for #&amp;lt;:discovery::crm::companies::basicapi:0x0000000106fff7d8&amp;gt;"pat-eu1-8e5f2c79-11e9-4bc1-9678-7708c19ab0b2"}, @codegen_api_path="hubspot/codegen/crm/companies/basic_api", @codegen_module_name="Hubspot::Crm::Companies", @codegen_module_path="hubspot/codegen/crm/companies", @config=#&amp;lt;:crm::companies::configuration:0x0000000106f1c820&amp;gt;</description>
      <pubDate>Thu, 04 Apr 2024 07:21:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/954497#M72495</guid>
      <dc:creator>khandekyn</dc:creator>
      <dc:date>2024-04-04T07:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: ruby client get_by_id yields "User no implicit conversion of Symbol into Integer"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/954575#M72498</link>
      <description>&lt;P&gt;Hey, I just created my ruby environment and tested this which returned the data for a the specified company id.&lt;BR /&gt;&lt;BR /&gt;api_response = api_client.crm.companies.basic_api.get_by_id(company_id: 7559743199)&lt;BR /&gt;&lt;BR /&gt;PLEASE rotate your access token as you revealed it in your reply which I used to retrieve a sample and test my ruby code.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 09:50:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/ruby-client-get-by-id-yields-quot-User-no-implicit-conversion-of/m-p/954575#M72498</guid>
      <dc:creator>ChrisMagtoto</dc:creator>
      <dc:date>2024-04-04T09:50:22Z</dc:date>
    </item>
  </channel>
</rss>

