api-sdk-rb 1.11.66 → 1.11.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +294 -285
  3. data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
  4. data/docs/AdapterConnection.md +7 -1
  5. data/docs/{GetUserAdapterConnections200Response.md → AdapterConnectionListResponse.md} +2 -2
  6. data/docs/{RemoveUserAdapterConnection200Response.md → AdapterConnectionRemovalResponse.md} +2 -2
  7. data/docs/{SetUserAdapterConnection200Response.md → AdapterConnectionResponse.md} +2 -2
  8. data/docs/{AddAiAnswersKnowledgeDocument201Response.md → AiAnswersKnowledgeDocumentResponse.md} +2 -2
  9. data/docs/BrandColor.md +22 -0
  10. data/docs/BrandFont.md +24 -0
  11. data/docs/BrandKitApi.md +593 -0
  12. data/docs/BrandKitAssetView.md +42 -0
  13. data/docs/BrandKitFigmaSource.md +26 -0
  14. data/docs/BrandKitTokens.md +26 -0
  15. data/docs/BrandKitTokensFonts.md +24 -0
  16. data/docs/BrandKitView.md +36 -0
  17. data/docs/BrandKitViewOwner.md +20 -0
  18. data/docs/{OperationsIdGetResponse.md → BrandKitViewResponse.md} +3 -3
  19. data/docs/BrandSpacing.md +32 -0
  20. data/docs/BrandTextStyle.md +22 -0
  21. data/docs/CanvasesApi.md +45 -45
  22. data/docs/Composition.md +5 -1
  23. data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
  24. data/docs/CompositionLastEditedBy.md +20 -0
  25. data/docs/CompositionsApi.md +821 -473
  26. data/docs/ConfirmAdapterConnectionRequest.md +18 -0
  27. data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
  28. data/docs/CreateWidget201ResponseData.md +2 -4
  29. data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
  30. data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
  31. data/docs/CreditsApi.md +20 -20
  32. data/docs/DeleteUpload200Response.md +22 -0
  33. data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
  34. data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
  35. data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
  36. data/docs/EntitlementsApi.md +18 -18
  37. data/docs/GetOperationResponse.md +22 -0
  38. data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
  39. data/docs/GetOperationResponseDataMetadata.md +24 -0
  40. data/docs/GetPublicCompositionEmbed200Response.md +7 -1
  41. data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
  42. data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
  43. data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
  44. data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
  45. data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
  46. data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
  47. data/docs/InvoicesApi.md +9 -9
  48. data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
  49. data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
  50. data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
  51. data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
  52. data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
  53. data/docs/ListWorkspaceWorkflows200Response.md +22 -0
  54. data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
  55. data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
  56. data/docs/ManagedUsersApi.md +261 -171
  57. data/docs/NewComposition.md +1 -1
  58. data/docs/NewEditorSession.md +1 -1
  59. data/docs/OfferWorkflowPresetRequest.md +24 -0
  60. data/docs/OfferedWorkflowPreset.md +40 -0
  61. data/docs/OfferedWorkflowPresetList.md +18 -0
  62. data/docs/OfferedWorkflowPresetWidget.md +22 -0
  63. data/docs/OperationsApi.md +11 -11
  64. data/docs/PartnerCustomization.md +2 -2
  65. data/docs/PartnerNotification.md +1 -1
  66. data/docs/PartnersApi.md +644 -352
  67. data/docs/PatchBrandKitAssetRequest.md +24 -0
  68. data/docs/PatchBrandKitRequest.md +30 -0
  69. data/docs/PatchBrandKitRequestFonts.md +24 -0
  70. data/docs/PatchBrandKitRequestSpacing.md +32 -0
  71. data/docs/PostBrandKitIconRequest.md +20 -0
  72. data/docs/PublicEmbedApi.md +324 -58
  73. data/docs/PublicWorkflow.md +36 -0
  74. data/docs/PublicWorkflowEventsAccepted.md +22 -0
  75. data/docs/PublicWorkflowEventsRequest.md +24 -0
  76. data/docs/PublicWorkflowEventsRequestEventsInner.md +24 -0
  77. data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
  78. data/docs/{CreateCompositionFromWidget201Response.md → PublicWorkflowResponse.md} +3 -3
  79. data/docs/PublicWorkflowTranslation.md +20 -0
  80. data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
  81. data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
  82. data/docs/PutBrandKitRequest.md +22 -0
  83. data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
  84. data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
  85. data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
  86. data/docs/SetAdapterConnectionRequest.md +1 -1
  87. data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
  88. data/docs/TokensApi.md +11 -9
  89. data/docs/UpdateComposition.md +1 -1
  90. data/docs/Upload.md +1 -1
  91. data/docs/UploadLimits.md +3 -3
  92. data/docs/UploadsApi.md +85 -85
  93. data/docs/UsersApi.md +191 -115
  94. data/docs/Widget.md +2 -4
  95. data/docs/WidgetClarification.md +22 -0
  96. data/docs/WidgetClarificationOption.md +22 -0
  97. data/docs/WidgetClarificationQuestion.md +26 -0
  98. data/docs/WidgetNextStep.md +24 -0
  99. data/docs/WidgetPlan.md +26 -0
  100. data/docs/WidgetPlanDecisions.md +32 -0
  101. data/docs/WidgetPlanDecisionsAdaptersInner.md +20 -0
  102. data/docs/WidgetPlanDecisionsLibrariesInner.md +22 -0
  103. data/docs/WidgetPlanDecisionsResponsive.md +22 -0
  104. data/docs/WidgetPlanTask.md +24 -0
  105. data/docs/WidgetsApi.md +38 -38
  106. data/docs/Workflow.md +50 -0
  107. data/docs/WorkflowCompositionAction.md +24 -0
  108. data/docs/WorkflowCompositionField.md +24 -0
  109. data/docs/WorkflowCompositionOption.md +30 -0
  110. data/docs/WorkflowCompositionOptionActions.md +22 -0
  111. data/docs/WorkflowCompositionOptionInputs.md +24 -0
  112. data/docs/WorkflowCompositionOptions.md +24 -0
  113. data/docs/WorkflowConditionCase.md +24 -0
  114. data/docs/WorkflowConditionTest.md +22 -0
  115. data/docs/WorkflowCounter.md +20 -0
  116. data/docs/WorkflowDetail.md +60 -0
  117. data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
  118. data/docs/WorkflowDetailResponse.md +22 -0
  119. data/docs/WorkflowEdge.md +24 -0
  120. data/docs/WorkflowFailureReason.md +15 -0
  121. data/docs/WorkflowFailureReasonCounter.md +22 -0
  122. data/docs/WorkflowFieldReference.md +22 -0
  123. data/docs/WorkflowGraph.md +22 -0
  124. data/docs/WorkflowIssue.md +28 -0
  125. data/docs/WorkflowList.md +24 -0
  126. data/docs/WorkflowNode.md +30 -0
  127. data/docs/WorkflowNodePosition.md +20 -0
  128. data/docs/WorkflowPresetChoice.md +26 -0
  129. data/docs/WorkflowPresetChoices.md +18 -0
  130. data/docs/WorkflowPresetRemoval.md +18 -0
  131. data/docs/WorkflowPresetWidget.md +20 -0
  132. data/docs/WorkflowPublishResult.md +22 -0
  133. data/docs/WorkflowRemoved.md +18 -0
  134. data/docs/WorkflowResponse.md +22 -0
  135. data/docs/WorkflowSchedule.md +24 -0
  136. data/docs/WorkflowStats.md +34 -0
  137. data/docs/WorkflowStatus.md +15 -0
  138. data/docs/WorkflowTrigger.md +28 -0
  139. data/docs/WorkflowTriggerValuesInner.md +20 -0
  140. data/docs/WorkflowVersion.md +28 -0
  141. data/docs/WorkflowVersionDetail.md +32 -0
  142. data/docs/WorkflowVersionList.md +18 -0
  143. data/docs/WorkflowVersionPublishedBy.md +20 -0
  144. data/docs/WorkflowsApi.md +1527 -0
  145. data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
  146. data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
  147. data/lib/api-sdk-rb/api/compositions_api.rb +993 -565
  148. data/lib/api-sdk-rb/api/credits_api.rb +20 -20
  149. data/lib/api-sdk-rb/api/entitlements_api.rb +14 -14
  150. data/lib/api-sdk-rb/api/invoices_api.rb +10 -10
  151. data/lib/api-sdk-rb/api/managed_users_api.rb +278 -172
  152. data/lib/api-sdk-rb/api/operations_api.rb +10 -10
  153. data/lib/api-sdk-rb/api/partners_api.rb +668 -352
  154. data/lib/api-sdk-rb/api/public_embed_api.rb +339 -62
  155. data/lib/api-sdk-rb/api/tokens_api.rb +8 -6
  156. data/lib/api-sdk-rb/api/uploads_api.rb +96 -96
  157. data/lib/api-sdk-rb/api/users_api.rb +213 -119
  158. data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
  159. data/lib/api-sdk-rb/api/workflows_api.rb +1775 -0
  160. data/lib/api-sdk-rb/configuration.rb +11 -23
  161. data/lib/api-sdk-rb/models/{get_user_adapter_connections200_response.rb → account_credit_transaction_list_response.rb} +4 -4
  162. data/lib/api-sdk-rb/models/adapter_connection.rb +48 -5
  163. data/lib/api-sdk-rb/models/{get_partner_credit_transactions200_response.rb → adapter_connection_list_response.rb} +4 -4
  164. data/lib/api-sdk-rb/models/adapter_connection_removal_response.rb +246 -0
  165. data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → adapter_connection_response.rb} +4 -4
  166. data/lib/api-sdk-rb/models/ai_answers_knowledge_document_response.rb +246 -0
  167. data/lib/api-sdk-rb/models/brand_color.rb +329 -0
  168. data/lib/api-sdk-rb/models/brand_font.rb +357 -0
  169. data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
  170. data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
  171. data/lib/api-sdk-rb/models/brand_kit_tokens.rb +335 -0
  172. data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
  173. data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
  174. data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
  175. data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
  176. data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
  177. data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
  178. data/lib/api-sdk-rb/models/composition.rb +26 -5
  179. data/lib/api-sdk-rb/models/{create_composition_database_record201_response.rb → composition_database_record_response.rb} +3 -3
  180. data/lib/api-sdk-rb/models/composition_last_edited_by.rb +242 -0
  181. data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
  182. data/lib/api-sdk-rb/models/content_item_write_result_response.rb +246 -0
  183. data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
  184. data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
  185. data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
  186. data/lib/api-sdk-rb/models/{operations_id_get_response.rb → delete_upload200_response.rb} +4 -5
  187. data/lib/api-sdk-rb/models/{uploads_id_delete200_response_data.rb → delete_upload200_response_data.rb} +3 -3
  188. data/lib/api-sdk-rb/models/delete_workspace_workflow200_response.rb +246 -0
  189. data/lib/api-sdk-rb/models/design_defaults_response.rb +246 -0
  190. data/lib/api-sdk-rb/models/get_operation_response.rb +247 -0
  191. data/lib/api-sdk-rb/models/{operations_id_get_response_data.rb → get_operation_response_data.rb} +5 -8
  192. data/lib/api-sdk-rb/models/get_operation_response_data_metadata.rb +283 -0
  193. data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +29 -2
  194. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
  195. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
  196. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
  197. data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
  198. data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
  199. data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → get_workspace_workflow_version200_response.rb} +4 -4
  200. data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
  201. data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
  202. data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
  203. data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → list_workspace_workflow_presets200_response.rb} +4 -4
  204. data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → list_workspace_workflow_versions200_response.rb} +4 -4
  205. data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
  206. data/lib/api-sdk-rb/models/{get_managed_user_limits200_response.rb → managed_user_limits_response.rb} +3 -3
  207. data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb} +4 -4
  208. data/lib/api-sdk-rb/models/new_composition.rb +1 -1
  209. data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
  210. data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
  211. data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
  212. data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
  213. data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
  214. data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
  215. data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
  216. data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
  217. data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +363 -0
  218. data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
  219. data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
  220. data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
  221. data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
  222. data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
  223. data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
  224. data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +354 -0
  225. data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
  226. data/lib/api-sdk-rb/models/public_workflow_response.rb +246 -0
  227. data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
  228. data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → publish_workspace_workflow200_response.rb} +4 -4
  229. data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
  230. data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
  231. data/lib/api-sdk-rb/models/{remove_user_adapter_connection200_response.rb → remove_partner_workflow_preset200_response.rb} +4 -4
  232. data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
  233. data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
  234. data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
  235. data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → set_partner_workflow_preset200_response.rb} +4 -4
  236. data/lib/api-sdk-rb/models/update_composition.rb +1 -1
  237. data/lib/api-sdk-rb/models/upload.rb +1 -1
  238. data/lib/api-sdk-rb/models/upload_limits.rb +3 -3
  239. data/lib/api-sdk-rb/models/widget.rb +9 -20
  240. data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
  241. data/lib/api-sdk-rb/models/widget_clarification_option.rb +256 -0
  242. data/lib/api-sdk-rb/models/widget_clarification_question.rb +329 -0
  243. data/lib/api-sdk-rb/models/widget_next_step.rb +307 -0
  244. data/lib/api-sdk-rb/models/widget_plan.rb +306 -0
  245. data/lib/api-sdk-rb/models/widget_plan_decisions.rb +346 -0
  246. data/lib/api-sdk-rb/models/widget_plan_decisions_adapters_inner.rb +237 -0
  247. data/lib/api-sdk-rb/models/widget_plan_decisions_libraries_inner.rb +255 -0
  248. data/lib/api-sdk-rb/models/widget_plan_decisions_responsive.rb +311 -0
  249. data/lib/api-sdk-rb/models/widget_plan_task.rb +320 -0
  250. data/lib/api-sdk-rb/models/workflow.rb +509 -0
  251. data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
  252. data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
  253. data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
  254. data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
  255. data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
  256. data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
  257. data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
  258. data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
  259. data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
  260. data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
  261. data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
  262. data/lib/api-sdk-rb/models/workflow_detail_response.rb +246 -0
  263. data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
  264. data/lib/api-sdk-rb/models/workflow_failure_reason.rb +42 -0
  265. data/lib/api-sdk-rb/models/workflow_failure_reason_counter.rb +277 -0
  266. data/lib/api-sdk-rb/models/workflow_field_reference.rb +300 -0
  267. data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
  268. data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
  269. data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
  270. data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
  271. data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
  272. data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
  273. data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
  274. data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
  275. data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
  276. data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
  277. data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
  278. data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
  279. data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
  280. data/lib/api-sdk-rb/models/workflow_stats.rb +347 -0
  281. data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
  282. data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
  283. data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
  284. data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
  285. data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
  286. data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
  287. data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
  288. data/lib/api-sdk-rb/version.rb +1 -1
  289. data/lib/api-sdk-rb.rb +116 -17
  290. data/spec/api/brand_kit_api_spec.rb +136 -0
  291. data/spec/api/canvases_api_spec.rb +10 -10
  292. data/spec/api/compositions_api_spec.rb +227 -149
  293. data/spec/api/credits_api_spec.rb +5 -5
  294. data/spec/api/entitlements_api_spec.rb +4 -4
  295. data/spec/api/invoices_api_spec.rb +2 -2
  296. data/spec/api/managed_users_api_spec.rb +63 -42
  297. data/spec/api/operations_api_spec.rb +3 -3
  298. data/spec/api/partners_api_spec.rb +138 -84
  299. data/spec/api/public_embed_api_spec.rb +66 -15
  300. data/spec/api/tokens_api_spec.rb +3 -2
  301. data/spec/api/uploads_api_spec.rb +24 -24
  302. data/spec/api/users_api_spec.rb +43 -28
  303. data/spec/api/widgets_api_spec.rb +9 -9
  304. data/spec/api/workflows_api_spec.rb +339 -0
  305. data/spec/models/account_credit_transaction_list_response_spec.rb +48 -0
  306. data/spec/models/adapter_connection_list_response_spec.rb +48 -0
  307. data/spec/models/{get_managed_user_limits200_response_spec.rb → adapter_connection_removal_response_spec.rb} +6 -6
  308. data/spec/models/{delete_managed_user200_response_spec.rb → adapter_connection_response_spec.rb} +6 -6
  309. data/spec/models/adapter_connection_spec.rb +18 -0
  310. data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
  311. data/spec/models/brand_color_spec.rb +52 -0
  312. data/spec/models/brand_font_spec.rb +62 -0
  313. data/spec/models/brand_kit_asset_view_spec.rb +120 -0
  314. data/spec/models/brand_kit_figma_source_spec.rb +60 -0
  315. data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
  316. data/spec/models/brand_kit_tokens_spec.rb +60 -0
  317. data/spec/models/brand_kit_view_owner_spec.rb +46 -0
  318. data/spec/models/{uploads_get200_response_spec.rb → brand_kit_view_response_spec.rb} +6 -6
  319. data/spec/models/brand_kit_view_spec.rb +90 -0
  320. data/spec/models/brand_spacing_spec.rb +78 -0
  321. data/spec/models/brand_text_style_spec.rb +52 -0
  322. data/spec/models/composition_database_record_response_spec.rb +48 -0
  323. data/spec/models/composition_last_edited_by_spec.rb +42 -0
  324. data/spec/models/composition_spec.rb +12 -0
  325. data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
  326. data/spec/models/content_item_write_result_response_spec.rb +48 -0
  327. data/spec/models/create_widget201_response_data_spec.rb +1 -7
  328. data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
  329. data/spec/models/create_workspace_workflow_request_spec.rb +48 -0
  330. data/spec/models/{uploads_id_delete200_response_data_spec.rb → delete_upload200_response_data_spec.rb} +6 -6
  331. data/spec/models/{operations_id_get_response_spec.rb → delete_upload200_response_spec.rb} +6 -6
  332. data/spec/models/delete_workspace_workflow200_response_spec.rb +48 -0
  333. data/spec/models/design_defaults_response_spec.rb +48 -0
  334. data/spec/models/editor_session_spec.rb +1 -1
  335. data/spec/models/get_operation_response_data_metadata_spec.rb +58 -0
  336. data/spec/models/{operations_id_get_response_data_spec.rb → get_operation_response_data_spec.rb} +6 -6
  337. data/spec/models/get_operation_response_spec.rb +48 -0
  338. data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
  339. data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
  340. data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
  341. data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
  342. data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
  343. data/spec/models/{get_user_adapter_connections200_response_spec.rb → get_workspace_workflow_stats200_response_spec.rb} +6 -6
  344. data/spec/models/{remove_user_adapter_connection200_response_spec.rb → get_workspace_workflow_version200_response_spec.rb} +6 -6
  345. data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
  346. data/spec/models/list_uploads200_response_spec.rb +48 -0
  347. data/spec/models/{create_composition_database_record201_response_spec.rb → list_workspace_workflow_composition_options200_response_spec.rb} +6 -6
  348. data/spec/models/{get_partner_credit_transactions200_response_spec.rb → list_workspace_workflow_presets200_response_spec.rb} +6 -6
  349. data/spec/models/{add_ai_answers_knowledge_document201_response_spec.rb → list_workspace_workflow_versions200_response_spec.rb} +6 -6
  350. data/spec/models/list_workspace_workflows200_response_spec.rb +48 -0
  351. data/spec/models/managed_user_limits_response_spec.rb +48 -0
  352. data/spec/models/{uploads_id_delete200_response_spec.rb → managed_user_removal_response_spec.rb} +6 -6
  353. data/spec/models/new_editor_session_spec.rb +1 -1
  354. data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
  355. data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
  356. data/spec/models/offered_workflow_preset_spec.rb +106 -0
  357. data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
  358. data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
  359. data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
  360. data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
  361. data/spec/models/patch_brand_kit_request_spec.rb +72 -0
  362. data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
  363. data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
  364. data/spec/models/public_workflow_events_request_events_inner_spec.rb +62 -0
  365. data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
  366. data/spec/models/public_workflow_events_request_spec.rb +54 -0
  367. data/spec/models/public_workflow_response_spec.rb +48 -0
  368. data/spec/models/public_workflow_spec.rb +94 -0
  369. data/spec/models/public_workflow_translation_spec.rb +42 -0
  370. data/spec/models/{get_partner_design_defaults200_response_spec.rb → publish_workspace_workflow200_response_spec.rb} +6 -6
  371. data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
  372. data/spec/models/put_brand_kit_request_spec.rb +48 -0
  373. data/spec/models/{create_composition_from_widget201_response_spec.rb → remove_partner_workflow_preset200_response_spec.rb} +6 -6
  374. data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
  375. data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
  376. data/spec/models/{set_user_adapter_connection200_response_spec.rb → set_partner_workflow_preset200_response_spec.rb} +6 -6
  377. data/spec/models/widget_clarification_option_spec.rb +48 -0
  378. data/spec/models/widget_clarification_question_spec.rb +60 -0
  379. data/spec/models/widget_clarification_spec.rb +48 -0
  380. data/spec/models/widget_next_step_spec.rb +58 -0
  381. data/spec/models/widget_plan_decisions_adapters_inner_spec.rb +42 -0
  382. data/spec/models/widget_plan_decisions_libraries_inner_spec.rb +48 -0
  383. data/spec/models/widget_plan_decisions_responsive_spec.rb +48 -0
  384. data/spec/models/widget_plan_decisions_spec.rb +78 -0
  385. data/spec/models/widget_plan_spec.rb +60 -0
  386. data/spec/models/widget_plan_task_spec.rb +62 -0
  387. data/spec/models/widget_spec.rb +1 -7
  388. data/spec/models/workflow_composition_action_spec.rb +54 -0
  389. data/spec/models/workflow_composition_field_spec.rb +58 -0
  390. data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
  391. data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
  392. data/spec/models/workflow_composition_option_spec.rb +72 -0
  393. data/spec/models/workflow_composition_options_spec.rb +54 -0
  394. data/spec/models/workflow_condition_case_spec.rb +58 -0
  395. data/spec/models/workflow_condition_test_spec.rb +52 -0
  396. data/spec/models/workflow_counter_spec.rb +42 -0
  397. data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
  398. data/spec/models/workflow_detail_response_spec.rb +48 -0
  399. data/spec/models/workflow_detail_spec.rb +162 -0
  400. data/spec/models/workflow_edge_spec.rb +54 -0
  401. data/spec/models/workflow_failure_reason_counter_spec.rb +48 -0
  402. data/spec/models/workflow_failure_reason_spec.rb +30 -0
  403. data/spec/models/workflow_field_reference_spec.rb +56 -0
  404. data/spec/models/workflow_graph_spec.rb +52 -0
  405. data/spec/models/workflow_issue_spec.rb +70 -0
  406. data/spec/models/{create_composition_content_item201_response_spec.rb → workflow_list_spec.rb} +15 -9
  407. data/spec/models/workflow_node_position_spec.rb +42 -0
  408. data/spec/models/workflow_node_spec.rb +76 -0
  409. data/spec/models/workflow_preset_choice_spec.rb +60 -0
  410. data/spec/models/workflow_preset_choices_spec.rb +36 -0
  411. data/spec/models/workflow_preset_removal_spec.rb +36 -0
  412. data/spec/models/workflow_preset_widget_spec.rb +42 -0
  413. data/spec/models/workflow_publish_result_spec.rb +48 -0
  414. data/spec/models/workflow_removed_spec.rb +36 -0
  415. data/spec/models/workflow_response_spec.rb +48 -0
  416. data/spec/models/workflow_schedule_spec.rb +62 -0
  417. data/spec/models/workflow_spec.rb +132 -0
  418. data/spec/models/workflow_stats_spec.rb +84 -0
  419. data/spec/models/workflow_status_spec.rb +30 -0
  420. data/spec/models/workflow_trigger_spec.rb +70 -0
  421. data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
  422. data/spec/models/workflow_version_detail_spec.rb +78 -0
  423. data/spec/models/workflow_version_list_spec.rb +36 -0
  424. data/spec/models/workflow_version_published_by_spec.rb +42 -0
  425. data/spec/models/workflow_version_spec.rb +66 -0
  426. metadata +476 -80
  427. data/docs/PartnerApi.md +0 -9892
  428. data/docs/UploadsIdDelete200Response.md +0 -22
  429. data/lib/api-sdk-rb/api/partner_api.rb +0 -10693
  430. data/spec/api/partner_api_spec.rb +0 -1895
@@ -0,0 +1,335 @@
1
+ =begin
2
+ #Widgetic API Gateway
3
+
4
+ #API documentation for the Widgetic API Gateway
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ApiSdkRb
17
+ # Colors, fonts by role, text styles, spacing and corner radii of a Brand Kit.
18
+ class BrandKitTokens
19
+ attr_accessor :colors
20
+
21
+ attr_accessor :fonts
22
+
23
+ # The owner's text styles (family, weight and size). When there are some, they are what every widget made with the kit is told about type and the fonts by role are not used; with none, the fonts by role apply. A font file that is deleted takes the text styles made from it with it. Left out when the kit has none.
24
+ attr_accessor :text_styles
25
+
26
+ attr_accessor :spacing
27
+
28
+ # The kit owner's own style notes, taken into account in every widget made with the kit, for example \"Use the dark color as the background always and the light color for titles\". They are about how a widget looks and never about what it holds, and what a request names itself wins over them. Left out, Widgetic's default note applies (\"Widget backgrounds to be white whenever possible.\"); an empty string means none.
29
+ attr_accessor :instructions
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'colors' => :'colors',
35
+ :'fonts' => :'fonts',
36
+ :'text_styles' => :'textStyles',
37
+ :'spacing' => :'spacing',
38
+ :'instructions' => :'instructions'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'colors' => :'Array<BrandColor>',
51
+ :'fonts' => :'BrandKitTokensFonts',
52
+ :'text_styles' => :'Array<BrandTextStyle>',
53
+ :'spacing' => :'BrandSpacing',
54
+ :'instructions' => :'String'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::BrandKitTokens` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::BrandKitTokens`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'colors')
80
+ if (value = attributes[:'colors']).is_a?(Array)
81
+ self.colors = value
82
+ end
83
+ else
84
+ self.colors = nil
85
+ end
86
+
87
+ if attributes.key?(:'fonts')
88
+ self.fonts = attributes[:'fonts']
89
+ else
90
+ self.fonts = nil
91
+ end
92
+
93
+ if attributes.key?(:'text_styles')
94
+ if (value = attributes[:'text_styles']).is_a?(Array)
95
+ self.text_styles = value
96
+ end
97
+ end
98
+
99
+ if attributes.key?(:'spacing')
100
+ self.spacing = attributes[:'spacing']
101
+ else
102
+ self.spacing = nil
103
+ end
104
+
105
+ if attributes.key?(:'instructions')
106
+ self.instructions = attributes[:'instructions']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
+ invalid_properties = Array.new
115
+ if @colors.nil?
116
+ invalid_properties.push('invalid value for "colors", colors cannot be nil.')
117
+ end
118
+
119
+ if @colors.length > 24
120
+ invalid_properties.push('invalid value for "colors", number of items must be less than or equal to 24.')
121
+ end
122
+
123
+ if @fonts.nil?
124
+ invalid_properties.push('invalid value for "fonts", fonts cannot be nil.')
125
+ end
126
+
127
+ if !@text_styles.nil? && @text_styles.length > 12
128
+ invalid_properties.push('invalid value for "text_styles", number of items must be less than or equal to 12.')
129
+ end
130
+
131
+ if @spacing.nil?
132
+ invalid_properties.push('invalid value for "spacing", spacing cannot be nil.')
133
+ end
134
+
135
+ if !@instructions.nil? && @instructions.to_s.length > 500
136
+ invalid_properties.push('invalid value for "instructions", the character length must be smaller than or equal to 500.')
137
+ end
138
+
139
+ invalid_properties
140
+ end
141
+
142
+ # Check to see if the all the properties in the model are valid
143
+ # @return true if the model is valid
144
+ def valid?
145
+ warn '[DEPRECATED] the `valid?` method is obsolete'
146
+ return false if @colors.nil?
147
+ return false if @colors.length > 24
148
+ return false if @fonts.nil?
149
+ return false if !@text_styles.nil? && @text_styles.length > 12
150
+ return false if @spacing.nil?
151
+ return false if !@instructions.nil? && @instructions.to_s.length > 500
152
+ true
153
+ end
154
+
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] colors Value to be assigned
157
+ def colors=(colors)
158
+ if colors.nil?
159
+ fail ArgumentError, 'colors cannot be nil'
160
+ end
161
+
162
+ if colors.length > 24
163
+ fail ArgumentError, 'invalid value for "colors", number of items must be less than or equal to 24.'
164
+ end
165
+
166
+ @colors = colors
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] text_styles Value to be assigned
171
+ def text_styles=(text_styles)
172
+ if text_styles.nil?
173
+ fail ArgumentError, 'text_styles cannot be nil'
174
+ end
175
+
176
+ if text_styles.length > 12
177
+ fail ArgumentError, 'invalid value for "text_styles", number of items must be less than or equal to 12.'
178
+ end
179
+
180
+ @text_styles = text_styles
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] instructions Value to be assigned
185
+ def instructions=(instructions)
186
+ if instructions.nil?
187
+ fail ArgumentError, 'instructions cannot be nil'
188
+ end
189
+
190
+ if instructions.to_s.length > 500
191
+ fail ArgumentError, 'invalid value for "instructions", the character length must be smaller than or equal to 500.'
192
+ end
193
+
194
+ @instructions = instructions
195
+ end
196
+
197
+ # Checks equality by comparing each attribute.
198
+ # @param [Object] Object to be compared
199
+ def ==(o)
200
+ return true if self.equal?(o)
201
+ self.class == o.class &&
202
+ colors == o.colors &&
203
+ fonts == o.fonts &&
204
+ text_styles == o.text_styles &&
205
+ spacing == o.spacing &&
206
+ instructions == o.instructions
207
+ end
208
+
209
+ # @see the `==` method
210
+ # @param [Object] Object to be compared
211
+ def eql?(o)
212
+ self == o
213
+ end
214
+
215
+ # Calculates hash code according to all attributes.
216
+ # @return [Integer] Hash code
217
+ def hash
218
+ [colors, fonts, text_styles, spacing, instructions].hash
219
+ end
220
+
221
+ # Builds the object from hash
222
+ # @param [Hash] attributes Model attributes in the form of hash
223
+ # @return [Object] Returns the model itself
224
+ def self.build_from_hash(attributes)
225
+ return nil unless attributes.is_a?(Hash)
226
+ attributes = attributes.transform_keys(&:to_sym)
227
+ transformed_hash = {}
228
+ openapi_types.each_pair do |key, type|
229
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
230
+ transformed_hash["#{key}"] = nil
231
+ elsif type =~ /\AArray<(.*)>/i
232
+ # check to ensure the input is an array given that the attribute
233
+ # is documented as an array but the input is not
234
+ if attributes[attribute_map[key]].is_a?(Array)
235
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
236
+ end
237
+ elsif !attributes[attribute_map[key]].nil?
238
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
239
+ end
240
+ end
241
+ new(transformed_hash)
242
+ end
243
+
244
+ # Deserializes the data based on type
245
+ # @param string type Data type
246
+ # @param string value Value to be deserialized
247
+ # @return [Object] Deserialized data
248
+ def self._deserialize(type, value)
249
+ case type.to_sym
250
+ when :Time
251
+ Time.parse(value)
252
+ when :Date
253
+ Date.parse(value)
254
+ when :String
255
+ value.to_s
256
+ when :Integer
257
+ value.to_i
258
+ when :Float
259
+ value.to_f
260
+ when :Boolean
261
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
262
+ true
263
+ else
264
+ false
265
+ end
266
+ when :Object
267
+ # generic object (usually a Hash), return directly
268
+ value
269
+ when /\AArray<(?<inner_type>.+)>\z/
270
+ inner_type = Regexp.last_match[:inner_type]
271
+ value.map { |v| _deserialize(inner_type, v) }
272
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
273
+ k_type = Regexp.last_match[:k_type]
274
+ v_type = Regexp.last_match[:v_type]
275
+ {}.tap do |hash|
276
+ value.each do |k, v|
277
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
278
+ end
279
+ end
280
+ else # model
281
+ # models (e.g. Pet) or oneOf
282
+ klass = ApiSdkRb.const_get(type)
283
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
284
+ end
285
+ end
286
+
287
+ # Returns the string representation of the object
288
+ # @return [String] String presentation of the object
289
+ def to_s
290
+ to_hash.to_s
291
+ end
292
+
293
+ # to_body is an alias to to_hash (backward compatibility)
294
+ # @return [Hash] Returns the object in the form of hash
295
+ def to_body
296
+ to_hash
297
+ end
298
+
299
+ # Returns the object in the form of hash
300
+ # @return [Hash] Returns the object in the form of hash
301
+ def to_hash
302
+ hash = {}
303
+ self.class.attribute_map.each_pair do |attr, param|
304
+ value = self.send(attr)
305
+ if value.nil?
306
+ is_nullable = self.class.openapi_nullable.include?(attr)
307
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
308
+ end
309
+
310
+ hash[param] = _to_hash(value)
311
+ end
312
+ hash
313
+ end
314
+
315
+ # Outputs non-array value in the form of hash
316
+ # For object, use to_hash. Otherwise, just return the value
317
+ # @param [Object] value Any valid value
318
+ # @return [Hash] Returns the value in the form of hash
319
+ def _to_hash(value)
320
+ if value.is_a?(Array)
321
+ value.compact.map { |v| _to_hash(v) }
322
+ elsif value.is_a?(Hash)
323
+ {}.tap do |hash|
324
+ value.each { |k, v| hash[k] = _to_hash(v) }
325
+ end
326
+ elsif value.respond_to? :to_hash
327
+ value.to_hash
328
+ else
329
+ value
330
+ end
331
+ end
332
+
333
+ end
334
+
335
+ end
@@ -0,0 +1,241 @@
1
+ =begin
2
+ #Widgetic API Gateway
3
+
4
+ #API documentation for the Widgetic API Gateway
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ApiSdkRb
17
+ class BrandKitTokensFonts
18
+ attr_accessor :title
19
+
20
+ attr_accessor :subtitle
21
+
22
+ attr_accessor :body
23
+
24
+ attr_accessor :caption
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'title' => :'title',
30
+ :'subtitle' => :'subtitle',
31
+ :'body' => :'body',
32
+ :'caption' => :'caption'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'title' => :'BrandFont',
45
+ :'subtitle' => :'BrandFont',
46
+ :'body' => :'BrandFont',
47
+ :'caption' => :'BrandFont'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::BrandKitTokensFonts` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::BrandKitTokensFonts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'title')
73
+ self.title = attributes[:'title']
74
+ end
75
+
76
+ if attributes.key?(:'subtitle')
77
+ self.subtitle = attributes[:'subtitle']
78
+ end
79
+
80
+ if attributes.key?(:'body')
81
+ self.body = attributes[:'body']
82
+ end
83
+
84
+ if attributes.key?(:'caption')
85
+ self.caption = attributes[:'caption']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ title == o.title &&
110
+ subtitle == o.subtitle &&
111
+ body == o.body &&
112
+ caption == o.caption
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [title, subtitle, body, caption].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def self._deserialize(type, value)
155
+ case type.to_sym
156
+ when :Time
157
+ Time.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :Boolean
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ # models (e.g. Pet) or oneOf
188
+ klass = ApiSdkRb.const_get(type)
189
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
+ end
191
+ end
192
+
193
+ # Returns the string representation of the object
194
+ # @return [String] String presentation of the object
195
+ def to_s
196
+ to_hash.to_s
197
+ end
198
+
199
+ # to_body is an alias to to_hash (backward compatibility)
200
+ # @return [Hash] Returns the object in the form of hash
201
+ def to_body
202
+ to_hash
203
+ end
204
+
205
+ # Returns the object in the form of hash
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_hash
208
+ hash = {}
209
+ self.class.attribute_map.each_pair do |attr, param|
210
+ value = self.send(attr)
211
+ if value.nil?
212
+ is_nullable = self.class.openapi_nullable.include?(attr)
213
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
+ end
215
+
216
+ hash[param] = _to_hash(value)
217
+ end
218
+ hash
219
+ end
220
+
221
+ # Outputs non-array value in the form of hash
222
+ # For object, use to_hash. Otherwise, just return the value
223
+ # @param [Object] value Any valid value
224
+ # @return [Hash] Returns the value in the form of hash
225
+ def _to_hash(value)
226
+ if value.is_a?(Array)
227
+ value.compact.map { |v| _to_hash(v) }
228
+ elsif value.is_a?(Hash)
229
+ {}.tap do |hash|
230
+ value.each { |k, v| hash[k] = _to_hash(v) }
231
+ end
232
+ elsif value.respond_to? :to_hash
233
+ value.to_hash
234
+ else
235
+ value
236
+ end
237
+ end
238
+
239
+ end
240
+
241
+ end