hubspot-api-client 16.3.0 → 16.4.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 +6 -1
- data/Gemfile.lock +1 -1
- data/lib/hubspot/codegen/crm/properties/models/property.rb +14 -4
- data/lib/hubspot/codegen/crm/properties/models/property_create.rb +38 -8
- data/lib/hubspot/codegen/crm/properties/models/property_update.rb +18 -8
- data/lib/hubspot/helpers/get_all_helper.rb +2 -1
- data/lib/hubspot/version.rb +1 -1
- 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: 52e4c8fb1abbce80746a0ba2d1a512e7f2402f42ddfa4330ed8a334e9798e6bc
|
4
|
+
data.tar.gz: 79f9c68a85531802bf73e1c9cf50095a4561ced51194882d5c57588d2470ca72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0d326e50bdddb2939422730caef3e4dc3036db7bdd2230c30f5c05e43f7f817506440e50f2da437ea8b09ef9b7e83ae10db6775a5830405ec8187e2626917a1
|
7
|
+
data.tar.gz: de8e1f260e0a1405608eeaab382c8b5b67c7e8d2a6a804c111b4bfdc71019ed56cd87925c507f9abf8b8ea7aced0bdb6d9ca96fa6c0e78b74a3a0100d7432a8a
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
-
## [Unreleased](https://github.com/HubSpot/hubspot-api-ruby/compare/v16.
|
8
|
+
## [Unreleased](https://github.com/HubSpot/hubspot-api-ruby/compare/v16.4.0...HEAD)
|
9
|
+
|
10
|
+
## [16.4.0] - 2023-03-02
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- Update models for `crm.properties` API client
|
9
14
|
|
10
15
|
## [16.3.0] - 2023-02-21
|
11
16
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -83,6 +83,9 @@ module Hubspot
|
|
83
83
|
# Whether or not the property can be used in a HubSpot form.
|
84
84
|
attr_accessor :form_field
|
85
85
|
|
86
|
+
# Represents a formula that is used to compute a calculated property.
|
87
|
+
attr_accessor :calculation_formula
|
88
|
+
|
86
89
|
# Attribute mapping from ruby-style variable name to JSON key.
|
87
90
|
def self.attribute_map
|
88
91
|
{
|
@@ -108,7 +111,8 @@ module Hubspot
|
|
108
111
|
:'hubspot_defined' => :'hubspotDefined',
|
109
112
|
:'show_currency_symbol' => :'showCurrencySymbol',
|
110
113
|
:'modification_metadata' => :'modificationMetadata',
|
111
|
-
:'form_field' => :'formField'
|
114
|
+
:'form_field' => :'formField',
|
115
|
+
:'calculation_formula' => :'calculationFormula'
|
112
116
|
}
|
113
117
|
end
|
114
118
|
|
@@ -142,7 +146,8 @@ module Hubspot
|
|
142
146
|
:'hubspot_defined' => :'Boolean',
|
143
147
|
:'show_currency_symbol' => :'Boolean',
|
144
148
|
:'modification_metadata' => :'PropertyModificationMetadata',
|
145
|
-
:'form_field' => :'Boolean'
|
149
|
+
:'form_field' => :'Boolean',
|
150
|
+
:'calculation_formula' => :'String'
|
146
151
|
}
|
147
152
|
end
|
148
153
|
|
@@ -260,6 +265,10 @@ module Hubspot
|
|
260
265
|
if attributes.key?(:'form_field')
|
261
266
|
self.form_field = attributes[:'form_field']
|
262
267
|
end
|
268
|
+
|
269
|
+
if attributes.key?(:'calculation_formula')
|
270
|
+
self.calculation_formula = attributes[:'calculation_formula']
|
271
|
+
end
|
263
272
|
end
|
264
273
|
|
265
274
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -337,7 +346,8 @@ module Hubspot
|
|
337
346
|
hubspot_defined == o.hubspot_defined &&
|
338
347
|
show_currency_symbol == o.show_currency_symbol &&
|
339
348
|
modification_metadata == o.modification_metadata &&
|
340
|
-
form_field == o.form_field
|
349
|
+
form_field == o.form_field &&
|
350
|
+
calculation_formula == o.calculation_formula
|
341
351
|
end
|
342
352
|
|
343
353
|
# @see the `==` method
|
@@ -349,7 +359,7 @@ module Hubspot
|
|
349
359
|
# Calculates hash code according to all attributes.
|
350
360
|
# @return [Integer] Hash code
|
351
361
|
def hash
|
352
|
-
[updated_at, created_at, archived_at, name, label, type, field_type, description, group_name, options, created_user_id, updated_user_id, referenced_object_type, display_order, calculated, external_options, archived, has_unique_value, hidden, hubspot_defined, show_currency_symbol, modification_metadata, form_field].hash
|
362
|
+
[updated_at, created_at, archived_at, name, label, type, field_type, description, group_name, options, created_user_id, updated_user_id, referenced_object_type, display_order, calculated, external_options, archived, has_unique_value, hidden, hubspot_defined, show_currency_symbol, modification_metadata, form_field, calculation_formula].hash
|
353
363
|
end
|
354
364
|
|
355
365
|
# Builds the object from hash
|
@@ -50,6 +50,15 @@ module Hubspot
|
|
50
50
|
# Whether or not the property can be used in a HubSpot form.
|
51
51
|
attr_accessor :form_field
|
52
52
|
|
53
|
+
# Applicable only for 'enumeration' type properties. Should be set to true in conjunction with a 'referencedObjectType' of 'OWNER'. Otherwise false.
|
54
|
+
attr_accessor :external_options
|
55
|
+
|
56
|
+
# Should be set to 'OWNER' when 'externalOptions' is true, which causes the property to dynamically pull option values from the current HubSpot users.
|
57
|
+
attr_accessor :referenced_object_type
|
58
|
+
|
59
|
+
# Represents a formula that is used to compute a calculated property.
|
60
|
+
attr_accessor :calculation_formula
|
61
|
+
|
53
62
|
class EnumAttributeValidator
|
54
63
|
attr_reader :datatype
|
55
64
|
attr_reader :allowable_values
|
@@ -85,7 +94,10 @@ module Hubspot
|
|
85
94
|
:'display_order' => :'displayOrder',
|
86
95
|
:'has_unique_value' => :'hasUniqueValue',
|
87
96
|
:'hidden' => :'hidden',
|
88
|
-
:'form_field' => :'formField'
|
97
|
+
:'form_field' => :'formField',
|
98
|
+
:'external_options' => :'externalOptions',
|
99
|
+
:'referenced_object_type' => :'referencedObjectType',
|
100
|
+
:'calculation_formula' => :'calculationFormula'
|
89
101
|
}
|
90
102
|
end
|
91
103
|
|
@@ -107,7 +119,10 @@ module Hubspot
|
|
107
119
|
:'display_order' => :'Integer',
|
108
120
|
:'has_unique_value' => :'Boolean',
|
109
121
|
:'hidden' => :'Boolean',
|
110
|
-
:'form_field' => :'Boolean'
|
122
|
+
:'form_field' => :'Boolean',
|
123
|
+
:'external_options' => :'Boolean',
|
124
|
+
:'referenced_object_type' => :'String',
|
125
|
+
:'calculation_formula' => :'String'
|
111
126
|
}
|
112
127
|
end
|
113
128
|
|
@@ -177,6 +192,18 @@ module Hubspot
|
|
177
192
|
if attributes.key?(:'form_field')
|
178
193
|
self.form_field = attributes[:'form_field']
|
179
194
|
end
|
195
|
+
|
196
|
+
if attributes.key?(:'external_options')
|
197
|
+
self.external_options = attributes[:'external_options']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.key?(:'referenced_object_type')
|
201
|
+
self.referenced_object_type = attributes[:'referenced_object_type']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.key?(:'calculation_formula')
|
205
|
+
self.calculation_formula = attributes[:'calculation_formula']
|
206
|
+
end
|
180
207
|
end
|
181
208
|
|
182
209
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -212,10 +239,10 @@ module Hubspot
|
|
212
239
|
return false if @name.nil?
|
213
240
|
return false if @label.nil?
|
214
241
|
return false if @type.nil?
|
215
|
-
type_validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration"])
|
242
|
+
type_validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration", "bool"])
|
216
243
|
return false unless type_validator.valid?(@type)
|
217
244
|
return false if @field_type.nil?
|
218
|
-
field_type_validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox"])
|
245
|
+
field_type_validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox", "calculation_equation"])
|
219
246
|
return false unless field_type_validator.valid?(@field_type)
|
220
247
|
return false if @group_name.nil?
|
221
248
|
true
|
@@ -224,7 +251,7 @@ module Hubspot
|
|
224
251
|
# Custom attribute writer method checking allowed values (enum).
|
225
252
|
# @param [Object] type Object to be assigned
|
226
253
|
def type=(type)
|
227
|
-
validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration"])
|
254
|
+
validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration", "bool"])
|
228
255
|
unless validator.valid?(type)
|
229
256
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
230
257
|
end
|
@@ -234,7 +261,7 @@ module Hubspot
|
|
234
261
|
# Custom attribute writer method checking allowed values (enum).
|
235
262
|
# @param [Object] field_type Object to be assigned
|
236
263
|
def field_type=(field_type)
|
237
|
-
validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox"])
|
264
|
+
validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox", "calculation_equation"])
|
238
265
|
unless validator.valid?(field_type)
|
239
266
|
fail ArgumentError, "invalid value for \"field_type\", must be one of #{validator.allowable_values}."
|
240
267
|
end
|
@@ -256,7 +283,10 @@ module Hubspot
|
|
256
283
|
display_order == o.display_order &&
|
257
284
|
has_unique_value == o.has_unique_value &&
|
258
285
|
hidden == o.hidden &&
|
259
|
-
form_field == o.form_field
|
286
|
+
form_field == o.form_field &&
|
287
|
+
external_options == o.external_options &&
|
288
|
+
referenced_object_type == o.referenced_object_type &&
|
289
|
+
calculation_formula == o.calculation_formula
|
260
290
|
end
|
261
291
|
|
262
292
|
# @see the `==` method
|
@@ -268,7 +298,7 @@ module Hubspot
|
|
268
298
|
# Calculates hash code according to all attributes.
|
269
299
|
# @return [Integer] Hash code
|
270
300
|
def hash
|
271
|
-
[name, label, type, field_type, group_name, description, options, display_order, has_unique_value, hidden, form_field].hash
|
301
|
+
[name, label, type, field_type, group_name, description, options, display_order, has_unique_value, hidden, form_field, external_options, referenced_object_type, calculation_formula].hash
|
272
302
|
end
|
273
303
|
|
274
304
|
# Builds the object from hash
|
@@ -44,6 +44,9 @@ module Hubspot
|
|
44
44
|
# Whether or not the property can be used in a HubSpot form.
|
45
45
|
attr_accessor :form_field
|
46
46
|
|
47
|
+
# Represents a formula that is used to compute a calculated property.
|
48
|
+
attr_accessor :calculation_formula
|
49
|
+
|
47
50
|
class EnumAttributeValidator
|
48
51
|
attr_reader :datatype
|
49
52
|
attr_reader :allowable_values
|
@@ -77,7 +80,8 @@ module Hubspot
|
|
77
80
|
:'options' => :'options',
|
78
81
|
:'display_order' => :'displayOrder',
|
79
82
|
:'hidden' => :'hidden',
|
80
|
-
:'form_field' => :'formField'
|
83
|
+
:'form_field' => :'formField',
|
84
|
+
:'calculation_formula' => :'calculationFormula'
|
81
85
|
}
|
82
86
|
end
|
83
87
|
|
@@ -97,7 +101,8 @@ module Hubspot
|
|
97
101
|
:'options' => :'Array<OptionInput>',
|
98
102
|
:'display_order' => :'Integer',
|
99
103
|
:'hidden' => :'Boolean',
|
100
|
-
:'form_field' => :'Boolean'
|
104
|
+
:'form_field' => :'Boolean',
|
105
|
+
:'calculation_formula' => :'String'
|
101
106
|
}
|
102
107
|
end
|
103
108
|
|
@@ -159,6 +164,10 @@ module Hubspot
|
|
159
164
|
if attributes.key?(:'form_field')
|
160
165
|
self.form_field = attributes[:'form_field']
|
161
166
|
end
|
167
|
+
|
168
|
+
if attributes.key?(:'calculation_formula')
|
169
|
+
self.calculation_formula = attributes[:'calculation_formula']
|
170
|
+
end
|
162
171
|
end
|
163
172
|
|
164
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -171,9 +180,9 @@ module Hubspot
|
|
171
180
|
# Check to see if the all the properties in the model are valid
|
172
181
|
# @return true if the model is valid
|
173
182
|
def valid?
|
174
|
-
type_validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration"])
|
183
|
+
type_validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration", "bool"])
|
175
184
|
return false unless type_validator.valid?(@type)
|
176
|
-
field_type_validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox"])
|
185
|
+
field_type_validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox", "calculation_equation"])
|
177
186
|
return false unless field_type_validator.valid?(@field_type)
|
178
187
|
true
|
179
188
|
end
|
@@ -181,7 +190,7 @@ module Hubspot
|
|
181
190
|
# Custom attribute writer method checking allowed values (enum).
|
182
191
|
# @param [Object] type Object to be assigned
|
183
192
|
def type=(type)
|
184
|
-
validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration"])
|
193
|
+
validator = EnumAttributeValidator.new('String', ["string", "number", "date", "datetime", "enumeration", "bool"])
|
185
194
|
unless validator.valid?(type)
|
186
195
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
187
196
|
end
|
@@ -191,7 +200,7 @@ module Hubspot
|
|
191
200
|
# Custom attribute writer method checking allowed values (enum).
|
192
201
|
# @param [Object] field_type Object to be assigned
|
193
202
|
def field_type=(field_type)
|
194
|
-
validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox"])
|
203
|
+
validator = EnumAttributeValidator.new('String', ["textarea", "text", "date", "file", "number", "select", "radio", "checkbox", "booleancheckbox", "calculation_equation"])
|
195
204
|
unless validator.valid?(field_type)
|
196
205
|
fail ArgumentError, "invalid value for \"field_type\", must be one of #{validator.allowable_values}."
|
197
206
|
end
|
@@ -211,7 +220,8 @@ module Hubspot
|
|
211
220
|
options == o.options &&
|
212
221
|
display_order == o.display_order &&
|
213
222
|
hidden == o.hidden &&
|
214
|
-
form_field == o.form_field
|
223
|
+
form_field == o.form_field &&
|
224
|
+
calculation_formula == o.calculation_formula
|
215
225
|
end
|
216
226
|
|
217
227
|
# @see the `==` method
|
@@ -223,7 +233,7 @@ module Hubspot
|
|
223
233
|
# Calculates hash code according to all attributes.
|
224
234
|
# @return [Integer] Hash code
|
225
235
|
def hash
|
226
|
-
[label, type, field_type, group_name, description, options, display_order, hidden, form_field].hash
|
236
|
+
[label, type, field_type, group_name, description, options, display_order, hidden, form_field, calculation_formula].hash
|
227
237
|
end
|
228
238
|
|
229
239
|
# Builds the object from hash
|
@@ -12,8 +12,9 @@ module Hubspot
|
|
12
12
|
def get_all(opts = {})
|
13
13
|
after = nil
|
14
14
|
objects = []
|
15
|
+
opts[:limit] ||= MAX_PAGE_SIZE
|
15
16
|
loop do
|
16
|
-
page_opts = opts.merge(
|
17
|
+
page_opts = opts.merge(after: after)
|
17
18
|
page = get_page(page_opts)
|
18
19
|
objects.concat(page.results)
|
19
20
|
break objects if page.paging.nil?
|
data/lib/hubspot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubspot-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.
|
4
|
+
version: 16.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HubSpot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02
|
11
|
+
date: 2023-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|