Skip to content

Commit

Permalink
Add Call Log resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan Paratskyi committed Feb 19, 2024
1 parent de1d7fa commit c2f83b6
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/pipedrive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ def logger
# Webhooks
require 'pipedrive/webhook'

# Call Logs
require 'pipedrive/call_log'

2 changes: 1 addition & 1 deletion lib/pipedrive/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def failed_response(res)

def entity_name
class_name = self.class.name.split('::')[-1].downcase.pluralize
class_names = { 'people' => 'persons' }
class_names = { 'people' => 'persons', 'calllogs' => 'callLogs' }
class_names[class_name] || class_name
end

Expand Down
11 changes: 11 additions & 0 deletions lib/pipedrive/call_log.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Pipedrive
class CallLog < Base
include ::Pipedrive::Operations::Read
include ::Pipedrive::Operations::Create
include ::Pipedrive::Operations::Update
include ::Pipedrive::Operations::Delete
include ::Pipedrive::Utils
end
end
2 changes: 1 addition & 1 deletion lib/pipedrive/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Pipedrive
VERSION = '0.3.2'
VERSION = '0.3.3'
end
13 changes: 13 additions & 0 deletions spec/lib/pipedrive/call_log_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe ::Pipedrive::CallLog do
subject { described_class.new('token') }

describe '#entity_name' do
subject { super().entity_name }

it { is_expected.to eq('call_logs') }
end
end

0 comments on commit c2f83b6

Please sign in to comment.