hubspot-api-client 17.0.0.pre.beta.1 → 17.0.0.pre.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/hubspot/codegen/crm/associations/schema/api/types_api.rb +97 -0
  5. data/lib/hubspot/codegen/crm/associations/schema/api_client.rb +412 -0
  6. data/lib/hubspot/codegen/crm/associations/schema/api_error.rb +63 -0
  7. data/lib/hubspot/codegen/crm/associations/schema/configuration.rb +296 -0
  8. data/lib/hubspot/codegen/crm/associations/schema/models/associated_id.rb +244 -0
  9. data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_association.rb +232 -0
  10. data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_object_id.rb +232 -0
  11. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association.rb +328 -0
  12. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi.rb +328 -0
  13. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi_with_errors.rb +348 -0
  14. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_with_errors.rb +348 -0
  15. data/lib/hubspot/codegen/crm/associations/schema/models/collection_response_public_association_definition_no_paging.rb +232 -0
  16. data/lib/hubspot/codegen/crm/associations/schema/models/error.rb +307 -0
  17. data/lib/hubspot/codegen/crm/associations/schema/models/error_category.rb +278 -0
  18. data/lib/hubspot/codegen/crm/associations/schema/models/error_detail.rb +273 -0
  19. data/lib/hubspot/codegen/crm/associations/schema/models/next_page.rb +239 -0
  20. data/lib/hubspot/codegen/crm/associations/schema/models/paging.rb +234 -0
  21. data/lib/hubspot/codegen/crm/associations/schema/models/previous_page.rb +239 -0
  22. data/lib/hubspot/codegen/crm/associations/schema/models/public_association.rb +258 -0
  23. data/lib/hubspot/codegen/crm/associations/schema/models/public_association_definition.rb +244 -0
  24. data/lib/hubspot/codegen/crm/associations/schema/models/public_association_multi.rb +256 -0
  25. data/lib/hubspot/codegen/crm/associations/schema/models/public_object_id.rb +231 -0
  26. data/lib/hubspot/codegen/crm/associations/schema/models/standard_error.rb +324 -0
  27. data/lib/hubspot/codegen/crm/associations/v4/api/basic_api.rb +365 -0
  28. data/lib/hubspot/codegen/crm/associations/v4/api/batch_api.rb +1 -1
  29. data/lib/hubspot/codegen/crm/associations/v4/api_client.rb +1 -1
  30. data/lib/hubspot/codegen/crm/associations/v4/api_error.rb +1 -1
  31. data/lib/hubspot/codegen/crm/associations/v4/configuration.rb +1 -1
  32. data/lib/hubspot/codegen/crm/associations/v4/models/associated_id.rb +244 -0
  33. data/lib/hubspot/codegen/crm/associations/v4/models/association_spec.rb +1 -1
  34. data/lib/hubspot/codegen/crm/associations/v4/models/association_spec_with_label.rb +1 -1
  35. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_archive.rb +1 -1
  36. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_post.rb +1 -1
  37. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_default_association_multi_post.rb +1 -1
  38. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_fetch_associations_batch_request.rb +1 -1
  39. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_batch_input.rb +232 -0
  40. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_id.rb +232 -0
  41. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  42. data/lib/hubspot/codegen/crm/associations/v4/models/batch_read_input_simple_public_object_id.rb +273 -0
  43. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair.rb +1 -1
  44. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair_with_errors.rb +1 -1
  45. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label.rb +1 -1
  46. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label_with_errors.rb +1 -1
  47. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_default_association.rb +1 -1
  48. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object.rb +328 -0
  49. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object_with_errors.rb +348 -0
  50. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_associated_id.rb +241 -0
  51. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_association_spec_with_label_no_paging.rb +1 -1
  52. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_multi_associated_object_with_label_forward_paging.rb +241 -0
  53. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  54. data/lib/hubspot/codegen/crm/associations/v4/models/error.rb +1 -1
  55. data/lib/hubspot/codegen/crm/associations/v4/models/error_category.rb +1 -1
  56. data/lib/hubspot/codegen/crm/associations/v4/models/error_detail.rb +1 -1
  57. data/lib/hubspot/codegen/crm/associations/v4/models/forward_paging.rb +225 -0
  58. data/lib/hubspot/codegen/crm/associations/v4/models/labels_between_object_pair.rb +1 -1
  59. data/lib/hubspot/codegen/crm/associations/v4/models/multi_associated_object_with_label.rb +1 -1
  60. data/lib/hubspot/codegen/crm/associations/v4/models/next_page.rb +1 -1
  61. data/lib/hubspot/codegen/crm/associations/v4/models/paging.rb +1 -1
  62. data/lib/hubspot/codegen/crm/associations/v4/models/previous_page.rb +1 -1
  63. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_create_request.rb +1 -1
  64. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_update_request.rb +1 -1
  65. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_archive.rb +1 -1
  66. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_post.rb +1 -1
  67. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_with_label.rb +1 -1
  68. data/lib/hubspot/codegen/crm/associations/v4/models/public_associations_for_object.rb +246 -0
  69. data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association.rb +1 -1
  70. data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association_multi_post.rb +1 -1
  71. data/lib/hubspot/codegen/crm/associations/v4/models/public_fetch_associations_batch_request.rb +1 -1
  72. data/lib/hubspot/codegen/crm/associations/v4/models/public_gdpr_delete_input.rb +239 -0
  73. data/lib/hubspot/codegen/crm/associations/v4/models/public_object_id.rb +1 -1
  74. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object.rb +303 -0
  75. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_batch_input.rb +246 -0
  76. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_id.rb +230 -0
  77. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input.rb +232 -0
  78. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input_for_create.rb +248 -0
  79. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_with_associations.rb +314 -0
  80. data/lib/hubspot/codegen/crm/associations/v4/models/standard_error.rb +1 -1
  81. data/lib/hubspot/codegen/crm/associations/v4/models/value_with_timestamp.rb +285 -0
  82. data/lib/hubspot/codegen/crm/associations/v4/schema/api/definitions_api.rb +334 -0
  83. data/lib/hubspot/codegen/crm/associations/v4/schema/api_client.rb +414 -0
  84. data/lib/hubspot/codegen/crm/associations/v4/schema/api_error.rb +65 -0
  85. data/lib/hubspot/codegen/crm/associations/v4/schema/configuration.rb +298 -0
  86. data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec.rb +280 -0
  87. data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec_with_label.rb +289 -0
  88. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_archive.rb +234 -0
  89. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_post.rb +234 -0
  90. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_default_association_multi_post.rb +234 -0
  91. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_fetch_associations_batch_request.rb +234 -0
  92. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair.rb +330 -0
  93. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair_with_errors.rb +350 -0
  94. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label.rb +330 -0
  95. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label_with_errors.rb +350 -0
  96. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_default_association.rb +350 -0
  97. data/lib/hubspot/codegen/crm/associations/v4/schema/models/collection_response_association_spec_with_label_no_paging.rb +234 -0
  98. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error.rb +309 -0
  99. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_category.rb +280 -0
  100. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_detail.rb +275 -0
  101. data/lib/hubspot/codegen/crm/associations/v4/schema/models/labels_between_object_pair.rb +290 -0
  102. data/lib/hubspot/codegen/crm/associations/v4/schema/models/multi_associated_object_with_label.rb +248 -0
  103. data/lib/hubspot/codegen/crm/associations/v4/schema/models/next_page.rb +241 -0
  104. data/lib/hubspot/codegen/crm/associations/v4/schema/models/paging.rb +236 -0
  105. data/lib/hubspot/codegen/crm/associations/v4/schema/models/previous_page.rb +241 -0
  106. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_create_request.rb +246 -0
  107. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_update_request.rb +246 -0
  108. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_archive.rb +248 -0
  109. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_post.rb +262 -0
  110. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_with_label.rb +257 -0
  111. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association.rb +260 -0
  112. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association_multi_post.rb +246 -0
  113. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_fetch_associations_batch_request.rb +241 -0
  114. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_object_id.rb +232 -0
  115. data/lib/hubspot/codegen/crm/associations/v4/schema/models/standard_error.rb +326 -0
  116. data/lib/hubspot/codegen/crm/objects/communications/api/basic_api.rb +391 -0
  117. data/lib/hubspot/codegen/crm/objects/communications/api/batch_api.rb +295 -0
  118. data/lib/hubspot/codegen/crm/objects/communications/api/public_object_api.rb +94 -0
  119. data/lib/hubspot/codegen/crm/objects/communications/api/search_api.rb +92 -0
  120. data/lib/hubspot/codegen/crm/objects/communications/api_client.rb +412 -0
  121. data/lib/hubspot/codegen/crm/objects/communications/api_error.rb +63 -0
  122. data/lib/hubspot/codegen/crm/objects/communications/configuration.rb +296 -0
  123. data/lib/hubspot/codegen/crm/objects/communications/models/associated_id.rb +244 -0
  124. data/lib/hubspot/codegen/crm/objects/communications/models/association_spec.rb +278 -0
  125. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_batch_input.rb +232 -0
  126. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_id.rb +232 -0
  127. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  128. data/lib/hubspot/codegen/crm/objects/communications/models/batch_read_input_simple_public_object_id.rb +273 -0
  129. data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object.rb +328 -0
  130. data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object_with_errors.rb +348 -0
  131. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_associated_id.rb +241 -0
  132. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  133. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  134. data/lib/hubspot/codegen/crm/objects/communications/models/error.rb +307 -0
  135. data/lib/hubspot/codegen/crm/objects/communications/models/error_category.rb +278 -0
  136. data/lib/hubspot/codegen/crm/objects/communications/models/error_detail.rb +273 -0
  137. data/lib/hubspot/codegen/crm/objects/communications/models/filter.rb +308 -0
  138. data/lib/hubspot/codegen/crm/objects/communications/models/filter_group.rb +232 -0
  139. data/lib/hubspot/codegen/crm/objects/communications/models/forward_paging.rb +225 -0
  140. data/lib/hubspot/codegen/crm/objects/communications/models/next_page.rb +239 -0
  141. data/lib/hubspot/codegen/crm/objects/communications/models/paging.rb +234 -0
  142. data/lib/hubspot/codegen/crm/objects/communications/models/previous_page.rb +239 -0
  143. data/lib/hubspot/codegen/crm/objects/communications/models/public_associations_for_object.rb +246 -0
  144. data/lib/hubspot/codegen/crm/objects/communications/models/public_merge_input.rb +244 -0
  145. data/lib/hubspot/codegen/crm/objects/communications/models/public_object_id.rb +230 -0
  146. data/lib/hubspot/codegen/crm/objects/communications/models/public_object_search_request.rb +301 -0
  147. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object.rb +303 -0
  148. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_batch_input.rb +246 -0
  149. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_id.rb +230 -0
  150. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input.rb +232 -0
  151. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input_for_create.rb +248 -0
  152. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_with_associations.rb +314 -0
  153. data/lib/hubspot/codegen/crm/objects/communications/models/standard_error.rb +324 -0
  154. data/lib/hubspot/codegen/crm/objects/communications/models/value_with_timestamp.rb +285 -0
  155. data/lib/hubspot/codegen/webhooks/models/error_category.rb +18 -18
  156. data/lib/hubspot/codegen/webhooks/models/subscription_create_request.rb +2 -2
  157. data/lib/hubspot/codegen/webhooks/models/subscription_response.rb +2 -2
  158. data/lib/hubspot/discovery/crm/associations/client.rb +4 -2
  159. data/lib/hubspot/discovery/crm/associations/schema/api/types_api.rb +15 -0
  160. data/lib/hubspot/discovery/crm/associations/schema/client.rb +20 -0
  161. data/lib/hubspot/discovery/crm/associations/v4/api/{definitions_api.rb → basic_api.rb} +1 -1
  162. data/lib/hubspot/discovery/crm/associations/v4/client.rb +6 -1
  163. data/lib/hubspot/discovery/crm/associations/v4/schema/api/definitions_api.rb +17 -0
  164. data/lib/hubspot/discovery/crm/associations/v4/schema/client.rb +22 -0
  165. data/lib/hubspot/discovery/crm/objects/client.rb +1 -0
  166. data/lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb +15 -0
  167. data/lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb +15 -0
  168. data/lib/hubspot/discovery/crm/objects/communications/api/public_object_api.rb +15 -0
  169. data/lib/hubspot/discovery/crm/objects/communications/api/search_api.rb +15 -0
  170. data/lib/hubspot/discovery/crm/objects/communications/client.rb +24 -0
  171. data/lib/hubspot/version.rb +1 -1
  172. data/spec/discovery/crm/associations/client_spec.rb +1 -0
  173. data/spec/discovery/crm/associations/schema/types_api_spec.rb +7 -0
  174. data/spec/discovery/crm/associations/v4/basic_api_spec.rb +10 -0
  175. data/spec/discovery/crm/associations/v4/client_spec.rb +7 -0
  176. data/spec/discovery/crm/associations/v4/{definitions_api_spec.rb → schema/definitions_api_spec.rb} +3 -3
  177. data/spec/discovery/crm/objects/client_spec.rb +1 -0
  178. data/spec/discovery/crm/objects/communications/basic_api_spec.rb +10 -0
  179. data/spec/discovery/crm/objects/communications/batch_api_spec.rb +10 -0
  180. data/spec/discovery/crm/objects/communications/public_object_api_spec.rb +7 -0
  181. data/spec/discovery/crm/objects/communications/search_api_spec.rb +7 -0
  182. metadata +145 -10
  183. data/lib/hubspot/codegen/crm/associations/api/types_api.rb +0 -95
  184. data/lib/hubspot/codegen/crm/associations/v4/api/definitions_api.rb +0 -332
  185. data/lib/hubspot/discovery/crm/associations/api/types_api.rb +0 -13
  186. data/spec/discovery/crm/associations/types_api_spec.rb +0 -7
@@ -0,0 +1,298 @@
1
+ =begin
2
+ #CrmPublicAssociationsServiceV4
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ module Hubspot
14
+ module Crm
15
+ module Associations
16
+ module V4
17
+ module Schema
18
+ class Configuration
19
+ # Defines url scheme
20
+ attr_accessor :scheme
21
+
22
+ # Defines url host
23
+ attr_accessor :host
24
+
25
+ # Defines url base path
26
+ attr_accessor :base_path
27
+
28
+ # Define server configuration index
29
+ attr_accessor :server_index
30
+
31
+ # Define server operation configuration index
32
+ attr_accessor :server_operation_index
33
+
34
+ # Default server variables
35
+ attr_accessor :server_variables
36
+
37
+ # Default server operation variables
38
+ attr_accessor :server_operation_variables
39
+
40
+ # Defines API keys used with API Key authentications.
41
+ #
42
+ # @return [Hash] key: parameter name, value: parameter value (API key)
43
+ #
44
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
45
+ # config.api_key['api_key'] = 'xxx'
46
+ attr_accessor :api_key
47
+
48
+ # Defines API key prefixes used with API Key authentications.
49
+ #
50
+ # @return [Hash] key: parameter name, value: API key prefix
51
+ #
52
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
53
+ # config.api_key_prefix['api_key'] = 'Token'
54
+ attr_accessor :api_key_prefix
55
+
56
+ # Defines the username used with HTTP basic authentication.
57
+ #
58
+ # @return [String]
59
+ attr_accessor :username
60
+
61
+ # Defines the password used with HTTP basic authentication.
62
+ #
63
+ # @return [String]
64
+ attr_accessor :password
65
+
66
+ # Defines the access token (Bearer) used with OAuth2.
67
+ attr_accessor :access_token
68
+
69
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
70
+ # details will be logged with `logger.debug` (see the `logger` attribute).
71
+ # Default to false.
72
+ #
73
+ # @return [true, false]
74
+ attr_accessor :debugging
75
+
76
+ # Defines the logger used for debugging.
77
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
78
+ #
79
+ # @return [#debug]
80
+ attr_accessor :logger
81
+
82
+ # Defines the temporary folder to store downloaded files
83
+ # (for API endpoints that have file response).
84
+ # Default to use `Tempfile`.
85
+ #
86
+ # @return [String]
87
+ attr_accessor :temp_folder_path
88
+
89
+ # The time limit for HTTP request in seconds.
90
+ # Default to 0 (never times out).
91
+ attr_accessor :timeout
92
+
93
+ # Set this to false to skip client side validation in the operation.
94
+ # Default to true.
95
+ # @return [true, false]
96
+ attr_accessor :client_side_validation
97
+
98
+ ### TLS/SSL setting
99
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
100
+ # Default to true.
101
+ #
102
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
103
+ #
104
+ # @return [true, false]
105
+ attr_accessor :verify_ssl
106
+
107
+ ### TLS/SSL setting
108
+ # Set this to false to skip verifying SSL host name
109
+ # Default to true.
110
+ #
111
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
112
+ #
113
+ # @return [true, false]
114
+ attr_accessor :verify_ssl_host
115
+
116
+ ### TLS/SSL setting
117
+ # Set this to customize the certificate file to verify the peer.
118
+ #
119
+ # @return [String] the path to the certificate file
120
+ #
121
+ # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
122
+ # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
123
+ attr_accessor :ssl_ca_cert
124
+
125
+ ### TLS/SSL setting
126
+ # Client certificate file (for client certificate)
127
+ attr_accessor :cert_file
128
+
129
+ ### TLS/SSL setting
130
+ # Client private key file (for client certificate)
131
+ attr_accessor :key_file
132
+
133
+ # Set this to customize parameters encoding of array parameter with multi collectionFormat.
134
+ # Default to nil.
135
+ #
136
+ # @see The params_encoding option of Ethon. Related source code:
137
+ # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
138
+ attr_accessor :params_encoding
139
+
140
+
141
+ attr_accessor :inject_format
142
+
143
+ attr_accessor :force_ending_format
144
+
145
+ attr_accessor :error_handler
146
+
147
+ def initialize
148
+ @scheme = 'https'
149
+ @host = 'api.hubapi.com'
150
+ @base_path = ''
151
+ @server_index = 0
152
+ @server_operation_index = {}
153
+ @server_variables = {}
154
+ @server_operation_variables = {}
155
+ @api_key = {}
156
+ @api_key_prefix = {}
157
+ @client_side_validation = true
158
+ @verify_ssl = true
159
+ @verify_ssl_host = true
160
+ @cert_file = nil
161
+ @key_file = nil
162
+ @timeout = 0
163
+ @params_encoding = nil
164
+ @debugging = false
165
+ @inject_format = false
166
+ @force_ending_format = false
167
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
168
+ # error_handler params: { 'status_code': { max_retries: ..., seconds_delay: ... }, ... }
169
+ @error_handler = {}
170
+
171
+ yield(self) if block_given?
172
+ end
173
+
174
+ # The default Configuration object.
175
+ def self.default
176
+ @@default ||= Configuration.new
177
+ end
178
+
179
+ def configure
180
+ yield(self) if block_given?
181
+ end
182
+
183
+ def scheme=(scheme)
184
+ # remove :// from scheme
185
+ @scheme = scheme.sub(/:\/\//, '')
186
+ end
187
+
188
+ def host=(host)
189
+ # remove http(s):// and anything after a slash
190
+ @host = host.sub(/https?:\/\//, '').split('/').first
191
+ end
192
+
193
+ def base_path=(base_path)
194
+ # Add leading and trailing slashes to base_path
195
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
196
+ @base_path = '' if @base_path == '/'
197
+ end
198
+
199
+ # Returns base URL for specified operation based on server settings
200
+ def base_url(operation = nil)
201
+ index = server_operation_index.fetch(operation, server_index)
202
+ return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
203
+
204
+ server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
205
+ end
206
+
207
+ # Gets API key (with prefix if set).
208
+ # @param [String] param_name the parameter name of API key auth
209
+ def api_key_with_prefix(param_name, param_alias = nil)
210
+ key = @api_key[param_name]
211
+ key = @api_key.fetch(param_alias, key) unless param_alias.nil?
212
+ if @api_key_prefix[param_name]
213
+ "#{@api_key_prefix[param_name]} #{key}"
214
+ else
215
+ key
216
+ end
217
+ end
218
+
219
+ # Gets Basic Auth token string
220
+ def basic_auth_token
221
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
222
+ end
223
+
224
+ # Returns Auth Settings hash for api client.
225
+ def auth_settings
226
+ {
227
+ 'hapikey' =>
228
+ {
229
+ type: 'api_key',
230
+ in: 'query',
231
+ key: 'hapikey',
232
+ value: api_key_with_prefix('hapikey')
233
+ },
234
+ 'oauth2' =>
235
+ {
236
+ type: 'oauth2',
237
+ in: 'header',
238
+ key: 'Authorization',
239
+ value: "Bearer #{access_token}"
240
+ },
241
+ }
242
+ end
243
+
244
+ # Returns an array of Server setting
245
+ def server_settings
246
+ [
247
+ {
248
+ url: "https://api.hubapi.com",
249
+ description: "No description provided",
250
+ }
251
+ ]
252
+ end
253
+
254
+ def operation_server_settings
255
+ {
256
+ }
257
+ end
258
+
259
+ # Returns URL based on server settings
260
+ #
261
+ # @param index array index of the server settings
262
+ # @param variables hash of variable and the corresponding value
263
+ def server_url(index, variables = {}, servers = nil)
264
+ servers = server_settings if servers == nil
265
+
266
+ # check array index out of bound
267
+ if (index < 0 || index >= servers.size)
268
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
269
+ end
270
+
271
+ server = servers[index]
272
+ url = server[:url]
273
+
274
+ return url unless server.key? :variables
275
+
276
+ # go through variable and assign a value
277
+ server[:variables].each do |name, variable|
278
+ if variables.key?(name)
279
+ if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
280
+ url.gsub! "{" + name.to_s + "}", variables[name]
281
+ else
282
+ fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
283
+ end
284
+ else
285
+ # use default value
286
+ url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
287
+ end
288
+ end
289
+
290
+ url
291
+ end
292
+
293
+ end
294
+ end
295
+ end
296
+ end
297
+ end
298
+ end
@@ -0,0 +1,280 @@
1
+ =begin
2
+ #CrmPublicAssociationsServiceV4
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v4
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Hubspot
17
+ module Crm
18
+ module Associations
19
+ module V4
20
+ module Schema
21
+ class AssociationSpec
22
+ attr_accessor :association_category
23
+
24
+ attr_accessor :association_type_id
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'association_category' => :'associationCategory',
52
+ :'association_type_id' => :'associationTypeId'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'association_category' => :'String',
65
+ :'association_type_id' => :'Integer'
66
+ }
67
+ end
68
+
69
+ # List of attributes with nullable: true
70
+ def self.openapi_nullable
71
+ Set.new([
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Associations::V4::AssociationSpec` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!self.class.attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Associations::V4::AssociationSpec`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'association_category')
91
+ self.association_category = attributes[:'association_category']
92
+ end
93
+
94
+ if attributes.key?(:'association_type_id')
95
+ self.association_type_id = attributes[:'association_type_id']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+ if @association_category.nil?
104
+ invalid_properties.push('invalid value for "association_category", association_category cannot be nil.')
105
+ end
106
+
107
+ if @association_type_id.nil?
108
+ invalid_properties.push('invalid value for "association_type_id", association_type_id cannot be nil.')
109
+ end
110
+
111
+ invalid_properties
112
+ end
113
+
114
+ # Check to see if the all the properties in the model are valid
115
+ # @return true if the model is valid
116
+ def valid?
117
+ return false if @association_category.nil?
118
+ association_category_validator = EnumAttributeValidator.new('String', ["HUBSPOT_DEFINED", "USER_DEFINED", "INTEGRATOR_DEFINED"])
119
+ return false unless association_category_validator.valid?(@association_category)
120
+ return false if @association_type_id.nil?
121
+ true
122
+ end
123
+
124
+ # Custom attribute writer method checking allowed values (enum).
125
+ # @param [Object] association_category Object to be assigned
126
+ def association_category=(association_category)
127
+ validator = EnumAttributeValidator.new('String', ["HUBSPOT_DEFINED", "USER_DEFINED", "INTEGRATOR_DEFINED"])
128
+ unless validator.valid?(association_category)
129
+ fail ArgumentError, "invalid value for \"association_category\", must be one of #{validator.allowable_values}."
130
+ end
131
+ @association_category = association_category
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ association_category == o.association_category &&
140
+ association_type_id == o.association_type_id
141
+ end
142
+
143
+ # @see the `==` method
144
+ # @param [Object] Object to be compared
145
+ def eql?(o)
146
+ self == o
147
+ end
148
+
149
+ # Calculates hash code according to all attributes.
150
+ # @return [Integer] Hash code
151
+ def hash
152
+ [association_category, association_type_id].hash
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def self.build_from_hash(attributes)
159
+ new.build_from_hash(attributes)
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ self.class.openapi_types.each_pair do |key, type|
169
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
170
+ self.send("#{key}=", nil)
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
175
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
176
+ end
177
+ elsif !attributes[self.class.attribute_map[key]].nil?
178
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
+ end
180
+ end
181
+
182
+ self
183
+ end
184
+
185
+ # Deserializes the data based on type
186
+ # @param string type Data type
187
+ # @param string value Value to be deserialized
188
+ # @return [Object] Deserialized data
189
+ def _deserialize(type, value)
190
+ case type.to_sym
191
+ when :Time
192
+ Time.parse(value)
193
+ when :Date
194
+ Date.parse(value)
195
+ when :String
196
+ value.to_s
197
+ when :Integer
198
+ value.to_i
199
+ when :Float
200
+ value.to_f
201
+ when :Boolean
202
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
203
+ true
204
+ else
205
+ false
206
+ end
207
+ when :Object
208
+ # generic object (usually a Hash), return directly
209
+ value
210
+ when /\AArray<(?<inner_type>.+)>\z/
211
+ inner_type = Regexp.last_match[:inner_type]
212
+ value.map { |v| _deserialize(inner_type, v) }
213
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
214
+ k_type = Regexp.last_match[:k_type]
215
+ v_type = Regexp.last_match[:v_type]
216
+ {}.tap do |hash|
217
+ value.each do |k, v|
218
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
219
+ end
220
+ end
221
+ else # model
222
+ # models (e.g. Pet) or oneOf
223
+ klass = Hubspot::Crm::Associations::V4.const_get(type)
224
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
225
+ end
226
+ end
227
+
228
+ # Returns the string representation of the object
229
+ # @return [String] String presentation of the object
230
+ def to_s
231
+ to_hash.to_s
232
+ end
233
+
234
+ # to_body is an alias to to_hash (backward compatibility)
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_body
237
+ to_hash
238
+ end
239
+
240
+ # Returns the object in the form of hash
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_hash
243
+ hash = {}
244
+ self.class.attribute_map.each_pair do |attr, param|
245
+ value = self.send(attr)
246
+ if value.nil?
247
+ is_nullable = self.class.openapi_nullable.include?(attr)
248
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
249
+ end
250
+
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map { |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+
274
+ end
275
+
276
+ end
277
+ end
278
+ end
279
+ end
280
+ end