api-sdk-rb 1.11.66 → 1.11.111
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.
- checksums.yaml +4 -4
- data/README.md +192 -9
- data/docs/AdapterConnection.md +7 -1
- data/docs/BrandColor.md +22 -0
- data/docs/BrandFont.md +24 -0
- data/docs/BrandKitApi.md +593 -0
- data/docs/BrandKitAssetView.md +42 -0
- data/docs/BrandKitFigmaSource.md +26 -0
- data/docs/BrandKitTokens.md +24 -0
- data/docs/BrandKitTokensFonts.md +24 -0
- data/docs/BrandKitView.md +36 -0
- data/docs/BrandKitViewOwner.md +20 -0
- data/docs/BrandKitViewResponse.md +22 -0
- data/docs/BrandSpacing.md +32 -0
- data/docs/Composition.md +5 -1
- data/docs/CompositionLastEditedBy.md +20 -0
- data/docs/CompositionsApi.md +217 -135
- data/docs/ConfirmAdapterConnectionRequest.md +18 -0
- data/docs/CreateWidget201ResponseData.md +2 -4
- data/docs/CreateWorkspaceWorkflowFromPreset201Response.md +22 -0
- data/docs/CreateWorkspaceWorkflowFromPresetRequest.md +20 -0
- data/docs/CreateWorkspaceWorkflowRequest.md +22 -0
- data/docs/DeleteWorkspaceWorkflow200Response.md +22 -0
- data/docs/GetPublicCompositionEmbed200Response.md +7 -1
- data/docs/GetPublicCompositionEmbed200ResponseAdapters.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseAdaptersCaptcha.md +18 -0
- data/docs/GetPublicCompositionEmbed200ResponseEntries.md +20 -0
- data/docs/GetPublicCompositionEmbed200ResponseMedia.md +18 -0
- data/docs/GetPublicWorkflow200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowStats200Response.md +22 -0
- data/docs/GetWorkspaceWorkflowVersion200Response.md +22 -0
- data/docs/ListPartnerWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowCompositionOptions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowPresets200Response.md +22 -0
- data/docs/ListWorkspaceWorkflowVersions200Response.md +22 -0
- data/docs/ListWorkspaceWorkflows200Response.md +22 -0
- data/docs/ManagedUsersApi.md +1 -1
- data/docs/NewComposition.md +1 -1
- data/docs/NewEditorSession.md +1 -1
- data/docs/OfferWorkflowPresetRequest.md +24 -0
- data/docs/OfferedWorkflowPreset.md +40 -0
- data/docs/OfferedWorkflowPresetList.md +18 -0
- data/docs/OfferedWorkflowPresetWidget.md +22 -0
- data/docs/PartnerApi.md +3360 -538
- data/docs/PartnerCustomization.md +2 -2
- data/docs/PartnerNotification.md +1 -1
- data/docs/PartnersApi.md +294 -2
- data/docs/PatchBrandKitAssetRequest.md +24 -0
- data/docs/PatchBrandKitRequest.md +28 -0
- data/docs/PatchBrandKitRequestFonts.md +24 -0
- data/docs/PatchBrandKitRequestSpacing.md +32 -0
- data/docs/PostBrandKitIconRequest.md +20 -0
- data/docs/PublicEmbedApi.md +270 -4
- data/docs/PublicWorkflow.md +36 -0
- data/docs/PublicWorkflowEventsAccepted.md +22 -0
- data/docs/PublicWorkflowEventsRequest.md +24 -0
- data/docs/PublicWorkflowEventsRequestEventsInner.md +22 -0
- data/docs/PublicWorkflowEventsRequestHeightsInner.md +20 -0
- data/docs/PublicWorkflowTranslation.md +20 -0
- data/docs/PublishWorkspaceWorkflow200Response.md +22 -0
- data/docs/PublishWorkspaceWorkflowRequest.md +18 -0
- data/docs/PutBrandKitRequest.md +22 -0
- data/docs/RemovePartnerWorkflowPreset200Response.md +22 -0
- data/docs/ReportPublicWorkflowEvents200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflow200Response.md +22 -0
- data/docs/SaveWorkspaceWorkflowRequest.md +24 -0
- data/docs/SetAdapterConnectionRequest.md +1 -1
- data/docs/SetPartnerWorkflowPreset200Response.md +22 -0
- data/docs/UpdateComposition.md +1 -1
- data/docs/UsersApi.md +77 -1
- data/docs/Widget.md +2 -4
- data/docs/Workflow.md +50 -0
- data/docs/WorkflowCompositionAction.md +24 -0
- data/docs/WorkflowCompositionField.md +24 -0
- data/docs/WorkflowCompositionOption.md +30 -0
- data/docs/WorkflowCompositionOptionActions.md +22 -0
- data/docs/WorkflowCompositionOptionInputs.md +24 -0
- data/docs/WorkflowCompositionOptions.md +24 -0
- data/docs/WorkflowConditionCase.md +24 -0
- data/docs/WorkflowConditionTest.md +22 -0
- data/docs/WorkflowCounter.md +20 -0
- data/docs/WorkflowDetail.md +60 -0
- data/docs/WorkflowDetailAllOfLastEditedBy.md +20 -0
- data/docs/WorkflowEdge.md +24 -0
- data/docs/WorkflowFieldReference.md +22 -0
- data/docs/WorkflowGraph.md +22 -0
- data/docs/WorkflowIssue.md +28 -0
- data/docs/WorkflowList.md +24 -0
- data/docs/WorkflowNode.md +30 -0
- data/docs/WorkflowNodePosition.md +20 -0
- data/docs/WorkflowPresetChoice.md +26 -0
- data/docs/WorkflowPresetChoices.md +18 -0
- data/docs/WorkflowPresetRemoval.md +18 -0
- data/docs/WorkflowPresetWidget.md +20 -0
- data/docs/WorkflowPublishResult.md +22 -0
- data/docs/WorkflowRemoved.md +18 -0
- data/docs/WorkflowSchedule.md +24 -0
- data/docs/WorkflowStats.md +32 -0
- data/docs/WorkflowStatus.md +15 -0
- data/docs/WorkflowTrigger.md +28 -0
- data/docs/WorkflowTriggerValuesInner.md +20 -0
- data/docs/WorkflowVersion.md +28 -0
- data/docs/WorkflowVersionDetail.md +32 -0
- data/docs/WorkflowVersionList.md +18 -0
- data/docs/WorkflowVersionPublishedBy.md +20 -0
- data/docs/WorkflowsApi.md +1743 -0
- data/docs/WorkspacesApi.md +1527 -0
- data/lib/api-sdk-rb/api/brand_kit_api.rb +581 -0
- data/lib/api-sdk-rb/api/compositions_api.rb +237 -138
- data/lib/api-sdk-rb/api/managed_users_api.rb +2 -2
- data/lib/api-sdk-rb/api/partner_api.rb +3907 -809
- data/lib/api-sdk-rb/api/partners_api.rb +320 -4
- data/lib/api-sdk-rb/api/public_embed_api.rb +283 -6
- data/lib/api-sdk-rb/api/users_api.rb +96 -2
- data/lib/api-sdk-rb/api/workflows_api.rb +1997 -0
- data/lib/api-sdk-rb/api/workspaces_api.rb +1775 -0
- data/lib/api-sdk-rb/configuration.rb +50 -2
- data/lib/api-sdk-rb/models/adapter_connection.rb +48 -5
- data/lib/api-sdk-rb/models/brand_color.rb +329 -0
- data/lib/api-sdk-rb/models/brand_font.rb +357 -0
- data/lib/api-sdk-rb/models/brand_kit_asset_view.rb +409 -0
- data/lib/api-sdk-rb/models/brand_kit_figma_source.rb +277 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +304 -0
- data/lib/api-sdk-rb/models/brand_kit_tokens_fonts.rb +241 -0
- data/lib/api-sdk-rb/models/brand_kit_view.rb +344 -0
- data/lib/api-sdk-rb/models/brand_kit_view_owner.rb +267 -0
- data/lib/api-sdk-rb/models/brand_kit_view_response.rb +247 -0
- data/lib/api-sdk-rb/models/brand_spacing.rb +557 -0
- data/lib/api-sdk-rb/models/composition.rb +26 -5
- data/lib/api-sdk-rb/models/composition_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/confirm_adapter_connection_request.rb +241 -0
- data/lib/api-sdk-rb/models/create_widget201_response_data.rb +9 -20
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset201_response.rb +246 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_from_preset_request.rb +278 -0
- data/lib/api-sdk-rb/models/create_workspace_workflow_request.rb +271 -0
- data/lib/api-sdk-rb/models/delete_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response.rb +29 -2
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters.rb +225 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_adapters_captcha.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_entries.rb +224 -0
- data/lib/api-sdk-rb/models/get_public_composition_embed200_response_media.rb +216 -0
- data/lib/api-sdk-rb/models/get_public_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_stats200_response.rb +246 -0
- data/lib/api-sdk-rb/models/get_workspace_workflow_version200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_partner_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_composition_options200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_presets200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflow_versions200_response.rb +246 -0
- data/lib/api-sdk-rb/models/list_workspace_workflows200_response.rb +246 -0
- data/lib/api-sdk-rb/models/new_composition.rb +1 -1
- data/lib/api-sdk-rb/models/new_editor_session.rb +1 -1
- data/lib/api-sdk-rb/models/offer_workflow_preset_request.rb +322 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset.rb +423 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_list.rb +223 -0
- data/lib/api-sdk-rb/models/offered_workflow_preset_widget.rb +251 -0
- data/lib/api-sdk-rb/models/partner_notification.rb +1 -1
- data/lib/api-sdk-rb/models/partner_notification_event_type.rb +5 -1
- data/lib/api-sdk-rb/models/patch_brand_kit_asset_request.rb +289 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +332 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_fonts.rb +242 -0
- data/lib/api-sdk-rb/models/patch_brand_kit_request_spacing.rb +502 -0
- data/lib/api-sdk-rb/models/post_brand_kit_icon_request.rb +237 -0
- data/lib/api-sdk-rb/models/public_workflow.rb +351 -0
- data/lib/api-sdk-rb/models/public_workflow_events_accepted.rb +242 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request.rb +301 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +332 -0
- data/lib/api-sdk-rb/models/public_workflow_events_request_heights_inner.rb +267 -0
- data/lib/api-sdk-rb/models/public_workflow_translation.rb +242 -0
- data/lib/api-sdk-rb/models/publish_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/publish_workspace_workflow_request.rb +240 -0
- data/lib/api-sdk-rb/models/put_brand_kit_request.rb +239 -0
- data/lib/api-sdk-rb/models/remove_partner_workflow_preset200_response.rb +246 -0
- data/lib/api-sdk-rb/models/report_public_workflow_events200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow200_response.rb +246 -0
- data/lib/api-sdk-rb/models/save_workspace_workflow_request.rb +296 -0
- data/lib/api-sdk-rb/models/set_adapter_connection_request.rb +1 -1
- data/lib/api-sdk-rb/models/set_partner_workflow_preset200_response.rb +246 -0
- data/lib/api-sdk-rb/models/update_composition.rb +1 -1
- data/lib/api-sdk-rb/models/widget.rb +9 -20
- data/lib/api-sdk-rb/models/workflow.rb +509 -0
- data/lib/api-sdk-rb/models/workflow_composition_action.rb +266 -0
- data/lib/api-sdk-rb/models/workflow_composition_field.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_composition_option.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_actions.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_composition_option_inputs.rb +304 -0
- data/lib/api-sdk-rb/models/workflow_composition_options.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_condition_case.rb +322 -0
- data/lib/api-sdk-rb/models/workflow_condition_test.rb +284 -0
- data/lib/api-sdk-rb/models/workflow_counter.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_detail.rb +580 -0
- data/lib/api-sdk-rb/models/workflow_detail_all_of_last_edited_by.rb +242 -0
- data/lib/api-sdk-rb/models/workflow_edge.rb +292 -0
- data/lib/api-sdk-rb/models/workflow_field_reference.rb +300 -0
- data/lib/api-sdk-rb/models/workflow_graph.rb +330 -0
- data/lib/api-sdk-rb/models/workflow_issue.rb +309 -0
- data/lib/api-sdk-rb/models/workflow_list.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_node.rb +343 -0
- data/lib/api-sdk-rb/models/workflow_node_position.rb +238 -0
- data/lib/api-sdk-rb/models/workflow_preset_choice.rb +288 -0
- data/lib/api-sdk-rb/models/workflow_preset_choices.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_preset_removal.rb +222 -0
- data/lib/api-sdk-rb/models/workflow_preset_widget.rb +234 -0
- data/lib/api-sdk-rb/models/workflow_publish_result.rb +256 -0
- data/lib/api-sdk-rb/models/workflow_removed.rb +221 -0
- data/lib/api-sdk-rb/models/workflow_schedule.rb +298 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +335 -0
- data/lib/api-sdk-rb/models/workflow_status.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_trigger.rb +303 -0
- data/lib/api-sdk-rb/models/workflow_trigger_values_inner.rb +271 -0
- data/lib/api-sdk-rb/models/workflow_version.rb +316 -0
- data/lib/api-sdk-rb/models/workflow_version_detail.rb +354 -0
- data/lib/api-sdk-rb/models/workflow_version_list.rb +224 -0
- data/lib/api-sdk-rb/models/workflow_version_published_by.rb +225 -0
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +88 -0
- data/spec/api/brand_kit_api_spec.rb +136 -0
- data/spec/api/compositions_api_spec.rb +86 -69
- data/spec/api/managed_users_api_spec.rb +1 -1
- data/spec/api/partner_api_spec.rb +624 -82
- data/spec/api/partners_api_spec.rb +56 -2
- data/spec/api/public_embed_api_spec.rb +54 -3
- data/spec/api/users_api_spec.rb +16 -1
- data/spec/api/workflows_api_spec.rb +378 -0
- data/spec/api/workspaces_api_spec.rb +339 -0
- data/spec/models/adapter_connection_spec.rb +18 -0
- data/spec/models/brand_color_spec.rb +52 -0
- data/spec/models/brand_font_spec.rb +62 -0
- data/spec/models/brand_kit_asset_view_spec.rb +120 -0
- data/spec/models/brand_kit_figma_source_spec.rb +60 -0
- data/spec/models/brand_kit_tokens_fonts_spec.rb +54 -0
- data/spec/models/brand_kit_tokens_spec.rb +54 -0
- data/spec/models/brand_kit_view_owner_spec.rb +46 -0
- data/spec/models/brand_kit_view_response_spec.rb +48 -0
- data/spec/models/brand_kit_view_spec.rb +90 -0
- data/spec/models/brand_spacing_spec.rb +78 -0
- data/spec/models/composition_last_edited_by_spec.rb +42 -0
- data/spec/models/composition_spec.rb +12 -0
- data/spec/models/confirm_adapter_connection_request_spec.rb +36 -0
- data/spec/models/create_widget201_response_data_spec.rb +1 -7
- data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +48 -0
- data/spec/models/create_workspace_workflow_from_preset_request_spec.rb +42 -0
- data/spec/models/create_workspace_workflow_request_spec.rb +48 -0
- data/spec/models/delete_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/editor_session_spec.rb +1 -1
- data/spec/models/get_public_composition_embed200_response_adapters_captcha_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_adapters_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_entries_spec.rb +42 -0
- data/spec/models/get_public_composition_embed200_response_media_spec.rb +36 -0
- data/spec/models/get_public_composition_embed200_response_spec.rb +18 -0
- data/spec/models/get_public_workflow200_response_spec.rb +48 -0
- data/spec/models/get_workspace_workflow_stats200_response_spec.rb +48 -0
- data/spec/models/get_workspace_workflow_version200_response_spec.rb +48 -0
- data/spec/models/list_partner_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_composition_options200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_presets200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflow_versions200_response_spec.rb +48 -0
- data/spec/models/list_workspace_workflows200_response_spec.rb +48 -0
- data/spec/models/new_editor_session_spec.rb +1 -1
- data/spec/models/offer_workflow_preset_request_spec.rb +54 -0
- data/spec/models/offered_workflow_preset_list_spec.rb +36 -0
- data/spec/models/offered_workflow_preset_spec.rb +106 -0
- data/spec/models/offered_workflow_preset_widget_spec.rb +48 -0
- data/spec/models/patch_brand_kit_asset_request_spec.rb +62 -0
- data/spec/models/patch_brand_kit_request_fonts_spec.rb +54 -0
- data/spec/models/patch_brand_kit_request_spacing_spec.rb +78 -0
- data/spec/models/patch_brand_kit_request_spec.rb +66 -0
- data/spec/models/post_brand_kit_icon_request_spec.rb +42 -0
- data/spec/models/public_workflow_events_accepted_spec.rb +48 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +52 -0
- data/spec/models/public_workflow_events_request_heights_inner_spec.rb +42 -0
- data/spec/models/public_workflow_events_request_spec.rb +54 -0
- data/spec/models/public_workflow_spec.rb +94 -0
- data/spec/models/public_workflow_translation_spec.rb +42 -0
- data/spec/models/publish_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/publish_workspace_workflow_request_spec.rb +36 -0
- data/spec/models/put_brand_kit_request_spec.rb +48 -0
- data/spec/models/remove_partner_workflow_preset200_response_spec.rb +48 -0
- data/spec/models/report_public_workflow_events200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow200_response_spec.rb +48 -0
- data/spec/models/save_workspace_workflow_request_spec.rb +54 -0
- data/spec/models/set_partner_workflow_preset200_response_spec.rb +48 -0
- data/spec/models/widget_spec.rb +1 -7
- data/spec/models/workflow_composition_action_spec.rb +54 -0
- data/spec/models/workflow_composition_field_spec.rb +58 -0
- data/spec/models/workflow_composition_option_actions_spec.rb +52 -0
- data/spec/models/workflow_composition_option_inputs_spec.rb +58 -0
- data/spec/models/workflow_composition_option_spec.rb +72 -0
- data/spec/models/workflow_composition_options_spec.rb +54 -0
- data/spec/models/workflow_condition_case_spec.rb +58 -0
- data/spec/models/workflow_condition_test_spec.rb +52 -0
- data/spec/models/workflow_counter_spec.rb +42 -0
- data/spec/models/workflow_detail_all_of_last_edited_by_spec.rb +42 -0
- data/spec/models/workflow_detail_spec.rb +162 -0
- data/spec/models/workflow_edge_spec.rb +54 -0
- data/spec/models/workflow_field_reference_spec.rb +56 -0
- data/spec/models/workflow_graph_spec.rb +52 -0
- data/spec/models/workflow_issue_spec.rb +70 -0
- data/spec/models/workflow_list_spec.rb +54 -0
- data/spec/models/workflow_node_position_spec.rb +42 -0
- data/spec/models/workflow_node_spec.rb +76 -0
- data/spec/models/workflow_preset_choice_spec.rb +60 -0
- data/spec/models/workflow_preset_choices_spec.rb +36 -0
- data/spec/models/workflow_preset_removal_spec.rb +36 -0
- data/spec/models/workflow_preset_widget_spec.rb +42 -0
- data/spec/models/workflow_publish_result_spec.rb +48 -0
- data/spec/models/workflow_removed_spec.rb +36 -0
- data/spec/models/workflow_schedule_spec.rb +62 -0
- data/spec/models/workflow_spec.rb +132 -0
- data/spec/models/workflow_stats_spec.rb +78 -0
- data/spec/models/workflow_status_spec.rb +30 -0
- data/spec/models/workflow_trigger_spec.rb +70 -0
- data/spec/models/workflow_trigger_values_inner_spec.rb +46 -0
- data/spec/models/workflow_version_detail_spec.rb +78 -0
- data/spec/models/workflow_version_list_spec.rb +36 -0
- data/spec/models/workflow_version_published_by_spec.rb +42 -0
- data/spec/models/workflow_version_spec.rb +66 -0
- metadata +364 -12
|
@@ -290,11 +290,11 @@ module ApiSdkRb
|
|
|
290
290
|
[
|
|
291
291
|
{
|
|
292
292
|
url: "https://api.widgetic.com/v1",
|
|
293
|
-
description: "
|
|
293
|
+
description: "Production server",
|
|
294
294
|
variables: {
|
|
295
295
|
env: {
|
|
296
296
|
description: "Environment",
|
|
297
|
-
default_value: "
|
|
297
|
+
default_value: "production",
|
|
298
298
|
},
|
|
299
299
|
apiUrl: {
|
|
300
300
|
description: "API URL",
|
|
@@ -335,12 +335,36 @@ module ApiSdkRb
|
|
|
335
335
|
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
336
336
|
}
|
|
337
337
|
],
|
|
338
|
+
"PartnerApi.get_public_workflow": [
|
|
339
|
+
{
|
|
340
|
+
url: "https://api.widgetic.com",
|
|
341
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
"PartnerApi.get_public_workflow_frame": [
|
|
345
|
+
{
|
|
346
|
+
url: "https://api.widgetic.com",
|
|
347
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"PartnerApi.get_public_workflow_version": [
|
|
351
|
+
{
|
|
352
|
+
url: "https://api.widgetic.com",
|
|
353
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
354
|
+
}
|
|
355
|
+
],
|
|
338
356
|
"PartnerApi.post_public_composition_embed_status": [
|
|
339
357
|
{
|
|
340
358
|
url: "https://api.widgetic.com",
|
|
341
359
|
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
342
360
|
}
|
|
343
361
|
],
|
|
362
|
+
"PartnerApi.report_public_workflow_events": [
|
|
363
|
+
{
|
|
364
|
+
url: "https://api.widgetic.com",
|
|
365
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
366
|
+
}
|
|
367
|
+
],
|
|
344
368
|
"PartnerApi.upload_public_composition_adapter_file": [
|
|
345
369
|
{
|
|
346
370
|
url: "https://api.widgetic.com",
|
|
@@ -371,12 +395,36 @@ module ApiSdkRb
|
|
|
371
395
|
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
372
396
|
}
|
|
373
397
|
],
|
|
398
|
+
"PublicEmbedApi.get_public_workflow": [
|
|
399
|
+
{
|
|
400
|
+
url: "https://api.widgetic.com",
|
|
401
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
"PublicEmbedApi.get_public_workflow_frame": [
|
|
405
|
+
{
|
|
406
|
+
url: "https://api.widgetic.com",
|
|
407
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
408
|
+
}
|
|
409
|
+
],
|
|
410
|
+
"PublicEmbedApi.get_public_workflow_version": [
|
|
411
|
+
{
|
|
412
|
+
url: "https://api.widgetic.com",
|
|
413
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
414
|
+
}
|
|
415
|
+
],
|
|
374
416
|
"PublicEmbedApi.post_public_composition_embed_status": [
|
|
375
417
|
{
|
|
376
418
|
url: "https://api.widgetic.com",
|
|
377
419
|
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
378
420
|
}
|
|
379
421
|
],
|
|
422
|
+
"PublicEmbedApi.report_public_workflow_events": [
|
|
423
|
+
{
|
|
424
|
+
url: "https://api.widgetic.com",
|
|
425
|
+
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
426
|
+
}
|
|
427
|
+
],
|
|
380
428
|
"PublicEmbedApi.upload_public_composition_adapter_file": [
|
|
381
429
|
{
|
|
382
430
|
url: "https://api.widgetic.com",
|
|
@@ -37,6 +37,15 @@ module ApiSdkRb
|
|
|
37
37
|
# When the key was last set. Null when it is not connected
|
|
38
38
|
attr_accessor :updated_at
|
|
39
39
|
|
|
40
|
+
# How this credential is proved before it is used. `email_code` means it is an email address: saving it emails a code to it, and it is used only after the code is given back (`confirmUserAdapterConnection`, `confirmPartnerAdapterConnection`). Null for a credential that is used as soon as it is saved
|
|
41
|
+
attr_accessor :confirmation
|
|
42
|
+
|
|
43
|
+
# True when the credential is connected but has not been confirmed yet, so no adapter uses it. Always false when `confirmation` is null or the credential is not connected
|
|
44
|
+
attr_accessor :awaiting_confirmation
|
|
45
|
+
|
|
46
|
+
# When the credential was confirmed. Null when it is not connected, is awaiting its code, or needs no confirmation
|
|
47
|
+
attr_accessor :confirmed_at
|
|
48
|
+
|
|
40
49
|
class EnumAttributeValidator
|
|
41
50
|
attr_reader :datatype
|
|
42
51
|
attr_reader :allowable_values
|
|
@@ -68,7 +77,10 @@ module ApiSdkRb
|
|
|
68
77
|
:'label' => :'label',
|
|
69
78
|
:'scope' => :'scope',
|
|
70
79
|
:'connected' => :'connected',
|
|
71
|
-
:'updated_at' => :'updatedAt'
|
|
80
|
+
:'updated_at' => :'updatedAt',
|
|
81
|
+
:'confirmation' => :'confirmation',
|
|
82
|
+
:'awaiting_confirmation' => :'awaitingConfirmation',
|
|
83
|
+
:'confirmed_at' => :'confirmedAt'
|
|
72
84
|
}
|
|
73
85
|
end
|
|
74
86
|
|
|
@@ -86,14 +98,19 @@ module ApiSdkRb
|
|
|
86
98
|
:'label' => :'String',
|
|
87
99
|
:'scope' => :'String',
|
|
88
100
|
:'connected' => :'Boolean',
|
|
89
|
-
:'updated_at' => :'Time'
|
|
101
|
+
:'updated_at' => :'Time',
|
|
102
|
+
:'confirmation' => :'String',
|
|
103
|
+
:'awaiting_confirmation' => :'Boolean',
|
|
104
|
+
:'confirmed_at' => :'Time'
|
|
90
105
|
}
|
|
91
106
|
end
|
|
92
107
|
|
|
93
108
|
# List of attributes with nullable: true
|
|
94
109
|
def self.openapi_nullable
|
|
95
110
|
Set.new([
|
|
96
|
-
:'updated_at'
|
|
111
|
+
:'updated_at',
|
|
112
|
+
:'confirmation',
|
|
113
|
+
:'confirmed_at'
|
|
97
114
|
])
|
|
98
115
|
end
|
|
99
116
|
|
|
@@ -153,6 +170,24 @@ module ApiSdkRb
|
|
|
153
170
|
else
|
|
154
171
|
self.updated_at = nil
|
|
155
172
|
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'confirmation')
|
|
175
|
+
self.confirmation = attributes[:'confirmation']
|
|
176
|
+
else
|
|
177
|
+
self.confirmation = nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'awaiting_confirmation')
|
|
181
|
+
self.awaiting_confirmation = attributes[:'awaiting_confirmation']
|
|
182
|
+
else
|
|
183
|
+
self.awaiting_confirmation = nil
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'confirmed_at')
|
|
187
|
+
self.confirmed_at = attributes[:'confirmed_at']
|
|
188
|
+
else
|
|
189
|
+
self.confirmed_at = nil
|
|
190
|
+
end
|
|
156
191
|
end
|
|
157
192
|
|
|
158
193
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -184,6 +219,10 @@ module ApiSdkRb
|
|
|
184
219
|
invalid_properties.push('invalid value for "connected", connected cannot be nil.')
|
|
185
220
|
end
|
|
186
221
|
|
|
222
|
+
if @awaiting_confirmation.nil?
|
|
223
|
+
invalid_properties.push('invalid value for "awaiting_confirmation", awaiting_confirmation cannot be nil.')
|
|
224
|
+
end
|
|
225
|
+
|
|
187
226
|
invalid_properties
|
|
188
227
|
end
|
|
189
228
|
|
|
@@ -199,6 +238,7 @@ module ApiSdkRb
|
|
|
199
238
|
scope_validator = EnumAttributeValidator.new('String', ["owner", "partner", "owner_or_partner"])
|
|
200
239
|
return false unless scope_validator.valid?(@scope)
|
|
201
240
|
return false if @connected.nil?
|
|
241
|
+
return false if @awaiting_confirmation.nil?
|
|
202
242
|
true
|
|
203
243
|
end
|
|
204
244
|
|
|
@@ -223,7 +263,10 @@ module ApiSdkRb
|
|
|
223
263
|
label == o.label &&
|
|
224
264
|
scope == o.scope &&
|
|
225
265
|
connected == o.connected &&
|
|
226
|
-
updated_at == o.updated_at
|
|
266
|
+
updated_at == o.updated_at &&
|
|
267
|
+
confirmation == o.confirmation &&
|
|
268
|
+
awaiting_confirmation == o.awaiting_confirmation &&
|
|
269
|
+
confirmed_at == o.confirmed_at
|
|
227
270
|
end
|
|
228
271
|
|
|
229
272
|
# @see the `==` method
|
|
@@ -235,7 +278,7 @@ module ApiSdkRb
|
|
|
235
278
|
# Calculates hash code according to all attributes.
|
|
236
279
|
# @return [Integer] Hash code
|
|
237
280
|
def hash
|
|
238
|
-
[adapter_id, adapter_label, credential_key, label, scope, connected, updated_at].hash
|
|
281
|
+
[adapter_id, adapter_label, credential_key, label, scope, connected, updated_at, confirmation, awaiting_confirmation, confirmed_at].hash
|
|
239
282
|
end
|
|
240
283
|
|
|
241
284
|
# Builds the object from hash
|
|
@@ -0,0 +1,329 @@
|
|
|
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 BrandColor
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
attr_accessor :hex
|
|
21
|
+
|
|
22
|
+
attr_accessor :role
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'name' => :'name',
|
|
50
|
+
:'hex' => :'hex',
|
|
51
|
+
:'role' => :'role'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns all the JSON keys this model knows about
|
|
56
|
+
def self.acceptable_attributes
|
|
57
|
+
attribute_map.values
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.openapi_types
|
|
62
|
+
{
|
|
63
|
+
:'name' => :'String',
|
|
64
|
+
:'hex' => :'String',
|
|
65
|
+
:'role' => :'String'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# List of attributes with nullable: true
|
|
70
|
+
def self.openapi_nullable
|
|
71
|
+
Set.new([
|
|
72
|
+
])
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Initializes the object
|
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
77
|
+
def initialize(attributes = {})
|
|
78
|
+
if (!attributes.is_a?(Hash))
|
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::BrandColor` initialize method"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
83
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
84
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
85
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::BrandColor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
86
|
+
end
|
|
87
|
+
h[k.to_sym] = v
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'name')
|
|
91
|
+
self.name = attributes[:'name']
|
|
92
|
+
else
|
|
93
|
+
self.name = nil
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'hex')
|
|
97
|
+
self.hex = attributes[:'hex']
|
|
98
|
+
else
|
|
99
|
+
self.hex = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'role')
|
|
103
|
+
self.role = attributes[:'role']
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
if @name.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @name.to_s.length > 40
|
|
117
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 40.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @name.to_s.length < 1
|
|
121
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @hex.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "hex", hex cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
pattern = Regexp.new(/^#[0-9A-Fa-f]{6}$/)
|
|
129
|
+
if @hex !~ pattern
|
|
130
|
+
invalid_properties.push("invalid value for \"hex\", must conform to the pattern #{pattern}.")
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
invalid_properties
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Check to see if the all the properties in the model are valid
|
|
137
|
+
# @return true if the model is valid
|
|
138
|
+
def valid?
|
|
139
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
140
|
+
return false if @name.nil?
|
|
141
|
+
return false if @name.to_s.length > 40
|
|
142
|
+
return false if @name.to_s.length < 1
|
|
143
|
+
return false if @hex.nil?
|
|
144
|
+
return false if @hex !~ Regexp.new(/^#[0-9A-Fa-f]{6}$/)
|
|
145
|
+
role_validator = EnumAttributeValidator.new('String', ["primary", "secondary", "accent", "background", "surface", "text", "title", "sub", "border", "error"])
|
|
146
|
+
return false unless role_validator.valid?(@role)
|
|
147
|
+
true
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method with validation
|
|
151
|
+
# @param [Object] name Value to be assigned
|
|
152
|
+
def name=(name)
|
|
153
|
+
if name.nil?
|
|
154
|
+
fail ArgumentError, 'name cannot be nil'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if name.to_s.length > 40
|
|
158
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 40.'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if name.to_s.length < 1
|
|
162
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@name = name
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] hex Value to be assigned
|
|
170
|
+
def hex=(hex)
|
|
171
|
+
if hex.nil?
|
|
172
|
+
fail ArgumentError, 'hex cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
pattern = Regexp.new(/^#[0-9A-Fa-f]{6}$/)
|
|
176
|
+
if hex !~ pattern
|
|
177
|
+
fail ArgumentError, "invalid value for \"hex\", must conform to the pattern #{pattern}."
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@hex = hex
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
184
|
+
# @param [Object] role Object to be assigned
|
|
185
|
+
def role=(role)
|
|
186
|
+
validator = EnumAttributeValidator.new('String', ["primary", "secondary", "accent", "background", "surface", "text", "title", "sub", "border", "error"])
|
|
187
|
+
unless validator.valid?(role)
|
|
188
|
+
fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
|
|
189
|
+
end
|
|
190
|
+
@role = role
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Checks equality by comparing each attribute.
|
|
194
|
+
# @param [Object] Object to be compared
|
|
195
|
+
def ==(o)
|
|
196
|
+
return true if self.equal?(o)
|
|
197
|
+
self.class == o.class &&
|
|
198
|
+
name == o.name &&
|
|
199
|
+
hex == o.hex &&
|
|
200
|
+
role == o.role
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# @see the `==` method
|
|
204
|
+
# @param [Object] Object to be compared
|
|
205
|
+
def eql?(o)
|
|
206
|
+
self == o
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Calculates hash code according to all attributes.
|
|
210
|
+
# @return [Integer] Hash code
|
|
211
|
+
def hash
|
|
212
|
+
[name, hex, role].hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Builds the object from hash
|
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
217
|
+
# @return [Object] Returns the model itself
|
|
218
|
+
def self.build_from_hash(attributes)
|
|
219
|
+
return nil unless attributes.is_a?(Hash)
|
|
220
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
221
|
+
transformed_hash = {}
|
|
222
|
+
openapi_types.each_pair do |key, type|
|
|
223
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
224
|
+
transformed_hash["#{key}"] = nil
|
|
225
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
226
|
+
# check to ensure the input is an array given that the attribute
|
|
227
|
+
# is documented as an array but the input is not
|
|
228
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
229
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
230
|
+
end
|
|
231
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
232
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
new(transformed_hash)
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Deserializes the data based on type
|
|
239
|
+
# @param string type Data type
|
|
240
|
+
# @param string value Value to be deserialized
|
|
241
|
+
# @return [Object] Deserialized data
|
|
242
|
+
def self._deserialize(type, value)
|
|
243
|
+
case type.to_sym
|
|
244
|
+
when :Time
|
|
245
|
+
Time.parse(value)
|
|
246
|
+
when :Date
|
|
247
|
+
Date.parse(value)
|
|
248
|
+
when :String
|
|
249
|
+
value.to_s
|
|
250
|
+
when :Integer
|
|
251
|
+
value.to_i
|
|
252
|
+
when :Float
|
|
253
|
+
value.to_f
|
|
254
|
+
when :Boolean
|
|
255
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
256
|
+
true
|
|
257
|
+
else
|
|
258
|
+
false
|
|
259
|
+
end
|
|
260
|
+
when :Object
|
|
261
|
+
# generic object (usually a Hash), return directly
|
|
262
|
+
value
|
|
263
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
264
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
265
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
266
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
267
|
+
k_type = Regexp.last_match[:k_type]
|
|
268
|
+
v_type = Regexp.last_match[:v_type]
|
|
269
|
+
{}.tap do |hash|
|
|
270
|
+
value.each do |k, v|
|
|
271
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
else # model
|
|
275
|
+
# models (e.g. Pet) or oneOf
|
|
276
|
+
klass = ApiSdkRb.const_get(type)
|
|
277
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Returns the string representation of the object
|
|
282
|
+
# @return [String] String presentation of the object
|
|
283
|
+
def to_s
|
|
284
|
+
to_hash.to_s
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
288
|
+
# @return [Hash] Returns the object in the form of hash
|
|
289
|
+
def to_body
|
|
290
|
+
to_hash
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Returns the object in the form of hash
|
|
294
|
+
# @return [Hash] Returns the object in the form of hash
|
|
295
|
+
def to_hash
|
|
296
|
+
hash = {}
|
|
297
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
298
|
+
value = self.send(attr)
|
|
299
|
+
if value.nil?
|
|
300
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
301
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
hash[param] = _to_hash(value)
|
|
305
|
+
end
|
|
306
|
+
hash
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Outputs non-array value in the form of hash
|
|
310
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
311
|
+
# @param [Object] value Any valid value
|
|
312
|
+
# @return [Hash] Returns the value in the form of hash
|
|
313
|
+
def _to_hash(value)
|
|
314
|
+
if value.is_a?(Array)
|
|
315
|
+
value.compact.map { |v| _to_hash(v) }
|
|
316
|
+
elsif value.is_a?(Hash)
|
|
317
|
+
{}.tap do |hash|
|
|
318
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
319
|
+
end
|
|
320
|
+
elsif value.respond_to? :to_hash
|
|
321
|
+
value.to_hash
|
|
322
|
+
else
|
|
323
|
+
value
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
end
|