hubspot-api-client 20.0.0.pre.beta.1 → 20.0.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.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -1
  3. data/Gemfile.lock +2 -2
  4. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +91 -22
  5. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +25 -17
  6. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +4 -0
  7. data/lib/hubspot/codegen/crm/companies/models/association_spec.rb +12 -0
  8. data/lib/hubspot/codegen/crm/companies/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  9. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +1 -0
  10. data/lib/hubspot/codegen/crm/companies/models/public_associations_for_object.rb +10 -0
  11. data/lib/hubspot/codegen/crm/companies/models/public_merge_input.rb +2 -0
  12. data/lib/hubspot/codegen/crm/companies/models/public_object_id.rb +6 -0
  13. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +10 -1
  14. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +4 -0
  15. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_for_create.rb +250 -0
  16. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_upsert.rb +4 -0
  17. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +2 -10
  18. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input_for_create.rb +2 -10
  19. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +10 -1
  20. data/lib/hubspot/codegen/crm/companies/models/simple_public_upsert_object.rb +10 -1
  21. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +163 -26
  22. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +27 -19
  23. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +4 -0
  24. data/lib/hubspot/codegen/crm/contacts/models/association_spec.rb +10 -0
  25. data/lib/hubspot/codegen/crm/contacts/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  26. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +1 -0
  27. data/lib/hubspot/codegen/crm/contacts/models/public_associations_for_object.rb +10 -0
  28. data/lib/hubspot/codegen/crm/contacts/models/public_gdpr_delete_input.rb +2 -0
  29. data/lib/hubspot/codegen/crm/contacts/models/public_object_id.rb +5 -0
  30. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +10 -1
  31. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +2 -0
  32. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_for_create.rb +250 -0
  33. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_upsert.rb +1 -0
  34. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input.rb +1 -10
  35. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input_for_create.rb +1 -10
  36. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +13 -1
  37. data/lib/hubspot/codegen/crm/contacts/models/simple_public_upsert_object.rb +10 -1
  38. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +67 -0
  39. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +11 -9
  40. data/lib/hubspot/codegen/crm/deals/models/association_spec.rb +10 -0
  41. data/lib/hubspot/codegen/crm/deals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  42. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +1 -0
  43. data/lib/hubspot/codegen/crm/deals/models/public_associations_for_object.rb +10 -0
  44. data/lib/hubspot/codegen/crm/deals/models/public_object_id.rb +5 -0
  45. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +10 -1
  46. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +2 -0
  47. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_for_create.rb +250 -0
  48. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_upsert.rb +1 -0
  49. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input.rb +1 -10
  50. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input_for_create.rb +1 -10
  51. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +10 -1
  52. data/lib/hubspot/codegen/crm/deals/models/simple_public_upsert_object.rb +10 -1
  53. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +3 -2
  54. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +2 -0
  55. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +1 -0
  56. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +10 -1
  57. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +10 -1
  58. data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +1 -0
  59. data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +11 -9
  60. data/lib/hubspot/codegen/crm/objects/goals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  61. data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +1 -0
  62. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +10 -1
  63. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +2 -0
  64. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_for_create.rb +252 -0
  65. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_upsert.rb +1 -0
  66. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +1 -10
  67. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +1 -15
  68. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +10 -1
  69. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_upsert_object.rb +10 -1
  70. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +5 -4
  71. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +11 -9
  72. data/lib/hubspot/codegen/crm/products/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  73. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +1 -1
  74. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +10 -1
  75. data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input_for_create.rb +250 -0
  76. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -10
  77. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input_for_create.rb +6 -10
  78. data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +10 -1
  79. data/lib/hubspot/codegen/crm/products/models/simple_public_upsert_object.rb +10 -1
  80. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +73 -4
  81. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +17 -9
  82. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +4 -0
  83. data/lib/hubspot/codegen/crm/tickets/models/association_spec.rb +10 -0
  84. data/lib/hubspot/codegen/crm/tickets/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  85. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +1 -0
  86. data/lib/hubspot/codegen/crm/tickets/models/public_associations_for_object.rb +10 -0
  87. data/lib/hubspot/codegen/crm/tickets/models/public_object_id.rb +5 -0
  88. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +10 -1
  89. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +2 -0
  90. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_for_create.rb +250 -0
  91. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_upsert.rb +1 -0
  92. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input.rb +1 -10
  93. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input_for_create.rb +1 -10
  94. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +10 -1
  95. data/lib/hubspot/codegen/crm/tickets/models/simple_public_upsert_object.rb +10 -1
  96. data/lib/hubspot/codegen/files/api/files_api.rb +144 -104
  97. data/lib/hubspot/codegen/files/api/folders_api.rb +142 -57
  98. data/lib/hubspot/codegen/files/api_client.rb +1 -1
  99. data/lib/hubspot/codegen/files/api_error.rb +1 -1
  100. data/lib/hubspot/codegen/files/configuration.rb +1 -1
  101. data/lib/hubspot/codegen/files/models/collection_response_file.rb +2 -1
  102. data/lib/hubspot/codegen/files/models/collection_response_folder.rb +1 -1
  103. data/lib/hubspot/codegen/files/models/error.rb +1 -1
  104. data/lib/hubspot/codegen/files/models/error_detail.rb +1 -1
  105. data/lib/hubspot/codegen/files/models/file.rb +33 -14
  106. data/lib/hubspot/codegen/files/models/file_action_response.rb +1 -1
  107. data/lib/hubspot/codegen/files/models/file_stat.rb +1 -1
  108. data/lib/hubspot/codegen/files/models/file_update_input.rb +15 -5
  109. data/lib/hubspot/codegen/files/models/folder.rb +12 -12
  110. data/lib/hubspot/codegen/files/models/folder_action_response.rb +1 -1
  111. data/lib/hubspot/codegen/files/models/folder_input.rb +2 -1
  112. data/lib/hubspot/codegen/files/models/folder_update_input.rb +6 -20
  113. data/lib/hubspot/codegen/files/models/folder_update_input_with_id.rb +244 -0
  114. data/lib/hubspot/codegen/files/models/folder_update_task_locator.rb +2 -1
  115. data/lib/hubspot/codegen/files/models/import_from_url_input.rb +13 -4
  116. data/lib/hubspot/codegen/files/models/import_from_url_task_locator.rb +2 -1
  117. data/lib/hubspot/codegen/files/models/next_page.rb +1 -1
  118. data/lib/hubspot/codegen/files/models/paging.rb +1 -1
  119. data/lib/hubspot/codegen/files/models/previous_page.rb +1 -1
  120. data/lib/hubspot/codegen/files/models/signed_url.rb +18 -17
  121. data/lib/hubspot/codegen/files/models/standard_error.rb +1 -1
  122. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +7 -3
  123. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +13 -5
  124. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +5 -1
  125. data/lib/hubspot/codegen/oauth/api_client.rb +2 -2
  126. data/lib/hubspot/codegen/oauth/api_error.rb +1 -1
  127. data/lib/hubspot/codegen/oauth/configuration.rb +1 -1
  128. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +4 -4
  129. data/lib/hubspot/codegen/oauth/models/error.rb +4 -4
  130. data/lib/hubspot/codegen/oauth/models/error_detail.rb +4 -4
  131. data/lib/hubspot/codegen/oauth/models/refresh_token_info_response.rb +4 -4
  132. data/lib/hubspot/codegen/oauth/models/token_response_if.rb +4 -4
  133. data/lib/hubspot/discovery/cms/client.rb +0 -1
  134. data/lib/hubspot/discovery/crm/companies/client.rb +0 -1
  135. data/lib/hubspot/discovery/crm/contacts/client.rb +0 -2
  136. data/lib/hubspot/discovery/crm/deals/client.rb +0 -1
  137. data/lib/hubspot/discovery/crm/tickets/client.rb +0 -1
  138. data/lib/hubspot/discovery/oauth/api/access_tokens_api.rb +1 -1
  139. data/lib/hubspot/discovery/oauth/api/refresh_tokens_api.rb +1 -1
  140. data/lib/hubspot/discovery/oauth/api/tokens_api.rb +1 -1
  141. data/lib/hubspot/discovery/oauth/client.rb +1 -1
  142. data/lib/hubspot/helpers/camel_case.rb +0 -4
  143. data/lib/hubspot/version.rb +1 -1
  144. data/spec/discovery/cms/client_spec.rb +0 -1
  145. data/spec/discovery/crm/companies/basic_api_spec.rb +1 -0
  146. data/spec/discovery/crm/contacts/basic_api_spec.rb +1 -0
  147. data/spec/discovery/crm/deals/basic_api_spec.rb +1 -0
  148. data/spec/discovery/crm/tickets/basic_api_spec.rb +1 -0
  149. data/spec/discovery/files/files_api_spec.rb +2 -1
  150. data/spec/discovery/files/folders_api_spec.rb +1 -0
  151. data/spec/discovery/oauth/access_tokens_api_spec.rb +1 -1
  152. data/spec/discovery/oauth/refresh_tokens_api_spec.rb +1 -1
  153. data/spec/discovery/oauth/tokens_api_spec.rb +1 -1
  154. metadata +17 -42
  155. data/lib/hubspot/codegen/cms/performance/api/public_performance_api.rb +0 -188
  156. data/lib/hubspot/codegen/cms/performance/api_client.rb +0 -410
  157. data/lib/hubspot/codegen/cms/performance/api_error.rb +0 -61
  158. data/lib/hubspot/codegen/cms/performance/configuration.rb +0 -287
  159. data/lib/hubspot/codegen/cms/performance/models/error.rb +0 -305
  160. data/lib/hubspot/codegen/cms/performance/models/error_detail.rb +0 -271
  161. data/lib/hubspot/codegen/cms/performance/models/performance_view.rb +0 -526
  162. data/lib/hubspot/codegen/cms/performance/models/public_performance_response.rb +0 -345
  163. data/lib/hubspot/codegen/crm/companies/api/merge_api.rb +0 -92
  164. data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +0 -94
  165. data/lib/hubspot/codegen/crm/contacts/api/merge_api.rb +0 -92
  166. data/lib/hubspot/codegen/crm/deals/api/merge_api.rb +0 -92
  167. data/lib/hubspot/codegen/crm/tickets/api/merge_api.rb +0 -92
  168. data/lib/hubspot/discovery/cms/performance/api/public_performance_api.rb +0 -13
  169. data/lib/hubspot/discovery/cms/performance/client.rb +0 -19
  170. data/lib/hubspot/discovery/crm/companies/api/merge_api.rb +0 -13
  171. data/lib/hubspot/discovery/crm/contacts/api/gdpr_api.rb +0 -13
  172. data/lib/hubspot/discovery/crm/contacts/api/merge_api.rb +0 -13
  173. data/lib/hubspot/discovery/crm/deals/api/merge_api.rb +0 -13
  174. data/lib/hubspot/discovery/crm/tickets/api/merge_api.rb +0 -13
  175. data/spec/discovery/cms/performance/public_performance_api_spec.rb +0 -8
  176. data/spec/discovery/crm/companies/merge_api_spec.rb +0 -7
  177. data/spec/discovery/crm/contacts/gdpr_api_spec.rb +0 -7
  178. data/spec/discovery/crm/contacts/merge_api_spec.rb +0 -7
  179. data/spec/discovery/crm/deals/merge_api_spec.rb +0 -7
  180. data/spec/discovery/crm/tickets/merge_api_spec.rb +0 -7
@@ -1,345 +0,0 @@
1
- =begin
2
- #CMS Performance
3
-
4
- #Use these endpoints to get a time series view of your website's performance.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.2.1
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Hubspot
17
- module Cms
18
- module Performance
19
- class PublicPerformanceResponse
20
- attr_accessor :path
21
-
22
- attr_accessor :period
23
-
24
- attr_accessor :start_interval
25
-
26
- attr_accessor :data
27
-
28
- attr_accessor :domain
29
-
30
- attr_accessor :interval
31
-
32
- attr_accessor :end_interval
33
-
34
- class EnumAttributeValidator
35
- attr_reader :datatype
36
- attr_reader :allowable_values
37
-
38
- def initialize(datatype, allowable_values)
39
- @allowable_values = allowable_values.map do |value|
40
- case datatype.to_s
41
- when /Integer/i
42
- value.to_i
43
- when /Float/i
44
- value.to_f
45
- else
46
- value
47
- end
48
- end
49
- end
50
-
51
- def valid?(value)
52
- !value || allowable_values.include?(value)
53
- end
54
- end
55
-
56
- # Attribute mapping from ruby-style variable name to JSON key.
57
- def self.attribute_map
58
- {
59
- :'path' => :'path',
60
- :'period' => :'period',
61
- :'start_interval' => :'startInterval',
62
- :'data' => :'data',
63
- :'domain' => :'domain',
64
- :'interval' => :'interval',
65
- :'end_interval' => :'endInterval'
66
- }
67
- end
68
-
69
- # Returns all the JSON keys this model knows about
70
- def self.acceptable_attributes
71
- attribute_map.values
72
- end
73
-
74
- # Attribute type mapping.
75
- def self.openapi_types
76
- {
77
- :'path' => :'String',
78
- :'period' => :'String',
79
- :'start_interval' => :'Integer',
80
- :'data' => :'Array<PerformanceView>',
81
- :'domain' => :'String',
82
- :'interval' => :'String',
83
- :'end_interval' => :'Integer'
84
- }
85
- end
86
-
87
- # List of attributes with nullable: true
88
- def self.openapi_nullable
89
- Set.new([
90
- ])
91
- end
92
-
93
- # Initializes the object
94
- # @param [Hash] attributes Model attributes in the form of hash
95
- def initialize(attributes = {})
96
- if (!attributes.is_a?(Hash))
97
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::Performance::PublicPerformanceResponse` initialize method"
98
- end
99
-
100
- # check to see if the attribute exists and convert string to symbol for hash key
101
- attributes = attributes.each_with_object({}) { |(k, v), h|
102
- if (!self.class.attribute_map.key?(k.to_sym))
103
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::Performance::PublicPerformanceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
104
- end
105
- h[k.to_sym] = v
106
- }
107
-
108
- if attributes.key?(:'path')
109
- self.path = attributes[:'path']
110
- end
111
-
112
- if attributes.key?(:'period')
113
- self.period = attributes[:'period']
114
- end
115
-
116
- if attributes.key?(:'start_interval')
117
- self.start_interval = attributes[:'start_interval']
118
- end
119
-
120
- if attributes.key?(:'data')
121
- if (value = attributes[:'data']).is_a?(Array)
122
- self.data = value
123
- end
124
- end
125
-
126
- if attributes.key?(:'domain')
127
- self.domain = attributes[:'domain']
128
- end
129
-
130
- if attributes.key?(:'interval')
131
- self.interval = attributes[:'interval']
132
- end
133
-
134
- if attributes.key?(:'end_interval')
135
- self.end_interval = attributes[:'end_interval']
136
- end
137
- end
138
-
139
- # Show invalid properties with the reasons. Usually used together with valid?
140
- # @return Array for valid properties with the reasons
141
- def list_invalid_properties
142
- invalid_properties = Array.new
143
- if @start_interval.nil?
144
- invalid_properties.push('invalid value for "start_interval", start_interval cannot be nil.')
145
- end
146
-
147
- if @data.nil?
148
- invalid_properties.push('invalid value for "data", data cannot be nil.')
149
- end
150
-
151
- if @interval.nil?
152
- invalid_properties.push('invalid value for "interval", interval cannot be nil.')
153
- end
154
-
155
- if @end_interval.nil?
156
- invalid_properties.push('invalid value for "end_interval", end_interval cannot be nil.')
157
- end
158
-
159
- invalid_properties
160
- end
161
-
162
- # Check to see if the all the properties in the model are valid
163
- # @return true if the model is valid
164
- def valid?
165
- period_validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
166
- return false unless period_validator.valid?(@period)
167
- return false if @start_interval.nil?
168
- return false if @data.nil?
169
- return false if @interval.nil?
170
- interval_validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
171
- return false unless interval_validator.valid?(@interval)
172
- return false if @end_interval.nil?
173
- true
174
- end
175
-
176
- # Custom attribute writer method checking allowed values (enum).
177
- # @param [Object] period Object to be assigned
178
- def period=(period)
179
- validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
180
- unless validator.valid?(period)
181
- fail ArgumentError, "invalid value for \"period\", must be one of #{validator.allowable_values}."
182
- end
183
- @period = period
184
- end
185
-
186
- # Custom attribute writer method checking allowed values (enum).
187
- # @param [Object] interval Object to be assigned
188
- def interval=(interval)
189
- validator = EnumAttributeValidator.new('String', ["ONE_MINUTE", "FIVE_MINUTES", "TEN_MINUTES", "FIFTEEN_MINUTES", "THIRTY_MINUTES", "ONE_HOUR", "FOUR_HOURS", "TWELVE_HOURS", "ONE_DAY", "ONE_WEEK"])
190
- unless validator.valid?(interval)
191
- fail ArgumentError, "invalid value for \"interval\", must be one of #{validator.allowable_values}."
192
- end
193
- @interval = interval
194
- end
195
-
196
- # Checks equality by comparing each attribute.
197
- # @param [Object] Object to be compared
198
- def ==(o)
199
- return true if self.equal?(o)
200
- self.class == o.class &&
201
- path == o.path &&
202
- period == o.period &&
203
- start_interval == o.start_interval &&
204
- data == o.data &&
205
- domain == o.domain &&
206
- interval == o.interval &&
207
- end_interval == o.end_interval
208
- end
209
-
210
- # @see the `==` method
211
- # @param [Object] Object to be compared
212
- def eql?(o)
213
- self == o
214
- end
215
-
216
- # Calculates hash code according to all attributes.
217
- # @return [Integer] Hash code
218
- def hash
219
- [path, period, start_interval, data, domain, interval, end_interval].hash
220
- end
221
-
222
- # Builds the object from hash
223
- # @param [Hash] attributes Model attributes in the form of hash
224
- # @return [Object] Returns the model itself
225
- def self.build_from_hash(attributes)
226
- new.build_from_hash(attributes)
227
- end
228
-
229
- # Builds the object from hash
230
- # @param [Hash] attributes Model attributes in the form of hash
231
- # @return [Object] Returns the model itself
232
- def build_from_hash(attributes)
233
- return nil unless attributes.is_a?(Hash)
234
- attributes = attributes.transform_keys(&:to_sym)
235
- self.class.openapi_types.each_pair do |key, type|
236
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
237
- self.send("#{key}=", nil)
238
- elsif type =~ /\AArray<(.*)>/i
239
- # check to ensure the input is an array given that the attribute
240
- # is documented as an array but the input is not
241
- if attributes[self.class.attribute_map[key]].is_a?(Array)
242
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
243
- end
244
- elsif !attributes[self.class.attribute_map[key]].nil?
245
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
246
- end
247
- end
248
-
249
- self
250
- end
251
-
252
- # Deserializes the data based on type
253
- # @param string type Data type
254
- # @param string value Value to be deserialized
255
- # @return [Object] Deserialized data
256
- def _deserialize(type, value)
257
- case type.to_sym
258
- when :Time
259
- Time.parse(value)
260
- when :Date
261
- Date.parse(value)
262
- when :String
263
- value.to_s
264
- when :Integer
265
- value.to_i
266
- when :Float
267
- value.to_f
268
- when :Boolean
269
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
270
- true
271
- else
272
- false
273
- end
274
- when :Object
275
- # generic object (usually a Hash), return directly
276
- value
277
- when /\AArray<(?<inner_type>.+)>\z/
278
- inner_type = Regexp.last_match[:inner_type]
279
- value.map { |v| _deserialize(inner_type, v) }
280
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
281
- k_type = Regexp.last_match[:k_type]
282
- v_type = Regexp.last_match[:v_type]
283
- {}.tap do |hash|
284
- value.each do |k, v|
285
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
286
- end
287
- end
288
- else # model
289
- # models (e.g. Pet) or oneOf
290
- klass = Hubspot::Cms::Performance.const_get(type)
291
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
292
- end
293
- end
294
-
295
- # Returns the string representation of the object
296
- # @return [String] String presentation of the object
297
- def to_s
298
- to_hash.to_s
299
- end
300
-
301
- # to_body is an alias to to_hash (backward compatibility)
302
- # @return [Hash] Returns the object in the form of hash
303
- def to_body
304
- to_hash
305
- end
306
-
307
- # Returns the object in the form of hash
308
- # @return [Hash] Returns the object in the form of hash
309
- def to_hash
310
- hash = {}
311
- self.class.attribute_map.each_pair do |attr, param|
312
- value = self.send(attr)
313
- if value.nil?
314
- is_nullable = self.class.openapi_nullable.include?(attr)
315
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
316
- end
317
-
318
- hash[param] = _to_hash(value)
319
- end
320
- hash
321
- end
322
-
323
- # Outputs non-array value in the form of hash
324
- # For object, use to_hash. Otherwise, just return the value
325
- # @param [Object] value Any valid value
326
- # @return [Hash] Returns the value in the form of hash
327
- def _to_hash(value)
328
- if value.is_a?(Array)
329
- value.compact.map { |v| _to_hash(v) }
330
- elsif value.is_a?(Hash)
331
- {}.tap do |hash|
332
- value.each { |k, v| hash[k] = _to_hash(v) }
333
- end
334
- elsif value.respond_to? :to_hash
335
- value.to_hash
336
- else
337
- value
338
- end
339
- end
340
-
341
- end
342
-
343
- end
344
- end
345
- end
@@ -1,92 +0,0 @@
1
- =begin
2
- #Companies
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.2.1
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Hubspot
16
- module Crm
17
- module Companies
18
- class MergeApi
19
- attr_accessor :api_client
20
-
21
- def initialize(api_client = ApiClient.default)
22
- @api_client = api_client
23
- end
24
- # Merge two companies with same type
25
- # @param public_merge_input [PublicMergeInput]
26
- # @param [Hash] opts the optional parameters
27
- # @return [SimplePublicObject]
28
- def merge(public_merge_input, opts = {})
29
- data, _status_code, _headers = merge_with_http_info(public_merge_input, opts)
30
- data
31
- end
32
-
33
- # Merge two companies with same type
34
- # @param public_merge_input [PublicMergeInput]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
37
- def merge_with_http_info(public_merge_input, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: MergeApi.merge ...'
40
- end
41
- # verify the required parameter 'public_merge_input' is set
42
- if @api_client.config.client_side_validation && public_merge_input.nil?
43
- fail ArgumentError, "Missing the required parameter 'public_merge_input' when calling MergeApi.merge"
44
- end
45
- # resource path
46
- local_var_path = '/crm/v3/objects/companies/merge'
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
55
- # HTTP header 'Content-Type'
56
- content_type = @api_client.select_header_content_type(['application/json'])
57
- if !content_type.nil?
58
- header_params['Content-Type'] = content_type
59
- end
60
-
61
- # form parameters
62
- form_params = opts[:form_params] || {}
63
-
64
- # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(public_merge_input)
66
-
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'SimplePublicObject'
69
-
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['oauth2']
72
-
73
- new_options = opts.merge(
74
- :operation => :"MergeApi.merge",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
82
-
83
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: MergeApi#merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
- end
87
- return data, status_code, headers
88
- end
89
- end
90
- end
91
- end
92
- end
@@ -1,94 +0,0 @@
1
- =begin
2
- #Contacts
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.2.1
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Hubspot
16
- module Crm
17
- module Contacts
18
- class GDPRApi
19
- attr_accessor :api_client
20
-
21
- def initialize(api_client = ApiClient.default)
22
- @api_client = api_client
23
- end
24
- # GDPR DELETE
25
- # Permanently delete a contact and all associated content to follow GDPR. Use optional property 'idProperty' set to 'email' to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future.
26
- # @param public_gdpr_delete_input [PublicGdprDeleteInput]
27
- # @param [Hash] opts the optional parameters
28
- # @return [nil]
29
- def purge(public_gdpr_delete_input, opts = {})
30
- purge_with_http_info(public_gdpr_delete_input, opts)
31
- nil
32
- end
33
-
34
- # GDPR DELETE
35
- # Permanently delete a contact and all associated content to follow GDPR. Use optional property &#39;idProperty&#39; set to &#39;email&#39; to identify contact by email address. If email address is not found, the email address will be added to a blocklist and prevent it from being used in the future.
36
- # @param public_gdpr_delete_input [PublicGdprDeleteInput]
37
- # @param [Hash] opts the optional parameters
38
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
- def purge_with_http_info(public_gdpr_delete_input, opts = {})
40
- if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: GDPRApi.purge ...'
42
- end
43
- # verify the required parameter 'public_gdpr_delete_input' is set
44
- if @api_client.config.client_side_validation && public_gdpr_delete_input.nil?
45
- fail ArgumentError, "Missing the required parameter 'public_gdpr_delete_input' when calling GDPRApi.purge"
46
- end
47
- # resource path
48
- local_var_path = '/crm/v3/objects/contacts/gdpr-delete'
49
-
50
- # query parameters
51
- query_params = opts[:query_params] || {}
52
-
53
- # header parameters
54
- header_params = opts[:header_params] || {}
55
- # HTTP header 'Accept' (if needed)
56
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
57
- # HTTP header 'Content-Type'
58
- content_type = @api_client.select_header_content_type(['application/json'])
59
- if !content_type.nil?
60
- header_params['Content-Type'] = content_type
61
- end
62
-
63
- # form parameters
64
- form_params = opts[:form_params] || {}
65
-
66
- # http body (model)
67
- post_body = opts[:debug_body] || @api_client.object_to_http_body(public_gdpr_delete_input)
68
-
69
- # return_type
70
- return_type = opts[:debug_return_type]
71
-
72
- # auth_names
73
- auth_names = opts[:debug_auth_names] || ['oauth2']
74
-
75
- new_options = opts.merge(
76
- :operation => :"GDPRApi.purge",
77
- :header_params => header_params,
78
- :query_params => query_params,
79
- :form_params => form_params,
80
- :body => post_body,
81
- :auth_names => auth_names,
82
- :return_type => return_type
83
- )
84
-
85
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
- if @api_client.config.debugging
87
- @api_client.config.logger.debug "API called: GDPRApi#purge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
- end
89
- return data, status_code, headers
90
- end
91
- end
92
- end
93
- end
94
- end
@@ -1,92 +0,0 @@
1
- =begin
2
- #Contacts
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.2.1
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Hubspot
16
- module Crm
17
- module Contacts
18
- class MergeApi
19
- attr_accessor :api_client
20
-
21
- def initialize(api_client = ApiClient.default)
22
- @api_client = api_client
23
- end
24
- # Merge two contacts with same type
25
- # @param public_merge_input [PublicMergeInput]
26
- # @param [Hash] opts the optional parameters
27
- # @return [SimplePublicObject]
28
- def merge(public_merge_input, opts = {})
29
- data, _status_code, _headers = merge_with_http_info(public_merge_input, opts)
30
- data
31
- end
32
-
33
- # Merge two contacts with same type
34
- # @param public_merge_input [PublicMergeInput]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
37
- def merge_with_http_info(public_merge_input, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: MergeApi.merge ...'
40
- end
41
- # verify the required parameter 'public_merge_input' is set
42
- if @api_client.config.client_side_validation && public_merge_input.nil?
43
- fail ArgumentError, "Missing the required parameter 'public_merge_input' when calling MergeApi.merge"
44
- end
45
- # resource path
46
- local_var_path = '/crm/v3/objects/contacts/merge'
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
55
- # HTTP header 'Content-Type'
56
- content_type = @api_client.select_header_content_type(['application/json'])
57
- if !content_type.nil?
58
- header_params['Content-Type'] = content_type
59
- end
60
-
61
- # form parameters
62
- form_params = opts[:form_params] || {}
63
-
64
- # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(public_merge_input)
66
-
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'SimplePublicObject'
69
-
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['oauth2']
72
-
73
- new_options = opts.merge(
74
- :operation => :"MergeApi.merge",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
82
-
83
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: MergeApi#merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
- end
87
- return data, status_code, headers
88
- end
89
- end
90
- end
91
- end
92
- end