ruby_hubspot_api 0.1.1 → 0.1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4214bf31fd3e4041ac3c10fd4ea0faef5a1576423f79353a42fbfea0b9a11f11
4
- data.tar.gz: 960b116fc8da2c78d430c6e813ad77023c1ac3088f3a8239291ea7400f67c6d2
3
+ metadata.gz: b77e20469ffc97b7330e7a163ee5ed4d43b1bef4a17ee7a1eb38663157d3faab
4
+ data.tar.gz: 52088790ea4ccea816e0b2efc0846331dcffbc29fd0d01c80e16baa9dbafb331
5
5
  SHA512:
6
- metadata.gz: 681a2908baea00ce5c4ff396f85442f90d4c760cca8560106f259628e49b00fc5d61901f6ac44cf3864a78f3f58af26fcf4d38f423a10eda065e570e0f741f7d
7
- data.tar.gz: d94bb5b7cd68317293ffe312e92fd1d4a352c215fdda61f251827b858d80924d716f99edafac09b628ad344b37654c1c477de146f6cc36bd7e6883005be22c34
6
+ metadata.gz: eab5e7e4ab612428b97b31b81c06c25562f6dd0ef89eba5f47628bb1dbc79dd84fa893c868f6515f0f2d2b435016e8ed50c897e7aa97ac66355b136c1778aea3
7
+ data.tar.gz: '08dbe5b3847885d286e7f26142e8d2925583195d1c624158d165e023cc2fc3b7cb4482eab4db459c3ecf50aae226457a3487e3fbe8242eb8c59c346c1e0132bb'
data/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
- ## v0.1.0
1
+
2
+ ## v0.1.1
2
3
 
3
4
  - initial setup
4
5
  - Setup the configuration block
@@ -41,3 +42,13 @@
41
42
  - Test that we only get the properties we ask for or the defaults
42
43
  - Flatten the properties array into a comma separated list
43
44
  - Improve the intialiser
45
+ - Update the changeling and link in gem spec
46
+ - adds the version numbers to the gemspec
47
+ - Fix dependencies
48
+ - bump version
49
+
50
+ ## v0.1.0
51
+
52
+ - adds the version numbers to the gemspec
53
+ - Fix dependencies
54
+ - bump version
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_hubspot_api (0.1.0)
4
+ ruby_hubspot_api (0.1.1)
5
5
  bundler (>= 2.0)
6
6
  dotenv (>= 2.0)
7
7
  httparty (>= 0.1, < 1.0)
data/README.md CHANGED
@@ -137,14 +137,14 @@ contacts.each do |contact|
137
137
  end
138
138
 
139
139
  # Search for companies with number of employees greater than or equal to 100
140
- companies = Hubspot::Company.search(number_of_employees_gte: 100)
140
+ companies = Hubspot::Company.search(query: { number_of_employees_gte: 100 })
141
141
 
142
142
  companies.each do |company|
143
143
  puts "Found: #{company.name}, Employees: #{company.number_of_employees}"
144
144
  end
145
145
 
146
146
  # Search for contacts with email in a specific list (IN operator)
147
- contacts = Hubspot::Contact.search(email_in: ['user1@example.com', 'user2@example.com'])
147
+ contacts = Hubspot::Contact.search(query: { email_in: ['user1@example.com', 'user2@example.com'] })
148
148
 
149
149
  contacts.each do |contact|
150
150
  puts "Found: #{contact.email}"
@@ -134,12 +134,10 @@ module Hubspot
134
134
  filter_groups = [{ filters: [] }]
135
135
 
136
136
  filters.each do |key, value|
137
- property_name, operator = extract_property_and_operator(key)
138
- filter_groups.first[:filters] << {
139
- propertyName: property_name,
140
- operator: operator,
141
- value: value
142
- }
137
+ filter = extract_property_and_operator(key)
138
+ value_key = value.is_a?(Array) ? :values : :value
139
+ filter[value_key] = value
140
+ filter_groups.first[:filters] << filter
143
141
  end
144
142
 
145
143
  filter_groups
@@ -148,11 +146,16 @@ module Hubspot
148
146
  # Extract property name and operator from the key
149
147
  def extract_property_and_operator(key)
150
148
  OPERATOR_MAP.each do |suffix, hubspot_operator|
151
- return [key.to_s.sub(suffix, ''), hubspot_operator] if key.to_s.end_with?(suffix)
149
+ if key.to_s.end_with?(suffix)
150
+ return {
151
+ propertyName: key.to_s.sub(suffix, ''),
152
+ operator: hubspot_operator
153
+ }
154
+ end
152
155
  end
153
156
 
154
157
  # Default to 'EQ' operator if no suffix is found
155
- [key.to_s, 'EQ']
158
+ { propertyName: key.to_s, operator: 'EQ' }
156
159
  end
157
160
  end
158
161
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hubspot
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2.1'
5
5
  end
@@ -40,14 +40,14 @@ Gem::Specification.new do |spec|
40
40
  # Define development dependencies
41
41
  spec.add_development_dependency 'rake', '>= 11.0', '< 14.0'
42
42
 
43
- spec.add_dependency 'bundler', '>= 2.0'
44
- spec.add_dependency 'dotenv', '>= 2.0'
45
- spec.add_dependency 'pry', '>= 0.1'
46
- spec.add_dependency 'pry-byebug', '>= 3.0'
47
- spec.add_dependency 'rspec', '>= 3.0'
48
- spec.add_dependency 'simplecov', '>= 0.22', '< 1.0'
49
- spec.add_dependency 'vcr', '>= 6.0'
50
- spec.add_dependency 'webmock', '>= 3.0'
43
+ spec.add_development_dependency 'bundler', '>= 2.0'
44
+ spec.add_development_dependency 'dotenv', '>= 2.0'
45
+ spec.add_development_dependency 'pry', '>= 0.1'
46
+ spec.add_development_dependency 'pry-byebug', '>= 3.0'
47
+ spec.add_development_dependency 'rspec', '>= 3.0'
48
+ spec.add_development_dependency 'simplecov', '>= 0.22', '< 1.0'
49
+ spec.add_development_dependency 'vcr', '>= 6.0'
50
+ spec.add_development_dependency 'webmock', '>= 3.0'
51
51
 
52
52
  # Define runtime dependencies
53
53
  spec.add_runtime_dependency 'httparty', '>= 0.1', '< 1.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_hubspot_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Brook
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-24 00:00:00.000000000 Z
11
+ date: 2024-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -37,7 +37,7 @@ dependencies:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '2.0'
40
- type: :runtime
40
+ type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
@@ -51,7 +51,7 @@ dependencies:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: '2.0'
54
- type: :runtime
54
+ type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
@@ -65,7 +65,7 @@ dependencies:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0.1'
68
- type: :runtime
68
+ type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
@@ -79,7 +79,7 @@ dependencies:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '3.0'
82
- type: :runtime
82
+ type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
@@ -93,7 +93,7 @@ dependencies:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: '3.0'
96
- type: :runtime
96
+ type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
@@ -110,7 +110,7 @@ dependencies:
110
110
  - - "<"
111
111
  - !ruby/object:Gem::Version
112
112
  version: '1.0'
113
- type: :runtime
113
+ type: :development
114
114
  prerelease: false
115
115
  version_requirements: !ruby/object:Gem::Requirement
116
116
  requirements:
@@ -127,7 +127,7 @@ dependencies:
127
127
  - - ">="
128
128
  - !ruby/object:Gem::Version
129
129
  version: '6.0'
130
- type: :runtime
130
+ type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
@@ -141,7 +141,7 @@ dependencies:
141
141
  - - ">="
142
142
  - !ruby/object:Gem::Version
143
143
  version: '3.0'
144
- type: :runtime
144
+ type: :development
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements: