pipedrive-connect 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -3
- data/lib/pipedrive/api_operations/request.rb +1 -0
- data/lib/pipedrive/fields.rb +33 -1
- data/lib/pipedrive/resources/activity.rb +5 -0
- data/lib/pipedrive/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b59e1ddcf850e86b6ab8ddfc384c83d86b55839b9518ea482190f1685a9d0f4a
|
4
|
+
data.tar.gz: 19715830d980662d719712275641380c818322c06f919b6b6924feda0dada118
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8aaf434d1b15bae2de6608c1baada88ae3cd4010c29f633dcfe28804958a5b6a9356a68f92af392e7bf5bf023659e748c1d19281c34fb45d13583e22253740b
|
7
|
+
data.tar.gz: 7b9318cee4b94c8b352a7767e8ba6d96c021836f44321ea2d69fcc88beebf1b54533c992669ee8b4d4cf2b6add603c8d15e3ed371e3c3554355f81e7ccbe44df
|
data/CHANGELOG.md
CHANGED
@@ -5,11 +5,21 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
7
7
|
|
8
|
-
## [2.0
|
8
|
+
## [2.1.0] - 2025-08-06
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- New `use_fields_version` method in Fields module to override API version specifically for fields operations
|
12
|
+
- Fields-specific version override functionality that allows resources to use different API versions for fields vs general operations
|
13
|
+
- `fields_api_version` method to query the fields-specific API version
|
9
14
|
|
10
|
-
|
11
|
-
-
|
15
|
+
### Changed
|
16
|
+
- Activity resource now uses `use_fields_version :v1` instead of `use_version :v1` to override version only for fields operations
|
17
|
+
- Activity general operations now use v2 API while fields operations continue to use v1 API as required by Pipedrive
|
18
|
+
|
19
|
+
## [2.0.1] - 2025-04-17
|
12
20
|
|
21
|
+
- Fix bugs introduced with version 2 where the base URL for v1 was broken.
|
22
|
+
- Add GitHub Actions workflow
|
13
23
|
## [2.0.0] - 2025-04-11
|
14
24
|
|
15
25
|
- **BREAKING change**: Minimum ruby version updated to 2.7.
|
data/lib/pipedrive/fields.rb
CHANGED
@@ -10,6 +10,24 @@ module Pipedrive
|
|
10
10
|
end
|
11
11
|
|
12
12
|
module ClassMethods
|
13
|
+
# Set version specifically for fields operations
|
14
|
+
def use_fields_version(version)
|
15
|
+
@fields_version = version
|
16
|
+
end
|
17
|
+
|
18
|
+
# override the default version with the one provided
|
19
|
+
def api_version
|
20
|
+
return @version if @version
|
21
|
+
|
22
|
+
# Fall back to original Request module logic if no version override
|
23
|
+
super
|
24
|
+
end
|
25
|
+
|
26
|
+
# Fields-specific API version
|
27
|
+
def fields_api_version
|
28
|
+
@fields_version || api_version
|
29
|
+
end
|
30
|
+
|
13
31
|
def fields
|
14
32
|
url = fields_url || "#{class_name.downcase}Fields"
|
15
33
|
|
@@ -18,7 +36,7 @@ module Pipedrive
|
|
18
36
|
request_more_fields = true
|
19
37
|
|
20
38
|
while request_more_fields
|
21
|
-
response =
|
39
|
+
response = fields_request(:get, url, start: start)
|
22
40
|
data.concat(response.dig(:data))
|
23
41
|
# Check wether there are more fields to bring
|
24
42
|
metadata = response.dig(:additional_data, :pagination)
|
@@ -40,6 +58,20 @@ module Pipedrive
|
|
40
58
|
end
|
41
59
|
[dicc, data]
|
42
60
|
end
|
61
|
+
|
62
|
+
# Fields-specific request method that uses fields_api_version
|
63
|
+
private def fields_request(method, url, params = {})
|
64
|
+
# Temporarily override the api_version for this request
|
65
|
+
original_version = @version
|
66
|
+
@version = @fields_version if @fields_version
|
67
|
+
|
68
|
+
begin
|
69
|
+
request(method, url, params)
|
70
|
+
ensure
|
71
|
+
# Restore original version
|
72
|
+
@version = original_version
|
73
|
+
end
|
74
|
+
end
|
43
75
|
end
|
44
76
|
|
45
77
|
def fields
|
@@ -3,6 +3,11 @@
|
|
3
3
|
module Pipedrive
|
4
4
|
class Activity < Resource
|
5
5
|
include Fields
|
6
|
+
|
7
|
+
# fields are only available in v1
|
8
|
+
# https://developers.pipedrive.com/docs/api/v1/ActivityFields#getActivityFields
|
9
|
+
use_fields_version :v1
|
10
|
+
|
6
11
|
self.resources_url = "activities"
|
7
12
|
|
8
13
|
def self.supports_v2_api?
|
data/lib/pipedrive/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipedrive-connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Get on Board
|
8
|
+
autorequire:
|
8
9
|
bindir: exe
|
9
10
|
cert_chain: []
|
10
|
-
date: 2025-
|
11
|
+
date: 2025-08-06 00:00:00.000000000 Z
|
11
12
|
dependencies:
|
12
13
|
- !ruby/object:Gem::Dependency
|
13
14
|
name: faraday
|
@@ -23,6 +24,7 @@ dependencies:
|
|
23
24
|
- - "<"
|
24
25
|
- !ruby/object:Gem::Version
|
25
26
|
version: '3'
|
27
|
+
description:
|
26
28
|
email: team@getonbrd.com
|
27
29
|
executables: []
|
28
30
|
extensions: []
|
@@ -86,6 +88,7 @@ metadata:
|
|
86
88
|
source_code_uri: https://github.com/getonbrd/pipedrive-connect
|
87
89
|
changelog_uri: https://github.com/getonbrd/pipedrive-connect/CHANGELOG.md
|
88
90
|
rubygems_mfa_required: 'true'
|
91
|
+
post_install_message:
|
89
92
|
rdoc_options: []
|
90
93
|
require_paths:
|
91
94
|
- lib
|
@@ -100,7 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
103
|
- !ruby/object:Gem::Version
|
101
104
|
version: '0'
|
102
105
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
106
|
+
rubygems_version: 3.5.21
|
107
|
+
signing_key:
|
104
108
|
specification_version: 4
|
105
109
|
summary: Ruby binding for the pipedrive API.
|
106
110
|
test_files: []
|