hubspot-api-client 17.1.1 → 17.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/hubspot/codegen/cms/pages/api/landing_pages_api.rb +2754 -0
  5. data/lib/hubspot/codegen/cms/pages/api/site_pages_api.rb +1896 -0
  6. data/lib/hubspot/codegen/cms/pages/api_client.rb +410 -0
  7. data/lib/hubspot/codegen/cms/pages/api_error.rb +61 -0
  8. data/lib/hubspot/codegen/cms/pages/configuration.rb +287 -0
  9. data/lib/hubspot/codegen/cms/pages/models/ab_test_create_request_v_next.rb +244 -0
  10. data/lib/hubspot/codegen/cms/pages/models/ab_test_end_request_v_next.rb +244 -0
  11. data/lib/hubspot/codegen/cms/pages/models/ab_test_rerun_request_v_next.rb +244 -0
  12. data/lib/hubspot/codegen/cms/pages/models/angle.rb +244 -0
  13. data/lib/hubspot/codegen/cms/pages/models/attach_to_lang_primary_request_v_next.rb +269 -0
  14. data/lib/hubspot/codegen/cms/pages/models/background_image.rb +259 -0
  15. data/lib/hubspot/codegen/cms/pages/models/batch_input_content_folder.rb +231 -0
  16. data/lib/hubspot/codegen/cms/pages/models/batch_input_json_node.rb +231 -0
  17. data/lib/hubspot/codegen/cms/pages/models/batch_input_page.rb +231 -0
  18. data/lib/hubspot/codegen/cms/pages/models/batch_input_string.rb +231 -0
  19. data/lib/hubspot/codegen/cms/pages/models/batch_response_content_folder.rb +326 -0
  20. data/lib/hubspot/codegen/cms/pages/models/batch_response_content_folder_with_errors.rb +354 -0
  21. data/lib/hubspot/codegen/cms/pages/models/batch_response_page.rb +326 -0
  22. data/lib/hubspot/codegen/cms/pages/models/batch_response_page_with_errors.rb +354 -0
  23. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_content_folder_forward_paging.rb +255 -0
  24. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_page_forward_paging.rb +255 -0
  25. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_version_content_folder.rb +255 -0
  26. data/lib/hubspot/codegen/cms/pages/models/collection_response_with_total_version_page.rb +255 -0
  27. data/lib/hubspot/codegen/cms/pages/models/color_stop.rb +228 -0
  28. data/lib/hubspot/codegen/cms/pages/models/content_clone_request_v_next.rb +239 -0
  29. data/lib/hubspot/codegen/cms/pages/models/content_folder.rb +317 -0
  30. data/lib/hubspot/codegen/cms/pages/models/content_language_clone_request_v_next.rb +249 -0
  31. data/lib/hubspot/codegen/cms/pages/models/content_language_variation.rb +409 -0
  32. data/lib/hubspot/codegen/cms/pages/models/content_schedule_request_v_next.rb +244 -0
  33. data/lib/hubspot/codegen/cms/pages/models/detach_from_lang_group_request_v_next.rb +229 -0
  34. data/lib/hubspot/codegen/cms/pages/models/error.rb +305 -0
  35. data/lib/hubspot/codegen/cms/pages/models/error_detail.rb +271 -0
  36. data/lib/hubspot/codegen/cms/pages/models/forward_paging.rb +223 -0
  37. data/lib/hubspot/codegen/cms/pages/models/gradient.rb +259 -0
  38. data/lib/hubspot/codegen/cms/pages/models/layout_section.rb +416 -0
  39. data/lib/hubspot/codegen/cms/pages/models/next_page.rb +239 -0
  40. data/lib/hubspot/codegen/cms/pages/models/page.rb +1165 -0
  41. data/lib/hubspot/codegen/cms/pages/models/paging.rb +232 -0
  42. data/lib/hubspot/codegen/cms/pages/models/previous_page.rb +239 -0
  43. data/lib/hubspot/codegen/cms/pages/models/rgba_color.rb +274 -0
  44. data/lib/hubspot/codegen/cms/pages/models/row_meta_data.rb +243 -0
  45. data/lib/hubspot/codegen/cms/pages/models/set_new_language_primary_request_v_next.rb +229 -0
  46. data/lib/hubspot/codegen/cms/pages/models/side_or_corner.rb +244 -0
  47. data/lib/hubspot/codegen/cms/pages/models/standard_error.rb +330 -0
  48. data/lib/hubspot/codegen/cms/pages/models/styles.rb +316 -0
  49. data/lib/hubspot/codegen/cms/pages/models/update_languages_request_v_next.rb +246 -0
  50. data/lib/hubspot/codegen/cms/pages/models/version_content_folder.rb +271 -0
  51. data/lib/hubspot/codegen/cms/pages/models/version_page.rb +271 -0
  52. data/lib/hubspot/codegen/cms/pages/models/version_user.rb +259 -0
  53. data/lib/hubspot/codegen/crm/lists/api/lists_api.rb +635 -0
  54. data/lib/hubspot/codegen/crm/lists/api/memberships_api.rb +452 -0
  55. data/lib/hubspot/codegen/crm/lists/api_client.rb +410 -0
  56. data/lib/hubspot/codegen/crm/lists/api_error.rb +61 -0
  57. data/lib/hubspot/codegen/crm/lists/configuration.rb +287 -0
  58. data/lib/hubspot/codegen/crm/lists/models/collection_response_long.rb +240 -0
  59. data/lib/hubspot/codegen/crm/lists/models/error.rb +305 -0
  60. data/lib/hubspot/codegen/crm/lists/models/error_detail.rb +271 -0
  61. data/lib/hubspot/codegen/crm/lists/models/list_create_request.rb +278 -0
  62. data/lib/hubspot/codegen/crm/lists/models/list_create_response.rb +228 -0
  63. data/lib/hubspot/codegen/crm/lists/models/list_fetch_response.rb +228 -0
  64. data/lib/hubspot/codegen/crm/lists/models/list_filter_update_request.rb +228 -0
  65. data/lib/hubspot/codegen/crm/lists/models/list_search_request.rb +266 -0
  66. data/lib/hubspot/codegen/crm/lists/models/list_search_response.rb +276 -0
  67. data/lib/hubspot/codegen/crm/lists/models/list_update_response.rb +223 -0
  68. data/lib/hubspot/codegen/crm/lists/models/lists_by_id_response.rb +231 -0
  69. data/lib/hubspot/codegen/crm/lists/models/membership_change_request.rb +248 -0
  70. data/lib/hubspot/codegen/crm/lists/models/memberships_update_response.rb +264 -0
  71. data/lib/hubspot/codegen/crm/lists/models/next_page.rb +239 -0
  72. data/lib/hubspot/codegen/crm/lists/models/paging.rb +232 -0
  73. data/lib/hubspot/codegen/crm/lists/models/previous_page.rb +239 -0
  74. data/lib/hubspot/codegen/crm/lists/models/public_absolute_comparative_timestamp_refine_by.rb +292 -0
  75. data/lib/hubspot/codegen/crm/lists/models/public_absolute_ranged_timestamp_refine_by.rb +306 -0
  76. data/lib/hubspot/codegen/crm/lists/models/public_ads_search_filter.rb +336 -0
  77. data/lib/hubspot/codegen/crm/lists/models/public_ads_time_filter.rb +278 -0
  78. data/lib/hubspot/codegen/crm/lists/models/public_all_history_refine_by.rb +264 -0
  79. data/lib/hubspot/codegen/crm/lists/models/public_all_property_types_operation.rb +292 -0
  80. data/lib/hubspot/codegen/crm/lists/models/public_and_filter_branch.rb +310 -0
  81. data/lib/hubspot/codegen/crm/lists/models/public_association_filter_branch.rb +366 -0
  82. data/lib/hubspot/codegen/crm/lists/models/public_association_in_list_filter.rb +352 -0
  83. data/lib/hubspot/codegen/crm/lists/models/public_bool_property_operation.rb +306 -0
  84. data/lib/hubspot/codegen/crm/lists/models/public_calendar_date_property_operation.rb +345 -0
  85. data/lib/hubspot/codegen/crm/lists/models/public_campaign_influenced_filter.rb +278 -0
  86. data/lib/hubspot/codegen/crm/lists/models/public_communication_subscription_filter.rb +333 -0
  87. data/lib/hubspot/codegen/crm/lists/models/public_comparative_date_property_operation.rb +315 -0
  88. data/lib/hubspot/codegen/crm/lists/models/public_comparative_property_updated_operation.rb +315 -0
  89. data/lib/hubspot/codegen/crm/lists/models/public_constant_filter.rb +287 -0
  90. data/lib/hubspot/codegen/crm/lists/models/public_cta_analytics_filter.rb +310 -0
  91. data/lib/hubspot/codegen/crm/lists/models/public_date_point.rb +365 -0
  92. data/lib/hubspot/codegen/crm/lists/models/public_date_property_operation.rb +334 -0
  93. data/lib/hubspot/codegen/crm/lists/models/public_date_time_property_operation.rb +320 -0
  94. data/lib/hubspot/codegen/crm/lists/models/public_email_event_filter.rb +350 -0
  95. data/lib/hubspot/codegen/crm/lists/models/public_email_subscription_filter.rb +305 -0
  96. data/lib/hubspot/codegen/crm/lists/models/public_enumeration_property_operation.rb +308 -0
  97. data/lib/hubspot/codegen/crm/lists/models/public_event_analytics_filter.rb +310 -0
  98. data/lib/hubspot/codegen/crm/lists/models/public_event_analytics_filter_coalescing_refine_by.rb +115 -0
  99. data/lib/hubspot/codegen/crm/lists/models/public_event_filter_metadata.rb +242 -0
  100. data/lib/hubspot/codegen/crm/lists/models/public_fiscal_quarter_reference.rb +328 -0
  101. data/lib/hubspot/codegen/crm/lists/models/public_fiscal_year_reference.rb +328 -0
  102. data/lib/hubspot/codegen/crm/lists/models/public_form_submission_filter.rb +317 -0
  103. data/lib/hubspot/codegen/crm/lists/models/public_form_submission_on_page_filter.rb +331 -0
  104. data/lib/hubspot/codegen/crm/lists/models/public_in_list_filter.rb +301 -0
  105. data/lib/hubspot/codegen/crm/lists/models/public_in_list_filter_metadata.rb +242 -0
  106. data/lib/hubspot/codegen/crm/lists/models/public_index_offset.rb +295 -0
  107. data/lib/hubspot/codegen/crm/lists/models/public_indexed_time_point.rb +310 -0
  108. data/lib/hubspot/codegen/crm/lists/models/public_indexed_time_point_index_reference.rb +114 -0
  109. data/lib/hubspot/codegen/crm/lists/models/public_integration_event_filter.rb +294 -0
  110. data/lib/hubspot/codegen/crm/lists/models/public_month_reference.rb +314 -0
  111. data/lib/hubspot/codegen/crm/lists/models/public_multi_string_property_operation.rb +308 -0
  112. data/lib/hubspot/codegen/crm/lists/models/public_not_all_filter_branch.rb +310 -0
  113. data/lib/hubspot/codegen/crm/lists/models/public_not_any_filter_branch.rb +310 -0
  114. data/lib/hubspot/codegen/crm/lists/models/public_now_reference.rb +300 -0
  115. data/lib/hubspot/codegen/crm/lists/models/public_num_associations_filter.rb +306 -0
  116. data/lib/hubspot/codegen/crm/lists/models/public_num_occurrences_refine_by.rb +282 -0
  117. data/lib/hubspot/codegen/crm/lists/models/public_number_property_operation.rb +306 -0
  118. data/lib/hubspot/codegen/crm/lists/models/public_object_list.rb +373 -0
  119. data/lib/hubspot/codegen/crm/lists/models/public_object_list_search_result.rb +381 -0
  120. data/lib/hubspot/codegen/crm/lists/models/public_or_filter_branch.rb +310 -0
  121. data/lib/hubspot/codegen/crm/lists/models/public_page_view_analytics_filter.rb +319 -0
  122. data/lib/hubspot/codegen/crm/lists/models/public_privacy_analytics_filter.rb +292 -0
  123. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch.rb +352 -0
  124. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch_filter_branches_inner.rb +114 -0
  125. data/lib/hubspot/codegen/crm/lists/models/public_property_association_filter_branch_filters_inner.rb +130 -0
  126. data/lib/hubspot/codegen/crm/lists/models/public_property_association_in_list_filter.rb +329 -0
  127. data/lib/hubspot/codegen/crm/lists/models/public_property_filter.rb +292 -0
  128. data/lib/hubspot/codegen/crm/lists/models/public_property_filter_operation.rb +123 -0
  129. data/lib/hubspot/codegen/crm/lists/models/public_property_referenced_time.rb +315 -0
  130. data/lib/hubspot/codegen/crm/lists/models/public_quarter_reference.rb +328 -0
  131. data/lib/hubspot/codegen/crm/lists/models/public_ranged_date_property_operation.rb +334 -0
  132. data/lib/hubspot/codegen/crm/lists/models/public_ranged_number_property_operation.rb +320 -0
  133. data/lib/hubspot/codegen/crm/lists/models/public_ranged_time_operation.rb +361 -0
  134. data/lib/hubspot/codegen/crm/lists/models/public_relative_comparative_timestamp_refine_by.rb +292 -0
  135. data/lib/hubspot/codegen/crm/lists/models/public_relative_ranged_timestamp_refine_by.rb +306 -0
  136. data/lib/hubspot/codegen/crm/lists/models/public_restricted_filter_branch.rb +310 -0
  137. data/lib/hubspot/codegen/crm/lists/models/public_rolling_date_range_property_operation.rb +320 -0
  138. data/lib/hubspot/codegen/crm/lists/models/public_rolling_property_updated_operation.rb +306 -0
  139. data/lib/hubspot/codegen/crm/lists/models/public_set_occurrences_refine_by.rb +278 -0
  140. data/lib/hubspot/codegen/crm/lists/models/public_string_property_operation.rb +306 -0
  141. data/lib/hubspot/codegen/crm/lists/models/public_survey_monkey_filter.rb +292 -0
  142. data/lib/hubspot/codegen/crm/lists/models/public_survey_monkey_value_filter.rb +338 -0
  143. data/lib/hubspot/codegen/crm/lists/models/public_time_offset.rb +256 -0
  144. data/lib/hubspot/codegen/crm/lists/models/public_time_point_operation.rb +338 -0
  145. data/lib/hubspot/codegen/crm/lists/models/public_time_point_operation_time_point.rb +109 -0
  146. data/lib/hubspot/codegen/crm/lists/models/public_today_reference.rb +300 -0
  147. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_filter.rb +307 -0
  148. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_filter_branch.rb +350 -0
  149. data/lib/hubspot/codegen/crm/lists/models/public_unified_events_in_list_filter.rb +310 -0
  150. data/lib/hubspot/codegen/crm/lists/models/public_webinar_filter.rb +287 -0
  151. data/lib/hubspot/codegen/crm/lists/models/public_week_reference.rb +326 -0
  152. data/lib/hubspot/codegen/crm/lists/models/public_year_reference.rb +328 -0
  153. data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +391 -0
  154. data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +295 -0
  155. data/lib/hubspot/codegen/crm/objects/goals/api/gdpr_api.rb +96 -0
  156. data/lib/hubspot/codegen/crm/objects/goals/api/public_object_api.rb +94 -0
  157. data/lib/hubspot/codegen/crm/objects/goals/api/search_api.rb +92 -0
  158. data/lib/hubspot/codegen/crm/objects/goals/api_client.rb +412 -0
  159. data/lib/hubspot/codegen/crm/objects/goals/api_error.rb +63 -0
  160. data/lib/hubspot/codegen/crm/objects/goals/configuration.rb +289 -0
  161. data/lib/hubspot/codegen/crm/objects/goals/models/associated_id.rb +244 -0
  162. data/lib/hubspot/codegen/crm/objects/goals/models/association_spec.rb +278 -0
  163. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_batch_input.rb +232 -0
  164. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_id.rb +232 -0
  165. data/lib/hubspot/codegen/crm/objects/goals/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  166. data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +273 -0
  167. data/lib/hubspot/codegen/crm/objects/goals/models/batch_response_simple_public_object.rb +328 -0
  168. data/lib/hubspot/codegen/crm/objects/goals/models/batch_response_simple_public_object_with_errors.rb +348 -0
  169. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_associated_id.rb +241 -0
  170. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  171. data/lib/hubspot/codegen/crm/objects/goals/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  172. data/lib/hubspot/codegen/crm/objects/goals/models/error.rb +307 -0
  173. data/lib/hubspot/codegen/crm/objects/goals/models/error_detail.rb +273 -0
  174. data/lib/hubspot/codegen/crm/objects/goals/models/filter.rb +308 -0
  175. data/lib/hubspot/codegen/crm/objects/goals/models/filter_group.rb +232 -0
  176. data/lib/hubspot/codegen/crm/objects/goals/models/forward_paging.rb +225 -0
  177. data/lib/hubspot/codegen/crm/objects/goals/models/next_page.rb +239 -0
  178. data/lib/hubspot/codegen/crm/objects/goals/models/paging.rb +234 -0
  179. data/lib/hubspot/codegen/crm/objects/goals/models/previous_page.rb +239 -0
  180. data/lib/hubspot/codegen/crm/objects/goals/models/public_associations_for_object.rb +246 -0
  181. data/lib/hubspot/codegen/crm/objects/goals/models/public_gdpr_delete_input.rb +239 -0
  182. data/lib/hubspot/codegen/crm/objects/goals/models/public_merge_input.rb +244 -0
  183. data/lib/hubspot/codegen/crm/objects/goals/models/public_object_id.rb +230 -0
  184. data/lib/hubspot/codegen/crm/objects/goals/models/public_object_search_request.rb +301 -0
  185. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +303 -0
  186. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +246 -0
  187. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_id.rb +230 -0
  188. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +232 -0
  189. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +248 -0
  190. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +314 -0
  191. data/lib/hubspot/codegen/crm/objects/goals/models/standard_error.rb +324 -0
  192. data/lib/hubspot/codegen/crm/objects/goals/models/value_with_timestamp.rb +285 -0
  193. data/lib/hubspot/codegen/crm/objects/taxes/api/basic_api.rb +391 -0
  194. data/lib/hubspot/codegen/crm/objects/taxes/api/batch_api.rb +295 -0
  195. data/lib/hubspot/codegen/crm/objects/taxes/api/gdpr_api.rb +96 -0
  196. data/lib/hubspot/codegen/crm/objects/taxes/api/public_object_api.rb +94 -0
  197. data/lib/hubspot/codegen/crm/objects/taxes/api/search_api.rb +92 -0
  198. data/lib/hubspot/codegen/crm/objects/taxes/api_client.rb +412 -0
  199. data/lib/hubspot/codegen/crm/objects/taxes/api_error.rb +63 -0
  200. data/lib/hubspot/codegen/crm/objects/taxes/configuration.rb +289 -0
  201. data/lib/hubspot/codegen/crm/objects/taxes/models/associated_id.rb +244 -0
  202. data/lib/hubspot/codegen/crm/objects/taxes/models/association_spec.rb +278 -0
  203. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_batch_input.rb +232 -0
  204. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_id.rb +232 -0
  205. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  206. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_read_input_simple_public_object_id.rb +273 -0
  207. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_response_simple_public_object.rb +328 -0
  208. data/lib/hubspot/codegen/crm/objects/taxes/models/batch_response_simple_public_object_with_errors.rb +348 -0
  209. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_associated_id.rb +241 -0
  210. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  211. data/lib/hubspot/codegen/crm/objects/taxes/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  212. data/lib/hubspot/codegen/crm/objects/taxes/models/error.rb +307 -0
  213. data/lib/hubspot/codegen/crm/objects/taxes/models/error_detail.rb +273 -0
  214. data/lib/hubspot/codegen/crm/objects/taxes/models/filter.rb +308 -0
  215. data/lib/hubspot/codegen/crm/objects/taxes/models/filter_group.rb +232 -0
  216. data/lib/hubspot/codegen/crm/objects/taxes/models/forward_paging.rb +225 -0
  217. data/lib/hubspot/codegen/crm/objects/taxes/models/next_page.rb +239 -0
  218. data/lib/hubspot/codegen/crm/objects/taxes/models/paging.rb +234 -0
  219. data/lib/hubspot/codegen/crm/objects/taxes/models/previous_page.rb +239 -0
  220. data/lib/hubspot/codegen/crm/objects/taxes/models/public_associations_for_object.rb +246 -0
  221. data/lib/hubspot/codegen/crm/objects/taxes/models/public_gdpr_delete_input.rb +239 -0
  222. data/lib/hubspot/codegen/crm/objects/taxes/models/public_merge_input.rb +244 -0
  223. data/lib/hubspot/codegen/crm/objects/taxes/models/public_object_id.rb +230 -0
  224. data/lib/hubspot/codegen/crm/objects/taxes/models/public_object_search_request.rb +301 -0
  225. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object.rb +303 -0
  226. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_batch_input.rb +246 -0
  227. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_id.rb +230 -0
  228. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_input.rb +232 -0
  229. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_input_for_create.rb +248 -0
  230. data/lib/hubspot/codegen/crm/objects/taxes/models/simple_public_object_with_associations.rb +314 -0
  231. data/lib/hubspot/codegen/crm/objects/taxes/models/standard_error.rb +324 -0
  232. data/lib/hubspot/codegen/crm/objects/taxes/models/value_with_timestamp.rb +285 -0
  233. data/lib/hubspot/codegen/events/send/api/behavioral_events_tracking_api.rb +94 -0
  234. data/lib/hubspot/codegen/events/send/api_client.rb +410 -0
  235. data/lib/hubspot/codegen/events/send/api_error.rb +61 -0
  236. data/lib/hubspot/codegen/events/send/configuration.rb +287 -0
  237. data/lib/hubspot/codegen/events/send/models/behavioral_event_http_completion_request.rb +290 -0
  238. data/lib/hubspot/codegen/events/send/models/error.rb +305 -0
  239. data/lib/hubspot/codegen/events/send/models/error_detail.rb +271 -0
  240. data/lib/hubspot/codegen/settings/business_units/api/business_unit_api.rb +95 -0
  241. data/lib/hubspot/codegen/settings/business_units/api_client.rb +410 -0
  242. data/lib/hubspot/codegen/settings/business_units/api_error.rb +61 -0
  243. data/lib/hubspot/codegen/settings/business_units/configuration.rb +287 -0
  244. data/lib/hubspot/codegen/settings/business_units/models/collection_response_public_business_unit_no_paging.rb +232 -0
  245. data/lib/hubspot/codegen/settings/business_units/models/error.rb +305 -0
  246. data/lib/hubspot/codegen/settings/business_units/models/error_detail.rb +271 -0
  247. data/lib/hubspot/codegen/settings/business_units/models/public_business_unit.rb +254 -0
  248. data/lib/hubspot/codegen/settings/business_units/models/public_business_unit_logo_metadata.rb +245 -0
  249. data/lib/hubspot/discovery/cms/client.rb +1 -0
  250. data/lib/hubspot/discovery/cms/pages/api/landing_pages_api.rb +13 -0
  251. data/lib/hubspot/discovery/cms/pages/api/site_pages_api.rb +13 -0
  252. data/lib/hubspot/discovery/cms/pages/client.rb +20 -0
  253. data/lib/hubspot/discovery/crm/client.rb +1 -0
  254. data/lib/hubspot/discovery/crm/lists/api/lists_api.rb +13 -0
  255. data/lib/hubspot/discovery/crm/lists/api/memberships_api.rb +13 -0
  256. data/lib/hubspot/discovery/crm/lists/client.rb +20 -0
  257. data/lib/hubspot/discovery/crm/objects/client.rb +2 -0
  258. data/lib/hubspot/discovery/crm/objects/goals/api/basic_api.rb +15 -0
  259. data/lib/hubspot/discovery/crm/objects/goals/api/batch_api.rb +15 -0
  260. data/lib/hubspot/discovery/crm/objects/goals/api/gdpr_api.rb +15 -0
  261. data/lib/hubspot/discovery/crm/objects/goals/api/public_object_api.rb +15 -0
  262. data/lib/hubspot/discovery/crm/objects/goals/api/search_api.rb +15 -0
  263. data/lib/hubspot/discovery/crm/objects/goals/client.rb +25 -0
  264. data/lib/hubspot/discovery/crm/objects/taxes/api/basic_api.rb +15 -0
  265. data/lib/hubspot/discovery/crm/objects/taxes/api/batch_api.rb +15 -0
  266. data/lib/hubspot/discovery/crm/objects/taxes/api/gdpr_api.rb +15 -0
  267. data/lib/hubspot/discovery/crm/objects/taxes/api/public_object_api.rb +15 -0
  268. data/lib/hubspot/discovery/crm/objects/taxes/api/search_api.rb +15 -0
  269. data/lib/hubspot/discovery/crm/objects/taxes/client.rb +25 -0
  270. data/lib/hubspot/discovery/events/client.rb +6 -0
  271. data/lib/hubspot/discovery/events/send/api/behavioral_events_tracking_api.rb +13 -0
  272. data/lib/hubspot/discovery/events/send/client.rb +19 -0
  273. data/lib/hubspot/discovery/settings/business_units/api/business_unit_api.rb +13 -0
  274. data/lib/hubspot/discovery/settings/business_units/client.rb +19 -0
  275. data/lib/hubspot/discovery/settings/client.rb +1 -0
  276. data/lib/hubspot/version.rb +1 -1
  277. data/spec/discovery/client_spec.rb +1 -0
  278. data/spec/discovery/cms/client_spec.rb +1 -0
  279. data/spec/discovery/cms/pages/landing_pages_api_spec.rb +45 -0
  280. data/spec/discovery/cms/pages/site_pages_api_spec.rb +33 -0
  281. data/spec/discovery/crm/lists/lists_api_spec.rb +15 -0
  282. data/spec/discovery/crm/lists/memberships_api_spec.rb +12 -0
  283. data/spec/discovery/crm/objects/goals/basic_api_spec.rb +11 -0
  284. data/spec/discovery/crm/objects/goals/batch_api_spec.rb +10 -0
  285. data/spec/discovery/crm/objects/goals/gdpr_api_spec.rb +7 -0
  286. data/spec/discovery/crm/objects/goals/public_object_api_spec.rb +7 -0
  287. data/spec/discovery/crm/objects/goals/search_api_spec.rb +7 -0
  288. data/spec/discovery/crm/objects/taxes/basic_api_spec.rb +11 -0
  289. data/spec/discovery/crm/objects/taxes/batch_api_spec.rb +10 -0
  290. data/spec/discovery/crm/objects/taxes/gdpr_api_spec.rb +7 -0
  291. data/spec/discovery/crm/objects/taxes/public_object_api_spec.rb +7 -0
  292. data/spec/discovery/crm/objects/taxes/search_api_spec.rb +7 -0
  293. data/spec/discovery/events/send/behavioral_events_tracking_api_spec.rb +7 -0
  294. data/spec/discovery/settings/businnes_units/business_unit_api_spec.rb +7 -0
  295. data/spec/integration/contacts_spec.rb +85 -0
  296. metadata +303 -2
@@ -0,0 +1,1896 @@
1
+ =begin
2
+ #Pages
3
+
4
+ #Use these endpoints for interacting with Landing Pages and Site Pages
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Hubspot
16
+ module Cms
17
+ module Pages
18
+ class SitePagesApi
19
+ attr_accessor :api_client
20
+
21
+ def initialize(api_client = ApiClient.default)
22
+ @api_client = api_client
23
+ end
24
+ # Delete a Site Page
25
+ # Delete the Site Page object identified by the id in the path.
26
+ # @param object_id [String] The Site Page id.
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [Boolean] :archived Whether to return only results that have been archived.
29
+ # @return [nil]
30
+ def archive(object_id, opts = {})
31
+ archive_with_http_info(object_id, opts)
32
+ nil
33
+ end
34
+
35
+ # Delete a Site Page
36
+ # Delete the Site Page object identified by the id in the path.
37
+ # @param object_id [String] The Site Page id.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Boolean] :archived Whether to return only results that have been archived.
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def archive_with_http_info(object_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.archive ...'
44
+ end
45
+ # verify the required parameter 'object_id' is set
46
+ if @api_client.config.client_side_validation && object_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.archive"
48
+ end
49
+ # resource path
50
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body]
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type]
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['oauth2']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"SitePagesApi.archive",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: SitePagesApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete a batch of Site Pages
91
+ # Delete the Site Page objects identified in the request body. Note: This is not the same as the dashboard `archive` function. To perform a dashboard `archive` send an normal update with the `archivedInDashboard` field set to true.
92
+ # @param batch_input_string [BatchInputString] The JSON array of Site Page ids.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def archive_batch(batch_input_string, opts = {})
96
+ archive_batch_with_http_info(batch_input_string, opts)
97
+ nil
98
+ end
99
+
100
+ # Delete a batch of Site Pages
101
+ # Delete the Site Page objects identified in the request body. Note: This is not the same as the dashboard &#x60;archive&#x60; function. To perform a dashboard &#x60;archive&#x60; send an normal update with the &#x60;archivedInDashboard&#x60; field set to true.
102
+ # @param batch_input_string [BatchInputString] The JSON array of Site Page ids.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def archive_batch_with_http_info(batch_input_string, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.archive_batch ...'
108
+ end
109
+ # verify the required parameter 'batch_input_string' is set
110
+ if @api_client.config.client_side_validation && batch_input_string.nil?
111
+ fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling SitePagesApi.archive_batch"
112
+ end
113
+ # resource path
114
+ local_var_path = '/cms/v3/pages/site-pages/batch/archive'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
123
+ # HTTP header 'Content-Type'
124
+ content_type = @api_client.select_header_content_type(['application/json'])
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type]
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['oauth2']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"SitePagesApi.archive_batch",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: SitePagesApi#archive_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Attach a site page to a multi-language group
159
+ # Attach a site page to a multi-language group.
160
+ # @param attach_to_lang_primary_request_v_next [AttachToLangPrimaryRequestVNext] The JSON representation of the AttachToLangPrimaryRequest object.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [nil]
163
+ def attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {})
164
+ attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts)
165
+ nil
166
+ end
167
+
168
+ # Attach a site page to a multi-language group
169
+ # Attach a site page to a multi-language group.
170
+ # @param attach_to_lang_primary_request_v_next [AttachToLangPrimaryRequestVNext] The JSON representation of the AttachToLangPrimaryRequest object.
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
173
+ def attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.attach_to_lang_group ...'
176
+ end
177
+ # verify the required parameter 'attach_to_lang_primary_request_v_next' is set
178
+ if @api_client.config.client_side_validation && attach_to_lang_primary_request_v_next.nil?
179
+ fail ArgumentError, "Missing the required parameter 'attach_to_lang_primary_request_v_next' when calling SitePagesApi.attach_to_lang_group"
180
+ end
181
+ # resource path
182
+ local_var_path = '/cms/v3/pages/site-pages/multi-language/attach-to-lang-group'
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
191
+ # HTTP header 'Content-Type'
192
+ content_type = @api_client.select_header_content_type(['application/json'])
193
+ if !content_type.nil?
194
+ header_params['Content-Type'] = content_type
195
+ end
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(attach_to_lang_primary_request_v_next)
202
+
203
+ # return_type
204
+ return_type = opts[:debug_return_type]
205
+
206
+ # auth_names
207
+ auth_names = opts[:debug_auth_names] || ['oauth2']
208
+
209
+ new_options = opts.merge(
210
+ :operation => :"SitePagesApi.attach_to_lang_group",
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type
217
+ )
218
+
219
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: SitePagesApi#attach_to_lang_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
225
+
226
+ # Clone a Site Page
227
+ # Clone a Site Page
228
+ # @param content_clone_request_v_next [ContentCloneRequestVNext] The JSON representation of the ContentCloneRequest object.
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [Page]
231
+ def clone(content_clone_request_v_next, opts = {})
232
+ data, _status_code, _headers = clone_with_http_info(content_clone_request_v_next, opts)
233
+ data
234
+ end
235
+
236
+ # Clone a Site Page
237
+ # Clone a Site Page
238
+ # @param content_clone_request_v_next [ContentCloneRequestVNext] The JSON representation of the ContentCloneRequest object.
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
241
+ def clone_with_http_info(content_clone_request_v_next, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.clone ...'
244
+ end
245
+ # verify the required parameter 'content_clone_request_v_next' is set
246
+ if @api_client.config.client_side_validation && content_clone_request_v_next.nil?
247
+ fail ArgumentError, "Missing the required parameter 'content_clone_request_v_next' when calling SitePagesApi.clone"
248
+ end
249
+ # resource path
250
+ local_var_path = '/cms/v3/pages/site-pages/clone'
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
259
+ # HTTP header 'Content-Type'
260
+ content_type = @api_client.select_header_content_type(['application/json'])
261
+ if !content_type.nil?
262
+ header_params['Content-Type'] = content_type
263
+ end
264
+
265
+ # form parameters
266
+ form_params = opts[:form_params] || {}
267
+
268
+ # http body (model)
269
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(content_clone_request_v_next)
270
+
271
+ # return_type
272
+ return_type = opts[:debug_return_type] || 'Page'
273
+
274
+ # auth_names
275
+ auth_names = opts[:debug_auth_names] || ['oauth2']
276
+
277
+ new_options = opts.merge(
278
+ :operation => :"SitePagesApi.clone",
279
+ :header_params => header_params,
280
+ :query_params => query_params,
281
+ :form_params => form_params,
282
+ :body => post_body,
283
+ :auth_names => auth_names,
284
+ :return_type => return_type
285
+ )
286
+
287
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "API called: SitePagesApi#clone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
+ end
291
+ return data, status_code, headers
292
+ end
293
+
294
+ # Create a new Site Page
295
+ # Create a new Site Page
296
+ # @param page [Page] The JSON representation of a new Site Page.
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [nil]
299
+ def create(page, opts = {})
300
+ create_with_http_info(page, opts)
301
+ nil
302
+ end
303
+
304
+ # Create a new Site Page
305
+ # Create a new Site Page
306
+ # @param page [Page] The JSON representation of a new Site Page.
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
309
+ def create_with_http_info(page, opts = {})
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.create ...'
312
+ end
313
+ # verify the required parameter 'page' is set
314
+ if @api_client.config.client_side_validation && page.nil?
315
+ fail ArgumentError, "Missing the required parameter 'page' when calling SitePagesApi.create"
316
+ end
317
+ # resource path
318
+ local_var_path = '/cms/v3/pages/site-pages'
319
+
320
+ # query parameters
321
+ query_params = opts[:query_params] || {}
322
+
323
+ # header parameters
324
+ header_params = opts[:header_params] || {}
325
+ # HTTP header 'Accept' (if needed)
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
327
+ # HTTP header 'Content-Type'
328
+ content_type = @api_client.select_header_content_type(['application/json'])
329
+ if !content_type.nil?
330
+ header_params['Content-Type'] = content_type
331
+ end
332
+
333
+ # form parameters
334
+ form_params = opts[:form_params] || {}
335
+
336
+ # http body (model)
337
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(page)
338
+
339
+ # return_type
340
+ return_type = opts[:debug_return_type]
341
+
342
+ # auth_names
343
+ auth_names = opts[:debug_auth_names] || ['oauth2']
344
+
345
+ new_options = opts.merge(
346
+ :operation => :"SitePagesApi.create",
347
+ :header_params => header_params,
348
+ :query_params => query_params,
349
+ :form_params => form_params,
350
+ :body => post_body,
351
+ :auth_names => auth_names,
352
+ :return_type => return_type
353
+ )
354
+
355
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
356
+ if @api_client.config.debugging
357
+ @api_client.config.logger.debug "API called: SitePagesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ end
359
+ return data, status_code, headers
360
+ end
361
+
362
+ # Create a new A/B test variation
363
+ # Create a new A/B test variation based on the information provided in the request body.
364
+ # @param ab_test_create_request_v_next [AbTestCreateRequestVNext] The JSON representation of the AbTestCreateRequest object.
365
+ # @param [Hash] opts the optional parameters
366
+ # @return [Page]
367
+ def create_ab_test_variation(ab_test_create_request_v_next, opts = {})
368
+ data, _status_code, _headers = create_ab_test_variation_with_http_info(ab_test_create_request_v_next, opts)
369
+ data
370
+ end
371
+
372
+ # Create a new A/B test variation
373
+ # Create a new A/B test variation based on the information provided in the request body.
374
+ # @param ab_test_create_request_v_next [AbTestCreateRequestVNext] The JSON representation of the AbTestCreateRequest object.
375
+ # @param [Hash] opts the optional parameters
376
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
377
+ def create_ab_test_variation_with_http_info(ab_test_create_request_v_next, opts = {})
378
+ if @api_client.config.debugging
379
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.create_ab_test_variation ...'
380
+ end
381
+ # verify the required parameter 'ab_test_create_request_v_next' is set
382
+ if @api_client.config.client_side_validation && ab_test_create_request_v_next.nil?
383
+ fail ArgumentError, "Missing the required parameter 'ab_test_create_request_v_next' when calling SitePagesApi.create_ab_test_variation"
384
+ end
385
+ # resource path
386
+ local_var_path = '/cms/v3/pages/site-pages/ab-test/create-variation'
387
+
388
+ # query parameters
389
+ query_params = opts[:query_params] || {}
390
+
391
+ # header parameters
392
+ header_params = opts[:header_params] || {}
393
+ # HTTP header 'Accept' (if needed)
394
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
395
+ # HTTP header 'Content-Type'
396
+ content_type = @api_client.select_header_content_type(['application/json'])
397
+ if !content_type.nil?
398
+ header_params['Content-Type'] = content_type
399
+ end
400
+
401
+ # form parameters
402
+ form_params = opts[:form_params] || {}
403
+
404
+ # http body (model)
405
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ab_test_create_request_v_next)
406
+
407
+ # return_type
408
+ return_type = opts[:debug_return_type] || 'Page'
409
+
410
+ # auth_names
411
+ auth_names = opts[:debug_auth_names] || ['oauth2']
412
+
413
+ new_options = opts.merge(
414
+ :operation => :"SitePagesApi.create_ab_test_variation",
415
+ :header_params => header_params,
416
+ :query_params => query_params,
417
+ :form_params => form_params,
418
+ :body => post_body,
419
+ :auth_names => auth_names,
420
+ :return_type => return_type
421
+ )
422
+
423
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
424
+ if @api_client.config.debugging
425
+ @api_client.config.logger.debug "API called: SitePagesApi#create_ab_test_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
426
+ end
427
+ return data, status_code, headers
428
+ end
429
+
430
+ # Create a batch of Site Pages
431
+ # Create the Site Page objects detailed in the request body.
432
+ # @param batch_input_page [BatchInputPage] The JSON array of new Site Pages to create.
433
+ # @param [Hash] opts the optional parameters
434
+ # @return [BatchResponsePage]
435
+ def create_batch(batch_input_page, opts = {})
436
+ data, _status_code, _headers = create_batch_with_http_info(batch_input_page, opts)
437
+ data
438
+ end
439
+
440
+ # Create a batch of Site Pages
441
+ # Create the Site Page objects detailed in the request body.
442
+ # @param batch_input_page [BatchInputPage] The JSON array of new Site Pages to create.
443
+ # @param [Hash] opts the optional parameters
444
+ # @return [Array<(BatchResponsePage, Integer, Hash)>] BatchResponsePage data, response status code and response headers
445
+ def create_batch_with_http_info(batch_input_page, opts = {})
446
+ if @api_client.config.debugging
447
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.create_batch ...'
448
+ end
449
+ # verify the required parameter 'batch_input_page' is set
450
+ if @api_client.config.client_side_validation && batch_input_page.nil?
451
+ fail ArgumentError, "Missing the required parameter 'batch_input_page' when calling SitePagesApi.create_batch"
452
+ end
453
+ # resource path
454
+ local_var_path = '/cms/v3/pages/site-pages/batch/create'
455
+
456
+ # query parameters
457
+ query_params = opts[:query_params] || {}
458
+
459
+ # header parameters
460
+ header_params = opts[:header_params] || {}
461
+ # HTTP header 'Accept' (if needed)
462
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
463
+ # HTTP header 'Content-Type'
464
+ content_type = @api_client.select_header_content_type(['application/json'])
465
+ if !content_type.nil?
466
+ header_params['Content-Type'] = content_type
467
+ end
468
+
469
+ # form parameters
470
+ form_params = opts[:form_params] || {}
471
+
472
+ # http body (model)
473
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_page)
474
+
475
+ # return_type
476
+ return_type = opts[:debug_return_type] || 'BatchResponsePage'
477
+
478
+ # auth_names
479
+ auth_names = opts[:debug_auth_names] || ['oauth2']
480
+
481
+ new_options = opts.merge(
482
+ :operation => :"SitePagesApi.create_batch",
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => return_type
489
+ )
490
+
491
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug "API called: SitePagesApi#create_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ end
495
+ return data, status_code, headers
496
+ end
497
+
498
+ # Create a new language variation
499
+ # Create a new language variation from an existing site page
500
+ # @param content_language_clone_request_v_next [ContentLanguageCloneRequestVNext] The JSON representation of the ContentLanguageCloneRequest object.
501
+ # @param [Hash] opts the optional parameters
502
+ # @return [Page]
503
+ def create_lang_variation(content_language_clone_request_v_next, opts = {})
504
+ data, _status_code, _headers = create_lang_variation_with_http_info(content_language_clone_request_v_next, opts)
505
+ data
506
+ end
507
+
508
+ # Create a new language variation
509
+ # Create a new language variation from an existing site page
510
+ # @param content_language_clone_request_v_next [ContentLanguageCloneRequestVNext] The JSON representation of the ContentLanguageCloneRequest object.
511
+ # @param [Hash] opts the optional parameters
512
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
513
+ def create_lang_variation_with_http_info(content_language_clone_request_v_next, opts = {})
514
+ if @api_client.config.debugging
515
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.create_lang_variation ...'
516
+ end
517
+ # verify the required parameter 'content_language_clone_request_v_next' is set
518
+ if @api_client.config.client_side_validation && content_language_clone_request_v_next.nil?
519
+ fail ArgumentError, "Missing the required parameter 'content_language_clone_request_v_next' when calling SitePagesApi.create_lang_variation"
520
+ end
521
+ # resource path
522
+ local_var_path = '/cms/v3/pages/site-pages/multi-language/create-language-variation'
523
+
524
+ # query parameters
525
+ query_params = opts[:query_params] || {}
526
+
527
+ # header parameters
528
+ header_params = opts[:header_params] || {}
529
+ # HTTP header 'Accept' (if needed)
530
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
531
+ # HTTP header 'Content-Type'
532
+ content_type = @api_client.select_header_content_type(['application/json'])
533
+ if !content_type.nil?
534
+ header_params['Content-Type'] = content_type
535
+ end
536
+
537
+ # form parameters
538
+ form_params = opts[:form_params] || {}
539
+
540
+ # http body (model)
541
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(content_language_clone_request_v_next)
542
+
543
+ # return_type
544
+ return_type = opts[:debug_return_type] || 'Page'
545
+
546
+ # auth_names
547
+ auth_names = opts[:debug_auth_names] || ['oauth2']
548
+
549
+ new_options = opts.merge(
550
+ :operation => :"SitePagesApi.create_lang_variation",
551
+ :header_params => header_params,
552
+ :query_params => query_params,
553
+ :form_params => form_params,
554
+ :body => post_body,
555
+ :auth_names => auth_names,
556
+ :return_type => return_type
557
+ )
558
+
559
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
560
+ if @api_client.config.debugging
561
+ @api_client.config.logger.debug "API called: SitePagesApi#create_lang_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
562
+ end
563
+ return data, status_code, headers
564
+ end
565
+
566
+ # Detach a site page from a multi-language group
567
+ # Detach a site page from a multi-language group.
568
+ # @param detach_from_lang_group_request_v_next [DetachFromLangGroupRequestVNext] The JSON representation of the DetachFromLangGroupRequest object.
569
+ # @param [Hash] opts the optional parameters
570
+ # @return [nil]
571
+ def detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {})
572
+ detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts)
573
+ nil
574
+ end
575
+
576
+ # Detach a site page from a multi-language group
577
+ # Detach a site page from a multi-language group.
578
+ # @param detach_from_lang_group_request_v_next [DetachFromLangGroupRequestVNext] The JSON representation of the DetachFromLangGroupRequest object.
579
+ # @param [Hash] opts the optional parameters
580
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
581
+ def detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {})
582
+ if @api_client.config.debugging
583
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.detach_from_lang_group ...'
584
+ end
585
+ # verify the required parameter 'detach_from_lang_group_request_v_next' is set
586
+ if @api_client.config.client_side_validation && detach_from_lang_group_request_v_next.nil?
587
+ fail ArgumentError, "Missing the required parameter 'detach_from_lang_group_request_v_next' when calling SitePagesApi.detach_from_lang_group"
588
+ end
589
+ # resource path
590
+ local_var_path = '/cms/v3/pages/site-pages/multi-language/detach-from-lang-group'
591
+
592
+ # query parameters
593
+ query_params = opts[:query_params] || {}
594
+
595
+ # header parameters
596
+ header_params = opts[:header_params] || {}
597
+ # HTTP header 'Accept' (if needed)
598
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
599
+ # HTTP header 'Content-Type'
600
+ content_type = @api_client.select_header_content_type(['application/json'])
601
+ if !content_type.nil?
602
+ header_params['Content-Type'] = content_type
603
+ end
604
+
605
+ # form parameters
606
+ form_params = opts[:form_params] || {}
607
+
608
+ # http body (model)
609
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(detach_from_lang_group_request_v_next)
610
+
611
+ # return_type
612
+ return_type = opts[:debug_return_type]
613
+
614
+ # auth_names
615
+ auth_names = opts[:debug_auth_names] || ['oauth2']
616
+
617
+ new_options = opts.merge(
618
+ :operation => :"SitePagesApi.detach_from_lang_group",
619
+ :header_params => header_params,
620
+ :query_params => query_params,
621
+ :form_params => form_params,
622
+ :body => post_body,
623
+ :auth_names => auth_names,
624
+ :return_type => return_type
625
+ )
626
+
627
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
628
+ if @api_client.config.debugging
629
+ @api_client.config.logger.debug "API called: SitePagesApi#detach_from_lang_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
630
+ end
631
+ return data, status_code, headers
632
+ end
633
+
634
+ # End an active A/B test
635
+ # End an active A/B test and designate a winner.
636
+ # @param ab_test_end_request_v_next [AbTestEndRequestVNext] The JSON representation of the AbTestEndRequest object.
637
+ # @param [Hash] opts the optional parameters
638
+ # @return [nil]
639
+ def end_active_ab_test(ab_test_end_request_v_next, opts = {})
640
+ end_active_ab_test_with_http_info(ab_test_end_request_v_next, opts)
641
+ nil
642
+ end
643
+
644
+ # End an active A/B test
645
+ # End an active A/B test and designate a winner.
646
+ # @param ab_test_end_request_v_next [AbTestEndRequestVNext] The JSON representation of the AbTestEndRequest object.
647
+ # @param [Hash] opts the optional parameters
648
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
649
+ def end_active_ab_test_with_http_info(ab_test_end_request_v_next, opts = {})
650
+ if @api_client.config.debugging
651
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.end_active_ab_test ...'
652
+ end
653
+ # verify the required parameter 'ab_test_end_request_v_next' is set
654
+ if @api_client.config.client_side_validation && ab_test_end_request_v_next.nil?
655
+ fail ArgumentError, "Missing the required parameter 'ab_test_end_request_v_next' when calling SitePagesApi.end_active_ab_test"
656
+ end
657
+ # resource path
658
+ local_var_path = '/cms/v3/pages/site-pages/ab-test/end'
659
+
660
+ # query parameters
661
+ query_params = opts[:query_params] || {}
662
+
663
+ # header parameters
664
+ header_params = opts[:header_params] || {}
665
+ # HTTP header 'Accept' (if needed)
666
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
667
+ # HTTP header 'Content-Type'
668
+ content_type = @api_client.select_header_content_type(['application/json'])
669
+ if !content_type.nil?
670
+ header_params['Content-Type'] = content_type
671
+ end
672
+
673
+ # form parameters
674
+ form_params = opts[:form_params] || {}
675
+
676
+ # http body (model)
677
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ab_test_end_request_v_next)
678
+
679
+ # return_type
680
+ return_type = opts[:debug_return_type]
681
+
682
+ # auth_names
683
+ auth_names = opts[:debug_auth_names] || ['oauth2']
684
+
685
+ new_options = opts.merge(
686
+ :operation => :"SitePagesApi.end_active_ab_test",
687
+ :header_params => header_params,
688
+ :query_params => query_params,
689
+ :form_params => form_params,
690
+ :body => post_body,
691
+ :auth_names => auth_names,
692
+ :return_type => return_type
693
+ )
694
+
695
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
696
+ if @api_client.config.debugging
697
+ @api_client.config.logger.debug "API called: SitePagesApi#end_active_ab_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
698
+ end
699
+ return data, status_code, headers
700
+ end
701
+
702
+ # Retrieve a Site Page
703
+ # Retrieve the Site Page object identified by the id in the path.
704
+ # @param object_id [String] The Site Page id.
705
+ # @param [Hash] opts the optional parameters
706
+ # @option opts [Boolean] :archived Specifies whether to return deleted Site Pages. Defaults to &#x60;false&#x60;.
707
+ # @option opts [String] :property
708
+ # @return [Page]
709
+ def get_by_id(object_id, opts = {})
710
+ data, _status_code, _headers = get_by_id_with_http_info(object_id, opts)
711
+ data
712
+ end
713
+
714
+ # Retrieve a Site Page
715
+ # Retrieve the Site Page object identified by the id in the path.
716
+ # @param object_id [String] The Site Page id.
717
+ # @param [Hash] opts the optional parameters
718
+ # @option opts [Boolean] :archived Specifies whether to return deleted Site Pages. Defaults to &#x60;false&#x60;.
719
+ # @option opts [String] :property
720
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
721
+ def get_by_id_with_http_info(object_id, opts = {})
722
+ if @api_client.config.debugging
723
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.get_by_id ...'
724
+ end
725
+ # verify the required parameter 'object_id' is set
726
+ if @api_client.config.client_side_validation && object_id.nil?
727
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.get_by_id"
728
+ end
729
+ # resource path
730
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
731
+
732
+ # query parameters
733
+ query_params = opts[:query_params] || {}
734
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
735
+ query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil?
736
+
737
+ # header parameters
738
+ header_params = opts[:header_params] || {}
739
+ # HTTP header 'Accept' (if needed)
740
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
741
+
742
+ # form parameters
743
+ form_params = opts[:form_params] || {}
744
+
745
+ # http body (model)
746
+ post_body = opts[:debug_body]
747
+
748
+ # return_type
749
+ return_type = opts[:debug_return_type] || 'Page'
750
+
751
+ # auth_names
752
+ auth_names = opts[:debug_auth_names] || ['oauth2']
753
+
754
+ new_options = opts.merge(
755
+ :operation => :"SitePagesApi.get_by_id",
756
+ :header_params => header_params,
757
+ :query_params => query_params,
758
+ :form_params => form_params,
759
+ :body => post_body,
760
+ :auth_names => auth_names,
761
+ :return_type => return_type
762
+ )
763
+
764
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
765
+ if @api_client.config.debugging
766
+ @api_client.config.logger.debug "API called: SitePagesApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
767
+ end
768
+ return data, status_code, headers
769
+ end
770
+
771
+ # Retrieve the full draft version of the Site Page
772
+ # Retrieve the full draft version of the Site Page.
773
+ # @param object_id [String] The Site Page id.
774
+ # @param [Hash] opts the optional parameters
775
+ # @return [Page]
776
+ def get_draft_by_id(object_id, opts = {})
777
+ data, _status_code, _headers = get_draft_by_id_with_http_info(object_id, opts)
778
+ data
779
+ end
780
+
781
+ # Retrieve the full draft version of the Site Page
782
+ # Retrieve the full draft version of the Site Page.
783
+ # @param object_id [String] The Site Page id.
784
+ # @param [Hash] opts the optional parameters
785
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
786
+ def get_draft_by_id_with_http_info(object_id, opts = {})
787
+ if @api_client.config.debugging
788
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.get_draft_by_id ...'
789
+ end
790
+ # verify the required parameter 'object_id' is set
791
+ if @api_client.config.client_side_validation && object_id.nil?
792
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.get_draft_by_id"
793
+ end
794
+ # resource path
795
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
796
+
797
+ # query parameters
798
+ query_params = opts[:query_params] || {}
799
+
800
+ # header parameters
801
+ header_params = opts[:header_params] || {}
802
+ # HTTP header 'Accept' (if needed)
803
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
804
+
805
+ # form parameters
806
+ form_params = opts[:form_params] || {}
807
+
808
+ # http body (model)
809
+ post_body = opts[:debug_body]
810
+
811
+ # return_type
812
+ return_type = opts[:debug_return_type] || 'Page'
813
+
814
+ # auth_names
815
+ auth_names = opts[:debug_auth_names] || ['oauth2']
816
+
817
+ new_options = opts.merge(
818
+ :operation => :"SitePagesApi.get_draft_by_id",
819
+ :header_params => header_params,
820
+ :query_params => query_params,
821
+ :form_params => form_params,
822
+ :body => post_body,
823
+ :auth_names => auth_names,
824
+ :return_type => return_type
825
+ )
826
+
827
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
828
+ if @api_client.config.debugging
829
+ @api_client.config.logger.debug "API called: SitePagesApi#get_draft_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
830
+ end
831
+ return data, status_code, headers
832
+ end
833
+
834
+ # Get all Site Pages
835
+ # Get the list of site pages. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits.
836
+ # @param [Hash] opts the optional parameters
837
+ # @option opts [Time] :created_at Only return Site Pages created at exactly the specified time.
838
+ # @option opts [Time] :created_after Only return Site Pages created after the specified time.
839
+ # @option opts [Time] :created_before Only return Site Pages created before the specified time.
840
+ # @option opts [Time] :updated_at Only return Site Pages last updated at exactly the specified time.
841
+ # @option opts [Time] :updated_after Only return Site Pages last updated after the specified time.
842
+ # @option opts [Time] :updated_before Only return Site Pages last updated before the specified time.
843
+ # @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are &#x60;name&#x60;, &#x60;createdAt&#x60;, &#x60;updatedAt&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60;. &#x60;createdAt&#x60; will be used by default.
844
+ # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
845
+ # @option opts [Integer] :limit The maximum number of results to return. Default is 100.
846
+ # @option opts [Boolean] :archived Specifies whether to return deleted Site Pages. Defaults to &#x60;false&#x60;.
847
+ # @option opts [String] :property
848
+ # @return [CollectionResponseWithTotalPageForwardPaging]
849
+ def get_page(opts = {})
850
+ data, _status_code, _headers = get_page_with_http_info(opts)
851
+ data
852
+ end
853
+
854
+ # Get all Site Pages
855
+ # Get the list of site pages. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits.
856
+ # @param [Hash] opts the optional parameters
857
+ # @option opts [Time] :created_at Only return Site Pages created at exactly the specified time.
858
+ # @option opts [Time] :created_after Only return Site Pages created after the specified time.
859
+ # @option opts [Time] :created_before Only return Site Pages created before the specified time.
860
+ # @option opts [Time] :updated_at Only return Site Pages last updated at exactly the specified time.
861
+ # @option opts [Time] :updated_after Only return Site Pages last updated after the specified time.
862
+ # @option opts [Time] :updated_before Only return Site Pages last updated before the specified time.
863
+ # @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are &#x60;name&#x60;, &#x60;createdAt&#x60;, &#x60;updatedAt&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60;. &#x60;createdAt&#x60; will be used by default.
864
+ # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
865
+ # @option opts [Integer] :limit The maximum number of results to return. Default is 100.
866
+ # @option opts [Boolean] :archived Specifies whether to return deleted Site Pages. Defaults to &#x60;false&#x60;.
867
+ # @option opts [String] :property
868
+ # @return [Array<(CollectionResponseWithTotalPageForwardPaging, Integer, Hash)>] CollectionResponseWithTotalPageForwardPaging data, response status code and response headers
869
+ def get_page_with_http_info(opts = {})
870
+ if @api_client.config.debugging
871
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.get_page ...'
872
+ end
873
+ # resource path
874
+ local_var_path = '/cms/v3/pages/site-pages'
875
+
876
+ # query parameters
877
+ query_params = opts[:query_params] || {}
878
+ query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
879
+ query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
880
+ query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
881
+ query_params[:'updatedAt'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
882
+ query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
883
+ query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
884
+ query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?
885
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
886
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
887
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
888
+ query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil?
889
+
890
+ # header parameters
891
+ header_params = opts[:header_params] || {}
892
+ # HTTP header 'Accept' (if needed)
893
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
894
+
895
+ # form parameters
896
+ form_params = opts[:form_params] || {}
897
+
898
+ # http body (model)
899
+ post_body = opts[:debug_body]
900
+
901
+ # return_type
902
+ return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalPageForwardPaging'
903
+
904
+ # auth_names
905
+ auth_names = opts[:debug_auth_names] || ['oauth2']
906
+
907
+ new_options = opts.merge(
908
+ :operation => :"SitePagesApi.get_page",
909
+ :header_params => header_params,
910
+ :query_params => query_params,
911
+ :form_params => form_params,
912
+ :body => post_body,
913
+ :auth_names => auth_names,
914
+ :return_type => return_type
915
+ )
916
+
917
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
918
+ if @api_client.config.debugging
919
+ @api_client.config.logger.debug "API called: SitePagesApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
920
+ end
921
+ return data, status_code, headers
922
+ end
923
+
924
+ # Retrieves a previous version of a Site Page
925
+ # Retrieves a previous version of a Site Page
926
+ # @param object_id [String] The Site Page id.
927
+ # @param revision_id [String] The Site Page version id.
928
+ # @param [Hash] opts the optional parameters
929
+ # @return [VersionPage]
930
+ def get_previous_version(object_id, revision_id, opts = {})
931
+ data, _status_code, _headers = get_previous_version_with_http_info(object_id, revision_id, opts)
932
+ data
933
+ end
934
+
935
+ # Retrieves a previous version of a Site Page
936
+ # Retrieves a previous version of a Site Page
937
+ # @param object_id [String] The Site Page id.
938
+ # @param revision_id [String] The Site Page version id.
939
+ # @param [Hash] opts the optional parameters
940
+ # @return [Array<(VersionPage, Integer, Hash)>] VersionPage data, response status code and response headers
941
+ def get_previous_version_with_http_info(object_id, revision_id, opts = {})
942
+ if @api_client.config.debugging
943
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.get_previous_version ...'
944
+ end
945
+ # verify the required parameter 'object_id' is set
946
+ if @api_client.config.client_side_validation && object_id.nil?
947
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.get_previous_version"
948
+ end
949
+ # verify the required parameter 'revision_id' is set
950
+ if @api_client.config.client_side_validation && revision_id.nil?
951
+ fail ArgumentError, "Missing the required parameter 'revision_id' when calling SitePagesApi.get_previous_version"
952
+ end
953
+ # resource path
954
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/revisions/{revisionId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s))
955
+
956
+ # query parameters
957
+ query_params = opts[:query_params] || {}
958
+
959
+ # header parameters
960
+ header_params = opts[:header_params] || {}
961
+ # HTTP header 'Accept' (if needed)
962
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
963
+
964
+ # form parameters
965
+ form_params = opts[:form_params] || {}
966
+
967
+ # http body (model)
968
+ post_body = opts[:debug_body]
969
+
970
+ # return_type
971
+ return_type = opts[:debug_return_type] || 'VersionPage'
972
+
973
+ # auth_names
974
+ auth_names = opts[:debug_auth_names] || ['oauth2']
975
+
976
+ new_options = opts.merge(
977
+ :operation => :"SitePagesApi.get_previous_version",
978
+ :header_params => header_params,
979
+ :query_params => query_params,
980
+ :form_params => form_params,
981
+ :body => post_body,
982
+ :auth_names => auth_names,
983
+ :return_type => return_type
984
+ )
985
+
986
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
987
+ if @api_client.config.debugging
988
+ @api_client.config.logger.debug "API called: SitePagesApi#get_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
989
+ end
990
+ return data, status_code, headers
991
+ end
992
+
993
+ # Retrieves all the previous versions of a Site Page
994
+ # Retrieves all the previous versions of a Site Page.
995
+ # @param object_id [String] The Site Page id.
996
+ # @param [Hash] opts the optional parameters
997
+ # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
998
+ # @option opts [String] :before
999
+ # @option opts [Integer] :limit The maximum number of results to return. Default is 100.
1000
+ # @return [CollectionResponseWithTotalVersionPage]
1001
+ def get_previous_versions(object_id, opts = {})
1002
+ data, _status_code, _headers = get_previous_versions_with_http_info(object_id, opts)
1003
+ data
1004
+ end
1005
+
1006
+ # Retrieves all the previous versions of a Site Page
1007
+ # Retrieves all the previous versions of a Site Page.
1008
+ # @param object_id [String] The Site Page id.
1009
+ # @param [Hash] opts the optional parameters
1010
+ # @option opts [String] :after The cursor token value to get the next set of results. You can get this from the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
1011
+ # @option opts [String] :before
1012
+ # @option opts [Integer] :limit The maximum number of results to return. Default is 100.
1013
+ # @return [Array<(CollectionResponseWithTotalVersionPage, Integer, Hash)>] CollectionResponseWithTotalVersionPage data, response status code and response headers
1014
+ def get_previous_versions_with_http_info(object_id, opts = {})
1015
+ if @api_client.config.debugging
1016
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.get_previous_versions ...'
1017
+ end
1018
+ # verify the required parameter 'object_id' is set
1019
+ if @api_client.config.client_side_validation && object_id.nil?
1020
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.get_previous_versions"
1021
+ end
1022
+ # resource path
1023
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/revisions'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
1024
+
1025
+ # query parameters
1026
+ query_params = opts[:query_params] || {}
1027
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
1028
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
1029
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1030
+
1031
+ # header parameters
1032
+ header_params = opts[:header_params] || {}
1033
+ # HTTP header 'Accept' (if needed)
1034
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
1035
+
1036
+ # form parameters
1037
+ form_params = opts[:form_params] || {}
1038
+
1039
+ # http body (model)
1040
+ post_body = opts[:debug_body]
1041
+
1042
+ # return_type
1043
+ return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalVersionPage'
1044
+
1045
+ # auth_names
1046
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1047
+
1048
+ new_options = opts.merge(
1049
+ :operation => :"SitePagesApi.get_previous_versions",
1050
+ :header_params => header_params,
1051
+ :query_params => query_params,
1052
+ :form_params => form_params,
1053
+ :body => post_body,
1054
+ :auth_names => auth_names,
1055
+ :return_type => return_type
1056
+ )
1057
+
1058
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1059
+ if @api_client.config.debugging
1060
+ @api_client.config.logger.debug "API called: SitePagesApi#get_previous_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1061
+ end
1062
+ return data, status_code, headers
1063
+ end
1064
+
1065
+ # Push Site Page draft edits live
1066
+ # Take any changes from the draft version of the Site Page and apply them to the live version.
1067
+ # @param object_id [String] The id of the Site Page for which it&#39;s draft will be pushed live.
1068
+ # @param [Hash] opts the optional parameters
1069
+ # @return [nil]
1070
+ def push_live(object_id, opts = {})
1071
+ push_live_with_http_info(object_id, opts)
1072
+ nil
1073
+ end
1074
+
1075
+ # Push Site Page draft edits live
1076
+ # Take any changes from the draft version of the Site Page and apply them to the live version.
1077
+ # @param object_id [String] The id of the Site Page for which it&#39;s draft will be pushed live.
1078
+ # @param [Hash] opts the optional parameters
1079
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1080
+ def push_live_with_http_info(object_id, opts = {})
1081
+ if @api_client.config.debugging
1082
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.push_live ...'
1083
+ end
1084
+ # verify the required parameter 'object_id' is set
1085
+ if @api_client.config.client_side_validation && object_id.nil?
1086
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.push_live"
1087
+ end
1088
+ # resource path
1089
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/draft/push-live'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
1090
+
1091
+ # query parameters
1092
+ query_params = opts[:query_params] || {}
1093
+
1094
+ # header parameters
1095
+ header_params = opts[:header_params] || {}
1096
+ # HTTP header 'Accept' (if needed)
1097
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1098
+
1099
+ # form parameters
1100
+ form_params = opts[:form_params] || {}
1101
+
1102
+ # http body (model)
1103
+ post_body = opts[:debug_body]
1104
+
1105
+ # return_type
1106
+ return_type = opts[:debug_return_type]
1107
+
1108
+ # auth_names
1109
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1110
+
1111
+ new_options = opts.merge(
1112
+ :operation => :"SitePagesApi.push_live",
1113
+ :header_params => header_params,
1114
+ :query_params => query_params,
1115
+ :form_params => form_params,
1116
+ :body => post_body,
1117
+ :auth_names => auth_names,
1118
+ :return_type => return_type
1119
+ )
1120
+
1121
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1122
+ if @api_client.config.debugging
1123
+ @api_client.config.logger.debug "API called: SitePagesApi#push_live\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1124
+ end
1125
+ return data, status_code, headers
1126
+ end
1127
+
1128
+ # Retrieve a batch of Site Pages
1129
+ # Retrieve the Site Page objects identified in the request body.
1130
+ # @param batch_input_string [BatchInputString] The JSON array of Site Page ids.
1131
+ # @param [Hash] opts the optional parameters
1132
+ # @option opts [Boolean] :archived Specifies whether to return deleted Site Pages. Defaults to &#x60;false&#x60;.
1133
+ # @return [BatchResponsePage]
1134
+ def read_batch(batch_input_string, opts = {})
1135
+ data, _status_code, _headers = read_batch_with_http_info(batch_input_string, opts)
1136
+ data
1137
+ end
1138
+
1139
+ # Retrieve a batch of Site Pages
1140
+ # Retrieve the Site Page objects identified in the request body.
1141
+ # @param batch_input_string [BatchInputString] The JSON array of Site Page ids.
1142
+ # @param [Hash] opts the optional parameters
1143
+ # @option opts [Boolean] :archived Specifies whether to return deleted Site Pages. Defaults to &#x60;false&#x60;.
1144
+ # @return [Array<(BatchResponsePage, Integer, Hash)>] BatchResponsePage data, response status code and response headers
1145
+ def read_batch_with_http_info(batch_input_string, opts = {})
1146
+ if @api_client.config.debugging
1147
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.read_batch ...'
1148
+ end
1149
+ # verify the required parameter 'batch_input_string' is set
1150
+ if @api_client.config.client_side_validation && batch_input_string.nil?
1151
+ fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling SitePagesApi.read_batch"
1152
+ end
1153
+ # resource path
1154
+ local_var_path = '/cms/v3/pages/site-pages/batch/read'
1155
+
1156
+ # query parameters
1157
+ query_params = opts[:query_params] || {}
1158
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
1159
+
1160
+ # header parameters
1161
+ header_params = opts[:header_params] || {}
1162
+ # HTTP header 'Accept' (if needed)
1163
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
1164
+ # HTTP header 'Content-Type'
1165
+ content_type = @api_client.select_header_content_type(['application/json'])
1166
+ if !content_type.nil?
1167
+ header_params['Content-Type'] = content_type
1168
+ end
1169
+
1170
+ # form parameters
1171
+ form_params = opts[:form_params] || {}
1172
+
1173
+ # http body (model)
1174
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)
1175
+
1176
+ # return_type
1177
+ return_type = opts[:debug_return_type] || 'BatchResponsePage'
1178
+
1179
+ # auth_names
1180
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1181
+
1182
+ new_options = opts.merge(
1183
+ :operation => :"SitePagesApi.read_batch",
1184
+ :header_params => header_params,
1185
+ :query_params => query_params,
1186
+ :form_params => form_params,
1187
+ :body => post_body,
1188
+ :auth_names => auth_names,
1189
+ :return_type => return_type
1190
+ )
1191
+
1192
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1193
+ if @api_client.config.debugging
1194
+ @api_client.config.logger.debug "API called: SitePagesApi#read_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1195
+ end
1196
+ return data, status_code, headers
1197
+ end
1198
+
1199
+ # Rerun a previous A/B test
1200
+ # Rerun a previous A/B test.
1201
+ # @param ab_test_rerun_request_v_next [AbTestRerunRequestVNext] The JSON representation of the AbTestRerunRequest object.
1202
+ # @param [Hash] opts the optional parameters
1203
+ # @return [nil]
1204
+ def rerun_previous_ab_test(ab_test_rerun_request_v_next, opts = {})
1205
+ rerun_previous_ab_test_with_http_info(ab_test_rerun_request_v_next, opts)
1206
+ nil
1207
+ end
1208
+
1209
+ # Rerun a previous A/B test
1210
+ # Rerun a previous A/B test.
1211
+ # @param ab_test_rerun_request_v_next [AbTestRerunRequestVNext] The JSON representation of the AbTestRerunRequest object.
1212
+ # @param [Hash] opts the optional parameters
1213
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1214
+ def rerun_previous_ab_test_with_http_info(ab_test_rerun_request_v_next, opts = {})
1215
+ if @api_client.config.debugging
1216
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.rerun_previous_ab_test ...'
1217
+ end
1218
+ # verify the required parameter 'ab_test_rerun_request_v_next' is set
1219
+ if @api_client.config.client_side_validation && ab_test_rerun_request_v_next.nil?
1220
+ fail ArgumentError, "Missing the required parameter 'ab_test_rerun_request_v_next' when calling SitePagesApi.rerun_previous_ab_test"
1221
+ end
1222
+ # resource path
1223
+ local_var_path = '/cms/v3/pages/site-pages/ab-test/rerun'
1224
+
1225
+ # query parameters
1226
+ query_params = opts[:query_params] || {}
1227
+
1228
+ # header parameters
1229
+ header_params = opts[:header_params] || {}
1230
+ # HTTP header 'Accept' (if needed)
1231
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1232
+ # HTTP header 'Content-Type'
1233
+ content_type = @api_client.select_header_content_type(['application/json'])
1234
+ if !content_type.nil?
1235
+ header_params['Content-Type'] = content_type
1236
+ end
1237
+
1238
+ # form parameters
1239
+ form_params = opts[:form_params] || {}
1240
+
1241
+ # http body (model)
1242
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ab_test_rerun_request_v_next)
1243
+
1244
+ # return_type
1245
+ return_type = opts[:debug_return_type]
1246
+
1247
+ # auth_names
1248
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1249
+
1250
+ new_options = opts.merge(
1251
+ :operation => :"SitePagesApi.rerun_previous_ab_test",
1252
+ :header_params => header_params,
1253
+ :query_params => query_params,
1254
+ :form_params => form_params,
1255
+ :body => post_body,
1256
+ :auth_names => auth_names,
1257
+ :return_type => return_type
1258
+ )
1259
+
1260
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1261
+ if @api_client.config.debugging
1262
+ @api_client.config.logger.debug "API called: SitePagesApi#rerun_previous_ab_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1263
+ end
1264
+ return data, status_code, headers
1265
+ end
1266
+
1267
+ # Reset the Site Page draft to the live version
1268
+ # Discards any edits and resets the draft to the live version.
1269
+ # @param object_id [String] The id of the Site Page for which it&#39;s draft will be reset.
1270
+ # @param [Hash] opts the optional parameters
1271
+ # @return [nil]
1272
+ def reset_draft(object_id, opts = {})
1273
+ reset_draft_with_http_info(object_id, opts)
1274
+ nil
1275
+ end
1276
+
1277
+ # Reset the Site Page draft to the live version
1278
+ # Discards any edits and resets the draft to the live version.
1279
+ # @param object_id [String] The id of the Site Page for which it&#39;s draft will be reset.
1280
+ # @param [Hash] opts the optional parameters
1281
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1282
+ def reset_draft_with_http_info(object_id, opts = {})
1283
+ if @api_client.config.debugging
1284
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.reset_draft ...'
1285
+ end
1286
+ # verify the required parameter 'object_id' is set
1287
+ if @api_client.config.client_side_validation && object_id.nil?
1288
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.reset_draft"
1289
+ end
1290
+ # resource path
1291
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/draft/reset'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
1292
+
1293
+ # query parameters
1294
+ query_params = opts[:query_params] || {}
1295
+
1296
+ # header parameters
1297
+ header_params = opts[:header_params] || {}
1298
+ # HTTP header 'Accept' (if needed)
1299
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1300
+
1301
+ # form parameters
1302
+ form_params = opts[:form_params] || {}
1303
+
1304
+ # http body (model)
1305
+ post_body = opts[:debug_body]
1306
+
1307
+ # return_type
1308
+ return_type = opts[:debug_return_type]
1309
+
1310
+ # auth_names
1311
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1312
+
1313
+ new_options = opts.merge(
1314
+ :operation => :"SitePagesApi.reset_draft",
1315
+ :header_params => header_params,
1316
+ :query_params => query_params,
1317
+ :form_params => form_params,
1318
+ :body => post_body,
1319
+ :auth_names => auth_names,
1320
+ :return_type => return_type
1321
+ )
1322
+
1323
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1324
+ if @api_client.config.debugging
1325
+ @api_client.config.logger.debug "API called: SitePagesApi#reset_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1326
+ end
1327
+ return data, status_code, headers
1328
+ end
1329
+
1330
+ # Restore a previous version of a Site Page
1331
+ # Takes a specified version of a Site Page and restores it.
1332
+ # @param object_id [String] The Site Page id.
1333
+ # @param revision_id [String] The Site Page version id to restore.
1334
+ # @param [Hash] opts the optional parameters
1335
+ # @return [Page]
1336
+ def restore_previous_version(object_id, revision_id, opts = {})
1337
+ data, _status_code, _headers = restore_previous_version_with_http_info(object_id, revision_id, opts)
1338
+ data
1339
+ end
1340
+
1341
+ # Restore a previous version of a Site Page
1342
+ # Takes a specified version of a Site Page and restores it.
1343
+ # @param object_id [String] The Site Page id.
1344
+ # @param revision_id [String] The Site Page version id to restore.
1345
+ # @param [Hash] opts the optional parameters
1346
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
1347
+ def restore_previous_version_with_http_info(object_id, revision_id, opts = {})
1348
+ if @api_client.config.debugging
1349
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.restore_previous_version ...'
1350
+ end
1351
+ # verify the required parameter 'object_id' is set
1352
+ if @api_client.config.client_side_validation && object_id.nil?
1353
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.restore_previous_version"
1354
+ end
1355
+ # verify the required parameter 'revision_id' is set
1356
+ if @api_client.config.client_side_validation && revision_id.nil?
1357
+ fail ArgumentError, "Missing the required parameter 'revision_id' when calling SitePagesApi.restore_previous_version"
1358
+ end
1359
+ # resource path
1360
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/revisions/{revisionId}/restore'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s))
1361
+
1362
+ # query parameters
1363
+ query_params = opts[:query_params] || {}
1364
+
1365
+ # header parameters
1366
+ header_params = opts[:header_params] || {}
1367
+ # HTTP header 'Accept' (if needed)
1368
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
1369
+
1370
+ # form parameters
1371
+ form_params = opts[:form_params] || {}
1372
+
1373
+ # http body (model)
1374
+ post_body = opts[:debug_body]
1375
+
1376
+ # return_type
1377
+ return_type = opts[:debug_return_type] || 'Page'
1378
+
1379
+ # auth_names
1380
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1381
+
1382
+ new_options = opts.merge(
1383
+ :operation => :"SitePagesApi.restore_previous_version",
1384
+ :header_params => header_params,
1385
+ :query_params => query_params,
1386
+ :form_params => form_params,
1387
+ :body => post_body,
1388
+ :auth_names => auth_names,
1389
+ :return_type => return_type
1390
+ )
1391
+
1392
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1393
+ if @api_client.config.debugging
1394
+ @api_client.config.logger.debug "API called: SitePagesApi#restore_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1395
+ end
1396
+ return data, status_code, headers
1397
+ end
1398
+
1399
+ # Restore a previous version of a Site Page, to the draft version of the Site Page
1400
+ # Takes a specified version of a Site Page, sets it as the new draft version of the Site Page.
1401
+ # @param object_id [String] The Site Page id.
1402
+ # @param revision_id [Integer] The Site Page version id to restore.
1403
+ # @param [Hash] opts the optional parameters
1404
+ # @return [Page]
1405
+ def restore_previous_version_to_draft(object_id, revision_id, opts = {})
1406
+ data, _status_code, _headers = restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts)
1407
+ data
1408
+ end
1409
+
1410
+ # Restore a previous version of a Site Page, to the draft version of the Site Page
1411
+ # Takes a specified version of a Site Page, sets it as the new draft version of the Site Page.
1412
+ # @param object_id [String] The Site Page id.
1413
+ # @param revision_id [Integer] The Site Page version id to restore.
1414
+ # @param [Hash] opts the optional parameters
1415
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
1416
+ def restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts = {})
1417
+ if @api_client.config.debugging
1418
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.restore_previous_version_to_draft ...'
1419
+ end
1420
+ # verify the required parameter 'object_id' is set
1421
+ if @api_client.config.client_side_validation && object_id.nil?
1422
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.restore_previous_version_to_draft"
1423
+ end
1424
+ # verify the required parameter 'revision_id' is set
1425
+ if @api_client.config.client_side_validation && revision_id.nil?
1426
+ fail ArgumentError, "Missing the required parameter 'revision_id' when calling SitePagesApi.restore_previous_version_to_draft"
1427
+ end
1428
+ # resource path
1429
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/revisions/{revisionId}/restore-to-draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.to_s))
1430
+
1431
+ # query parameters
1432
+ query_params = opts[:query_params] || {}
1433
+
1434
+ # header parameters
1435
+ header_params = opts[:header_params] || {}
1436
+ # HTTP header 'Accept' (if needed)
1437
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
1438
+
1439
+ # form parameters
1440
+ form_params = opts[:form_params] || {}
1441
+
1442
+ # http body (model)
1443
+ post_body = opts[:debug_body]
1444
+
1445
+ # return_type
1446
+ return_type = opts[:debug_return_type] || 'Page'
1447
+
1448
+ # auth_names
1449
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1450
+
1451
+ new_options = opts.merge(
1452
+ :operation => :"SitePagesApi.restore_previous_version_to_draft",
1453
+ :header_params => header_params,
1454
+ :query_params => query_params,
1455
+ :form_params => form_params,
1456
+ :body => post_body,
1457
+ :auth_names => auth_names,
1458
+ :return_type => return_type
1459
+ )
1460
+
1461
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1462
+ if @api_client.config.debugging
1463
+ @api_client.config.logger.debug "API called: SitePagesApi#restore_previous_version_to_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1464
+ end
1465
+ return data, status_code, headers
1466
+ end
1467
+
1468
+ # Schedule a Site Page to be Published
1469
+ # Schedule a Site Page to be Published
1470
+ # @param content_schedule_request_v_next [ContentScheduleRequestVNext] The JSON representation of the ContentScheduleRequestVNext object.
1471
+ # @param [Hash] opts the optional parameters
1472
+ # @return [nil]
1473
+ def schedule(content_schedule_request_v_next, opts = {})
1474
+ schedule_with_http_info(content_schedule_request_v_next, opts)
1475
+ nil
1476
+ end
1477
+
1478
+ # Schedule a Site Page to be Published
1479
+ # Schedule a Site Page to be Published
1480
+ # @param content_schedule_request_v_next [ContentScheduleRequestVNext] The JSON representation of the ContentScheduleRequestVNext object.
1481
+ # @param [Hash] opts the optional parameters
1482
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1483
+ def schedule_with_http_info(content_schedule_request_v_next, opts = {})
1484
+ if @api_client.config.debugging
1485
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.schedule ...'
1486
+ end
1487
+ # verify the required parameter 'content_schedule_request_v_next' is set
1488
+ if @api_client.config.client_side_validation && content_schedule_request_v_next.nil?
1489
+ fail ArgumentError, "Missing the required parameter 'content_schedule_request_v_next' when calling SitePagesApi.schedule"
1490
+ end
1491
+ # resource path
1492
+ local_var_path = '/cms/v3/pages/site-pages/schedule'
1493
+
1494
+ # query parameters
1495
+ query_params = opts[:query_params] || {}
1496
+
1497
+ # header parameters
1498
+ header_params = opts[:header_params] || {}
1499
+ # HTTP header 'Accept' (if needed)
1500
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1501
+ # HTTP header 'Content-Type'
1502
+ content_type = @api_client.select_header_content_type(['application/json'])
1503
+ if !content_type.nil?
1504
+ header_params['Content-Type'] = content_type
1505
+ end
1506
+
1507
+ # form parameters
1508
+ form_params = opts[:form_params] || {}
1509
+
1510
+ # http body (model)
1511
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(content_schedule_request_v_next)
1512
+
1513
+ # return_type
1514
+ return_type = opts[:debug_return_type]
1515
+
1516
+ # auth_names
1517
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1518
+
1519
+ new_options = opts.merge(
1520
+ :operation => :"SitePagesApi.schedule",
1521
+ :header_params => header_params,
1522
+ :query_params => query_params,
1523
+ :form_params => form_params,
1524
+ :body => post_body,
1525
+ :auth_names => auth_names,
1526
+ :return_type => return_type
1527
+ )
1528
+
1529
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1530
+ if @api_client.config.debugging
1531
+ @api_client.config.logger.debug "API called: SitePagesApi#schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1532
+ end
1533
+ return data, status_code, headers
1534
+ end
1535
+
1536
+ # Set a new primary language
1537
+ # Set a site page as the primary language of a multi-language group.
1538
+ # @param set_new_language_primary_request_v_next [SetNewLanguagePrimaryRequestVNext] The JSON representation of the SetNewLanguagePrimaryRequest object.
1539
+ # @param [Hash] opts the optional parameters
1540
+ # @return [nil]
1541
+ def set_lang_primary(set_new_language_primary_request_v_next, opts = {})
1542
+ set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts)
1543
+ nil
1544
+ end
1545
+
1546
+ # Set a new primary language
1547
+ # Set a site page as the primary language of a multi-language group.
1548
+ # @param set_new_language_primary_request_v_next [SetNewLanguagePrimaryRequestVNext] The JSON representation of the SetNewLanguagePrimaryRequest object.
1549
+ # @param [Hash] opts the optional parameters
1550
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1551
+ def set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts = {})
1552
+ if @api_client.config.debugging
1553
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.set_lang_primary ...'
1554
+ end
1555
+ # verify the required parameter 'set_new_language_primary_request_v_next' is set
1556
+ if @api_client.config.client_side_validation && set_new_language_primary_request_v_next.nil?
1557
+ fail ArgumentError, "Missing the required parameter 'set_new_language_primary_request_v_next' when calling SitePagesApi.set_lang_primary"
1558
+ end
1559
+ # resource path
1560
+ local_var_path = '/cms/v3/pages/site-pages/multi-language/set-new-lang-primary'
1561
+
1562
+ # query parameters
1563
+ query_params = opts[:query_params] || {}
1564
+
1565
+ # header parameters
1566
+ header_params = opts[:header_params] || {}
1567
+ # HTTP header 'Accept' (if needed)
1568
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1569
+ # HTTP header 'Content-Type'
1570
+ content_type = @api_client.select_header_content_type(['application/json'])
1571
+ if !content_type.nil?
1572
+ header_params['Content-Type'] = content_type
1573
+ end
1574
+
1575
+ # form parameters
1576
+ form_params = opts[:form_params] || {}
1577
+
1578
+ # http body (model)
1579
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_new_language_primary_request_v_next)
1580
+
1581
+ # return_type
1582
+ return_type = opts[:debug_return_type]
1583
+
1584
+ # auth_names
1585
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1586
+
1587
+ new_options = opts.merge(
1588
+ :operation => :"SitePagesApi.set_lang_primary",
1589
+ :header_params => header_params,
1590
+ :query_params => query_params,
1591
+ :form_params => form_params,
1592
+ :body => post_body,
1593
+ :auth_names => auth_names,
1594
+ :return_type => return_type
1595
+ )
1596
+
1597
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1598
+ if @api_client.config.debugging
1599
+ @api_client.config.logger.debug "API called: SitePagesApi#set_lang_primary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1600
+ end
1601
+ return data, status_code, headers
1602
+ end
1603
+
1604
+ # Update a Site Page
1605
+ # Sparse updates a single Site Page object identified by the id in the path. You only need to specify the column values that you are modifying.
1606
+ # @param object_id [String] The Site Page id.
1607
+ # @param page [Page] The JSON representation of the updated Site Page.
1608
+ # @param [Hash] opts the optional parameters
1609
+ # @option opts [Boolean] :archived Specifies whether to update deleted Site Pages. Defaults to &#x60;false&#x60;.
1610
+ # @return [Page]
1611
+ def update(object_id, page, opts = {})
1612
+ data, _status_code, _headers = update_with_http_info(object_id, page, opts)
1613
+ data
1614
+ end
1615
+
1616
+ # Update a Site Page
1617
+ # Sparse updates a single Site Page object identified by the id in the path. You only need to specify the column values that you are modifying.
1618
+ # @param object_id [String] The Site Page id.
1619
+ # @param page [Page] The JSON representation of the updated Site Page.
1620
+ # @param [Hash] opts the optional parameters
1621
+ # @option opts [Boolean] :archived Specifies whether to update deleted Site Pages. Defaults to &#x60;false&#x60;.
1622
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
1623
+ def update_with_http_info(object_id, page, opts = {})
1624
+ if @api_client.config.debugging
1625
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.update ...'
1626
+ end
1627
+ # verify the required parameter 'object_id' is set
1628
+ if @api_client.config.client_side_validation && object_id.nil?
1629
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.update"
1630
+ end
1631
+ # verify the required parameter 'page' is set
1632
+ if @api_client.config.client_side_validation && page.nil?
1633
+ fail ArgumentError, "Missing the required parameter 'page' when calling SitePagesApi.update"
1634
+ end
1635
+ # resource path
1636
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
1637
+
1638
+ # query parameters
1639
+ query_params = opts[:query_params] || {}
1640
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
1641
+
1642
+ # header parameters
1643
+ header_params = opts[:header_params] || {}
1644
+ # HTTP header 'Accept' (if needed)
1645
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
1646
+ # HTTP header 'Content-Type'
1647
+ content_type = @api_client.select_header_content_type(['application/json'])
1648
+ if !content_type.nil?
1649
+ header_params['Content-Type'] = content_type
1650
+ end
1651
+
1652
+ # form parameters
1653
+ form_params = opts[:form_params] || {}
1654
+
1655
+ # http body (model)
1656
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(page)
1657
+
1658
+ # return_type
1659
+ return_type = opts[:debug_return_type] || 'Page'
1660
+
1661
+ # auth_names
1662
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1663
+
1664
+ new_options = opts.merge(
1665
+ :operation => :"SitePagesApi.update",
1666
+ :header_params => header_params,
1667
+ :query_params => query_params,
1668
+ :form_params => form_params,
1669
+ :body => post_body,
1670
+ :auth_names => auth_names,
1671
+ :return_type => return_type
1672
+ )
1673
+
1674
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1675
+ if @api_client.config.debugging
1676
+ @api_client.config.logger.debug "API called: SitePagesApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1677
+ end
1678
+ return data, status_code, headers
1679
+ end
1680
+
1681
+ # Update a batch of Site Pages
1682
+ # Update the Site Page objects identified in the request body.
1683
+ # @param batch_input_json_node [BatchInputJsonNode] The JSON representation of the updated Site Pages.
1684
+ # @param [Hash] opts the optional parameters
1685
+ # @option opts [Boolean] :archived Specifies whether to update deleted Site Pages. Defaults to &#x60;false&#x60;.
1686
+ # @return [BatchResponsePage]
1687
+ def update_batch(batch_input_json_node, opts = {})
1688
+ data, _status_code, _headers = update_batch_with_http_info(batch_input_json_node, opts)
1689
+ data
1690
+ end
1691
+
1692
+ # Update a batch of Site Pages
1693
+ # Update the Site Page objects identified in the request body.
1694
+ # @param batch_input_json_node [BatchInputJsonNode] The JSON representation of the updated Site Pages.
1695
+ # @param [Hash] opts the optional parameters
1696
+ # @option opts [Boolean] :archived Specifies whether to update deleted Site Pages. Defaults to &#x60;false&#x60;.
1697
+ # @return [Array<(BatchResponsePage, Integer, Hash)>] BatchResponsePage data, response status code and response headers
1698
+ def update_batch_with_http_info(batch_input_json_node, opts = {})
1699
+ if @api_client.config.debugging
1700
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.update_batch ...'
1701
+ end
1702
+ # verify the required parameter 'batch_input_json_node' is set
1703
+ if @api_client.config.client_side_validation && batch_input_json_node.nil?
1704
+ fail ArgumentError, "Missing the required parameter 'batch_input_json_node' when calling SitePagesApi.update_batch"
1705
+ end
1706
+ # resource path
1707
+ local_var_path = '/cms/v3/pages/site-pages/batch/update'
1708
+
1709
+ # query parameters
1710
+ query_params = opts[:query_params] || {}
1711
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
1712
+
1713
+ # header parameters
1714
+ header_params = opts[:header_params] || {}
1715
+ # HTTP header 'Accept' (if needed)
1716
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
1717
+ # HTTP header 'Content-Type'
1718
+ content_type = @api_client.select_header_content_type(['application/json'])
1719
+ if !content_type.nil?
1720
+ header_params['Content-Type'] = content_type
1721
+ end
1722
+
1723
+ # form parameters
1724
+ form_params = opts[:form_params] || {}
1725
+
1726
+ # http body (model)
1727
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_json_node)
1728
+
1729
+ # return_type
1730
+ return_type = opts[:debug_return_type] || 'BatchResponsePage'
1731
+
1732
+ # auth_names
1733
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1734
+
1735
+ new_options = opts.merge(
1736
+ :operation => :"SitePagesApi.update_batch",
1737
+ :header_params => header_params,
1738
+ :query_params => query_params,
1739
+ :form_params => form_params,
1740
+ :body => post_body,
1741
+ :auth_names => auth_names,
1742
+ :return_type => return_type
1743
+ )
1744
+
1745
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1746
+ if @api_client.config.debugging
1747
+ @api_client.config.logger.debug "API called: SitePagesApi#update_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1748
+ end
1749
+ return data, status_code, headers
1750
+ end
1751
+
1752
+ # Update a Site Page draft
1753
+ # Sparse updates the draft version of a single Site Page object identified by the id in the path. You only need to specify the column values that you are modifying.
1754
+ # @param object_id [String] The Site Page id.
1755
+ # @param page [Page] The JSON representation of the updated Site Page to be applied to the draft.
1756
+ # @param [Hash] opts the optional parameters
1757
+ # @return [Page]
1758
+ def update_draft(object_id, page, opts = {})
1759
+ data, _status_code, _headers = update_draft_with_http_info(object_id, page, opts)
1760
+ data
1761
+ end
1762
+
1763
+ # Update a Site Page draft
1764
+ # Sparse updates the draft version of a single Site Page object identified by the id in the path. You only need to specify the column values that you are modifying.
1765
+ # @param object_id [String] The Site Page id.
1766
+ # @param page [Page] The JSON representation of the updated Site Page to be applied to the draft.
1767
+ # @param [Hash] opts the optional parameters
1768
+ # @return [Array<(Page, Integer, Hash)>] Page data, response status code and response headers
1769
+ def update_draft_with_http_info(object_id, page, opts = {})
1770
+ if @api_client.config.debugging
1771
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.update_draft ...'
1772
+ end
1773
+ # verify the required parameter 'object_id' is set
1774
+ if @api_client.config.client_side_validation && object_id.nil?
1775
+ fail ArgumentError, "Missing the required parameter 'object_id' when calling SitePagesApi.update_draft"
1776
+ end
1777
+ # verify the required parameter 'page' is set
1778
+ if @api_client.config.client_side_validation && page.nil?
1779
+ fail ArgumentError, "Missing the required parameter 'page' when calling SitePagesApi.update_draft"
1780
+ end
1781
+ # resource path
1782
+ local_var_path = '/cms/v3/pages/site-pages/{objectId}/draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s))
1783
+
1784
+ # query parameters
1785
+ query_params = opts[:query_params] || {}
1786
+
1787
+ # header parameters
1788
+ header_params = opts[:header_params] || {}
1789
+ # HTTP header 'Accept' (if needed)
1790
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
1791
+ # HTTP header 'Content-Type'
1792
+ content_type = @api_client.select_header_content_type(['application/json'])
1793
+ if !content_type.nil?
1794
+ header_params['Content-Type'] = content_type
1795
+ end
1796
+
1797
+ # form parameters
1798
+ form_params = opts[:form_params] || {}
1799
+
1800
+ # http body (model)
1801
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(page)
1802
+
1803
+ # return_type
1804
+ return_type = opts[:debug_return_type] || 'Page'
1805
+
1806
+ # auth_names
1807
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1808
+
1809
+ new_options = opts.merge(
1810
+ :operation => :"SitePagesApi.update_draft",
1811
+ :header_params => header_params,
1812
+ :query_params => query_params,
1813
+ :form_params => form_params,
1814
+ :body => post_body,
1815
+ :auth_names => auth_names,
1816
+ :return_type => return_type
1817
+ )
1818
+
1819
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1820
+ if @api_client.config.debugging
1821
+ @api_client.config.logger.debug "API called: SitePagesApi#update_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1822
+ end
1823
+ return data, status_code, headers
1824
+ end
1825
+
1826
+ # Update languages of multi-language group
1827
+ # Explicitly set new languages for each site page in a multi-language group.
1828
+ # @param update_languages_request_v_next [UpdateLanguagesRequestVNext] The JSON representation of the UpdateLanguagesRequest object.
1829
+ # @param [Hash] opts the optional parameters
1830
+ # @return [nil]
1831
+ def update_langs(update_languages_request_v_next, opts = {})
1832
+ update_langs_with_http_info(update_languages_request_v_next, opts)
1833
+ nil
1834
+ end
1835
+
1836
+ # Update languages of multi-language group
1837
+ # Explicitly set new languages for each site page in a multi-language group.
1838
+ # @param update_languages_request_v_next [UpdateLanguagesRequestVNext] The JSON representation of the UpdateLanguagesRequest object.
1839
+ # @param [Hash] opts the optional parameters
1840
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1841
+ def update_langs_with_http_info(update_languages_request_v_next, opts = {})
1842
+ if @api_client.config.debugging
1843
+ @api_client.config.logger.debug 'Calling API: SitePagesApi.update_langs ...'
1844
+ end
1845
+ # verify the required parameter 'update_languages_request_v_next' is set
1846
+ if @api_client.config.client_side_validation && update_languages_request_v_next.nil?
1847
+ fail ArgumentError, "Missing the required parameter 'update_languages_request_v_next' when calling SitePagesApi.update_langs"
1848
+ end
1849
+ # resource path
1850
+ local_var_path = '/cms/v3/pages/site-pages/multi-language/update-languages'
1851
+
1852
+ # query parameters
1853
+ query_params = opts[:query_params] || {}
1854
+
1855
+ # header parameters
1856
+ header_params = opts[:header_params] || {}
1857
+ # HTTP header 'Accept' (if needed)
1858
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1859
+ # HTTP header 'Content-Type'
1860
+ content_type = @api_client.select_header_content_type(['application/json'])
1861
+ if !content_type.nil?
1862
+ header_params['Content-Type'] = content_type
1863
+ end
1864
+
1865
+ # form parameters
1866
+ form_params = opts[:form_params] || {}
1867
+
1868
+ # http body (model)
1869
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_languages_request_v_next)
1870
+
1871
+ # return_type
1872
+ return_type = opts[:debug_return_type]
1873
+
1874
+ # auth_names
1875
+ auth_names = opts[:debug_auth_names] || ['oauth2']
1876
+
1877
+ new_options = opts.merge(
1878
+ :operation => :"SitePagesApi.update_langs",
1879
+ :header_params => header_params,
1880
+ :query_params => query_params,
1881
+ :form_params => form_params,
1882
+ :body => post_body,
1883
+ :auth_names => auth_names,
1884
+ :return_type => return_type
1885
+ )
1886
+
1887
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1888
+ if @api_client.config.debugging
1889
+ @api_client.config.logger.debug "API called: SitePagesApi#update_langs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1890
+ end
1891
+ return data, status_code, headers
1892
+ end
1893
+ end
1894
+ end
1895
+ end
1896
+ end