hubspot-api-ruby 0.15.0 → 0.16.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/hubspot-api-ruby.gemspec +1 -1
- data/lib/hubspot/meeting.rb +7 -3
- data/spec/lib/hubspot/meeting_spec.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce2ef58e430507f2d3573dab50231ebdc9d5af9479d678d1f2a063d350e4d10f
|
4
|
+
data.tar.gz: 33fc9cbba6bdb66a30c6477a4fda5c31284cbc277993ec1ede750a20c08ab8a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '06921a719c97ddf74779098da5dfc3b7160716f96a998df6454394f0fc1261b7a7ef104f139d926921a455081f921d4ba07846612d34e3c7b74ac8a1c1358108'
|
7
|
+
data.tar.gz: 48ee5aa85a01c9e83e87d7512d4a4471489092f50fea603fcea2d7e941d3f70461e4b43f6eeb696d5971776c31f9e60eb97631516ce68e3ffbdc43877c762f97
|
data/hubspot-api-ruby.gemspec
CHANGED
data/lib/hubspot/meeting.rb
CHANGED
@@ -26,8 +26,11 @@ module Hubspot
|
|
26
26
|
}
|
27
27
|
end
|
28
28
|
|
29
|
-
def find(id)
|
30
|
-
|
29
|
+
def find(id, opts = {})
|
30
|
+
input_properties = opts[:properties].presence || []
|
31
|
+
properties = BASE_PROPERTIES | input_properties.compact
|
32
|
+
|
33
|
+
response = Hubspot::Connection.get_json(MEETING_PATH, { meeting_id: id, properties: properties.join(',') })
|
31
34
|
new(response)
|
32
35
|
end
|
33
36
|
|
@@ -36,6 +39,7 @@ module Hubspot
|
|
36
39
|
limit: opts[:limit].presence || 100,
|
37
40
|
after: opts[:after].presence
|
38
41
|
}.compact
|
42
|
+
properties = opts[:properties].presence || []
|
39
43
|
|
40
44
|
default_filters = [{ propertyName: 'associations.contact', 'operator': 'EQ', value: contact_id }]
|
41
45
|
default_sorts = [{ propertyName: "hs_lastmodifieddate", direction: "DESCENDING" }]
|
@@ -44,7 +48,7 @@ module Hubspot
|
|
44
48
|
params: {},
|
45
49
|
body: {
|
46
50
|
**params,
|
47
|
-
properties: BASE_PROPERTIES,
|
51
|
+
properties: BASE_PROPERTIES | properties.compact,
|
48
52
|
filters: (opts[:filters].presence || []) + default_filters,
|
49
53
|
sorts: opts[:sorts].presence || default_sorts
|
50
54
|
}
|
@@ -94,8 +94,10 @@ RSpec.describe Hubspot::Meeting do
|
|
94
94
|
end
|
95
95
|
end
|
96
96
|
|
97
|
-
context 'when custom filters' do
|
98
|
-
let(:
|
97
|
+
context 'when custom filters and props' do
|
98
|
+
let(:filters) { [{ propertyName: 'hs_meeting_title', 'operator': 'EQ', value: 'Hello World' }] }
|
99
|
+
let(:properties) { [:hs_timestamp] }
|
100
|
+
let(:opts) { { filters: filters, properties: properties } }
|
99
101
|
|
100
102
|
it 'retrieves meetings' do
|
101
103
|
VCR.use_cassette 'meeting_find_by_contact_custom_filters' do
|
@@ -110,6 +112,7 @@ RSpec.describe Hubspot::Meeting do
|
|
110
112
|
expect(first_meeting.properties[:hs_meeting_body]).not_to be nil
|
111
113
|
expect(first_meeting.properties[:hs_meeting_start_time]).not_to be nil
|
112
114
|
expect(first_meeting.properties[:hs_meeting_end_time]).not_to be nil
|
115
|
+
expect(first_meeting.properties[:hs_timestamp]).not_to be nil
|
113
116
|
end
|
114
117
|
end
|
115
118
|
end
|
@@ -131,6 +134,7 @@ RSpec.describe Hubspot::Meeting do
|
|
131
134
|
expect(first_meeting.properties[:hs_meeting_body]).not_to be nil
|
132
135
|
expect(first_meeting.properties[:hs_meeting_start_time]).not_to be nil
|
133
136
|
expect(first_meeting.properties[:hs_meeting_end_time]).not_to be nil
|
137
|
+
expect(first_meeting.properties[:hs_timestamp]).to be nil
|
134
138
|
end
|
135
139
|
end
|
136
140
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubspot-api-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|