hubspot-api-client 10.1.1 → 11.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile.lock +2 -2
  4. data/lib/hubspot/codegen/cms/audit-logs/api/{default_api.rb → audit_logs_api.rb} +3 -3
  5. data/lib/hubspot/codegen/cms/blogs/authors/api/{default_api.rb → author_api.rb} +28 -28
  6. data/lib/hubspot/codegen/cms/blogs/blog-posts/api/{default_api.rb → blog_post_api.rb} +62 -62
  7. data/lib/hubspot/codegen/cms/blogs/tags/api/{default_api.rb → tag_api.rb} +28 -28
  8. data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
  9. data/lib/hubspot/codegen/cms/domains/configuration.rb +0 -7
  10. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +102 -102
  11. data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +21 -21
  12. data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +100 -108
  13. data/lib/hubspot/codegen/cms/hubdb/api_client.rb +1 -1
  14. data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
  15. data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
  16. data/lib/hubspot/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3.rb → batch_input_hub_db_table_row_v3_request.rb} +5 -5
  17. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
  18. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
  19. data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
  20. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
  21. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
  22. data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
  23. data/lib/hubspot/codegen/cms/hubdb/models/{column_input.rb → column_request.rb} +71 -47
  24. data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
  25. data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
  26. data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
  27. data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
  28. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +4 -9
  29. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +12 -27
  30. data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_row_v3_input.rb → hub_db_table_row_v3_request.rb} +25 -20
  31. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
  32. data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_v3_input.rb → hub_db_table_v3_request.rb} +53 -53
  33. data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
  34. data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
  35. data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
  36. data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
  37. data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
  38. data/lib/hubspot/codegen/cms/performance/api/{default_api.rb → public_performance_api.rb} +5 -5
  39. data/lib/hubspot/codegen/cms/site-search/api/{default_api.rb → public_api.rb} +7 -7
  40. data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +15 -15
  41. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +0 -8
  42. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +0 -4
  43. data/lib/hubspot/codegen/crm/companies/models/filter.rb +3 -2
  44. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +0 -8
  45. data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +150 -0
  46. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +0 -4
  47. data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -2
  48. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +0 -8
  49. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +0 -4
  50. data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -2
  51. data/lib/hubspot/codegen/crm/imports/api/core_api.rb +2 -2
  52. data/lib/hubspot/codegen/crm/imports/api/{default_api.rb → public_imports_api.rb} +8 -8
  53. data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +4 -4
  54. data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +0 -8
  55. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +0 -4
  56. data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -2
  57. data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -8
  58. data/lib/hubspot/codegen/crm/objects/api/gdpr_api.rb +162 -0
  59. data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -4
  60. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +0 -2
  61. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +0 -4
  62. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +3 -2
  63. data/lib/hubspot/codegen/crm/objects/models/filter.rb +3 -2
  64. data/lib/hubspot/codegen/crm/owners/api/{default_api.rb → owners_api.rb} +6 -6
  65. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +0 -8
  66. data/lib/hubspot/codegen/crm/products/api/search_api.rb +0 -4
  67. data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -2
  68. data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +0 -2
  69. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +0 -4
  70. data/lib/hubspot/codegen/crm/quotes/models/filter.rb +3 -2
  71. data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +3 -3
  72. data/lib/hubspot/codegen/crm/schemas/api/{default_api.rb → public_object_schemas_api.rb} +4 -4
  73. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +0 -8
  74. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +0 -4
  75. data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -2
  76. data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +3 -3
  77. data/lib/hubspot/codegen/crm/timeline/models/{collection_response_timeline_event_template.rb → collection_response_timeline_event_template_no_paging.rb} +7 -17
  78. data/lib/hubspot/codegen/files/files/api/files_api.rb +12 -6
  79. data/lib/hubspot/codegen/files/files/api/folders_api.rb +12 -0
  80. data/lib/hubspot/codegen/files/files/models/error_category.rb +18 -18
  81. data/lib/hubspot/codegen/marketing/transactional/api/{default_api.rb → public_smtp_tokens_api.rb} +14 -74
  82. data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +86 -0
  83. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +82 -0
  84. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +140 -0
  85. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +100 -0
  86. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +33 -1
  87. data/lib/hubspot/codegen/oauth/models/token_response_if.rb +27 -4
  88. data/lib/hubspot/version.rb +1 -1
  89. data/pkg/hubspot-api-client-10.1.1.gem +0 -0
  90. data/spec/codegen/cms/audit-logs/api/{default_api_spec.rb → audit_logs_api_spec.rb} +6 -6
  91. data/spec/codegen/cms/blogs/authors/api/{default_api_spec.rb → author_api_spec.rb} +6 -6
  92. data/spec/codegen/cms/blogs/blog-posts/api/{default_api_spec.rb → blog_post_api_spec.rb} +6 -6
  93. data/spec/codegen/cms/blogs/tags/api/{default_api_spec.rb → tag_api_spec.rb} +6 -6
  94. data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +18 -18
  95. data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +4 -4
  96. data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +35 -36
  97. data/spec/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3_spec.rb → batch_input_hub_db_table_row_v3_request_spec.rb} +7 -7
  98. data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
  99. data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
  100. data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
  101. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
  102. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
  103. data/spec/codegen/cms/hubdb/models/{column_input_spec.rb → column_request_spec.rb} +14 -22
  104. data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
  105. data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
  106. data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
  107. data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
  108. data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
  109. data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
  110. data/spec/codegen/cms/hubdb/models/{hub_db_table_row_v3_input_spec.rb → hub_db_table_row_v3_request_spec.rb} +10 -10
  111. data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +7 -1
  112. data/spec/codegen/cms/hubdb/models/{hub_db_table_v3_input_spec.rb → hub_db_table_v3_request_spec.rb} +13 -13
  113. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
  114. data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
  115. data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
  116. data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
  117. data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
  118. data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
  119. data/spec/codegen/cms/performance/api/{default_api_spec.rb → public_performance_api_spec.rb} +6 -6
  120. data/spec/codegen/cms/site-search/api/{default_api_spec.rb → public_api_spec.rb} +6 -6
  121. data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
  122. data/spec/codegen/crm/companies/api/batch_api_spec.rb +0 -4
  123. data/spec/codegen/crm/companies/api/search_api_spec.rb +0 -2
  124. data/spec/codegen/crm/companies/models/filter_spec.rb +1 -1
  125. data/spec/codegen/crm/contacts/api/batch_api_spec.rb +0 -4
  126. data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +59 -0
  127. data/spec/codegen/crm/contacts/api/search_api_spec.rb +0 -2
  128. data/spec/codegen/crm/contacts/models/filter_spec.rb +1 -1
  129. data/spec/codegen/crm/deals/api/batch_api_spec.rb +0 -4
  130. data/spec/codegen/crm/deals/api/search_api_spec.rb +0 -2
  131. data/spec/codegen/crm/deals/models/filter_spec.rb +1 -1
  132. data/spec/codegen/crm/imports/api/{default_api_spec.rb → public_imports_api_spec.rb} +8 -8
  133. data/spec/codegen/crm/imports/models/public_import_error_spec.rb +2 -2
  134. data/spec/codegen/crm/line_items/api/batch_api_spec.rb +0 -4
  135. data/spec/codegen/crm/line_items/api/search_api_spec.rb +0 -2
  136. data/spec/codegen/crm/line_items/models/filter_spec.rb +1 -1
  137. data/spec/codegen/crm/objects/api/batch_api_spec.rb +0 -4
  138. data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +61 -0
  139. data/spec/codegen/crm/objects/api/search_api_spec.rb +0 -2
  140. data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +0 -1
  141. data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +0 -2
  142. data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +1 -1
  143. data/spec/codegen/crm/objects/models/filter_spec.rb +1 -1
  144. data/spec/codegen/crm/owners/api/{default_api_spec.rb → owners_api_spec.rb} +6 -6
  145. data/spec/codegen/crm/products/api/batch_api_spec.rb +0 -4
  146. data/spec/codegen/crm/products/api/search_api_spec.rb +0 -2
  147. data/spec/codegen/crm/products/models/filter_spec.rb +1 -1
  148. data/spec/codegen/crm/quotes/api/batch_api_spec.rb +0 -1
  149. data/spec/codegen/crm/quotes/api/search_api_spec.rb +0 -2
  150. data/spec/codegen/crm/quotes/models/filter_spec.rb +1 -1
  151. data/spec/codegen/crm/schemas/api/{default_api_spec.rb → public_object_schemas_api_spec.rb} +6 -6
  152. data/spec/codegen/crm/tickets/api/batch_api_spec.rb +0 -4
  153. data/spec/codegen/crm/tickets/api/search_api_spec.rb +0 -2
  154. data/spec/codegen/crm/tickets/models/filter_spec.rb +1 -1
  155. data/spec/codegen/crm/timeline/api/templates_api_spec.rb +1 -1
  156. data/spec/codegen/crm/timeline/models/{collection_response_timeline_event_template_spec.rb → collection_response_timeline_event_template_no_paging_spec.rb} +6 -12
  157. data/spec/codegen/files/files/api/files_api_spec.rb +4 -2
  158. data/spec/codegen/files/files/api/folders_api_spec.rb +4 -0
  159. data/spec/codegen/files/files/models/error_category_spec.rb +6 -6
  160. data/spec/codegen/marketing/transactional/api/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +6 -18
  161. data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +47 -0
  162. data/spec/codegen/oauth/api/access_tokens_api_spec.rb +45 -0
  163. data/spec/codegen/oauth/api/{default_api_spec.rb → refresh_tokens_api_spec.rb} +6 -31
  164. data/spec/codegen/oauth/api/tokens_api_spec.rb +50 -0
  165. data/spec/codegen/oauth/models/access_token_info_response_spec.rb +12 -0
  166. data/spec/codegen/oauth/models/token_response_if_spec.rb +12 -0
  167. data/spec/features/cms/audit-logs/{default_api_spec.rb → audit_logs_api_spec.rb} +4 -4
  168. data/spec/features/cms/blogs/authors/{default_api_spec.rb → author_api_spec.rb} +28 -28
  169. data/spec/features/cms/blogs/blog-posts/{default_api_spec.rb → blog_post_api_spec.rb} +2 -2
  170. data/spec/features/cms/blogs/tags/{default_api_spec.rb → tag_api_spec.rb} +2 -2
  171. data/spec/features/cms/hubdb/tables_api_spec.rb +1 -1
  172. data/spec/features/cms/perfomance/public_perfomance_api_spec.rb +8 -0
  173. data/spec/features/cms/site-search/{default_api_spec.rb → public_api_spec.rb} +2 -2
  174. data/spec/features/crm/contacts/gdpr_api_spec.rb +8 -0
  175. data/spec/features/crm/objects/gdpr_api_spec.rb +8 -0
  176. data/spec/features/crm/owners/{default_api_spec.rb → owners_api_spec.rb} +2 -2
  177. data/spec/features/crm/schemas/public_object_schemas_api_spec.rb +7 -0
  178. data/spec/features/marketing/transactional/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +2 -3
  179. data/spec/features/marketing/transactional/single_send_api_spec.rb +7 -0
  180. data/spec/features/oauth/access_tokens_api_spec.rb +7 -0
  181. data/spec/features/oauth/refresh_tokens_api_spec.rb +8 -0
  182. data/spec/features/oauth/tokens_api_spec.rb +7 -0
  183. metadata +96 -82
  184. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +0 -241
  185. data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +0 -224
  186. data/lib/hubspot/codegen/crm/timeline/models/paging.rb +0 -219
  187. data/lib/hubspot/codegen/crm/timeline/models/previous_page.rb +0 -224
  188. data/lib/hubspot/codegen/oauth/api/default_api.rb +0 -270
  189. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +0 -59
  190. data/spec/codegen/crm/timeline/models/next_page_spec.rb +0 -47
  191. data/spec/codegen/crm/timeline/models/paging_spec.rb +0 -47
  192. data/spec/codegen/crm/timeline/models/previous_page_spec.rb +0 -47
  193. data/spec/features/cms/perfomance/default_api_spec.rb +0 -8
  194. data/spec/features/crm/schemas/default_api_spec.rb +0 -7
  195. data/spec/features/oauth/default_api_spec.rb +0 -10
@@ -1,241 +0,0 @@
1
- =begin
2
- #HubDB endpoints
3
-
4
- #HubDB is a relational data store that presents data as rows, columns, and cells in a table, much like a spreadsheet. HubDB tables can be added or modified [in the HubSpot CMS](https://knowledge.hubspot.com/cos-general/how-to-edit-hubdb-tables), but you can also use the API endpoints documented here. For more information on HubDB tables and using their data on a HubSpot site, see the [CMS developers site](https://designers.hubspot.com/docs/tools/hubdb). You can also see the [documentation for dynamic pages](https://designers.hubspot.com/docs/tutorials/how-to-build-dynamic-pages-with-hubdb) for more details about the `useForPages` field. HubDB tables support `draft` and `live` versions and you can publish and unpublish the live version. This allows you to update data in the table, either for testing or to allow for a manual approval process, without affecting any live pages using the existing data. Draft data can be reviewed, pushed to live version, and published by a user working in HubSpot or published via the API. Draft data can also be discarded, allowing users to go back to the live version of the data without disrupting it. If a table is set to be `allowed for public access`, you can access the published version of the table and rows without any authentication by specifying the portal id via the query parameter `portalId`.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module Hubspot
16
- module Cms
17
- module Hubdb
18
- class HubDbTableV3LiveInput
19
- # Specifies whether to restore a table
20
- attr_accessor :archived
21
-
22
- # New name of the table
23
- attr_accessor :name
24
-
25
- # New Label of the table
26
- attr_accessor :label
27
-
28
- # Specifies whether to publish or unpublish a live table
29
- attr_accessor :published
30
-
31
- # Attribute mapping from ruby-style variable name to JSON key.
32
- def self.attribute_map
33
- {
34
- :'archived' => :'archived',
35
- :'name' => :'name',
36
- :'label' => :'label',
37
- :'published' => :'published'
38
- }
39
- end
40
-
41
- # Attribute type mapping.
42
- def self.openapi_types
43
- {
44
- :'archived' => :'Boolean',
45
- :'name' => :'String',
46
- :'label' => :'String',
47
- :'published' => :'Boolean'
48
- }
49
- end
50
-
51
- # List of attributes with nullable: true
52
- def self.openapi_nullable
53
- Set.new([
54
- ])
55
- end
56
-
57
- # Initializes the object
58
- # @param [Hash] attributes Model attributes in the form of hash
59
- def initialize(attributes = {})
60
- if (!attributes.is_a?(Hash))
61
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Cms::Hubdb::HubDbTableV3LiveInput` initialize method"
62
- end
63
-
64
- # check to see if the attribute exists and convert string to symbol for hash key
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!self.class.attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Cms::Hubdb::HubDbTableV3LiveInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'archived')
73
- self.archived = attributes[:'archived']
74
- end
75
-
76
- if attributes.key?(:'name')
77
- self.name = attributes[:'name']
78
- end
79
-
80
- if attributes.key?(:'label')
81
- self.label = attributes[:'label']
82
- end
83
-
84
- if attributes.key?(:'published')
85
- self.published = attributes[:'published']
86
- end
87
- end
88
-
89
- # Show invalid properties with the reasons. Usually used together with valid?
90
- # @return Array for valid properties with the reasons
91
- def list_invalid_properties
92
- invalid_properties = Array.new
93
- invalid_properties
94
- end
95
-
96
- # Check to see if the all the properties in the model are valid
97
- # @return true if the model is valid
98
- def valid?
99
- true
100
- end
101
-
102
- # Checks equality by comparing each attribute.
103
- # @param [Object] Object to be compared
104
- def ==(o)
105
- return true if self.equal?(o)
106
- self.class == o.class &&
107
- archived == o.archived &&
108
- name == o.name &&
109
- label == o.label &&
110
- published == o.published
111
- end
112
-
113
- # @see the `==` method
114
- # @param [Object] Object to be compared
115
- def eql?(o)
116
- self == o
117
- end
118
-
119
- # Calculates hash code according to all attributes.
120
- # @return [Integer] Hash code
121
- def hash
122
- [archived, name, label, published].hash
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def self.build_from_hash(attributes)
129
- new.build_from_hash(attributes)
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def build_from_hash(attributes)
136
- return nil unless attributes.is_a?(Hash)
137
- self.class.openapi_types.each_pair do |key, type|
138
- if type =~ /\AArray<(.*)>/i
139
- # check to ensure the input is an array given that the attribute
140
- # is documented as an array but the input is not
141
- if attributes[self.class.attribute_map[key]].is_a?(Array)
142
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
143
- end
144
- elsif !attributes[self.class.attribute_map[key]].nil?
145
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
146
- end # or else data not found in attributes(hash), not an issue as the data can be optional
147
- end
148
-
149
- self
150
- end
151
-
152
- # Deserializes the data based on type
153
- # @param string type Data type
154
- # @param string value Value to be deserialized
155
- # @return [Object] Deserialized data
156
- def _deserialize(type, value)
157
- case type.to_sym
158
- when :DateTime
159
- DateTime.parse(value)
160
- when :Date
161
- Date.parse(value)
162
- when :String
163
- value.to_s
164
- when :Integer
165
- value.to_i
166
- when :Float
167
- value.to_f
168
- when :Boolean
169
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
- true
171
- else
172
- false
173
- end
174
- when :Object
175
- # generic object (usually a Hash), return directly
176
- value
177
- when /\AArray<(?<inner_type>.+)>\z/
178
- inner_type = Regexp.last_match[:inner_type]
179
- value.map { |v| _deserialize(inner_type, v) }
180
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
- k_type = Regexp.last_match[:k_type]
182
- v_type = Regexp.last_match[:v_type]
183
- {}.tap do |hash|
184
- value.each do |k, v|
185
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
- end
187
- end
188
- else # model
189
- Hubspot::Cms::Hubdb.const_get(type).build_from_hash(value)
190
- end
191
- end
192
-
193
- # Returns the string representation of the object
194
- # @return [String] String presentation of the object
195
- def to_s
196
- to_hash.to_s
197
- end
198
-
199
- # to_body is an alias to to_hash (backward compatibility)
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_body
202
- to_hash
203
- end
204
-
205
- # Returns the object in the form of hash
206
- # @return [Hash] Returns the object in the form of hash
207
- def to_hash
208
- hash = {}
209
- self.class.attribute_map.each_pair do |attr, param|
210
- value = self.send(attr)
211
- if value.nil?
212
- is_nullable = self.class.openapi_nullable.include?(attr)
213
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
- end
215
-
216
- hash[param] = _to_hash(value)
217
- end
218
- hash
219
- end
220
-
221
- # Outputs non-array value in the form of hash
222
- # For object, use to_hash. Otherwise, just return the value
223
- # @param [Object] value Any valid value
224
- # @return [Hash] Returns the value in the form of hash
225
- def _to_hash(value)
226
- if value.is_a?(Array)
227
- value.compact.map { |v| _to_hash(v) }
228
- elsif value.is_a?(Hash)
229
- {}.tap do |hash|
230
- value.each { |k, v| hash[k] = _to_hash(v) }
231
- end
232
- elsif value.respond_to? :to_hash
233
- value.to_hash
234
- else
235
- value
236
- end
237
- end
238
- end
239
- end
240
- end
241
- end
@@ -1,224 +0,0 @@
1
- =begin
2
- #Timeline events
3
-
4
- #This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM objects like contacts, companies, tickets, or deals. You'll find multiple use cases for this API in the sections below.
5
-
6
- The version of the OpenAPI document: v3
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module Hubspot
16
- module Crm
17
- module Timeline
18
- class NextPage
19
- attr_accessor :after
20
-
21
- attr_accessor :link
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'after' => :'after',
27
- :'link' => :'link'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.openapi_types
33
- {
34
- :'after' => :'String',
35
- :'link' => :'String'
36
- }
37
- end
38
-
39
- # List of attributes with nullable: true
40
- def self.openapi_nullable
41
- Set.new([
42
- ])
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Timeline::NextPage` initialize method"
50
- end
51
-
52
- # check to see if the attribute exists and convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}) { |(k, v), h|
54
- if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Timeline::NextPage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
- end
57
- h[k.to_sym] = v
58
- }
59
-
60
- if attributes.key?(:'after')
61
- self.after = attributes[:'after']
62
- end
63
-
64
- if attributes.key?(:'link')
65
- self.link = attributes[:'link']
66
- end
67
- end
68
-
69
- # Show invalid properties with the reasons. Usually used together with valid?
70
- # @return Array for valid properties with the reasons
71
- def list_invalid_properties
72
- invalid_properties = Array.new
73
- if @after.nil?
74
- invalid_properties.push('invalid value for "after", after cannot be nil.')
75
- end
76
-
77
- invalid_properties
78
- end
79
-
80
- # Check to see if the all the properties in the model are valid
81
- # @return true if the model is valid
82
- def valid?
83
- return false if @after.nil?
84
- true
85
- end
86
-
87
- # Checks equality by comparing each attribute.
88
- # @param [Object] Object to be compared
89
- def ==(o)
90
- return true if self.equal?(o)
91
- self.class == o.class &&
92
- after == o.after &&
93
- link == o.link
94
- end
95
-
96
- # @see the `==` method
97
- # @param [Object] Object to be compared
98
- def eql?(o)
99
- self == o
100
- end
101
-
102
- # Calculates hash code according to all attributes.
103
- # @return [Integer] Hash code
104
- def hash
105
- [after, link].hash
106
- end
107
-
108
- # Builds the object from hash
109
- # @param [Hash] attributes Model attributes in the form of hash
110
- # @return [Object] Returns the model itself
111
- def self.build_from_hash(attributes)
112
- new.build_from_hash(attributes)
113
- end
114
-
115
- # Builds the object from hash
116
- # @param [Hash] attributes Model attributes in the form of hash
117
- # @return [Object] Returns the model itself
118
- def build_from_hash(attributes)
119
- return nil unless attributes.is_a?(Hash)
120
- self.class.openapi_types.each_pair do |key, type|
121
- if type =~ /\AArray<(.*)>/i
122
- # check to ensure the input is an array given that the attribute
123
- # is documented as an array but the input is not
124
- if attributes[self.class.attribute_map[key]].is_a?(Array)
125
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
- end
127
- elsif !attributes[self.class.attribute_map[key]].nil?
128
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
- end # or else data not found in attributes(hash), not an issue as the data can be optional
130
- end
131
-
132
- self
133
- end
134
-
135
- # Deserializes the data based on type
136
- # @param string type Data type
137
- # @param string value Value to be deserialized
138
- # @return [Object] Deserialized data
139
- def _deserialize(type, value)
140
- case type.to_sym
141
- when :DateTime
142
- DateTime.parse(value)
143
- when :Date
144
- Date.parse(value)
145
- when :String
146
- value.to_s
147
- when :Integer
148
- value.to_i
149
- when :Float
150
- value.to_f
151
- when :Boolean
152
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
- true
154
- else
155
- false
156
- end
157
- when :Object
158
- # generic object (usually a Hash), return directly
159
- value
160
- when /\AArray<(?<inner_type>.+)>\z/
161
- inner_type = Regexp.last_match[:inner_type]
162
- value.map { |v| _deserialize(inner_type, v) }
163
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
- k_type = Regexp.last_match[:k_type]
165
- v_type = Regexp.last_match[:v_type]
166
- {}.tap do |hash|
167
- value.each do |k, v|
168
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
- end
170
- end
171
- else # model
172
- Hubspot::Crm::Timeline.const_get(type).build_from_hash(value)
173
- end
174
- end
175
-
176
- # Returns the string representation of the object
177
- # @return [String] String presentation of the object
178
- def to_s
179
- to_hash.to_s
180
- end
181
-
182
- # to_body is an alias to to_hash (backward compatibility)
183
- # @return [Hash] Returns the object in the form of hash
184
- def to_body
185
- to_hash
186
- end
187
-
188
- # Returns the object in the form of hash
189
- # @return [Hash] Returns the object in the form of hash
190
- def to_hash
191
- hash = {}
192
- self.class.attribute_map.each_pair do |attr, param|
193
- value = self.send(attr)
194
- if value.nil?
195
- is_nullable = self.class.openapi_nullable.include?(attr)
196
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
- end
198
-
199
- hash[param] = _to_hash(value)
200
- end
201
- hash
202
- end
203
-
204
- # Outputs non-array value in the form of hash
205
- # For object, use to_hash. Otherwise, just return the value
206
- # @param [Object] value Any valid value
207
- # @return [Hash] Returns the value in the form of hash
208
- def _to_hash(value)
209
- if value.is_a?(Array)
210
- value.compact.map { |v| _to_hash(v) }
211
- elsif value.is_a?(Hash)
212
- {}.tap do |hash|
213
- value.each { |k, v| hash[k] = _to_hash(v) }
214
- end
215
- elsif value.respond_to? :to_hash
216
- value.to_hash
217
- else
218
- value
219
- end
220
- end
221
- end
222
- end
223
- end
224
- end