Skip to content

Error when trying 'get_by_id' - no implicit conversion of Symbol into Integer #430

@arashm

Description

@arashm

I'm getting an error when trying to get a company by ID

> client = Hubspot::Client.new(access_token: Rails.application.credentials.dig(:hubspot, :access_token))
=> #<Hubspot::Client:0x00007fcd66c2ec60 @params={access_token: "XXXXXX"}>

> client.crm.companies.basic_api.get_by_id('123')
/home/arash/.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/gems/irb-1.15.2/lib/irb.rb:406:in 'full_message': no implicit conversion of Symbol into Integer (TypeError)

            params_with_defaults[:opts] ||= {}
                                 ^^^^^^^^^^^^^

Seems like it's related to this line, but I can't figure out if it's something I'm doing or a bug in the library. Looking at the code the opts are not required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions