hubspot-api-client 16.2.0 → 16.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/hubspot/codegen/automation/actions/models/action_function.rb +1 -0
  5. data/lib/hubspot/codegen/automation/actions/models/action_function_identifier.rb +1 -0
  6. data/lib/hubspot/codegen/automation/actions/models/action_labels.rb +1 -0
  7. data/lib/hubspot/codegen/automation/actions/models/action_revision.rb +1 -0
  8. data/lib/hubspot/codegen/automation/actions/models/callback_completion_batch_request.rb +1 -0
  9. data/lib/hubspot/codegen/automation/actions/models/callback_completion_request.rb +1 -0
  10. data/lib/hubspot/codegen/automation/actions/models/extension_action_definition.rb +1 -0
  11. data/lib/hubspot/codegen/automation/actions/models/extension_action_definition_input.rb +1 -0
  12. data/lib/hubspot/codegen/automation/actions/models/extension_action_definition_patch.rb +1 -0
  13. data/lib/hubspot/codegen/automation/actions/models/extension_action_definition_patch_input_field_dependencies_inner.rb +1 -0
  14. data/lib/hubspot/codegen/automation/actions/models/field_type_definition.rb +1 -0
  15. data/lib/hubspot/codegen/automation/actions/models/input_field_definition.rb +1 -0
  16. data/lib/hubspot/codegen/automation/actions/models/object_request_options.rb +1 -0
  17. data/lib/hubspot/codegen/automation/actions/models/option.rb +1 -0
  18. data/lib/hubspot/codegen/cms/blogs/authors/models/attach_to_lang_primary_request_v_next.rb +1 -0
  19. data/lib/hubspot/codegen/cms/blogs/authors/models/batch_input_blog_author.rb +1 -0
  20. data/lib/hubspot/codegen/cms/blogs/authors/models/batch_input_json_node.rb +1 -0
  21. data/lib/hubspot/codegen/cms/blogs/authors/models/batch_input_string.rb +1 -0
  22. data/lib/hubspot/codegen/cms/blogs/authors/models/batch_response_blog_author.rb +1 -0
  23. data/lib/hubspot/codegen/cms/blogs/authors/models/batch_response_blog_author_with_errors.rb +1 -0
  24. data/lib/hubspot/codegen/cms/blogs/authors/models/blog_author.rb +1 -0
  25. data/lib/hubspot/codegen/cms/blogs/authors/models/blog_author_clone_request_v_next.rb +1 -0
  26. data/lib/hubspot/codegen/cms/blogs/authors/models/collection_response_with_total_blog_author_forward_paging.rb +1 -0
  27. data/lib/hubspot/codegen/cms/blogs/authors/models/detach_from_lang_group_request_v_next.rb +1 -0
  28. data/lib/hubspot/codegen/cms/blogs/authors/models/forward_paging.rb +1 -0
  29. data/lib/hubspot/codegen/cms/blogs/authors/models/next_page.rb +1 -0
  30. data/lib/hubspot/codegen/cms/blogs/authors/models/set_new_language_primary_request_v_next.rb +1 -0
  31. data/lib/hubspot/codegen/cms/blogs/authors/models/standard_error.rb +1 -0
  32. data/lib/hubspot/codegen/cms/blogs/authors/models/update_languages_request_v_next.rb +1 -0
  33. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/attach_to_lang_primary_request_v_next.rb +1 -0
  34. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/batch_input_blog_post.rb +1 -0
  35. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/batch_input_json_node.rb +1 -0
  36. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/batch_input_string.rb +1 -0
  37. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/batch_response_blog_post.rb +1 -0
  38. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/batch_response_blog_post_with_errors.rb +1 -0
  39. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/blog_post.rb +1 -0
  40. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/blog_post_language_clone_request_v_next.rb +1 -0
  41. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/collection_response_with_total_blog_post_forward_paging.rb +1 -0
  42. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/collection_response_with_total_version_blog_post.rb +1 -0
  43. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/content_clone_request_v_next.rb +1 -0
  44. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/content_schedule_request_v_next.rb +1 -0
  45. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/detach_from_lang_group_request_v_next.rb +1 -0
  46. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/forward_paging.rb +1 -0
  47. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/next_page.rb +1 -0
  48. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/paging.rb +1 -0
  49. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/previous_page.rb +1 -0
  50. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/rgba_color.rb +1 -0
  51. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/set_new_language_primary_request_v_next.rb +1 -0
  52. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/standard_error.rb +1 -0
  53. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/update_languages_request_v_next.rb +1 -0
  54. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/version_blog_post.rb +1 -0
  55. data/lib/hubspot/codegen/cms/blogs/blog-posts/models/version_user.rb +1 -0
  56. data/lib/hubspot/codegen/cms/blogs/tags/models/attach_to_lang_primary_request_v_next.rb +1 -0
  57. data/lib/hubspot/codegen/cms/blogs/tags/models/batch_input_json_node.rb +1 -0
  58. data/lib/hubspot/codegen/cms/blogs/tags/models/batch_input_string.rb +1 -0
  59. data/lib/hubspot/codegen/cms/blogs/tags/models/batch_input_tag.rb +1 -0
  60. data/lib/hubspot/codegen/cms/blogs/tags/models/batch_response_tag.rb +1 -0
  61. data/lib/hubspot/codegen/cms/blogs/tags/models/batch_response_tag_with_errors.rb +1 -0
  62. data/lib/hubspot/codegen/cms/blogs/tags/models/collection_response_with_total_tag_forward_paging.rb +1 -0
  63. data/lib/hubspot/codegen/cms/blogs/tags/models/detach_from_lang_group_request_v_next.rb +1 -0
  64. data/lib/hubspot/codegen/cms/blogs/tags/models/forward_paging.rb +1 -0
  65. data/lib/hubspot/codegen/cms/blogs/tags/models/next_page.rb +1 -0
  66. data/lib/hubspot/codegen/cms/blogs/tags/models/set_new_language_primary_request_v_next.rb +1 -0
  67. data/lib/hubspot/codegen/cms/blogs/tags/models/standard_error.rb +1 -0
  68. data/lib/hubspot/codegen/cms/blogs/tags/models/tag.rb +1 -0
  69. data/lib/hubspot/codegen/cms/blogs/tags/models/tag_clone_request_v_next.rb +1 -0
  70. data/lib/hubspot/codegen/cms/blogs/tags/models/update_languages_request_v_next.rb +1 -0
  71. data/lib/hubspot/codegen/conversations/visitor-identification/models/identification_token_generation_request.rb +1 -0
  72. data/lib/hubspot/codegen/conversations/visitor-identification/models/identification_token_response.rb +1 -0
  73. data/lib/hubspot/codegen/crm/associations/api/batch_api.rb +30 -18
  74. data/lib/hubspot/codegen/crm/associations/api/types_api.rb +3 -3
  75. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association.rb +29 -38
  76. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association_multi.rb +29 -38
  77. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association_multi_with_errors.rb +346 -0
  78. data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association_with_errors.rb +346 -0
  79. data/lib/hubspot/codegen/crm/associations/models/collection_response_public_association_definition_no_paging.rb +230 -0
  80. data/lib/hubspot/codegen/crm/associations/models/error_category.rb +20 -20
  81. data/lib/hubspot/codegen/crm/associations/models/paging.rb +13 -4
  82. data/lib/hubspot/codegen/crm/associations/models/previous_page.rb +237 -0
  83. data/lib/hubspot/codegen/crm/associations/models/public_association_definition.rb +242 -0
  84. data/lib/hubspot/codegen/crm/associations/models/public_association_multi.rb +13 -4
  85. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_app_settings.rb +1 -0
  86. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_app_urls.rb +1 -0
  87. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_customer.rb +1 -0
  88. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_invoice.rb +1 -0
  89. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_term.rb +1 -0
  90. data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_features.rb +1 -0
  91. data/lib/hubspot/codegen/crm/extensions/accounting/models/address.rb +1 -0
  92. data/lib/hubspot/codegen/crm/extensions/accounting/models/create_invoice_feature.rb +1 -0
  93. data/lib/hubspot/codegen/crm/extensions/accounting/models/create_invoice_sub_features.rb +1 -0
  94. data/lib/hubspot/codegen/crm/extensions/accounting/models/create_user_account_request_external.rb +1 -0
  95. data/lib/hubspot/codegen/crm/extensions/accounting/models/customer_search_response_external.rb +1 -0
  96. data/lib/hubspot/codegen/crm/extensions/accounting/models/exchange_rate_response.rb +1 -0
  97. data/lib/hubspot/codegen/crm/extensions/accounting/models/import_invoice_feature.rb +1 -0
  98. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_pdf_response.rb +1 -0
  99. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_read_response.rb +1 -0
  100. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_search_response.rb +1 -0
  101. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_update_request.rb +1 -0
  102. data/lib/hubspot/codegen/crm/extensions/accounting/models/invoices_response_external.rb +1 -0
  103. data/lib/hubspot/codegen/crm/extensions/accounting/models/product.rb +1 -0
  104. data/lib/hubspot/codegen/crm/extensions/accounting/models/product_search_response.rb +1 -0
  105. data/lib/hubspot/codegen/crm/extensions/accounting/models/result_id_accounting_response.rb +1 -0
  106. data/lib/hubspot/codegen/crm/extensions/accounting/models/sync_contacts_request.rb +1 -0
  107. data/lib/hubspot/codegen/crm/extensions/accounting/models/sync_products_request.rb +1 -0
  108. data/lib/hubspot/codegen/crm/extensions/accounting/models/tax.rb +1 -0
  109. data/lib/hubspot/codegen/crm/extensions/accounting/models/tax_search_response.rb +1 -0
  110. data/lib/hubspot/codegen/crm/extensions/accounting/models/tax_type.rb +1 -0
  111. data/lib/hubspot/codegen/crm/extensions/accounting/models/terms_response.rb +1 -0
  112. data/lib/hubspot/codegen/crm/extensions/accounting/models/unit_price.rb +1 -0
  113. data/lib/hubspot/codegen/crm/extensions/accounting/models/updated_contact.rb +1 -0
  114. data/lib/hubspot/codegen/crm/extensions/accounting/models/updated_product.rb +1 -0
  115. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_patch_request.rb +1 -0
  116. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_request.rb +1 -0
  117. data/lib/hubspot/codegen/crm/extensions/calling/models/settings_response.rb +1 -0
  118. data/lib/hubspot/codegen/crm/extensions/cards/models/card_actions.rb +1 -0
  119. data/lib/hubspot/codegen/crm/extensions/cards/models/card_create_request.rb +1 -0
  120. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_body.rb +1 -0
  121. data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_property.rb +1 -0
  122. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body.rb +1 -0
  123. data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body_patch.rb +1 -0
  124. data/lib/hubspot/codegen/crm/extensions/cards/models/card_list_response.rb +1 -0
  125. data/lib/hubspot/codegen/crm/extensions/cards/models/card_patch_request.rb +1 -0
  126. data/lib/hubspot/codegen/crm/extensions/cards/models/card_response.rb +1 -0
  127. data/lib/hubspot/codegen/crm/extensions/cards/models/display_option.rb +1 -0
  128. data/lib/hubspot/codegen/crm/extensions/cards/models/integrator_card_payload_response.rb +1 -0
  129. data/lib/hubspot/codegen/crm/extensions/cards/models/integrator_object_result_actions_inner.rb +1 -0
  130. data/lib/hubspot/codegen/crm/extensions/videoconferencing/models/external_settings.rb +1 -0
  131. data/lib/hubspot/codegen/files/files/models/collection_response_file.rb +1 -0
  132. data/lib/hubspot/codegen/files/files/models/file_update_input.rb +1 -0
  133. data/lib/hubspot/codegen/files/files/models/folder_input.rb +1 -0
  134. data/lib/hubspot/codegen/files/files/models/folder_update_input.rb +1 -0
  135. data/lib/hubspot/codegen/files/files/models/folder_update_task_locator.rb +1 -0
  136. data/lib/hubspot/codegen/files/files/models/hubspot_file.rb +1 -0
  137. data/lib/hubspot/codegen/files/files/models/import_from_url_task_locator.rb +1 -0
  138. data/lib/hubspot/codegen/marketing/events/api/marketing_events_external_api.rb +0 -60
  139. data/lib/hubspot/codegen/marketing/events/api/search_api.rb +90 -0
  140. data/lib/hubspot/codegen/marketing/events/models/batch_input_marketing_event_email_subscriber.rb +1 -0
  141. data/lib/hubspot/codegen/marketing/events/models/batch_input_marketing_event_subscriber.rb +1 -0
  142. data/lib/hubspot/codegen/marketing/events/models/property_value.rb +13 -4
  143. data/lib/hubspot/codegen/marketing/forms/models/collection_response_form_definition_base_forward_paging_results_inner.rb +1 -0
  144. data/lib/hubspot/codegen/marketing/forms/models/datepicker_field.rb +1 -0
  145. data/lib/hubspot/codegen/marketing/forms/models/dependent_field.rb +1 -0
  146. data/lib/hubspot/codegen/marketing/forms/models/dependent_field_dependent_field.rb +1 -0
  147. data/lib/hubspot/codegen/marketing/forms/models/dependent_field_filter.rb +1 -0
  148. data/lib/hubspot/codegen/marketing/forms/models/dropdown_field.rb +1 -0
  149. data/lib/hubspot/codegen/marketing/forms/models/email_field.rb +1 -0
  150. data/lib/hubspot/codegen/marketing/forms/models/email_field_validation.rb +1 -0
  151. data/lib/hubspot/codegen/marketing/forms/models/field_group.rb +1 -0
  152. data/lib/hubspot/codegen/marketing/forms/models/file_field.rb +1 -0
  153. data/lib/hubspot/codegen/marketing/forms/models/form_definition_base.rb +1 -0
  154. data/lib/hubspot/codegen/marketing/forms/models/form_definition_create_request_base.rb +1 -0
  155. data/lib/hubspot/codegen/marketing/forms/models/form_display_options.rb +1 -0
  156. data/lib/hubspot/codegen/marketing/forms/models/form_post_submit_action.rb +1 -0
  157. data/lib/hubspot/codegen/marketing/forms/models/form_style.rb +1 -0
  158. data/lib/hubspot/codegen/marketing/forms/models/hub_spot_form_definition_patch_request_legal_consent_options.rb +1 -0
  159. data/lib/hubspot/codegen/marketing/forms/models/mobile_phone_field.rb +1 -0
  160. data/lib/hubspot/codegen/marketing/forms/models/multi_line_text_field.rb +1 -0
  161. data/lib/hubspot/codegen/marketing/forms/models/multiple_checkboxes_field.rb +1 -0
  162. data/lib/hubspot/codegen/marketing/forms/models/number_field.rb +1 -0
  163. data/lib/hubspot/codegen/marketing/forms/models/number_field_validation.rb +1 -0
  164. data/lib/hubspot/codegen/marketing/forms/models/phone_field.rb +1 -0
  165. data/lib/hubspot/codegen/marketing/forms/models/phone_field_validation.rb +1 -0
  166. data/lib/hubspot/codegen/marketing/forms/models/radio_field.rb +1 -0
  167. data/lib/hubspot/codegen/marketing/forms/models/single_checkbox_field.rb +1 -0
  168. data/lib/hubspot/codegen/marketing/forms/models/single_line_text_field.rb +1 -0
  169. data/lib/hubspot/codegen/marketing/transactional/models/email_send_status_view.rb +1 -0
  170. data/lib/hubspot/codegen/marketing/transactional/models/event_id_view.rb +1 -0
  171. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_email.rb +1 -0
  172. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_request_egg.rb +1 -0
  173. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_request_egg.rb +1 -0
  174. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_view.rb +1 -0
  175. data/lib/hubspot/codegen/settings/users/models/public_permission_set.rb +1 -0
  176. data/lib/hubspot/codegen/settings/users/models/public_team.rb +1 -0
  177. data/lib/hubspot/codegen/settings/users/models/public_user.rb +1 -0
  178. data/lib/hubspot/codegen/settings/users/models/public_user_update.rb +1 -0
  179. data/lib/hubspot/codegen/settings/users/models/user_provision_request.rb +1 -0
  180. data/lib/hubspot/discovery/marketing/events/api/search_api.rb +13 -0
  181. data/lib/hubspot/discovery/marketing/events/client.rb +1 -0
  182. data/lib/hubspot/version.rb +1 -1
  183. data/spec/discovery/marketing/events/marketing_events_external_api_spec.rb +0 -1
  184. data/spec/discovery/marketing/events/search_api_spec.rb +7 -0
  185. metadata +12 -3
@@ -0,0 +1,242 @@
1
+ =begin
2
+ #Associations
3
+
4
+ #Associations define the relationships between objects in HubSpot. These endpoints allow you to create, read, and remove associations.
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 Crm
18
+ module Associations
19
+ class PublicAssociationDefinition
20
+ attr_accessor :id
21
+
22
+ attr_accessor :name
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'id' => :'id',
28
+ :'name' => :'name'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'id' => :'String',
41
+ :'name' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Associations::PublicAssociationDefinition` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Associations::PublicAssociationDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'id')
67
+ self.id = attributes[:'id']
68
+ end
69
+
70
+ if attributes.key?(:'name')
71
+ self.name = attributes[:'name']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ if @id.nil?
80
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
81
+ end
82
+
83
+ if @name.nil?
84
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
85
+ end
86
+
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return false if @id.nil?
94
+ return false if @name.nil?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ id == o.id &&
104
+ name == o.name
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [id, name].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = Hubspot::Crm::Associations.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
241
+ end
242
+ end
@@ -22,11 +22,14 @@ module Hubspot
22
22
  # The IDs of objects that are associated with the object identified by the ID in 'from'.
23
23
  attr_accessor :to
24
24
 
25
+ attr_accessor :paging
26
+
25
27
  # Attribute mapping from ruby-style variable name to JSON key.
26
28
  def self.attribute_map
27
29
  {
28
30
  :'from' => :'from',
29
- :'to' => :'to'
31
+ :'to' => :'to',
32
+ :'paging' => :'paging'
30
33
  }
31
34
  end
32
35
 
@@ -39,7 +42,8 @@ module Hubspot
39
42
  def self.openapi_types
40
43
  {
41
44
  :'from' => :'PublicObjectId',
42
- :'to' => :'Array<AssociatedId>'
45
+ :'to' => :'Array<AssociatedId>',
46
+ :'paging' => :'Paging'
43
47
  }
44
48
  end
45
49
 
@@ -73,6 +77,10 @@ module Hubspot
73
77
  self.to = value
74
78
  end
75
79
  end
80
+
81
+ if attributes.key?(:'paging')
82
+ self.paging = attributes[:'paging']
83
+ end
76
84
  end
77
85
 
78
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -104,7 +112,8 @@ module Hubspot
104
112
  return true if self.equal?(o)
105
113
  self.class == o.class &&
106
114
  from == o.from &&
107
- to == o.to
115
+ to == o.to &&
116
+ paging == o.paging
108
117
  end
109
118
 
110
119
  # @see the `==` method
@@ -116,7 +125,7 @@ module Hubspot
116
125
  # Calculates hash code according to all attributes.
117
126
  # @return [Integer] Hash code
118
127
  def hash
119
- [from, to].hash
128
+ [from, to, paging].hash
120
129
  end
121
130
 
122
131
  # Builds the object from hash
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # The URL Settings, which defines the URL endpoints that HubSpot will send requests to an external accounting application for certain actions.
20
21
  class AccountingAppSettings
21
22
  # The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal.
22
23
  attr_accessor :app_id
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # The URL endpoints that HubSpot will send requests to an external accounting system for certain actions.
20
21
  class AccountingAppUrls
21
22
  # A URL that specifies the endpoint where invoices can be retrieved.
22
23
  attr_accessor :get_invoice_url
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Representation of a customer in the external accounting system.
20
21
  class AccountingExtensionCustomer
21
22
  # The customer's email address
22
23
  attr_accessor :email_address
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Representation of an invoice in the external accounting system.
20
21
  class AccountingExtensionInvoice
21
22
  # The total amount due.
22
23
  attr_accessor :amount_due
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Representation of payment terms that are defined in the external accounting system. One of 'dueDays' or 'dueDate' is required.
20
21
  class AccountingExtensionTerm
21
22
  # The due date for payment of the invoice, in ISO-8601 date format (yyyy-MM-dd)
22
23
  attr_accessor :due_date
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Outlines the features that are supported by the external accounting system.
20
21
  class AccountingFeatures
21
22
  attr_accessor :create_invoice
22
23
 
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Represents an address of a customer
20
21
  class Address
21
22
  # The country of the address.
22
23
  attr_accessor :country
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Indicates what elements of creating invoices in HubSpot is supported for the integration.
20
21
  class CreateInvoiceFeature
21
22
  # Indicates if creating invoices in HubSpot is supported for the integration.
22
23
  attr_accessor :enabled
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Lists the individual aspects of creating invoices that are enabled for the integration, as part of the create invoice flow in HubSpot.
20
21
  class CreateInvoiceSubFeatures
21
22
  # Indicates if a new customer can be created in the external accounting system.
22
23
  attr_accessor :create_customer
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Information about the account in your external account system.
20
21
  class CreateUserAccountRequestExternal
21
22
  # The id of the account in your system.
22
23
  attr_accessor :account_id
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to a search for customers.
20
21
  class CustomerSearchResponseExternal
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to the request for an exchange rate value. It represents the exchange rate from the source currency to the target currency.
20
21
  class ExchangeRateResponse
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Indicates if importing invoices from the external account system into HubSpot is supported for the integration.
20
21
  class ImportInvoiceFeature
21
22
  # Indicates if importing invoices from the external account system into HubSpot.
22
23
  attr_accessor :enabled
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response that contains the PDF of an invoice
20
21
  class InvoicePdfResponse
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # The invoice data stored in HubSpot
20
21
  class InvoiceReadResponse
21
22
  # The invoice number. Note that this is _not_ the ID of the invoice, but the number that the billed customer will see.
22
23
  attr_accessor :external_invoice_number
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to a search for invoices.
20
21
  class InvoiceSearchResponse
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # The invoice data to update in HubSpot
20
21
  class InvoiceUpdateRequest
21
22
  attr_accessor :external_invoice_number
22
23
 
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to a request for invoices.
20
21
  class InvoicesResponseExternal
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Representation of a product in the external accounting system.
20
21
  class Product
21
22
  attr_accessor :unit_price
22
23
 
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to a search for products.
20
21
  class ProductSearchResponse
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to the creation of an entity (eg. invoice, customer).
20
21
  class ResultIdAccountingResponse
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A request to import external accounting contact properties in HubSpot
20
21
  class SyncContactsRequest
21
22
  # The ID of the account in the external accounting system. This is the value that will be passed as `accountId` for all outbound calls for the user from HubSpot to the external accounting system.
22
23
  attr_accessor :account_id
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A request to import external accounting product properties in HubSpot
20
21
  class SyncProductsRequest
21
22
  # The ID of the account in the external accounting system. This is the value that will be passed as `accountId` for all outbound calls for the user from HubSpot to the external accounting system.
22
23
  attr_accessor :account_id
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Representation of a tax defined in the external accounting system.
20
21
  class Tax
21
22
  # The code/ID of the tax in the external accounting system.
22
23
  attr_accessor :code
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to a search for taxes.
20
21
  class TaxSearchResponse
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Represents a tax in the external accounting system.
20
21
  class TaxType
21
22
  # The code/ID of the tax in the external accounting system.
22
23
  attr_accessor :code
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A response to a search for payment terms.
20
21
  class TermsResponse
21
22
  # Designates if the response is a success ('OK') or failure ('ERR').
22
23
  attr_accessor :result
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # Represents a unit price
20
21
  class UnitPrice
21
22
  # The actual unit price amount.
22
23
  attr_accessor :amount
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A request to import external accounting contact properties in HubSpot
20
21
  class UpdatedContact
21
22
  # The operation to be performed.
22
23
  attr_accessor :sync_action
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Accounting
20
+ # A request to import external accounting product properties in HubSpot
20
21
  class UpdatedProduct
21
22
  # The operation to be performed.
22
23
  attr_accessor :sync_action
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Calling
20
+ # Settings update request
20
21
  class SettingsPatchRequest
21
22
  # The name of your calling service to display to users.
22
23
  attr_accessor :name
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Calling
20
+ # Settings create request
20
21
  class SettingsRequest
21
22
  # The name of your calling service to display to users.
22
23
  attr_accessor :name
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Calling
20
+ # Current settings state
20
21
  class SettingsResponse
21
22
  # The name of your calling service to display to users.
22
23
  attr_accessor :name
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Cards
20
+ # Configuration for custom user actions on cards.
20
21
  class CardActions
21
22
  # A list of URL prefixes that will be accepted for card action URLs. If your data fetch response includes an action URL that doesn't begin with one of these values, it will result in an error and the card will not be displayed.
22
23
  attr_accessor :base_urls
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Cards
20
+ # State of card definition to be created
20
21
  class CardCreateRequest
21
22
  # The top-level title for this card. Displayed to users in the CRM UI.
22
23
  attr_accessor :title
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Cards
20
+ # Configuration for displayed info on a card
20
21
  class CardDisplayBody
21
22
  # Card display properties. These will will be rendered as \"label : value\" pairs in the card UI. See the [example card](#) in the overview docs for more details.
22
23
  attr_accessor :properties
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Cards
20
+ # Definition for a card display property.
20
21
  class CardDisplayProperty
21
22
  # An internal identifier for this property. This value must be unique TODO.
22
23
  attr_accessor :name
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Cards
20
+ # Configuration for this card's data fetch request.
20
21
  class CardFetchBody
21
22
  # URL to a service endpoints that will respond with card details. HubSpot will call this endpoint each time a user visits a CRM record page where this card should be displayed.
22
23
  attr_accessor :target_url
@@ -17,6 +17,7 @@ module Hubspot
17
17
  module Crm
18
18
  module Extensions
19
19
  module Cards
20
+ # Variant of CardFetchBody with fields as optional for patches
20
21
  class CardFetchBodyPatch
21
22
  # URL to a service endpoint that will respond with details for this card. HubSpot will call this endpoint each time a user visits a CRM record page where this card should be displayed.
22
23
  attr_accessor :target_url