hubspot-api-client 10.1.0 → 11.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/Gemfile.lock +4 -4
  4. data/README.md +4 -0
  5. data/lib/hubspot/codegen/cms/audit-logs/api/{default_api.rb → audit_logs_api.rb} +3 -3
  6. data/lib/hubspot/codegen/cms/blogs/authors/api/{default_api.rb → author_api.rb} +28 -28
  7. data/lib/hubspot/codegen/cms/blogs/blog-posts/api/{default_api.rb → blog_post_api.rb} +62 -62
  8. data/lib/hubspot/codegen/cms/blogs/tags/api/{default_api.rb → tag_api.rb} +28 -28
  9. data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
  10. data/lib/hubspot/codegen/cms/domains/configuration.rb +0 -7
  11. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +102 -102
  12. data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +21 -21
  13. data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +100 -108
  14. data/lib/hubspot/codegen/cms/hubdb/api_client.rb +1 -1
  15. data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
  16. data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
  17. 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
  18. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
  19. data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
  20. data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
  21. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
  22. data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
  23. data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
  24. data/lib/hubspot/codegen/cms/hubdb/models/{column_input.rb → column_request.rb} +71 -47
  25. data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
  26. data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
  27. data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
  28. data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
  29. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +4 -9
  30. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +12 -27
  31. data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_row_v3_input.rb → hub_db_table_row_v3_request.rb} +25 -20
  32. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
  33. data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_v3_input.rb → hub_db_table_v3_request.rb} +53 -53
  34. data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
  35. data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
  36. data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
  37. data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
  38. data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
  39. data/lib/hubspot/codegen/cms/performance/api/{default_api.rb → public_performance_api.rb} +5 -5
  40. data/lib/hubspot/codegen/cms/site-search/api/{default_api.rb → public_api.rb} +7 -7
  41. data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +15 -15
  42. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +0 -8
  43. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +0 -4
  44. data/lib/hubspot/codegen/crm/companies/models/filter.rb +3 -2
  45. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +0 -8
  46. data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +150 -0
  47. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +0 -4
  48. data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -2
  49. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +0 -8
  50. data/lib/hubspot/codegen/crm/deals/api/search_api.rb +0 -4
  51. data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -2
  52. data/lib/hubspot/codegen/crm/imports/api/core_api.rb +2 -2
  53. data/lib/hubspot/codegen/crm/imports/api/{default_api.rb → public_imports_api.rb} +8 -8
  54. data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +4 -4
  55. data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +0 -8
  56. data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +0 -4
  57. data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -2
  58. data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -8
  59. data/lib/hubspot/codegen/crm/objects/api/gdpr_api.rb +162 -0
  60. data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -4
  61. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +0 -2
  62. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +0 -4
  63. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +3 -2
  64. data/lib/hubspot/codegen/crm/objects/models/filter.rb +3 -2
  65. data/lib/hubspot/codegen/crm/owners/api/{default_api.rb → owners_api.rb} +6 -6
  66. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +0 -8
  67. data/lib/hubspot/codegen/crm/products/api/search_api.rb +0 -4
  68. data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -2
  69. data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +0 -2
  70. data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +0 -4
  71. data/lib/hubspot/codegen/crm/quotes/models/filter.rb +3 -2
  72. data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +3 -3
  73. data/lib/hubspot/codegen/crm/schemas/api/{default_api.rb → public_object_schemas_api.rb} +4 -4
  74. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +0 -8
  75. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +0 -4
  76. data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -2
  77. data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +3 -3
  78. data/lib/hubspot/codegen/crm/timeline/models/{collection_response_timeline_event_template.rb → collection_response_timeline_event_template_no_paging.rb} +7 -17
  79. data/lib/hubspot/codegen/files/files/api/files_api.rb +12 -6
  80. data/lib/hubspot/codegen/files/files/api/folders_api.rb +12 -0
  81. data/lib/hubspot/codegen/files/files/models/collection_response_file.rb +1 -1
  82. data/lib/hubspot/codegen/files/files/models/error_category.rb +18 -18
  83. data/lib/hubspot/codegen/marketing/transactional/api/{default_api.rb → public_smtp_tokens_api.rb} +14 -74
  84. data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +86 -0
  85. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +82 -0
  86. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +140 -0
  87. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +100 -0
  88. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +33 -1
  89. data/lib/hubspot/codegen/oauth/models/token_response_if.rb +27 -4
  90. data/lib/hubspot/version.rb +1 -1
  91. data/lib/hubspot-api-client.rb +16 -3
  92. data/pkg/hubspot-api-client-10.1.1.gem +0 -0
  93. data/spec/codegen/cms/audit-logs/api/{default_api_spec.rb → audit_logs_api_spec.rb} +6 -6
  94. data/spec/codegen/cms/blogs/authors/api/{default_api_spec.rb → author_api_spec.rb} +6 -6
  95. data/spec/codegen/cms/blogs/blog-posts/api/{default_api_spec.rb → blog_post_api_spec.rb} +6 -6
  96. data/spec/codegen/cms/blogs/tags/api/{default_api_spec.rb → tag_api_spec.rb} +6 -6
  97. data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +18 -18
  98. data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +4 -4
  99. data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +35 -36
  100. 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
  101. data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
  102. data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
  103. data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
  104. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
  105. data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
  106. data/spec/codegen/cms/hubdb/models/{column_input_spec.rb → column_request_spec.rb} +14 -22
  107. data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
  108. data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
  109. data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
  110. data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
  111. data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
  112. data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
  113. data/spec/codegen/cms/hubdb/models/{hub_db_table_row_v3_input_spec.rb → hub_db_table_row_v3_request_spec.rb} +10 -10
  114. data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +7 -1
  115. data/spec/codegen/cms/hubdb/models/{hub_db_table_v3_input_spec.rb → hub_db_table_v3_request_spec.rb} +13 -13
  116. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
  117. data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
  118. data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
  119. data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
  120. data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
  121. data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
  122. data/spec/codegen/cms/performance/api/{default_api_spec.rb → public_performance_api_spec.rb} +6 -6
  123. data/spec/codegen/cms/site-search/api/{default_api_spec.rb → public_api_spec.rb} +6 -6
  124. data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
  125. data/spec/codegen/crm/companies/api/batch_api_spec.rb +0 -4
  126. data/spec/codegen/crm/companies/api/search_api_spec.rb +0 -2
  127. data/spec/codegen/crm/companies/models/filter_spec.rb +1 -1
  128. data/spec/codegen/crm/contacts/api/batch_api_spec.rb +0 -4
  129. data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +59 -0
  130. data/spec/codegen/crm/contacts/api/search_api_spec.rb +0 -2
  131. data/spec/codegen/crm/contacts/models/filter_spec.rb +1 -1
  132. data/spec/codegen/crm/deals/api/batch_api_spec.rb +0 -4
  133. data/spec/codegen/crm/deals/api/search_api_spec.rb +0 -2
  134. data/spec/codegen/crm/deals/models/filter_spec.rb +1 -1
  135. data/spec/codegen/crm/imports/api/{default_api_spec.rb → public_imports_api_spec.rb} +8 -8
  136. data/spec/codegen/crm/imports/models/public_import_error_spec.rb +2 -2
  137. data/spec/codegen/crm/line_items/api/batch_api_spec.rb +0 -4
  138. data/spec/codegen/crm/line_items/api/search_api_spec.rb +0 -2
  139. data/spec/codegen/crm/line_items/models/filter_spec.rb +1 -1
  140. data/spec/codegen/crm/objects/api/batch_api_spec.rb +0 -4
  141. data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +61 -0
  142. data/spec/codegen/crm/objects/api/search_api_spec.rb +0 -2
  143. data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +0 -1
  144. data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +0 -2
  145. data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +1 -1
  146. data/spec/codegen/crm/objects/models/filter_spec.rb +1 -1
  147. data/spec/codegen/crm/owners/api/{default_api_spec.rb → owners_api_spec.rb} +6 -6
  148. data/spec/codegen/crm/products/api/batch_api_spec.rb +0 -4
  149. data/spec/codegen/crm/products/api/search_api_spec.rb +0 -2
  150. data/spec/codegen/crm/products/models/filter_spec.rb +1 -1
  151. data/spec/codegen/crm/quotes/api/batch_api_spec.rb +0 -1
  152. data/spec/codegen/crm/quotes/api/search_api_spec.rb +0 -2
  153. data/spec/codegen/crm/quotes/models/filter_spec.rb +1 -1
  154. data/spec/codegen/crm/schemas/api/{default_api_spec.rb → public_object_schemas_api_spec.rb} +6 -6
  155. data/spec/codegen/crm/tickets/api/batch_api_spec.rb +0 -4
  156. data/spec/codegen/crm/tickets/api/search_api_spec.rb +0 -2
  157. data/spec/codegen/crm/tickets/models/filter_spec.rb +1 -1
  158. data/spec/codegen/crm/timeline/api/templates_api_spec.rb +1 -1
  159. data/spec/codegen/crm/timeline/models/{collection_response_timeline_event_template_spec.rb → collection_response_timeline_event_template_no_paging_spec.rb} +6 -12
  160. data/spec/codegen/files/files/api/files_api_spec.rb +4 -2
  161. data/spec/codegen/files/files/api/folders_api_spec.rb +4 -0
  162. data/spec/codegen/files/files/models/error_category_spec.rb +6 -6
  163. data/spec/codegen/marketing/transactional/api/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +6 -18
  164. data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +47 -0
  165. data/spec/codegen/oauth/api/access_tokens_api_spec.rb +45 -0
  166. data/spec/codegen/oauth/api/{default_api_spec.rb → refresh_tokens_api_spec.rb} +6 -31
  167. data/spec/codegen/oauth/api/tokens_api_spec.rb +50 -0
  168. data/spec/codegen/oauth/models/access_token_info_response_spec.rb +12 -0
  169. data/spec/codegen/oauth/models/token_response_if_spec.rb +12 -0
  170. data/spec/features/cms/audit-logs/{default_api_spec.rb → audit_logs_api_spec.rb} +4 -4
  171. data/spec/features/cms/blogs/authors/{default_api_spec.rb → author_api_spec.rb} +28 -28
  172. data/spec/features/cms/blogs/blog-posts/{default_api_spec.rb → blog_post_api_spec.rb} +2 -2
  173. data/spec/features/cms/blogs/tags/{default_api_spec.rb → tag_api_spec.rb} +2 -2
  174. data/spec/features/cms/hubdb/tables_api_spec.rb +1 -1
  175. data/spec/features/cms/perfomance/public_perfomance_api_spec.rb +8 -0
  176. data/spec/features/cms/site-search/{default_api_spec.rb → public_api_spec.rb} +2 -2
  177. data/spec/features/crm/contacts/gdpr_api_spec.rb +8 -0
  178. data/spec/features/crm/objects/gdpr_api_spec.rb +8 -0
  179. data/spec/features/crm/owners/{default_api_spec.rb → owners_api_spec.rb} +2 -2
  180. data/spec/features/crm/schemas/public_object_schemas_api_spec.rb +7 -0
  181. data/spec/features/marketing/transactional/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +2 -3
  182. data/spec/features/marketing/transactional/single_send_api_spec.rb +7 -0
  183. data/spec/features/oauth/access_tokens_api_spec.rb +7 -0
  184. data/spec/features/oauth/refresh_tokens_api_spec.rb +8 -0
  185. data/spec/features/oauth/tokens_api_spec.rb +7 -0
  186. metadata +96 -82
  187. data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +0 -241
  188. data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +0 -224
  189. data/lib/hubspot/codegen/crm/timeline/models/paging.rb +0 -219
  190. data/lib/hubspot/codegen/crm/timeline/models/previous_page.rb +0 -224
  191. data/lib/hubspot/codegen/oauth/api/default_api.rb +0 -270
  192. data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +0 -59
  193. data/spec/codegen/crm/timeline/models/next_page_spec.rb +0 -47
  194. data/spec/codegen/crm/timeline/models/paging_spec.rb +0 -47
  195. data/spec/codegen/crm/timeline/models/previous_page_spec.rb +0 -47
  196. data/spec/features/cms/perfomance/default_api_spec.rb +0 -8
  197. data/spec/features/crm/schemas/default_api_spec.rb +0 -7
  198. data/spec/features/oauth/default_api_spec.rb +0 -10
@@ -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
@@ -1,59 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for Hubspot::Cms::Hubdb::HubDbTableV3LiveInput
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'HubDbTableV3LiveInput' do
21
- before do
22
- # run before each test
23
- @instance = Hubspot::Cms::Hubdb::HubDbTableV3LiveInput.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of HubDbTableV3LiveInput' do
31
- it 'should create an instance of HubDbTableV3LiveInput' do
32
- expect(@instance).to be_instance_of(Hubspot::Cms::Hubdb::HubDbTableV3LiveInput)
33
- end
34
- end
35
- describe 'test attribute "archived"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "name"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "label"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- describe 'test attribute "published"' do
54
- it 'should work' do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
- end
57
- end
58
-
59
- end
@@ -1,47 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for Hubspot::Crm::Timeline::NextPage
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'NextPage' do
21
- before do
22
- # run before each test
23
- @instance = Hubspot::Crm::Timeline::NextPage.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of NextPage' do
31
- it 'should create an instance of NextPage' do
32
- expect(@instance).to be_instance_of(Hubspot::Crm::Timeline::NextPage)
33
- end
34
- end
35
- describe 'test attribute "after"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "link"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end
@@ -1,47 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for Hubspot::Crm::Timeline::Paging
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'Paging' do
21
- before do
22
- # run before each test
23
- @instance = Hubspot::Crm::Timeline::Paging.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of Paging' do
31
- it 'should create an instance of Paging' do
32
- expect(@instance).to be_instance_of(Hubspot::Crm::Timeline::Paging)
33
- end
34
- end
35
- describe 'test attribute "_next"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "prev"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end
@@ -1,47 +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 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for Hubspot::Crm::Timeline::PreviousPage
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'PreviousPage' do
21
- before do
22
- # run before each test
23
- @instance = Hubspot::Crm::Timeline::PreviousPage.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of PreviousPage' do
31
- it 'should create an instance of PreviousPage' do
32
- expect(@instance).to be_instance_of(Hubspot::Crm::Timeline::PreviousPage)
33
- end
34
- end
35
- describe 'test attribute "before"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "link"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end