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,219 +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 Paging
19
- attr_accessor :_next
20
-
21
- attr_accessor :prev
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'_next' => :'next',
27
- :'prev' => :'prev'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.openapi_types
33
- {
34
- :'_next' => :'NextPage',
35
- :'prev' => :'PreviousPage'
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::Paging` 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::Paging`. 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?(:'_next')
61
- self._next = attributes[:'_next']
62
- end
63
-
64
- if attributes.key?(:'prev')
65
- self.prev = attributes[:'prev']
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
- invalid_properties
74
- end
75
-
76
- # Check to see if the all the properties in the model are valid
77
- # @return true if the model is valid
78
- def valid?
79
- true
80
- end
81
-
82
- # Checks equality by comparing each attribute.
83
- # @param [Object] Object to be compared
84
- def ==(o)
85
- return true if self.equal?(o)
86
- self.class == o.class &&
87
- _next == o._next &&
88
- prev == o.prev
89
- end
90
-
91
- # @see the `==` method
92
- # @param [Object] Object to be compared
93
- def eql?(o)
94
- self == o
95
- end
96
-
97
- # Calculates hash code according to all attributes.
98
- # @return [Integer] Hash code
99
- def hash
100
- [_next, prev].hash
101
- end
102
-
103
- # Builds the object from hash
104
- # @param [Hash] attributes Model attributes in the form of hash
105
- # @return [Object] Returns the model itself
106
- def self.build_from_hash(attributes)
107
- new.build_from_hash(attributes)
108
- end
109
-
110
- # Builds the object from hash
111
- # @param [Hash] attributes Model attributes in the form of hash
112
- # @return [Object] Returns the model itself
113
- def build_from_hash(attributes)
114
- return nil unless attributes.is_a?(Hash)
115
- self.class.openapi_types.each_pair do |key, type|
116
- if type =~ /\AArray<(.*)>/i
117
- # check to ensure the input is an array given that the attribute
118
- # is documented as an array but the input is not
119
- if attributes[self.class.attribute_map[key]].is_a?(Array)
120
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
- end
122
- elsif !attributes[self.class.attribute_map[key]].nil?
123
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
- end # or else data not found in attributes(hash), not an issue as the data can be optional
125
- end
126
-
127
- self
128
- end
129
-
130
- # Deserializes the data based on type
131
- # @param string type Data type
132
- # @param string value Value to be deserialized
133
- # @return [Object] Deserialized data
134
- def _deserialize(type, value)
135
- case type.to_sym
136
- when :DateTime
137
- DateTime.parse(value)
138
- when :Date
139
- Date.parse(value)
140
- when :String
141
- value.to_s
142
- when :Integer
143
- value.to_i
144
- when :Float
145
- value.to_f
146
- when :Boolean
147
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
- true
149
- else
150
- false
151
- end
152
- when :Object
153
- # generic object (usually a Hash), return directly
154
- value
155
- when /\AArray<(?<inner_type>.+)>\z/
156
- inner_type = Regexp.last_match[:inner_type]
157
- value.map { |v| _deserialize(inner_type, v) }
158
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
- k_type = Regexp.last_match[:k_type]
160
- v_type = Regexp.last_match[:v_type]
161
- {}.tap do |hash|
162
- value.each do |k, v|
163
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
- end
165
- end
166
- else # model
167
- Hubspot::Crm::Timeline.const_get(type).build_from_hash(value)
168
- end
169
- end
170
-
171
- # Returns the string representation of the object
172
- # @return [String] String presentation of the object
173
- def to_s
174
- to_hash.to_s
175
- end
176
-
177
- # to_body is an alias to to_hash (backward compatibility)
178
- # @return [Hash] Returns the object in the form of hash
179
- def to_body
180
- to_hash
181
- end
182
-
183
- # Returns the object in the form of hash
184
- # @return [Hash] Returns the object in the form of hash
185
- def to_hash
186
- hash = {}
187
- self.class.attribute_map.each_pair do |attr, param|
188
- value = self.send(attr)
189
- if value.nil?
190
- is_nullable = self.class.openapi_nullable.include?(attr)
191
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
- end
193
-
194
- hash[param] = _to_hash(value)
195
- end
196
- hash
197
- end
198
-
199
- # Outputs non-array value in the form of hash
200
- # For object, use to_hash. Otherwise, just return the value
201
- # @param [Object] value Any valid value
202
- # @return [Hash] Returns the value in the form of hash
203
- def _to_hash(value)
204
- if value.is_a?(Array)
205
- value.compact.map { |v| _to_hash(v) }
206
- elsif value.is_a?(Hash)
207
- {}.tap do |hash|
208
- value.each { |k, v| hash[k] = _to_hash(v) }
209
- end
210
- elsif value.respond_to? :to_hash
211
- value.to_hash
212
- else
213
- value
214
- end
215
- end
216
- end
217
- end
218
- end
219
- 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 PreviousPage
19
- attr_accessor :before
20
-
21
- attr_accessor :link
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'before' => :'before',
27
- :'link' => :'link'
28
- }
29
- end
30
-
31
- # Attribute type mapping.
32
- def self.openapi_types
33
- {
34
- :'before' => :'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::PreviousPage` 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::PreviousPage`. 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?(:'before')
61
- self.before = attributes[:'before']
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 @before.nil?
74
- invalid_properties.push('invalid value for "before", before 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 @before.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
- before == o.before &&
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
- [before, 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
@@ -1,270 +0,0 @@
1
- =begin
2
- #OAuthService
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v1
7
-
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.3.1
10
-
11
- =end
12
-
13
- require 'cgi'
14
-
15
- module Hubspot
16
- module OAuth
17
- class DefaultApi
18
- attr_accessor :api_client
19
-
20
- def initialize(api_client = ApiClient.default)
21
- @api_client = api_client
22
- end
23
- # @param token [String]
24
- # @param [Hash] opts the optional parameters
25
- # @return [Error]
26
- def archive_refresh_token(token, opts = {})
27
- data, _status_code, _headers = archive_refresh_token_with_http_info(token, opts)
28
- data
29
- end
30
-
31
- # @param token [String]
32
- # @param [Hash] opts the optional parameters
33
- # @return [Array<(Error, Integer, Hash)>] Error data, response status code and response headers
34
- def archive_refresh_token_with_http_info(token, opts = {})
35
- if @api_client.config.debugging
36
- @api_client.config.logger.debug 'Calling API: DefaultApi.archive_refresh_token ...'
37
- end
38
- # verify the required parameter 'token' is set
39
- if @api_client.config.client_side_validation && token.nil?
40
- fail ArgumentError, "Missing the required parameter 'token' when calling DefaultApi.archive_refresh_token"
41
- end
42
- # resource path
43
- local_var_path = '/oauth/v1/refresh-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
44
-
45
- # query parameters
46
- query_params = opts[:query_params] || {}
47
-
48
- # header parameters
49
- header_params = opts[:header_params] || {}
50
- # HTTP header 'Accept' (if needed)
51
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
52
-
53
- # form parameters
54
- form_params = opts[:form_params] || {}
55
-
56
- # http body (model)
57
- post_body = opts[:body]
58
-
59
- # return_type
60
- return_type = opts[:return_type] || 'Error'
61
-
62
- # auth_names
63
- auth_names = opts[:auth_names] || []
64
-
65
- new_options = opts.merge(
66
- :header_params => header_params,
67
- :query_params => query_params,
68
- :form_params => form_params,
69
- :body => post_body,
70
- :auth_names => auth_names,
71
- :return_type => return_type
72
- )
73
-
74
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
75
- if @api_client.config.debugging
76
- @api_client.config.logger.debug "API called: DefaultApi#archive_refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
- end
78
- return data, status_code, headers
79
- end
80
-
81
- # @param [Hash] opts the optional parameters
82
- # @option opts [String] :grant_type
83
- # @option opts [String] :code
84
- # @option opts [String] :redirect_uri
85
- # @option opts [String] :client_id
86
- # @option opts [String] :client_secret
87
- # @option opts [String] :refresh_token
88
- # @return [TokenResponseIF]
89
- def create_token(opts = {})
90
- data, _status_code, _headers = create_token_with_http_info(opts)
91
- data
92
- end
93
-
94
- # @param [Hash] opts the optional parameters
95
- # @option opts [String] :grant_type
96
- # @option opts [String] :code
97
- # @option opts [String] :redirect_uri
98
- # @option opts [String] :client_id
99
- # @option opts [String] :client_secret
100
- # @option opts [String] :refresh_token
101
- # @return [Array<(TokenResponseIF, Integer, Hash)>] TokenResponseIF data, response status code and response headers
102
- def create_token_with_http_info(opts = {})
103
- if @api_client.config.debugging
104
- @api_client.config.logger.debug 'Calling API: DefaultApi.create_token ...'
105
- end
106
- # resource path
107
- local_var_path = '/oauth/v1/token'
108
-
109
- # query parameters
110
- query_params = opts[:query_params] || {}
111
-
112
- # header parameters
113
- header_params = opts[:header_params] || {}
114
- # HTTP header 'Accept' (if needed)
115
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
116
- # HTTP header 'Content-Type'
117
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
118
-
119
- # form parameters
120
- form_params = opts[:form_params] || {}
121
- form_params['grant_type'] = opts[:'grant_type'] if !opts[:'grant_type'].nil?
122
- form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
123
- form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
124
- form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
125
- form_params['client_secret'] = opts[:'client_secret'] if !opts[:'client_secret'].nil?
126
- form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
127
-
128
- # http body (model)
129
- post_body = opts[:body]
130
-
131
- # return_type
132
- return_type = opts[:return_type] || 'TokenResponseIF'
133
-
134
- # auth_names
135
- auth_names = opts[:auth_names] || []
136
-
137
- new_options = opts.merge(
138
- :header_params => header_params,
139
- :query_params => query_params,
140
- :form_params => form_params,
141
- :body => post_body,
142
- :auth_names => auth_names,
143
- :return_type => return_type
144
- )
145
-
146
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
147
- if @api_client.config.debugging
148
- @api_client.config.logger.debug "API called: DefaultApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
- end
150
- return data, status_code, headers
151
- end
152
-
153
- # @param token [String]
154
- # @param [Hash] opts the optional parameters
155
- # @return [AccessTokenInfoResponse]
156
- def get_access_token(token, opts = {})
157
- data, _status_code, _headers = get_access_token_with_http_info(token, opts)
158
- data
159
- end
160
-
161
- # @param token [String]
162
- # @param [Hash] opts the optional parameters
163
- # @return [Array<(AccessTokenInfoResponse, Integer, Hash)>] AccessTokenInfoResponse data, response status code and response headers
164
- def get_access_token_with_http_info(token, opts = {})
165
- if @api_client.config.debugging
166
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_access_token ...'
167
- end
168
- # verify the required parameter 'token' is set
169
- if @api_client.config.client_side_validation && token.nil?
170
- fail ArgumentError, "Missing the required parameter 'token' when calling DefaultApi.get_access_token"
171
- end
172
- # resource path
173
- local_var_path = '/oauth/v1/access-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
174
-
175
- # query parameters
176
- query_params = opts[:query_params] || {}
177
-
178
- # header parameters
179
- header_params = opts[:header_params] || {}
180
- # HTTP header 'Accept' (if needed)
181
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
182
-
183
- # form parameters
184
- form_params = opts[:form_params] || {}
185
-
186
- # http body (model)
187
- post_body = opts[:body]
188
-
189
- # return_type
190
- return_type = opts[:return_type] || 'AccessTokenInfoResponse'
191
-
192
- # auth_names
193
- auth_names = opts[:auth_names] || []
194
-
195
- new_options = opts.merge(
196
- :header_params => header_params,
197
- :query_params => query_params,
198
- :form_params => form_params,
199
- :body => post_body,
200
- :auth_names => auth_names,
201
- :return_type => return_type
202
- )
203
-
204
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
205
- if @api_client.config.debugging
206
- @api_client.config.logger.debug "API called: DefaultApi#get_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
- end
208
- return data, status_code, headers
209
- end
210
-
211
- # @param token [String]
212
- # @param [Hash] opts the optional parameters
213
- # @return [RefreshTokenInfoResponse]
214
- def get_refresh_token(token, opts = {})
215
- data, _status_code, _headers = get_refresh_token_with_http_info(token, opts)
216
- data
217
- end
218
-
219
- # @param token [String]
220
- # @param [Hash] opts the optional parameters
221
- # @return [Array<(RefreshTokenInfoResponse, Integer, Hash)>] RefreshTokenInfoResponse data, response status code and response headers
222
- def get_refresh_token_with_http_info(token, opts = {})
223
- if @api_client.config.debugging
224
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_refresh_token ...'
225
- end
226
- # verify the required parameter 'token' is set
227
- if @api_client.config.client_side_validation && token.nil?
228
- fail ArgumentError, "Missing the required parameter 'token' when calling DefaultApi.get_refresh_token"
229
- end
230
- # resource path
231
- local_var_path = '/oauth/v1/refresh-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
232
-
233
- # query parameters
234
- query_params = opts[:query_params] || {}
235
-
236
- # header parameters
237
- header_params = opts[:header_params] || {}
238
- # HTTP header 'Accept' (if needed)
239
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
240
-
241
- # form parameters
242
- form_params = opts[:form_params] || {}
243
-
244
- # http body (model)
245
- post_body = opts[:body]
246
-
247
- # return_type
248
- return_type = opts[:return_type] || 'RefreshTokenInfoResponse'
249
-
250
- # auth_names
251
- auth_names = opts[:auth_names] || []
252
-
253
- new_options = opts.merge(
254
- :header_params => header_params,
255
- :query_params => query_params,
256
- :form_params => form_params,
257
- :body => post_body,
258
- :auth_names => auth_names,
259
- :return_type => return_type
260
- )
261
-
262
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
263
- if @api_client.config.debugging
264
- @api_client.config.logger.debug "API called: DefaultApi#get_refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
265
- end
266
- return data, status_code, headers
267
- end
268
- end
269
- end
270
- end