api-sdk-rb 1.11.111 → 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.
- checksums.yaml +4 -4
- data/README.md +207 -381
- data/docs/{GetPartnerCreditTransactions200Response.md → AccountCreditTransactionListResponse.md} +2 -2
- data/docs/{GetUserAdapterConnections200Response.md → AdapterConnectionListResponse.md} +2 -2
- data/docs/{RemoveUserAdapterConnection200Response.md → AdapterConnectionRemovalResponse.md} +2 -2
- data/docs/{SetUserAdapterConnection200Response.md → AdapterConnectionResponse.md} +2 -2
- data/docs/{AddAiAnswersKnowledgeDocument201Response.md → AiAnswersKnowledgeDocumentResponse.md} +2 -2
- data/docs/BrandKitApi.md +74 -74
- data/docs/BrandKitTokens.md +2 -0
- data/docs/BrandKitView.md +1 -1
- data/docs/BrandTextStyle.md +22 -0
- data/docs/CanvasesApi.md +45 -45
- data/docs/{CreateCompositionDatabaseRecord201Response.md → CompositionDatabaseRecordResponse.md} +2 -2
- data/docs/CompositionsApi.md +615 -349
- data/docs/{CreateCompositionContentItem201Response.md → ContentItemWriteResultResponse.md} +2 -2
- data/docs/CreditsApi.md +20 -20
- data/docs/{CreateCompositionFromWidget201Response.md → DeleteUpload200Response.md} +3 -3
- data/docs/{UploadsIdDelete200ResponseData.md → DeleteUpload200ResponseData.md} +2 -2
- data/docs/{GetPartnerDesignDefaults200Response.md → DesignDefaultsResponse.md} +2 -2
- data/docs/EntitlementsApi.md +18 -18
- data/docs/{OperationsIdGetResponse.md → GetOperationResponse.md} +3 -3
- data/docs/{OperationsIdGetResponseData.md → GetOperationResponseData.md} +3 -3
- data/docs/GetOperationResponseDataMetadata.md +24 -0
- data/docs/InvoicesApi.md +9 -9
- data/docs/{UploadsGet200Response.md → ListUploads200Response.md} +2 -2
- data/docs/{GetManagedUserLimits200Response.md → ManagedUserLimitsResponse.md} +2 -2
- data/docs/{DeleteManagedUser200Response.md → ManagedUserRemovalResponse.md} +2 -2
- data/docs/ManagedUsersApi.md +261 -171
- data/docs/OperationsApi.md +11 -11
- data/docs/PartnersApi.md +388 -388
- data/docs/PatchBrandKitRequest.md +2 -0
- data/docs/PublicEmbedApi.md +95 -95
- data/docs/PublicWorkflowEventsRequestEventsInner.md +3 -1
- data/docs/{GetPublicWorkflow200Response.md → PublicWorkflowResponse.md} +2 -2
- data/docs/TokensApi.md +11 -9
- data/docs/Upload.md +1 -1
- data/docs/UploadLimits.md +3 -3
- data/docs/UploadsApi.md +85 -85
- data/docs/UsersApi.md +125 -125
- data/docs/WidgetClarification.md +22 -0
- data/docs/WidgetClarificationOption.md +22 -0
- data/docs/WidgetClarificationQuestion.md +26 -0
- data/docs/WidgetNextStep.md +24 -0
- data/docs/WidgetPlan.md +26 -0
- data/docs/WidgetPlanDecisions.md +32 -0
- data/docs/WidgetPlanDecisionsAdaptersInner.md +20 -0
- data/docs/WidgetPlanDecisionsLibrariesInner.md +22 -0
- data/docs/WidgetPlanDecisionsResponsive.md +22 -0
- data/docs/WidgetPlanTask.md +24 -0
- data/docs/WidgetsApi.md +38 -38
- data/docs/{CreateWorkspaceWorkflowFromPreset201Response.md → WorkflowDetailResponse.md} +2 -2
- data/docs/WorkflowFailureReason.md +15 -0
- data/docs/WorkflowFailureReasonCounter.md +22 -0
- data/docs/{SaveWorkspaceWorkflow200Response.md → WorkflowResponse.md} +2 -2
- data/docs/WorkflowStats.md +4 -2
- data/docs/WorkflowsApi.md +197 -413
- data/lib/api-sdk-rb/api/brand_kit_api.rb +61 -61
- data/lib/api-sdk-rb/api/canvases_api.rb +39 -39
- data/lib/api-sdk-rb/api/compositions_api.rb +770 -441
- data/lib/api-sdk-rb/api/credits_api.rb +20 -20
- data/lib/api-sdk-rb/api/entitlements_api.rb +14 -14
- data/lib/api-sdk-rb/api/invoices_api.rb +10 -10
- data/lib/api-sdk-rb/api/managed_users_api.rb +278 -172
- data/lib/api-sdk-rb/api/operations_api.rb +10 -10
- data/lib/api-sdk-rb/api/partners_api.rb +389 -389
- data/lib/api-sdk-rb/api/public_embed_api.rb +95 -95
- data/lib/api-sdk-rb/api/tokens_api.rb +8 -6
- data/lib/api-sdk-rb/api/uploads_api.rb +96 -96
- data/lib/api-sdk-rb/api/users_api.rb +132 -132
- data/lib/api-sdk-rb/api/widgets_api.rb +40 -40
- data/lib/api-sdk-rb/api/workflows_api.rb +246 -468
- data/lib/api-sdk-rb/configuration.rb +0 -60
- data/lib/api-sdk-rb/models/{get_user_adapter_connections200_response.rb → account_credit_transaction_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{get_partner_credit_transactions200_response.rb → adapter_connection_list_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{save_workspace_workflow200_response.rb → adapter_connection_removal_response.rb} +4 -4
- data/lib/api-sdk-rb/models/{set_user_adapter_connection200_response.rb → adapter_connection_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{add_ai_answers_knowledge_document201_response.rb → ai_answers_knowledge_document_response.rb} +3 -3
- data/lib/api-sdk-rb/models/brand_kit_tokens.rb +33 -2
- data/lib/api-sdk-rb/models/brand_kit_view.rb +1 -1
- data/lib/api-sdk-rb/models/brand_text_style.rb +344 -0
- data/lib/api-sdk-rb/models/{create_composition_database_record201_response.rb → composition_database_record_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{create_composition_content_item201_response.rb → content_item_write_result_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{operations_id_get_response.rb → delete_upload200_response.rb} +4 -5
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response_data.rb → delete_upload200_response_data.rb} +3 -3
- data/lib/api-sdk-rb/models/{get_partner_design_defaults200_response.rb → design_defaults_response.rb} +3 -3
- data/lib/api-sdk-rb/models/get_operation_response.rb +247 -0
- data/lib/api-sdk-rb/models/{operations_id_get_response_data.rb → get_operation_response_data.rb} +5 -8
- data/lib/api-sdk-rb/models/get_operation_response_data_metadata.rb +283 -0
- data/lib/api-sdk-rb/models/{uploads_get200_response.rb → list_uploads200_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{get_managed_user_limits200_response.rb → managed_user_limits_response.rb} +3 -3
- data/lib/api-sdk-rb/models/{uploads_id_delete200_response.rb → managed_user_removal_response.rb} +4 -4
- data/lib/api-sdk-rb/models/patch_brand_kit_request.rb +32 -1
- data/lib/api-sdk-rb/models/public_workflow_events_request_events_inner.rb +26 -4
- data/lib/api-sdk-rb/models/{get_public_workflow200_response.rb → public_workflow_response.rb} +3 -3
- data/lib/api-sdk-rb/models/upload.rb +1 -1
- data/lib/api-sdk-rb/models/upload_limits.rb +3 -3
- data/lib/api-sdk-rb/models/widget_clarification.rb +279 -0
- data/lib/api-sdk-rb/models/{create_composition_from_widget201_response.rb → widget_clarification_option.rb} +40 -30
- data/lib/api-sdk-rb/models/widget_clarification_question.rb +329 -0
- data/lib/api-sdk-rb/models/widget_next_step.rb +307 -0
- data/lib/api-sdk-rb/models/widget_plan.rb +306 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions.rb +346 -0
- data/lib/api-sdk-rb/models/widget_plan_decisions_adapters_inner.rb +237 -0
- data/lib/api-sdk-rb/models/{create_workspace_workflow_from_preset201_response.rb → widget_plan_decisions_libraries_inner.rb} +39 -30
- data/lib/api-sdk-rb/models/widget_plan_decisions_responsive.rb +311 -0
- data/lib/api-sdk-rb/models/widget_plan_task.rb +320 -0
- data/lib/api-sdk-rb/models/{delete_managed_user200_response.rb → workflow_detail_response.rb} +4 -4
- data/lib/api-sdk-rb/models/workflow_failure_reason.rb +42 -0
- data/lib/api-sdk-rb/models/workflow_failure_reason_counter.rb +277 -0
- data/lib/api-sdk-rb/models/workflow_response.rb +246 -0
- data/lib/api-sdk-rb/models/workflow_stats.rb +17 -5
- data/lib/api-sdk-rb/version.rb +1 -1
- data/lib/api-sdk-rb.rb +32 -21
- data/spec/api/brand_kit_api_spec.rb +18 -18
- data/spec/api/canvases_api_spec.rb +10 -10
- data/spec/api/compositions_api_spec.rb +144 -83
- data/spec/api/credits_api_spec.rb +5 -5
- data/spec/api/entitlements_api_spec.rb +4 -4
- data/spec/api/invoices_api_spec.rb +2 -2
- data/spec/api/managed_users_api_spec.rb +63 -42
- data/spec/api/operations_api_spec.rb +3 -3
- data/spec/api/partners_api_spec.rb +91 -91
- data/spec/api/public_embed_api_spec.rb +23 -23
- data/spec/api/tokens_api_spec.rb +3 -2
- data/spec/api/uploads_api_spec.rb +24 -24
- data/spec/api/users_api_spec.rb +30 -30
- data/spec/api/widgets_api_spec.rb +9 -9
- data/spec/api/workflows_api_spec.rb +50 -89
- data/spec/models/{get_user_adapter_connections200_response_spec.rb → account_credit_transaction_list_response_spec.rb} +6 -6
- data/spec/models/{get_public_workflow200_response_spec.rb → adapter_connection_list_response_spec.rb} +6 -6
- data/spec/models/{save_workspace_workflow200_response_spec.rb → adapter_connection_removal_response_spec.rb} +6 -6
- data/spec/models/{delete_managed_user200_response_spec.rb → adapter_connection_response_spec.rb} +6 -6
- data/spec/models/ai_answers_knowledge_document_response_spec.rb +48 -0
- data/spec/models/brand_kit_tokens_spec.rb +6 -0
- data/spec/models/{create_composition_from_widget201_response_spec.rb → brand_text_style_spec.rb} +13 -9
- data/spec/models/{get_managed_user_limits200_response_spec.rb → composition_database_record_response_spec.rb} +6 -6
- data/spec/models/content_item_write_result_response_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_data_spec.rb → delete_upload200_response_data_spec.rb} +6 -6
- data/spec/models/{operations_id_get_response_spec.rb → delete_upload200_response_spec.rb} +6 -6
- data/spec/models/design_defaults_response_spec.rb +48 -0
- data/spec/models/get_operation_response_data_metadata_spec.rb +58 -0
- data/spec/models/{operations_id_get_response_data_spec.rb → get_operation_response_data_spec.rb} +6 -6
- data/spec/models/{uploads_get200_response_spec.rb → get_operation_response_spec.rb} +6 -6
- data/spec/models/list_uploads200_response_spec.rb +48 -0
- data/spec/models/managed_user_limits_response_spec.rb +48 -0
- data/spec/models/{uploads_id_delete200_response_spec.rb → managed_user_removal_response_spec.rb} +6 -6
- data/spec/models/patch_brand_kit_request_spec.rb +6 -0
- data/spec/models/public_workflow_events_request_events_inner_spec.rb +10 -0
- data/spec/models/public_workflow_response_spec.rb +48 -0
- data/spec/models/widget_clarification_option_spec.rb +48 -0
- data/spec/models/widget_clarification_question_spec.rb +60 -0
- data/spec/models/widget_clarification_spec.rb +48 -0
- data/spec/models/widget_next_step_spec.rb +58 -0
- data/spec/models/widget_plan_decisions_adapters_inner_spec.rb +42 -0
- data/spec/models/widget_plan_decisions_libraries_inner_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_responsive_spec.rb +48 -0
- data/spec/models/widget_plan_decisions_spec.rb +78 -0
- data/spec/models/{create_composition_database_record201_response_spec.rb → widget_plan_spec.rb} +21 -9
- data/spec/models/widget_plan_task_spec.rb +62 -0
- data/spec/models/workflow_detail_response_spec.rb +48 -0
- data/spec/models/workflow_failure_reason_counter_spec.rb +48 -0
- data/spec/models/workflow_failure_reason_spec.rb +30 -0
- data/spec/models/workflow_response_spec.rb +48 -0
- data/spec/models/workflow_stats_spec.rb +6 -0
- metadata +130 -86
- data/docs/PartnerApi.md +0 -12714
- data/docs/UploadsIdDelete200Response.md +0 -22
- data/docs/WorkspacesApi.md +0 -1527
- data/lib/api-sdk-rb/api/partner_api.rb +0 -13791
- data/lib/api-sdk-rb/api/workspaces_api.rb +0 -1775
- data/lib/api-sdk-rb/models/remove_user_adapter_connection200_response.rb +0 -246
- data/spec/api/partner_api_spec.rb +0 -2437
- data/spec/api/workspaces_api_spec.rb +0 -339
- data/spec/models/add_ai_answers_knowledge_document201_response_spec.rb +0 -48
- data/spec/models/create_composition_content_item201_response_spec.rb +0 -48
- data/spec/models/create_workspace_workflow_from_preset201_response_spec.rb +0 -48
- data/spec/models/get_partner_credit_transactions200_response_spec.rb +0 -48
- data/spec/models/get_partner_design_defaults200_response_spec.rb +0 -48
- data/spec/models/remove_user_adapter_connection200_response_spec.rb +0 -48
- data/spec/models/set_user_adapter_connection200_response_spec.rb +0 -48
|
@@ -311,66 +311,6 @@ module ApiSdkRb
|
|
|
311
311
|
|
|
312
312
|
def operation_server_settings
|
|
313
313
|
{
|
|
314
|
-
"PartnerApi.call_public_composition_adapter": [
|
|
315
|
-
{
|
|
316
|
-
url: "https://api.widgetic.com",
|
|
317
|
-
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
318
|
-
}
|
|
319
|
-
],
|
|
320
|
-
"PartnerApi.create_public_composition_entry": [
|
|
321
|
-
{
|
|
322
|
-
url: "https://api.widgetic.com",
|
|
323
|
-
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
324
|
-
}
|
|
325
|
-
],
|
|
326
|
-
"PartnerApi.get_public_composition_embed": [
|
|
327
|
-
{
|
|
328
|
-
url: "https://api.widgetic.com",
|
|
329
|
-
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
330
|
-
}
|
|
331
|
-
],
|
|
332
|
-
"PartnerApi.get_public_composition_iframe": [
|
|
333
|
-
{
|
|
334
|
-
url: "https://api.widgetic.com",
|
|
335
|
-
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
336
|
-
}
|
|
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
|
-
],
|
|
356
|
-
"PartnerApi.post_public_composition_embed_status": [
|
|
357
|
-
{
|
|
358
|
-
url: "https://api.widgetic.com",
|
|
359
|
-
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
360
|
-
}
|
|
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
|
-
],
|
|
368
|
-
"PartnerApi.upload_public_composition_adapter_file": [
|
|
369
|
-
{
|
|
370
|
-
url: "https://api.widgetic.com",
|
|
371
|
-
description: "The public embed routes are served at the root of the API host, not under /v1.",
|
|
372
|
-
}
|
|
373
|
-
],
|
|
374
314
|
"PublicEmbedApi.call_public_composition_adapter": [
|
|
375
315
|
{
|
|
376
316
|
url: "https://api.widgetic.com",
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class AccountCreditTransactionListResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -39,7 +39,7 @@ module ApiSdkRb
|
|
|
39
39
|
def self.openapi_types
|
|
40
40
|
{
|
|
41
41
|
:'success' => :'Boolean',
|
|
42
|
-
:'data' => :'Array<
|
|
42
|
+
:'data' => :'Array<AccountCreditTransaction>',
|
|
43
43
|
:'meta' => :'ResponseMeta'
|
|
44
44
|
}
|
|
45
45
|
end
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::AccountCreditTransactionListResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::AccountCreditTransactionListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class AdapterConnectionListResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -39,7 +39,7 @@ module ApiSdkRb
|
|
|
39
39
|
def self.openapi_types
|
|
40
40
|
{
|
|
41
41
|
:'success' => :'Boolean',
|
|
42
|
-
:'data' => :'Array<
|
|
42
|
+
:'data' => :'Array<AdapterConnection>',
|
|
43
43
|
:'meta' => :'ResponseMeta'
|
|
44
44
|
}
|
|
45
45
|
end
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::AdapterConnectionListResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::AdapterConnectionListResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class AdapterConnectionRemovalResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -39,7 +39,7 @@ module ApiSdkRb
|
|
|
39
39
|
def self.openapi_types
|
|
40
40
|
{
|
|
41
41
|
:'success' => :'Boolean',
|
|
42
|
-
:'data' => :'
|
|
42
|
+
:'data' => :'AdapterConnectionRemoval',
|
|
43
43
|
:'meta' => :'ResponseMeta'
|
|
44
44
|
}
|
|
45
45
|
end
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::AdapterConnectionRemovalResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::AdapterConnectionRemovalResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class AdapterConnectionResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::AdapterConnectionResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::AdapterConnectionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
class
|
|
17
|
+
class AiAnswersKnowledgeDocumentResponse
|
|
18
18
|
attr_accessor :success
|
|
19
19
|
|
|
20
20
|
attr_accessor :data
|
|
@@ -54,13 +54,13 @@ module ApiSdkRb
|
|
|
54
54
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
55
|
def initialize(attributes = {})
|
|
56
56
|
if (!attributes.is_a?(Hash))
|
|
57
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::AiAnswersKnowledgeDocumentResponse` initialize method"
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
61
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
62
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::AiAnswersKnowledgeDocumentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
64
|
end
|
|
65
65
|
h[k.to_sym] = v
|
|
66
66
|
}
|
|
@@ -14,12 +14,15 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module ApiSdkRb
|
|
17
|
-
# Colors, fonts by role, spacing and corner radii of a Brand Kit.
|
|
17
|
+
# Colors, fonts by role, text styles, spacing and corner radii of a Brand Kit.
|
|
18
18
|
class BrandKitTokens
|
|
19
19
|
attr_accessor :colors
|
|
20
20
|
|
|
21
21
|
attr_accessor :fonts
|
|
22
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
|
+
|
|
23
26
|
attr_accessor :spacing
|
|
24
27
|
|
|
25
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.
|
|
@@ -30,6 +33,7 @@ module ApiSdkRb
|
|
|
30
33
|
{
|
|
31
34
|
:'colors' => :'colors',
|
|
32
35
|
:'fonts' => :'fonts',
|
|
36
|
+
:'text_styles' => :'textStyles',
|
|
33
37
|
:'spacing' => :'spacing',
|
|
34
38
|
:'instructions' => :'instructions'
|
|
35
39
|
}
|
|
@@ -45,6 +49,7 @@ module ApiSdkRb
|
|
|
45
49
|
{
|
|
46
50
|
:'colors' => :'Array<BrandColor>',
|
|
47
51
|
:'fonts' => :'BrandKitTokensFonts',
|
|
52
|
+
:'text_styles' => :'Array<BrandTextStyle>',
|
|
48
53
|
:'spacing' => :'BrandSpacing',
|
|
49
54
|
:'instructions' => :'String'
|
|
50
55
|
}
|
|
@@ -85,6 +90,12 @@ module ApiSdkRb
|
|
|
85
90
|
self.fonts = nil
|
|
86
91
|
end
|
|
87
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
|
+
|
|
88
99
|
if attributes.key?(:'spacing')
|
|
89
100
|
self.spacing = attributes[:'spacing']
|
|
90
101
|
else
|
|
@@ -113,6 +124,10 @@ module ApiSdkRb
|
|
|
113
124
|
invalid_properties.push('invalid value for "fonts", fonts cannot be nil.')
|
|
114
125
|
end
|
|
115
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
|
+
|
|
116
131
|
if @spacing.nil?
|
|
117
132
|
invalid_properties.push('invalid value for "spacing", spacing cannot be nil.')
|
|
118
133
|
end
|
|
@@ -131,6 +146,7 @@ module ApiSdkRb
|
|
|
131
146
|
return false if @colors.nil?
|
|
132
147
|
return false if @colors.length > 24
|
|
133
148
|
return false if @fonts.nil?
|
|
149
|
+
return false if !@text_styles.nil? && @text_styles.length > 12
|
|
134
150
|
return false if @spacing.nil?
|
|
135
151
|
return false if !@instructions.nil? && @instructions.to_s.length > 500
|
|
136
152
|
true
|
|
@@ -150,6 +166,20 @@ module ApiSdkRb
|
|
|
150
166
|
@colors = colors
|
|
151
167
|
end
|
|
152
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
|
+
|
|
153
183
|
# Custom attribute writer method with validation
|
|
154
184
|
# @param [Object] instructions Value to be assigned
|
|
155
185
|
def instructions=(instructions)
|
|
@@ -171,6 +201,7 @@ module ApiSdkRb
|
|
|
171
201
|
self.class == o.class &&
|
|
172
202
|
colors == o.colors &&
|
|
173
203
|
fonts == o.fonts &&
|
|
204
|
+
text_styles == o.text_styles &&
|
|
174
205
|
spacing == o.spacing &&
|
|
175
206
|
instructions == o.instructions
|
|
176
207
|
end
|
|
@@ -184,7 +215,7 @@ module ApiSdkRb
|
|
|
184
215
|
# Calculates hash code according to all attributes.
|
|
185
216
|
# @return [Integer] Hash code
|
|
186
217
|
def hash
|
|
187
|
-
[colors, fonts, spacing, instructions].hash
|
|
218
|
+
[colors, fonts, text_styles, spacing, instructions].hash
|
|
188
219
|
end
|
|
189
220
|
|
|
190
221
|
# Builds the object from hash
|
|
@@ -33,7 +33,7 @@ module ApiSdkRb
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :updated_by
|
|
35
35
|
|
|
36
|
-
# Things worth fixing in the saved
|
|
36
|
+
# Things worth fixing in the saved kit, such as a text color that is hard to read on the background, or fonts by role that are not used because the kit has text styles. The kit is saved either way.
|
|
37
37
|
attr_accessor :warnings
|
|
38
38
|
|
|
39
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -0,0 +1,344 @@
|
|
|
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
|
+
# One text style of the kit: a font family, a weight and a size in pixels, for example Inter 400 at 12px or Inter 500 at 18px. A family with a font file in the kit is an uploaded font; any other family is loaded from Google Fonts. The size is the size of the widget at full size.
|
|
18
|
+
class BrandTextStyle
|
|
19
|
+
attr_accessor :family
|
|
20
|
+
|
|
21
|
+
attr_accessor :weight
|
|
22
|
+
|
|
23
|
+
attr_accessor :size
|
|
24
|
+
|
|
25
|
+
class EnumAttributeValidator
|
|
26
|
+
attr_reader :datatype
|
|
27
|
+
attr_reader :allowable_values
|
|
28
|
+
|
|
29
|
+
def initialize(datatype, allowable_values)
|
|
30
|
+
@allowable_values = allowable_values.map do |value|
|
|
31
|
+
case datatype.to_s
|
|
32
|
+
when /Integer/i
|
|
33
|
+
value.to_i
|
|
34
|
+
when /Float/i
|
|
35
|
+
value.to_f
|
|
36
|
+
else
|
|
37
|
+
value
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def valid?(value)
|
|
43
|
+
!value || allowable_values.include?(value)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
48
|
+
def self.attribute_map
|
|
49
|
+
{
|
|
50
|
+
:'family' => :'family',
|
|
51
|
+
:'weight' => :'weight',
|
|
52
|
+
:'size' => :'size'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'family' => :'String',
|
|
65
|
+
:'weight' => :'Integer',
|
|
66
|
+
:'size' => :'Integer'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ApiSdkRb::BrandTextStyle` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ApiSdkRb::BrandTextStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'family')
|
|
92
|
+
self.family = attributes[:'family']
|
|
93
|
+
else
|
|
94
|
+
self.family = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'weight')
|
|
98
|
+
self.weight = attributes[:'weight']
|
|
99
|
+
else
|
|
100
|
+
self.weight = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'size')
|
|
104
|
+
self.size = attributes[:'size']
|
|
105
|
+
else
|
|
106
|
+
self.size = nil
|
|
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 @family.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "family", family cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if @family.to_s.length > 80
|
|
120
|
+
invalid_properties.push('invalid value for "family", the character length must be smaller than or equal to 80.')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if @family.to_s.length < 1
|
|
124
|
+
invalid_properties.push('invalid value for "family", the character length must be great than or equal to 1.')
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @weight.nil?
|
|
128
|
+
invalid_properties.push('invalid value for "weight", weight cannot be nil.')
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @size.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @size > 200
|
|
136
|
+
invalid_properties.push('invalid value for "size", must be smaller than or equal to 200.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if @size < 8
|
|
140
|
+
invalid_properties.push('invalid value for "size", must be greater than or equal to 8.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
invalid_properties
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Check to see if the all the properties in the model are valid
|
|
147
|
+
# @return true if the model is valid
|
|
148
|
+
def valid?
|
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
150
|
+
return false if @family.nil?
|
|
151
|
+
return false if @family.to_s.length > 80
|
|
152
|
+
return false if @family.to_s.length < 1
|
|
153
|
+
return false if @weight.nil?
|
|
154
|
+
weight_validator = EnumAttributeValidator.new('Integer', [100, 200, 300, 400, 500, 600, 700, 800, 900])
|
|
155
|
+
return false unless weight_validator.valid?(@weight)
|
|
156
|
+
return false if @size.nil?
|
|
157
|
+
return false if @size > 200
|
|
158
|
+
return false if @size < 8
|
|
159
|
+
true
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] family Value to be assigned
|
|
164
|
+
def family=(family)
|
|
165
|
+
if family.nil?
|
|
166
|
+
fail ArgumentError, 'family cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if family.to_s.length > 80
|
|
170
|
+
fail ArgumentError, 'invalid value for "family", the character length must be smaller than or equal to 80.'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if family.to_s.length < 1
|
|
174
|
+
fail ArgumentError, 'invalid value for "family", the character length must be great than or equal to 1.'
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
@family = family
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
181
|
+
# @param [Object] weight Object to be assigned
|
|
182
|
+
def weight=(weight)
|
|
183
|
+
validator = EnumAttributeValidator.new('Integer', [100, 200, 300, 400, 500, 600, 700, 800, 900])
|
|
184
|
+
unless validator.valid?(weight)
|
|
185
|
+
fail ArgumentError, "invalid value for \"weight\", must be one of #{validator.allowable_values}."
|
|
186
|
+
end
|
|
187
|
+
@weight = weight
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Custom attribute writer method with validation
|
|
191
|
+
# @param [Object] size Value to be assigned
|
|
192
|
+
def size=(size)
|
|
193
|
+
if size.nil?
|
|
194
|
+
fail ArgumentError, 'size cannot be nil'
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if size > 200
|
|
198
|
+
fail ArgumentError, 'invalid value for "size", must be smaller than or equal to 200.'
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if size < 8
|
|
202
|
+
fail ArgumentError, 'invalid value for "size", must be greater than or equal to 8.'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
@size = size
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Checks equality by comparing each attribute.
|
|
209
|
+
# @param [Object] Object to be compared
|
|
210
|
+
def ==(o)
|
|
211
|
+
return true if self.equal?(o)
|
|
212
|
+
self.class == o.class &&
|
|
213
|
+
family == o.family &&
|
|
214
|
+
weight == o.weight &&
|
|
215
|
+
size == o.size
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# @see the `==` method
|
|
219
|
+
# @param [Object] Object to be compared
|
|
220
|
+
def eql?(o)
|
|
221
|
+
self == o
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Calculates hash code according to all attributes.
|
|
225
|
+
# @return [Integer] Hash code
|
|
226
|
+
def hash
|
|
227
|
+
[family, weight, size].hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Builds the object from hash
|
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
232
|
+
# @return [Object] Returns the model itself
|
|
233
|
+
def self.build_from_hash(attributes)
|
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
236
|
+
transformed_hash = {}
|
|
237
|
+
openapi_types.each_pair do |key, type|
|
|
238
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
239
|
+
transformed_hash["#{key}"] = nil
|
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
241
|
+
# check to ensure the input is an array given that the attribute
|
|
242
|
+
# is documented as an array but the input is not
|
|
243
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
244
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
245
|
+
end
|
|
246
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
247
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
new(transformed_hash)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Deserializes the data based on type
|
|
254
|
+
# @param string type Data type
|
|
255
|
+
# @param string value Value to be deserialized
|
|
256
|
+
# @return [Object] Deserialized data
|
|
257
|
+
def self._deserialize(type, value)
|
|
258
|
+
case type.to_sym
|
|
259
|
+
when :Time
|
|
260
|
+
Time.parse(value)
|
|
261
|
+
when :Date
|
|
262
|
+
Date.parse(value)
|
|
263
|
+
when :String
|
|
264
|
+
value.to_s
|
|
265
|
+
when :Integer
|
|
266
|
+
value.to_i
|
|
267
|
+
when :Float
|
|
268
|
+
value.to_f
|
|
269
|
+
when :Boolean
|
|
270
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
271
|
+
true
|
|
272
|
+
else
|
|
273
|
+
false
|
|
274
|
+
end
|
|
275
|
+
when :Object
|
|
276
|
+
# generic object (usually a Hash), return directly
|
|
277
|
+
value
|
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
281
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
|
284
|
+
{}.tap do |hash|
|
|
285
|
+
value.each do |k, v|
|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
else # model
|
|
290
|
+
# models (e.g. Pet) or oneOf
|
|
291
|
+
klass = ApiSdkRb.const_get(type)
|
|
292
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Returns the string representation of the object
|
|
297
|
+
# @return [String] String presentation of the object
|
|
298
|
+
def to_s
|
|
299
|
+
to_hash.to_s
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
|
304
|
+
def to_body
|
|
305
|
+
to_hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Returns the object in the form of hash
|
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
|
310
|
+
def to_hash
|
|
311
|
+
hash = {}
|
|
312
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
313
|
+
value = self.send(attr)
|
|
314
|
+
if value.nil?
|
|
315
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
316
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
hash[param] = _to_hash(value)
|
|
320
|
+
end
|
|
321
|
+
hash
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Outputs non-array value in the form of hash
|
|
325
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
326
|
+
# @param [Object] value Any valid value
|
|
327
|
+
# @return [Hash] Returns the value in the form of hash
|
|
328
|
+
def _to_hash(value)
|
|
329
|
+
if value.is_a?(Array)
|
|
330
|
+
value.compact.map { |v| _to_hash(v) }
|
|
331
|
+
elsif value.is_a?(Hash)
|
|
332
|
+
{}.tap do |hash|
|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
334
|
+
end
|
|
335
|
+
elsif value.respond_to? :to_hash
|
|
336
|
+
value.to_hash
|
|
337
|
+
else
|
|
338
|
+
value
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
end
|