rikas / zoho_hub

Zoho CRM API V2 Wrapper
MIT License
25 stars 30 forks source link

The Zoho::Lead class does not implement the instance method: add_note #59

Closed ngw closed 3 years ago

ngw commented 4 years ago

Hi, I have a Zoho::Lead class which inherits from ZohoHub::BaseRecord. I apparently cannot use the add_note method and I don't understand why, looks like an issue with the gem.

2.6.6 :001 > ZohoHub.setup_connection(access_token: ENV['ZOHO_ACCESS_TOKEN'], refresh_token: ENV['ZOHO_REFRESH_TOKEN'])
......
2.6.6 :002 > zoho = Zoho::Lead.new(first_name: 'Test 2', last_name: 'Test 2', email: 'ngw@blah.org', description: 'blah')
 => #<Zoho::Lead:0x00007fb1d5087878 @id=nil, @first_name="Test 2", @last_name="Test 2", @email="ngw@blah.org", @description="blah">
2.6.6 :003 > zoho.save
 => "103.................."
2.6.6 :004 > Zoho::Lead.add_note(id: '103....................', title: 'test', content: 'content')
Traceback (most recent call last):
        1: from (irb):4
NoMethodError (undefined method `add_note' for Zoho::Lead:Class)

I think I'm following the documentation, is this a bug in the gem? Gem is at 0.4.0, ruby 2.6.6

Fabien-Wecasa commented 4 years ago

I think the corresponding PR #40 is not included in your gem version. Maybe @rikas can deploy a new version ? Else you'll have to rely on master.

rikas commented 3 years ago

@ngw just released version 0.4.1, let me know if that works.