hubspot-api-client 13.1.0 → 14.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/Gemfile.lock +16 -16
  4. data/README.md +4 -2
  5. data/hubspot-api-client.gemspec +1 -1
  6. data/lib/hubspot/codegen/automation/actions/api_error.rb +1 -1
  7. data/lib/hubspot/codegen/cms/audit-logs/api_error.rb +1 -1
  8. data/lib/hubspot/codegen/cms/blogs/authors/api_error.rb +1 -1
  9. data/lib/hubspot/codegen/cms/blogs/blog-posts/api_error.rb +1 -1
  10. data/lib/hubspot/codegen/cms/blogs/tags/api_error.rb +1 -1
  11. data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +1 -1
  12. data/lib/hubspot/codegen/cms/domains/api_error.rb +1 -1
  13. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +2 -2
  14. data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
  15. data/lib/hubspot/codegen/cms/performance/api_error.rb +1 -1
  16. data/lib/hubspot/codegen/cms/site-search/api/public_api.rb +1 -4
  17. data/lib/hubspot/codegen/cms/site-search/api_error.rb +1 -1
  18. data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +2 -2
  19. data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +1 -1
  20. data/lib/hubspot/codegen/cms/site-search/models/{search_hit_field.rb → indexed_field.rb} +35 -35
  21. data/lib/hubspot/codegen/cms/source-code/api_error.rb +1 -1
  22. data/lib/hubspot/codegen/cms/url-redirects/api/redirects_api.rb +23 -21
  23. data/lib/hubspot/codegen/cms/url-redirects/api_error.rb +1 -1
  24. data/lib/hubspot/codegen/cms/url-redirects/models/{collection_response_with_total_url_mapping.rb → collection_response_with_total_url_mapping_forward_paging.rb} +4 -6
  25. data/lib/hubspot/codegen/cms/url-redirects/models/{paging.rb → forward_paging.rb} +3 -3
  26. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping.rb +14 -226
  27. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping_create_request_body.rb +31 -31
  28. data/lib/hubspot/codegen/communication_preferences/api_error.rb +1 -1
  29. data/lib/hubspot/codegen/conversations/visitor-identification/api_error.rb +1 -1
  30. data/lib/hubspot/codegen/crm/associations/api_error.rb +1 -1
  31. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +2 -2
  32. data/lib/hubspot/codegen/crm/companies/api_error.rb +1 -1
  33. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +2 -2
  34. data/lib/hubspot/codegen/crm/contacts/api_error.rb +1 -1
  35. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +2 -2
  36. data/lib/hubspot/codegen/crm/deals/api_error.rb +1 -1
  37. data/lib/hubspot/codegen/crm/extensions/accounting/api_error.rb +1 -1
  38. data/lib/hubspot/codegen/crm/extensions/calling/api_error.rb +1 -1
  39. data/lib/hubspot/codegen/crm/extensions/cards/api_error.rb +1 -1
  40. data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_error.rb +1 -1
  41. data/lib/hubspot/codegen/crm/imports/api_error.rb +1 -1
  42. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +2 -2
  43. data/lib/hubspot/codegen/crm/line_items/api_error.rb +1 -1
  44. data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +2 -2
  45. data/lib/hubspot/codegen/crm/objects/api_error.rb +1 -1
  46. data/lib/hubspot/codegen/crm/objects/calls/api/basic_api.rb +2 -2
  47. data/lib/hubspot/codegen/crm/objects/calls/api_error.rb +1 -1
  48. data/lib/hubspot/codegen/crm/objects/emails/api/basic_api.rb +2 -2
  49. data/lib/hubspot/codegen/crm/objects/emails/api_error.rb +1 -1
  50. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +3 -3
  51. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +7 -7
  52. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +4 -4
  53. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/public_object_api.rb +1 -1
  54. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +1 -1
  55. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_error.rb +1 -1
  56. data/lib/hubspot/codegen/crm/objects/feedback_submissions/configuration.rb +7 -0
  57. data/lib/hubspot/codegen/crm/objects/meetings/api/basic_api.rb +2 -2
  58. data/lib/hubspot/codegen/crm/objects/meetings/api_error.rb +1 -1
  59. data/lib/hubspot/codegen/crm/objects/notes/api/basic_api.rb +2 -2
  60. data/lib/hubspot/codegen/crm/objects/notes/api_error.rb +1 -1
  61. data/lib/hubspot/codegen/crm/objects/tasks/api/basic_api.rb +2 -2
  62. data/lib/hubspot/codegen/crm/objects/tasks/api_error.rb +1 -1
  63. data/lib/hubspot/codegen/crm/owners/api_error.rb +1 -1
  64. data/lib/hubspot/codegen/crm/pipelines/api_error.rb +1 -1
  65. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +2 -2
  66. data/lib/hubspot/codegen/crm/products/api_error.rb +1 -1
  67. data/lib/hubspot/codegen/crm/properties/api_error.rb +1 -1
  68. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +2 -2
  69. data/lib/hubspot/codegen/crm/quotes/api_error.rb +1 -1
  70. data/lib/hubspot/codegen/crm/schemas/api_error.rb +1 -1
  71. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +2 -2
  72. data/lib/hubspot/codegen/crm/tickets/api_error.rb +1 -1
  73. data/lib/hubspot/codegen/crm/timeline/api_error.rb +1 -1
  74. data/lib/hubspot/codegen/events/api_error.rb +1 -1
  75. data/lib/hubspot/codegen/files/files/api/files_api.rb +2 -2
  76. data/lib/hubspot/codegen/files/files/api/folders_api.rb +3 -3
  77. data/lib/hubspot/codegen/files/files/api_error.rb +1 -1
  78. data/lib/hubspot/codegen/marketing/events/api_error.rb +1 -1
  79. data/lib/hubspot/codegen/marketing/forms/api_error.rb +1 -1
  80. data/lib/hubspot/codegen/marketing/transactional/api/public_smtp_tokens_api.rb +18 -14
  81. data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +10 -6
  82. data/lib/hubspot/codegen/marketing/transactional/api_error.rb +1 -1
  83. data/lib/hubspot/codegen/marketing/transactional/models/{collection_response_smtp_api_token_view.rb → collection_response_smtp_api_token_view_forward_paging.rb} +4 -5
  84. data/lib/hubspot/codegen/marketing/transactional/models/email_send_status_view.rb +15 -15
  85. data/lib/hubspot/codegen/marketing/transactional/models/{paging.rb → forward_paging.rb} +3 -3
  86. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_email.rb +3 -13
  87. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_request_egg.rb +22 -30
  88. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_request_egg.rb +1 -1
  89. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_view.rb +1 -1
  90. data/lib/hubspot/codegen/oauth/api_error.rb +1 -1
  91. data/lib/hubspot/codegen/settings/users/api_error.rb +1 -1
  92. data/lib/hubspot/codegen/webhooks/api_error.rb +1 -1
  93. data/lib/hubspot/version.rb +1 -1
  94. data/spec/codegen/cms/site-search/api/public_api_spec.rb +0 -1
  95. data/spec/codegen/cms/site-search/models/content_search_result_spec.rb +1 -1
  96. data/spec/codegen/cms/site-search/models/{search_hit_field_spec.rb → indexed_field_spec.rb} +10 -10
  97. data/spec/codegen/cms/url-redirects/api/redirects_api_spec.rb +3 -5
  98. data/spec/codegen/cms/url-redirects/models/{collection_response_with_total_url_mapping_spec.rb → collection_response_with_total_url_mapping_forward_paging_spec.rb} +6 -6
  99. data/spec/codegen/cms/url-redirects/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  100. data/spec/codegen/cms/url-redirects/models/url_mapping_create_request_body_spec.rb +10 -10
  101. data/spec/codegen/cms/url-redirects/models/url_mapping_spec.rb +2 -78
  102. data/spec/codegen/crm/contacts/api/basic_api_spec.rb +2 -0
  103. data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +3 -3
  104. data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +3 -3
  105. data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +14 -14
  106. data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +26 -26
  107. data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +17 -17
  108. data/spec/codegen/crm/objects/feedback_submissions/api/public_object_api_spec.rb +2 -2
  109. data/spec/codegen/crm/quotes/api/public_object_api_spec.rb +2 -2
  110. data/spec/codegen/marketing/transactional/api/public_smtp_tokens_api_spec.rb +2 -2
  111. data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +1 -1
  112. data/spec/codegen/marketing/transactional/models/{collection_response_smtp_api_token_view_spec.rb → collection_response_smtp_api_token_view_forward_paging_spec.rb} +6 -6
  113. data/spec/codegen/marketing/transactional/models/email_send_status_view_spec.rb +7 -7
  114. data/spec/codegen/marketing/transactional/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  115. data/spec/codegen/marketing/transactional/models/public_single_send_request_egg_spec.rb +4 -4
  116. metadata +18 -18
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  module Hubspot
14
14
  module Marketing
15
15
  module Events
16
- class ApiError < StandardError
16
+ class ApiError < ::StandardError
17
17
  attr_reader :code, :response_headers, :response_body
18
18
 
19
19
  # Usage examples:
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  module Hubspot
14
14
  module Marketing
15
15
  module Forms
16
- class ApiError < StandardError
16
+ class ApiError < ::StandardError
17
17
  attr_reader :code, :response_headers, :response_body
18
18
 
19
19
  # Usage examples:
@@ -65,7 +65,7 @@ module Hubspot
65
65
  return_type = opts[:return_type]
66
66
 
67
67
  # auth_names
68
- auth_names = opts[:auth_names] || ['hapikey']
68
+ auth_names = opts[:auth_names] || ['oauth2']
69
69
 
70
70
  new_options = opts.merge(
71
71
  :header_params => header_params,
@@ -85,23 +85,27 @@ module Hubspot
85
85
 
86
86
  # Create a SMTP API token.
87
87
  # Create a SMTP API token.
88
+ # @param smtp_api_token_request_egg [SmtpApiTokenRequestEgg] A request object that includes the campaign name tied to the token and whether contacts should be created for email recipients.
88
89
  # @param [Hash] opts the optional parameters
89
- # @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
90
90
  # @return [SmtpApiTokenView]
91
- def create_token(opts = {})
92
- data, _status_code, _headers = create_token_with_http_info(opts)
91
+ def create_token(smtp_api_token_request_egg, opts = {})
92
+ data, _status_code, _headers = create_token_with_http_info(smtp_api_token_request_egg, opts)
93
93
  data
94
94
  end
95
95
 
96
96
  # Create a SMTP API token.
97
97
  # Create a SMTP API token.
98
+ # @param smtp_api_token_request_egg [SmtpApiTokenRequestEgg] A request object that includes the campaign name tied to the token and whether contacts should be created for email recipients.
98
99
  # @param [Hash] opts the optional parameters
99
- # @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
100
100
  # @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
101
- def create_token_with_http_info(opts = {})
101
+ def create_token_with_http_info(smtp_api_token_request_egg, opts = {})
102
102
  if @api_client.config.debugging
103
103
  @api_client.config.logger.debug 'Calling API: PublicSmtpTokensApi.create_token ...'
104
104
  end
105
+ # verify the required parameter 'smtp_api_token_request_egg' is set
106
+ if @api_client.config.client_side_validation && smtp_api_token_request_egg.nil?
107
+ fail ArgumentError, "Missing the required parameter 'smtp_api_token_request_egg' when calling PublicSmtpTokensApi.create_token"
108
+ end
105
109
  # resource path
106
110
  local_var_path = '/marketing/v3/transactional/smtp-tokens'
107
111
 
@@ -119,13 +123,13 @@ module Hubspot
119
123
  form_params = opts[:form_params] || {}
120
124
 
121
125
  # http body (model)
122
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'smtp_api_token_request_egg'])
126
+ post_body = opts[:body] || @api_client.object_to_http_body(smtp_api_token_request_egg)
123
127
 
124
128
  # return_type
125
129
  return_type = opts[:return_type] || 'SmtpApiTokenView'
126
130
 
127
131
  # auth_names
128
- auth_names = opts[:auth_names] || ['hapikey']
132
+ auth_names = opts[:auth_names] || ['oauth2']
129
133
 
130
134
  new_options = opts.merge(
131
135
  :header_params => header_params,
@@ -187,7 +191,7 @@ module Hubspot
187
191
  return_type = opts[:return_type] || 'SmtpApiTokenView'
188
192
 
189
193
  # auth_names
190
- auth_names = opts[:auth_names] || ['hapikey']
194
+ auth_names = opts[:auth_names] || ['oauth2']
191
195
 
192
196
  new_options = opts.merge(
193
197
  :header_params => header_params,
@@ -212,7 +216,7 @@ module Hubspot
212
216
  # @option opts [String] :email_campaign_id Identifier assigned to the campaign provided during the token creation.
213
217
  # @option opts [String] :after Starting point to get the next set of results.
214
218
  # @option opts [Integer] :limit Maximum number of tokens to return.
215
- # @return [CollectionResponseSmtpApiTokenView]
219
+ # @return [CollectionResponseSmtpApiTokenViewForwardPaging]
216
220
  def get_tokens_page(opts = {})
217
221
  data, _status_code, _headers = get_tokens_page_with_http_info(opts)
218
222
  data
@@ -225,7 +229,7 @@ module Hubspot
225
229
  # @option opts [String] :email_campaign_id Identifier assigned to the campaign provided during the token creation.
226
230
  # @option opts [String] :after Starting point to get the next set of results.
227
231
  # @option opts [Integer] :limit Maximum number of tokens to return.
228
- # @return [Array<(CollectionResponseSmtpApiTokenView, Integer, Hash)>] CollectionResponseSmtpApiTokenView data, response status code and response headers
232
+ # @return [Array<(CollectionResponseSmtpApiTokenViewForwardPaging, Integer, Hash)>] CollectionResponseSmtpApiTokenViewForwardPaging data, response status code and response headers
229
233
  def get_tokens_page_with_http_info(opts = {})
230
234
  if @api_client.config.debugging
231
235
  @api_client.config.logger.debug 'Calling API: PublicSmtpTokensApi.get_tokens_page ...'
@@ -252,10 +256,10 @@ module Hubspot
252
256
  post_body = opts[:body]
253
257
 
254
258
  # return_type
255
- return_type = opts[:return_type] || 'CollectionResponseSmtpApiTokenView'
259
+ return_type = opts[:return_type] || 'CollectionResponseSmtpApiTokenViewForwardPaging'
256
260
 
257
261
  # auth_names
258
- auth_names = opts[:auth_names] || ['hapikey']
262
+ auth_names = opts[:auth_names] || ['oauth2']
259
263
 
260
264
  new_options = opts.merge(
261
265
  :header_params => header_params,
@@ -317,7 +321,7 @@ module Hubspot
317
321
  return_type = opts[:return_type] || 'SmtpApiTokenView'
318
322
 
319
323
  # auth_names
320
- auth_names = opts[:auth_names] || ['hapikey']
324
+ auth_names = opts[:auth_names] || ['oauth2']
321
325
 
322
326
  new_options = opts.merge(
323
327
  :header_params => header_params,
@@ -23,23 +23,27 @@ module Hubspot
23
23
  end
24
24
  # Send a single transactional email asynchronously.
25
25
  # Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.
26
+ # @param public_single_send_request_egg [PublicSingleSendRequestEgg] A request object describing the email to send.
26
27
  # @param [Hash] opts the optional parameters
27
- # @option opts [PublicSingleSendRequestEgg] :public_single_send_request_egg A request object describing the email to send.
28
28
  # @return [EmailSendStatusView]
29
- def send_email(opts = {})
30
- data, _status_code, _headers = send_email_with_http_info(opts)
29
+ def send_email(public_single_send_request_egg, opts = {})
30
+ data, _status_code, _headers = send_email_with_http_info(public_single_send_request_egg, opts)
31
31
  data
32
32
  end
33
33
 
34
34
  # Send a single transactional email asynchronously.
35
35
  # Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.
36
+ # @param public_single_send_request_egg [PublicSingleSendRequestEgg] A request object describing the email to send.
36
37
  # @param [Hash] opts the optional parameters
37
- # @option opts [PublicSingleSendRequestEgg] :public_single_send_request_egg A request object describing the email to send.
38
38
  # @return [Array<(EmailSendStatusView, Integer, Hash)>] EmailSendStatusView data, response status code and response headers
39
- def send_email_with_http_info(opts = {})
39
+ def send_email_with_http_info(public_single_send_request_egg, opts = {})
40
40
  if @api_client.config.debugging
41
41
  @api_client.config.logger.debug 'Calling API: SingleSendApi.send_email ...'
42
42
  end
43
+ # verify the required parameter 'public_single_send_request_egg' is set
44
+ if @api_client.config.client_side_validation && public_single_send_request_egg.nil?
45
+ fail ArgumentError, "Missing the required parameter 'public_single_send_request_egg' when calling SingleSendApi.send_email"
46
+ end
43
47
  # resource path
44
48
  local_var_path = '/marketing/v3/transactional/single-email/send'
45
49
 
@@ -57,7 +61,7 @@ module Hubspot
57
61
  form_params = opts[:form_params] || {}
58
62
 
59
63
  # http body (model)
60
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'public_single_send_request_egg'])
64
+ post_body = opts[:body] || @api_client.object_to_http_body(public_single_send_request_egg)
61
65
 
62
66
  # return_type
63
67
  return_type = opts[:return_type] || 'EmailSendStatusView'
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  module Hubspot
14
14
  module Marketing
15
15
  module Transactional
16
- class ApiError < StandardError
16
+ class ApiError < ::StandardError
17
17
  attr_reader :code, :response_headers, :response_body
18
18
 
19
19
  # Usage examples:
@@ -15,8 +15,7 @@ require 'date'
15
15
  module Hubspot
16
16
  module Marketing
17
17
  module Transactional
18
- class CollectionResponseSmtpApiTokenView
19
- # The actual collection of tokens.
18
+ class CollectionResponseSmtpApiTokenViewForwardPaging
20
19
  attr_accessor :results
21
20
 
22
21
  attr_accessor :paging
@@ -33,7 +32,7 @@ module Hubspot
33
32
  def self.openapi_types
34
33
  {
35
34
  :'results' => :'Array<SmtpApiTokenView>',
36
- :'paging' => :'Paging'
35
+ :'paging' => :'ForwardPaging'
37
36
  }
38
37
  end
39
38
 
@@ -47,13 +46,13 @@ module Hubspot
47
46
  # @param [Hash] attributes Model attributes in the form of hash
48
47
  def initialize(attributes = {})
49
48
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Marketing::Transactional::CollectionResponseSmtpApiTokenView` initialize method"
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Marketing::Transactional::CollectionResponseSmtpApiTokenViewForwardPaging` initialize method"
51
50
  end
52
51
 
53
52
  # check to see if the attribute exists and convert string to symbol for hash key
54
53
  attributes = attributes.each_with_object({}) { |(k, v), h|
55
54
  if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Marketing::Transactional::CollectionResponseSmtpApiTokenView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Marketing::Transactional::CollectionResponseSmtpApiTokenViewForwardPaging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
56
  end
58
57
  h[k.to_sym] = v
59
58
  }
@@ -16,8 +16,6 @@ module Hubspot
16
16
  module Marketing
17
17
  module Transactional
18
18
  class EmailSendStatusView
19
- attr_accessor :event_id
20
-
21
19
  # Identifier used to query the status of the send.
22
20
  attr_accessor :status_id
23
21
 
@@ -36,6 +34,8 @@ module Hubspot
36
34
  # Status of the send request.
37
35
  attr_accessor :status
38
36
 
37
+ attr_accessor :event_id
38
+
39
39
  class EnumAttributeValidator
40
40
  attr_reader :datatype
41
41
  attr_reader :allowable_values
@@ -61,26 +61,26 @@ module Hubspot
61
61
  # Attribute mapping from ruby-style variable name to JSON key.
62
62
  def self.attribute_map
63
63
  {
64
- :'event_id' => :'eventId',
65
64
  :'status_id' => :'statusId',
66
65
  :'send_result' => :'sendResult',
67
66
  :'requested_at' => :'requestedAt',
68
67
  :'started_at' => :'startedAt',
69
68
  :'completed_at' => :'completedAt',
70
- :'status' => :'status'
69
+ :'status' => :'status',
70
+ :'event_id' => :'eventId'
71
71
  }
72
72
  end
73
73
 
74
74
  # Attribute type mapping.
75
75
  def self.openapi_types
76
76
  {
77
- :'event_id' => :'EventIdView',
78
77
  :'status_id' => :'String',
79
78
  :'send_result' => :'String',
80
79
  :'requested_at' => :'DateTime',
81
80
  :'started_at' => :'DateTime',
82
81
  :'completed_at' => :'DateTime',
83
- :'status' => :'String'
82
+ :'status' => :'String',
83
+ :'event_id' => :'EventIdView'
84
84
  }
85
85
  end
86
86
 
@@ -105,10 +105,6 @@ module Hubspot
105
105
  h[k.to_sym] = v
106
106
  }
107
107
 
108
- if attributes.key?(:'event_id')
109
- self.event_id = attributes[:'event_id']
110
- end
111
-
112
108
  if attributes.key?(:'status_id')
113
109
  self.status_id = attributes[:'status_id']
114
110
  end
@@ -132,6 +128,10 @@ module Hubspot
132
128
  if attributes.key?(:'status')
133
129
  self.status = attributes[:'status']
134
130
  end
131
+
132
+ if attributes.key?(:'event_id')
133
+ self.event_id = attributes[:'event_id']
134
+ end
135
135
  end
136
136
 
137
137
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -153,7 +153,7 @@ module Hubspot
153
153
  # @return true if the model is valid
154
154
  def valid?
155
155
  return false if @status_id.nil?
156
- send_result_validator = EnumAttributeValidator.new('String', ["SENT", "IDEMPOTENT_IGNORE", "QUEUED", "IDEMPOTENT_FAIL", "THROTTLED", "EMAIL_DISABLED", "PORTAL_SUSPENDED", "INVALID_TO_ADDRESS", "BLOCKED_DOMAIN", "PREVIOUSLY_BOUNCED", "EMAIL_UNCONFIRMED", "PREVIOUS_SPAM", "PREVIOUSLY_UNSUBSCRIBED_MESSAGE", "PREVIOUSLY_UNSUBSCRIBED_PORTAL", "INVALID_FROM_ADDRESS", "CAMPAIGN_CANCELLED", "VALIDATION_FAILED", "MTA_IGNORE", "BLOCKED_ADDRESS", "PORTAL_OVER_LIMIT", "PORTAL_EXPIRED", "PORTAL_MISSING_MARKETING_SCOPE", "MISSING_TEMPLATE_PROPERTIES", "MISSING_REQUIRED_PARAMETER", "PORTAL_AUTHENTICATION_FAILURE", "MISSING_CONTENT", "CORRUPT_INPUT", "TEMPLATE_RENDER_EXCEPTION", "GRAYMAIL_SUPPRESSED", "UNCONFIGURED_SENDING_DOMAIN", "UNDELIVERABLE", "CANCELLED_ABUSE", "QUARANTINED_ADDRESS", "ADDRESS_ONLY_ACCEPTED_ON_PROD", "PORTAL_NOT_AUTHORIZED_FOR_APPLICATION", "ADDRESS_LIST_BOMBED", "ADDRESS_OPTED_OUT", "RECIPIENT_FATIGUE_SUPPRESSED", "TOO_MANY_RECIPIENTS", "PREVIOUSLY_UNSUBSCRIBED_BRAND", "NON_MARKETABLE_CONTACT"])
156
+ send_result_validator = EnumAttributeValidator.new('String', ["SENT", "IDEMPOTENT_IGNORE", "QUEUED", "IDEMPOTENT_FAIL", "THROTTLED", "EMAIL_DISABLED", "PORTAL_SUSPENDED", "INVALID_TO_ADDRESS", "BLOCKED_DOMAIN", "PREVIOUSLY_BOUNCED", "EMAIL_UNCONFIRMED", "PREVIOUS_SPAM", "PREVIOUSLY_UNSUBSCRIBED_MESSAGE", "PREVIOUSLY_UNSUBSCRIBED_PORTAL", "INVALID_FROM_ADDRESS", "CAMPAIGN_CANCELLED", "VALIDATION_FAILED", "MTA_IGNORE", "BLOCKED_ADDRESS", "PORTAL_OVER_LIMIT", "PORTAL_EXPIRED", "PORTAL_MISSING_MARKETING_SCOPE", "MISSING_TEMPLATE_PROPERTIES", "MISSING_REQUIRED_PARAMETER", "PORTAL_AUTHENTICATION_FAILURE", "MISSING_CONTENT", "CORRUPT_INPUT", "TEMPLATE_RENDER_EXCEPTION", "GRAYMAIL_SUPPRESSED", "UNCONFIGURED_SENDING_DOMAIN", "UNDELIVERABLE", "CANCELLED_ABUSE", "QUARANTINED_ADDRESS", "ADDRESS_ONLY_ACCEPTED_ON_PROD", "PORTAL_NOT_AUTHORIZED_FOR_APPLICATION", "ADDRESS_LIST_BOMBED", "ADDRESS_OPTED_OUT", "RECIPIENT_FATIGUE_SUPPRESSED", "TOO_MANY_RECIPIENTS", "PREVIOUSLY_UNSUBSCRIBED_BRAND", "NON_MARKETABLE_CONTACT", "PREVIOUSLY_UNSUBSCRIBED_BUSINESS_UNIT"])
157
157
  return false unless send_result_validator.valid?(@send_result)
158
158
  return false if @status.nil?
159
159
  status_validator = EnumAttributeValidator.new('String', ["PENDING", "PROCESSING", "CANCELED", "COMPLETE"])
@@ -164,7 +164,7 @@ module Hubspot
164
164
  # Custom attribute writer method checking allowed values (enum).
165
165
  # @param [Object] send_result Object to be assigned
166
166
  def send_result=(send_result)
167
- validator = EnumAttributeValidator.new('String', ["SENT", "IDEMPOTENT_IGNORE", "QUEUED", "IDEMPOTENT_FAIL", "THROTTLED", "EMAIL_DISABLED", "PORTAL_SUSPENDED", "INVALID_TO_ADDRESS", "BLOCKED_DOMAIN", "PREVIOUSLY_BOUNCED", "EMAIL_UNCONFIRMED", "PREVIOUS_SPAM", "PREVIOUSLY_UNSUBSCRIBED_MESSAGE", "PREVIOUSLY_UNSUBSCRIBED_PORTAL", "INVALID_FROM_ADDRESS", "CAMPAIGN_CANCELLED", "VALIDATION_FAILED", "MTA_IGNORE", "BLOCKED_ADDRESS", "PORTAL_OVER_LIMIT", "PORTAL_EXPIRED", "PORTAL_MISSING_MARKETING_SCOPE", "MISSING_TEMPLATE_PROPERTIES", "MISSING_REQUIRED_PARAMETER", "PORTAL_AUTHENTICATION_FAILURE", "MISSING_CONTENT", "CORRUPT_INPUT", "TEMPLATE_RENDER_EXCEPTION", "GRAYMAIL_SUPPRESSED", "UNCONFIGURED_SENDING_DOMAIN", "UNDELIVERABLE", "CANCELLED_ABUSE", "QUARANTINED_ADDRESS", "ADDRESS_ONLY_ACCEPTED_ON_PROD", "PORTAL_NOT_AUTHORIZED_FOR_APPLICATION", "ADDRESS_LIST_BOMBED", "ADDRESS_OPTED_OUT", "RECIPIENT_FATIGUE_SUPPRESSED", "TOO_MANY_RECIPIENTS", "PREVIOUSLY_UNSUBSCRIBED_BRAND", "NON_MARKETABLE_CONTACT"])
167
+ validator = EnumAttributeValidator.new('String', ["SENT", "IDEMPOTENT_IGNORE", "QUEUED", "IDEMPOTENT_FAIL", "THROTTLED", "EMAIL_DISABLED", "PORTAL_SUSPENDED", "INVALID_TO_ADDRESS", "BLOCKED_DOMAIN", "PREVIOUSLY_BOUNCED", "EMAIL_UNCONFIRMED", "PREVIOUS_SPAM", "PREVIOUSLY_UNSUBSCRIBED_MESSAGE", "PREVIOUSLY_UNSUBSCRIBED_PORTAL", "INVALID_FROM_ADDRESS", "CAMPAIGN_CANCELLED", "VALIDATION_FAILED", "MTA_IGNORE", "BLOCKED_ADDRESS", "PORTAL_OVER_LIMIT", "PORTAL_EXPIRED", "PORTAL_MISSING_MARKETING_SCOPE", "MISSING_TEMPLATE_PROPERTIES", "MISSING_REQUIRED_PARAMETER", "PORTAL_AUTHENTICATION_FAILURE", "MISSING_CONTENT", "CORRUPT_INPUT", "TEMPLATE_RENDER_EXCEPTION", "GRAYMAIL_SUPPRESSED", "UNCONFIGURED_SENDING_DOMAIN", "UNDELIVERABLE", "CANCELLED_ABUSE", "QUARANTINED_ADDRESS", "ADDRESS_ONLY_ACCEPTED_ON_PROD", "PORTAL_NOT_AUTHORIZED_FOR_APPLICATION", "ADDRESS_LIST_BOMBED", "ADDRESS_OPTED_OUT", "RECIPIENT_FATIGUE_SUPPRESSED", "TOO_MANY_RECIPIENTS", "PREVIOUSLY_UNSUBSCRIBED_BRAND", "NON_MARKETABLE_CONTACT", "PREVIOUSLY_UNSUBSCRIBED_BUSINESS_UNIT"])
168
168
  unless validator.valid?(send_result)
169
169
  fail ArgumentError, "invalid value for \"send_result\", must be one of #{validator.allowable_values}."
170
170
  end
@@ -186,13 +186,13 @@ module Hubspot
186
186
  def ==(o)
187
187
  return true if self.equal?(o)
188
188
  self.class == o.class &&
189
- event_id == o.event_id &&
190
189
  status_id == o.status_id &&
191
190
  send_result == o.send_result &&
192
191
  requested_at == o.requested_at &&
193
192
  started_at == o.started_at &&
194
193
  completed_at == o.completed_at &&
195
- status == o.status
194
+ status == o.status &&
195
+ event_id == o.event_id
196
196
  end
197
197
 
198
198
  # @see the `==` method
@@ -204,7 +204,7 @@ module Hubspot
204
204
  # Calculates hash code according to all attributes.
205
205
  # @return [Integer] Hash code
206
206
  def hash
207
- [event_id, status_id, send_result, requested_at, started_at, completed_at, status].hash
207
+ [status_id, send_result, requested_at, started_at, completed_at, status, event_id].hash
208
208
  end
209
209
 
210
210
  # Builds the object from hash
@@ -15,7 +15,7 @@ require 'date'
15
15
  module Hubspot
16
16
  module Marketing
17
17
  module Transactional
18
- class Paging
18
+ class ForwardPaging
19
19
  attr_accessor :_next
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -42,13 +42,13 @@ module Hubspot
42
42
  # @param [Hash] attributes Model attributes in the form of hash
43
43
  def initialize(attributes = {})
44
44
  if (!attributes.is_a?(Hash))
45
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Marketing::Transactional::Paging` initialize method"
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Marketing::Transactional::ForwardPaging` initialize method"
46
46
  end
47
47
 
48
48
  # check to see if the attribute exists and convert string to symbol for hash key
49
49
  attributes = attributes.each_with_object({}) { |(k, v), h|
50
50
  if (!self.class.attribute_map.key?(k.to_sym))
51
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Marketing::Transactional::Paging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Marketing::Transactional::ForwardPaging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
52
  end
53
53
  h[k.to_sym] = v
54
54
  }
@@ -114,16 +114,8 @@ module Hubspot
114
114
  # @return Array for valid properties with the reasons
115
115
  def list_invalid_properties
116
116
  invalid_properties = Array.new
117
- if @reply_to.nil?
118
- invalid_properties.push('invalid value for "reply_to", reply_to cannot be nil.')
119
- end
120
-
121
- if @cc.nil?
122
- invalid_properties.push('invalid value for "cc", cc cannot be nil.')
123
- end
124
-
125
- if @bcc.nil?
126
- invalid_properties.push('invalid value for "bcc", bcc cannot be nil.')
117
+ if @to.nil?
118
+ invalid_properties.push('invalid value for "to", to cannot be nil.')
127
119
  end
128
120
 
129
121
  invalid_properties
@@ -132,9 +124,7 @@ module Hubspot
132
124
  # Check to see if the all the properties in the model are valid
133
125
  # @return true if the model is valid
134
126
  def valid?
135
- return false if @reply_to.nil?
136
- return false if @cc.nil?
137
- return false if @bcc.nil?
127
+ return false if @to.nil?
138
128
  true
139
129
  end
140
130
 
@@ -16,6 +16,9 @@ module Hubspot
16
16
  module Marketing
17
17
  module Transactional
18
18
  class PublicSingleSendRequestEgg
19
+ # The content ID for the transactional email, which can be found in email tool UI.
20
+ attr_accessor :email_id
21
+
19
22
  attr_accessor :message
20
23
 
21
24
  # The contactProperties field is a map of contact property values. Each contact property value contains a name and value property. Each property will get set on the contact record and will be visible in the template under {{ contact.NAME }}. Use these properties when you want to set a contact property while you’re sending the email. For example, when sending a reciept you may want to set a last_paid_date property, as the sending of the receipt will have information about the last payment.
@@ -24,26 +27,23 @@ module Hubspot
24
27
  # The customProperties field is a map of property values. Each property value contains a name and value property. Each property will be visible in the template under {{ custom.NAME }}. Note: Custom properties do not currently support arrays. To provide a listing in an email, one workaround is to build an HTML list (either with tables or ul) and specify it as a custom property.
25
28
  attr_accessor :custom_properties
26
29
 
27
- # The content ID for the transactional email, which can be found in email tool UI.
28
- attr_accessor :email_id
29
-
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
33
+ :'email_id' => :'emailId',
33
34
  :'message' => :'message',
34
35
  :'contact_properties' => :'contactProperties',
35
- :'custom_properties' => :'customProperties',
36
- :'email_id' => :'emailId'
36
+ :'custom_properties' => :'customProperties'
37
37
  }
38
38
  end
39
39
 
40
40
  # Attribute type mapping.
41
41
  def self.openapi_types
42
42
  {
43
+ :'email_id' => :'Integer',
43
44
  :'message' => :'PublicSingleSendEmail',
44
45
  :'contact_properties' => :'Hash<String, String>',
45
- :'custom_properties' => :'Object',
46
- :'email_id' => :'Integer'
46
+ :'custom_properties' => :'Hash<String, Object>'
47
47
  }
48
48
  end
49
49
 
@@ -68,6 +68,10 @@ module Hubspot
68
68
  h[k.to_sym] = v
69
69
  }
70
70
 
71
+ if attributes.key?(:'email_id')
72
+ self.email_id = attributes[:'email_id']
73
+ end
74
+
71
75
  if attributes.key?(:'message')
72
76
  self.message = attributes[:'message']
73
77
  end
@@ -79,11 +83,9 @@ module Hubspot
79
83
  end
80
84
 
81
85
  if attributes.key?(:'custom_properties')
82
- self.custom_properties = attributes[:'custom_properties']
83
- end
84
-
85
- if attributes.key?(:'email_id')
86
- self.email_id = attributes[:'email_id']
86
+ if (value = attributes[:'custom_properties']).is_a?(Hash)
87
+ self.custom_properties = value
88
+ end
87
89
  end
88
90
  end
89
91
 
@@ -91,32 +93,22 @@ module Hubspot
91
93
  # @return Array for valid properties with the reasons
92
94
  def list_invalid_properties
93
95
  invalid_properties = Array.new
94
- if @message.nil?
95
- invalid_properties.push('invalid value for "message", message cannot be nil.')
96
- end
97
-
98
- if @contact_properties.nil?
99
- invalid_properties.push('invalid value for "contact_properties", contact_properties cannot be nil.')
100
- end
101
-
102
- if @custom_properties.nil?
103
- invalid_properties.push('invalid value for "custom_properties", custom_properties cannot be nil.')
104
- end
105
-
106
96
  if @email_id.nil?
107
97
  invalid_properties.push('invalid value for "email_id", email_id cannot be nil.')
108
98
  end
109
99
 
100
+ if @message.nil?
101
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
102
+ end
103
+
110
104
  invalid_properties
111
105
  end
112
106
 
113
107
  # Check to see if the all the properties in the model are valid
114
108
  # @return true if the model is valid
115
109
  def valid?
116
- return false if @message.nil?
117
- return false if @contact_properties.nil?
118
- return false if @custom_properties.nil?
119
110
  return false if @email_id.nil?
111
+ return false if @message.nil?
120
112
  true
121
113
  end
122
114
 
@@ -125,10 +117,10 @@ module Hubspot
125
117
  def ==(o)
126
118
  return true if self.equal?(o)
127
119
  self.class == o.class &&
120
+ email_id == o.email_id &&
128
121
  message == o.message &&
129
122
  contact_properties == o.contact_properties &&
130
- custom_properties == o.custom_properties &&
131
- email_id == o.email_id
123
+ custom_properties == o.custom_properties
132
124
  end
133
125
 
134
126
  # @see the `==` method
@@ -140,7 +132,7 @@ module Hubspot
140
132
  # Calculates hash code according to all attributes.
141
133
  # @return [Integer] Hash code
142
134
  def hash
143
- [message, contact_properties, custom_properties, email_id].hash
135
+ [email_id, message, contact_properties, custom_properties].hash
144
136
  end
145
137
 
146
138
  # Builds the object from hash
@@ -16,7 +16,7 @@ module Hubspot
16
16
  module Marketing
17
17
  module Transactional
18
18
  class SmtpApiTokenRequestEgg
19
- # Indicates whether a contact should be created for recipients of emails.
19
+ # Indicates whether a contact should be created for email recipients.
20
20
  attr_accessor :create_contact
21
21
 
22
22
  # A name for the campaign tied to the SMTP API token.
@@ -31,7 +31,7 @@ module Hubspot
31
31
  # Timestamp generated when a token is created.
32
32
  attr_accessor :created_at
33
33
 
34
- # Indicates whether a contact should be created for recipients of emails.
34
+ # Indicates whether a contact should be created for email recipients.
35
35
  attr_accessor :create_contact
36
36
 
37
37
  # A name for the campaign tied to the token.
@@ -12,7 +12,7 @@ OpenAPI Generator version: 4.3.1
12
12
 
13
13
  module Hubspot
14
14
  module OAuth
15
- class ApiError < StandardError
15
+ class ApiError < ::StandardError
16
16
  attr_reader :code, :response_headers, :response_body
17
17
 
18
18
  # Usage examples:
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  module Hubspot
14
14
  module Settings
15
15
  module Users
16
- class ApiError < StandardError
16
+ class ApiError < ::StandardError
17
17
  attr_reader :code, :response_headers, :response_body
18
18
 
19
19
  # Usage examples:
@@ -12,7 +12,7 @@ OpenAPI Generator version: 4.3.1
12
12
 
13
13
  module Hubspot
14
14
  module Webhooks
15
- class ApiError < StandardError
15
+ class ApiError < ::StandardError
16
16
  attr_reader :code, :response_headers, :response_body
17
17
 
18
18
  # Usage examples:
@@ -1,3 +1,3 @@
1
1
  module Hubspot
2
- VERSION = '13.1.0'
2
+ VERSION = '14.1.0'
3
3
  end
@@ -57,7 +57,6 @@ describe 'PublicApi' do
57
57
  # @option opts [Boolean] :autocomplete Specifies whether or not you are showing autocomplete results. Defaults to false.
58
58
  # @option opts [Float] :popularity_boost Specifies how strongly a result is boosted based on its view count. Defaults to 1.0.
59
59
  # @option opts [Float] :boost_limit Specifies the maximum amount a result will be boosted based on its view count. Defaults to 5.0. Read more about elasticsearch boosting [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-boost.html).
60
- # @option opts [Float] :min_score Specifies the minimum search score threshold for returned results. This value is intentionally set low by default in order to return many results. Increase this for higher precision, but less recall.
61
60
  # @option opts [String] :boost_recent Specifies a relative time window where scores of documents published outside this time window decay. This can only be used for blog posts. For example, boostRecent&#x3D;10d will boost documents published within the last 10 days. Supported timeunits are ms (milliseconds), s (seconds), m (minutes), h (hours), d (days).
62
61
  # @option opts [Integer] :table_id Specifies a specific HubDB table to search. Only returns results from the specified table. Can be used in tandem with the &#x60;hubdbQuery&#x60; parameter to further filter results.
63
62
  # @option opts [String] :hubdb_query Specify a HubDB query to further filter the search results.