diff --git a/lib/pipedrive.rb b/lib/pipedrive.rb index b872e92..7c83757 100644 --- a/lib/pipedrive.rb +++ b/lib/pipedrive.rb @@ -57,6 +57,7 @@ def logger # Organizations require 'pipedrive/organization_field' +require 'pipedrive/organization_relationship' require 'pipedrive/organization' # Filters @@ -92,6 +93,7 @@ def logger # Notes require 'pipedrive/note' +require 'pipedrive/note_field' # Users require 'pipedrive/user' diff --git a/lib/pipedrive/note_field.rb b/lib/pipedrive/note_field.rb new file mode 100644 index 0000000..08672c0 --- /dev/null +++ b/lib/pipedrive/note_field.rb @@ -0,0 +1,9 @@ +module Pipedrive + class NoteField < Base + include ::Pipedrive::Operations::Read + + def entity_name + 'noteFields' + end + end +end diff --git a/lib/pipedrive/organization_relationship.rb b/lib/pipedrive/organization_relationship.rb new file mode 100644 index 0000000..d264a62 --- /dev/null +++ b/lib/pipedrive/organization_relationship.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Pipedrive + class OrganizationRelationship < Base + include ::Pipedrive::Operations::Read + include ::Pipedrive::Operations::Create + include ::Pipedrive::Operations::Update + include ::Pipedrive::Operations::Delete + + def entity_name + 'organizationRelationships' + end + end +end diff --git a/spec/lib/pipedrive/note_field_spec.rb b/spec/lib/pipedrive/note_field_spec.rb new file mode 100644 index 0000000..bbdfb7c --- /dev/null +++ b/spec/lib/pipedrive/note_field_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe ::Pipedrive::NoteField do + subject { described_class.new('token') } + + describe '#entity_name' do + subject { super().entity_name } + + it { is_expected.to eq('noteFields') } + end +end diff --git a/spec/lib/pipedrive/organization_relationship_spec.rb b/spec/lib/pipedrive/organization_relationship_spec.rb new file mode 100644 index 0000000..843506e --- /dev/null +++ b/spec/lib/pipedrive/organization_relationship_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe ::Pipedrive::OrganizationRelationship do + subject { described_class.new('token') } + + describe '#entity_name' do + subject { super().entity_name } + + it { is_expected.to eq('organizationRelationships') } + end +end