signwell_sdk 0.1.2 → 0.2.0
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/.github/workflows/ci.yml +3 -3
- data/.github/workflows/generator-ownership.yml +1 -1
- data/.github/workflows/manual-release.yml +1 -1
- data/.github/workflows/release.yml +1 -1
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +20 -0
- data/Gemfile.lock +16 -12
- data/README.md +11 -0
- data/docs/AdditionalFieldsInnerInner.md +4 -0
- data/docs/BulkSendCsvRequest.md +1 -1
- data/docs/ConditionalLogicDecisionInfo.md +26 -0
- data/docs/ConditionalRuleInfo.md +26 -0
- data/docs/ConditionalRuleInfoConditionsInner.md +26 -0
- data/docs/ConditionalRuleRequest.md +28 -0
- data/docs/ConditionalRuleRequestConditionsInner.md +26 -0
- data/docs/CopiedPlaceholdersInner.md +1 -1
- data/docs/CreateBulkSendRequest.md +2 -2
- data/docs/DocumentApi.md +82 -8
- data/docs/DocumentFromTemplateRequest.md +11 -3
- data/docs/DocumentFromTemplateResponse.md +11 -1
- data/docs/DocumentFromTemplateResponseFieldsInnerInner.md +4 -0
- data/docs/DocumentFromTemplateResponseRecipientsInner.md +6 -0
- data/docs/DocumentRequest.md +10 -4
- data/docs/DocumentResponse.md +11 -1
- data/docs/DocumentResponseFieldsInnerInner.md +4 -0
- data/docs/DocumentResponseRecipientsInner.md +6 -0
- data/docs/DocumentResponseRecipientsInnerPasscodeDelivery.md +22 -0
- data/docs/DocumentResponseRecipientsInnerSms.md +30 -0
- data/docs/DocumentTemplateRequest.md +5 -3
- data/docs/DocumentTemplateResponse.md +3 -1
- data/docs/DocumentTemplateResponsePlaceholdersInner.md +3 -1
- data/docs/DocumentTemplateUpdateRequest.md +5 -3
- data/docs/EmbeddedBranding.md +18 -0
- data/docs/EmbeddedBrandingBranding.md +26 -0
- data/docs/EmbeddedBrandingRequest.md +26 -0
- data/docs/EmbeddedBrandingRequestCompanyLogo.md +20 -0
- data/docs/EmbeddedRequest.md +18 -0
- data/docs/FieldsInnerInner.md +4 -0
- data/docs/PlaceholdersInner.md +4 -2
- data/docs/PlaceholdersInnerPasscodeDelivery.md +22 -0
- data/docs/RecipientsInner.md +14 -4
- data/docs/RecipientsInnerPasscodeDelivery.md +22 -0
- data/docs/ReminderRecipientsInner.md +1 -1
- data/docs/SendReminderRequest.md +1 -1
- data/docs/TemplateFieldsInnerInner.md +4 -0
- data/docs/TemplateRecipientsInner.md +14 -4
- data/docs/UpdateAuthenticationRequest.md +18 -0
- data/docs/UpdateAuthenticationRequestRecipientsInner.md +22 -0
- data/docs/UpdateDocumentAndSendRequest.md +9 -3
- data/docs/UpdateRecipientsMapInner.md +4 -2
- data/docs/UpdateRecipientsMapInnerPasscodeDelivery.md +22 -0
- data/docs/WebhooksApi.md +1 -1
- data/lib/signwell_sdk/api/api_application_api.rb +1 -2
- data/lib/signwell_sdk/api/bulk_send_api.rb +1 -2
- data/lib/signwell_sdk/api/document_api.rb +87 -14
- data/lib/signwell_sdk/api/me_api.rb +1 -2
- data/lib/signwell_sdk/api/regional_api.rb +1 -2
- data/lib/signwell_sdk/api/template_api.rb +1 -2
- data/lib/signwell_sdk/api/webhooks_api.rb +3 -4
- data/lib/signwell_sdk/api_client.rb +26 -6
- data/lib/signwell_sdk/api_error.rb +1 -2
- data/lib/signwell_sdk/api_model_base.rb +88 -0
- data/lib/signwell_sdk/configuration.rb +1 -1
- data/lib/signwell_sdk/extras/rate_limit.rb +17 -0
- data/lib/signwell_sdk/models/account_info_response.rb +1 -2
- data/lib/signwell_sdk/models/account_info_response_active_users_inner.rb +1 -2
- data/lib/signwell_sdk/models/account_info_response_preferences.rb +1 -2
- data/lib/signwell_sdk/models/additional_fields_inner_inner.rb +24 -3
- data/lib/signwell_sdk/models/additional_fields_inner_inner_value.rb +3 -4
- data/lib/signwell_sdk/models/additional_files_inner.rb +1 -2
- data/lib/signwell_sdk/models/api_application_response.rb +1 -2
- data/lib/signwell_sdk/models/api_application_response_owner.rb +1 -2
- data/lib/signwell_sdk/models/api_application_response_preferences.rb +1 -2
- data/lib/signwell_sdk/models/attachment_request_info.rb +1 -2
- data/lib/signwell_sdk/models/attachment_requests_inner.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_create_response.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_csv_request.rb +2 -3
- data/lib/signwell_sdk/models/bulk_send_csv_template_response.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_documents_response.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_list_item.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_list_response.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_response.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_response_templates_inner.rb +1 -2
- data/lib/signwell_sdk/models/bulk_send_validate_csv_response.rb +1 -2
- data/lib/signwell_sdk/models/checkbox_group_info.rb +1 -2
- data/lib/signwell_sdk/models/checkbox_groups_inner.rb +1 -2
- data/lib/signwell_sdk/models/checkbox_validation.rb +4 -3
- data/lib/signwell_sdk/models/completed_pdf_response.rb +3 -4
- data/lib/signwell_sdk/models/completed_pdf_url_response.rb +1 -2
- data/lib/signwell_sdk/models/conditional_logic_decision_info.rb +365 -0
- data/lib/signwell_sdk/models/conditional_rule_info.rb +351 -0
- data/lib/signwell_sdk/models/conditional_rule_info_conditions_inner.rb +340 -0
- data/lib/signwell_sdk/models/conditional_rule_request.rb +322 -0
- data/lib/signwell_sdk/models/conditional_rule_request_conditions_inner.rb +371 -0
- data/lib/signwell_sdk/models/copied_contact_info.rb +1 -2
- data/lib/signwell_sdk/models/copied_contacts_inner.rb +1 -2
- data/lib/signwell_sdk/models/copied_placeholders_inner.rb +2 -3
- data/lib/signwell_sdk/models/create_bulk_send_request.rb +3 -4
- data/lib/signwell_sdk/models/create_webhook_request.rb +1 -2
- data/lib/signwell_sdk/models/date_format.rb +4 -3
- data/lib/signwell_sdk/models/detailed_option.rb +1 -2
- data/lib/signwell_sdk/models/document_from_template_request.rb +90 -6
- data/lib/signwell_sdk/models/document_from_template_response.rb +101 -6
- data/lib/signwell_sdk/models/document_from_template_response_fields_inner_inner.rb +24 -3
- data/lib/signwell_sdk/models/document_from_template_response_fields_inner_inner_recipient.rb +1 -2
- data/lib/signwell_sdk/models/document_from_template_response_recipients_inner.rb +71 -3
- data/lib/signwell_sdk/models/document_list_response.rb +1 -2
- data/lib/signwell_sdk/models/document_request.rb +42 -7
- data/lib/signwell_sdk/models/document_response.rb +101 -6
- data/lib/signwell_sdk/models/document_response_attachment_requests_inner.rb +1 -2
- data/lib/signwell_sdk/models/document_response_fields_inner_inner.rb +24 -3
- data/lib/signwell_sdk/models/document_response_fields_inner_inner_options_inner.rb +1 -2
- data/lib/signwell_sdk/models/document_response_fields_inner_inner_recipient.rb +1 -2
- data/lib/signwell_sdk/models/document_response_fields_inner_inner_value.rb +3 -4
- data/lib/signwell_sdk/models/document_response_recipients_inner.rb +71 -3
- data/lib/signwell_sdk/models/document_response_recipients_inner_passcode_delivery.rb +246 -0
- data/lib/signwell_sdk/models/document_response_recipients_inner_sms.rb +292 -0
- data/lib/signwell_sdk/models/document_template_list_response.rb +1 -2
- data/lib/signwell_sdk/models/document_template_request.rb +18 -6
- data/lib/signwell_sdk/models/document_template_response.rb +17 -6
- data/lib/signwell_sdk/models/document_template_response_copied_placeholders_inner.rb +1 -2
- data/lib/signwell_sdk/models/document_template_response_placeholders_inner.rb +15 -6
- data/lib/signwell_sdk/models/document_template_update_request.rb +18 -6
- data/lib/signwell_sdk/models/dropdown_option.rb +3 -4
- data/lib/signwell_sdk/models/embedded_branding.rb +241 -0
- data/lib/signwell_sdk/models/embedded_branding_branding.rb +307 -0
- data/lib/signwell_sdk/models/embedded_branding_request.rb +297 -0
- data/lib/signwell_sdk/models/embedded_branding_request_company_logo.rb +236 -0
- data/lib/signwell_sdk/models/embedded_request.rb +225 -0
- data/lib/signwell_sdk/models/error_response.rb +1 -2
- data/lib/signwell_sdk/models/error_response_meta.rb +1 -2
- data/lib/signwell_sdk/models/field_type.rb +4 -3
- data/lib/signwell_sdk/models/fields_inner_inner.rb +24 -3
- data/lib/signwell_sdk/models/file_format.rb +4 -3
- data/lib/signwell_sdk/models/file_info.rb +1 -2
- data/lib/signwell_sdk/models/files_inner.rb +1 -2
- data/lib/signwell_sdk/models/label_info.rb +1 -2
- data/lib/signwell_sdk/models/label_request.rb +1 -2
- data/lib/signwell_sdk/models/label_response.rb +1 -2
- data/lib/signwell_sdk/models/me_response.rb +1 -2
- data/lib/signwell_sdk/models/me_response_contact.rb +1 -2
- data/lib/signwell_sdk/models/me_response_user.rb +1 -2
- data/lib/signwell_sdk/models/me_response_user_preferences.rb +1 -2
- data/lib/signwell_sdk/models/nom151_certificate_response.rb +1 -2
- data/lib/signwell_sdk/models/nom151_certificate_response_nom151.rb +1 -2
- data/lib/signwell_sdk/models/nom151_url_response.rb +1 -2
- data/lib/signwell_sdk/models/pagination_meta.rb +1 -2
- data/lib/signwell_sdk/models/placeholders_inner.rb +16 -7
- data/lib/signwell_sdk/models/placeholders_inner_passcode_delivery.rb +271 -0
- data/lib/signwell_sdk/models/rate_limit_error_response.rb +1 -2
- data/lib/signwell_sdk/models/recipients_inner.rb +103 -23
- data/lib/signwell_sdk/models/recipients_inner_passcode_delivery.rb +271 -0
- data/lib/signwell_sdk/models/reminder_recipients_inner.rb +2 -3
- data/lib/signwell_sdk/models/send_reminder_request.rb +2 -3
- data/lib/signwell_sdk/models/template_attachment_requests_inner.rb +1 -2
- data/lib/signwell_sdk/models/template_checkbox_groups_inner.rb +1 -2
- data/lib/signwell_sdk/models/template_field_values_inner.rb +1 -2
- data/lib/signwell_sdk/models/template_field_values_inner_value.rb +3 -4
- data/lib/signwell_sdk/models/template_fields_inner_inner.rb +24 -3
- data/lib/signwell_sdk/models/template_recipients_inner.rb +103 -23
- data/lib/signwell_sdk/models/text_validation.rb +5 -3
- data/lib/signwell_sdk/models/update_authentication_request.rb +243 -0
- data/lib/signwell_sdk/models/update_authentication_request_recipients_inner.rb +262 -0
- data/lib/signwell_sdk/models/update_document_and_send_request.rb +41 -6
- data/lib/signwell_sdk/models/update_recipients_map_inner.rb +16 -7
- data/lib/signwell_sdk/models/update_recipients_map_inner_passcode_delivery.rb +271 -0
- data/lib/signwell_sdk/models/update_recipients_request.rb +1 -2
- data/lib/signwell_sdk/models/validation_error_response.rb +1 -2
- data/lib/signwell_sdk/models/webhook_response.rb +1 -2
- data/lib/signwell_sdk/version.rb +4 -4
- data/lib/signwell_sdk.rb +19 -2
- data/openapi.yaml +2231 -972
- data/package-lock.json +542 -136
- data/package.json +4 -1
- data/signwell_sdk.gemspec +1 -2
- data/spec/api/api_application_api_spec.rb +1 -2
- data/spec/api/bulk_send_api_spec.rb +1 -2
- data/spec/api/document_api_spec.rb +11 -4
- data/spec/api/me_api_spec.rb +1 -2
- data/spec/api/regional_api_spec.rb +1 -2
- data/spec/api/template_api_spec.rb +1 -2
- data/spec/api/webhooks_api_spec.rb +1 -2
- data/spec/models/account_info_response_active_users_inner_spec.rb +1 -2
- data/spec/models/account_info_response_preferences_spec.rb +1 -2
- data/spec/models/account_info_response_spec.rb +1 -2
- data/spec/models/additional_fields_inner_inner_spec.rb +13 -2
- data/spec/models/additional_fields_inner_inner_value_spec.rb +1 -2
- data/spec/models/additional_files_inner_spec.rb +1 -2
- data/spec/models/api_application_response_owner_spec.rb +1 -2
- data/spec/models/api_application_response_preferences_spec.rb +1 -2
- data/spec/models/api_application_response_spec.rb +1 -2
- data/spec/models/attachment_request_info_spec.rb +1 -2
- data/spec/models/attachment_requests_inner_spec.rb +1 -2
- data/spec/models/bulk_send_create_response_spec.rb +1 -2
- data/spec/models/bulk_send_csv_request_spec.rb +1 -2
- data/spec/models/bulk_send_csv_template_response_spec.rb +1 -2
- data/spec/models/bulk_send_documents_response_spec.rb +1 -2
- data/spec/models/bulk_send_list_item_spec.rb +1 -2
- data/spec/models/bulk_send_list_response_spec.rb +1 -2
- data/spec/models/bulk_send_response_spec.rb +1 -2
- data/spec/models/bulk_send_response_templates_inner_spec.rb +1 -2
- data/spec/models/bulk_send_validate_csv_response_spec.rb +1 -2
- data/spec/models/checkbox_group_info_spec.rb +1 -2
- data/spec/models/checkbox_groups_inner_spec.rb +1 -2
- data/spec/models/checkbox_validation_spec.rb +1 -2
- data/spec/models/completed_pdf_response_spec.rb +1 -2
- data/spec/models/completed_pdf_url_response_spec.rb +1 -2
- data/spec/models/conditional_logic_decision_info_spec.rb +58 -0
- data/spec/models/conditional_rule_info_conditions_inner_spec.rb +58 -0
- data/spec/models/conditional_rule_info_spec.rb +58 -0
- data/spec/models/conditional_rule_request_conditions_inner_spec.rb +58 -0
- data/spec/models/conditional_rule_request_spec.rb +64 -0
- data/spec/models/copied_contact_info_spec.rb +1 -2
- data/spec/models/copied_contacts_inner_spec.rb +1 -2
- data/spec/models/copied_placeholders_inner_spec.rb +1 -2
- data/spec/models/create_bulk_send_request_spec.rb +1 -2
- data/spec/models/create_webhook_request_spec.rb +1 -2
- data/spec/models/date_format_spec.rb +1 -2
- data/spec/models/detailed_option_spec.rb +1 -2
- data/spec/models/document_from_template_request_spec.rb +25 -2
- data/spec/models/document_from_template_response_fields_inner_inner_recipient_spec.rb +1 -2
- data/spec/models/document_from_template_response_fields_inner_inner_spec.rb +13 -2
- data/spec/models/document_from_template_response_recipients_inner_spec.rb +19 -2
- data/spec/models/document_from_template_response_spec.rb +31 -2
- data/spec/models/document_list_response_spec.rb +1 -2
- data/spec/models/document_request_spec.rb +19 -2
- data/spec/models/document_response_attachment_requests_inner_spec.rb +1 -2
- data/spec/models/document_response_fields_inner_inner_options_inner_spec.rb +1 -2
- data/spec/models/document_response_fields_inner_inner_recipient_spec.rb +1 -2
- data/spec/models/document_response_fields_inner_inner_spec.rb +13 -2
- data/spec/models/document_response_fields_inner_inner_value_spec.rb +1 -2
- data/spec/models/document_response_recipients_inner_passcode_delivery_spec.rb +46 -0
- data/spec/models/document_response_recipients_inner_sms_spec.rb +70 -0
- data/spec/models/document_response_recipients_inner_spec.rb +19 -2
- data/spec/models/document_response_spec.rb +31 -2
- data/spec/models/document_template_list_response_spec.rb +1 -2
- data/spec/models/document_template_request_spec.rb +7 -2
- data/spec/models/document_template_response_copied_placeholders_inner_spec.rb +1 -2
- data/spec/models/document_template_response_placeholders_inner_spec.rb +7 -2
- data/spec/models/document_template_response_spec.rb +7 -2
- data/spec/models/document_template_update_request_spec.rb +7 -2
- data/spec/models/dropdown_option_spec.rb +1 -2
- data/spec/models/embedded_branding_branding_spec.rb +58 -0
- data/spec/models/embedded_branding_request_company_logo_spec.rb +40 -0
- data/spec/models/embedded_branding_request_spec.rb +58 -0
- data/spec/models/embedded_branding_spec.rb +34 -0
- data/spec/models/embedded_request_spec.rb +34 -0
- data/spec/models/error_response_meta_spec.rb +1 -2
- data/spec/models/error_response_spec.rb +1 -2
- data/spec/models/field_type_spec.rb +1 -2
- data/spec/models/fields_inner_inner_spec.rb +13 -2
- data/spec/models/file_format_spec.rb +1 -2
- data/spec/models/file_info_spec.rb +1 -2
- data/spec/models/files_inner_spec.rb +1 -2
- data/spec/models/label_info_spec.rb +1 -2
- data/spec/models/label_request_spec.rb +1 -2
- data/spec/models/label_response_spec.rb +1 -2
- data/spec/models/me_response_contact_spec.rb +1 -2
- data/spec/models/me_response_spec.rb +1 -2
- data/spec/models/me_response_user_preferences_spec.rb +1 -2
- data/spec/models/me_response_user_spec.rb +1 -2
- data/spec/models/nom151_certificate_response_nom151_spec.rb +1 -2
- data/spec/models/nom151_certificate_response_spec.rb +1 -2
- data/spec/models/nom151_url_response_spec.rb +1 -2
- data/spec/models/pagination_meta_spec.rb +1 -2
- data/spec/models/placeholders_inner_passcode_delivery_spec.rb +46 -0
- data/spec/models/placeholders_inner_spec.rb +7 -2
- data/spec/models/rate_limit_error_response_spec.rb +1 -2
- data/spec/models/recipients_inner_passcode_delivery_spec.rb +46 -0
- data/spec/models/recipients_inner_spec.rb +31 -2
- data/spec/models/reminder_recipients_inner_spec.rb +1 -2
- data/spec/models/send_reminder_request_spec.rb +1 -2
- data/spec/models/template_attachment_requests_inner_spec.rb +1 -2
- data/spec/models/template_checkbox_groups_inner_spec.rb +1 -2
- data/spec/models/template_field_values_inner_spec.rb +1 -2
- data/spec/models/template_field_values_inner_value_spec.rb +1 -2
- data/spec/models/template_fields_inner_inner_spec.rb +13 -2
- data/spec/models/template_recipients_inner_spec.rb +31 -2
- data/spec/models/text_validation_spec.rb +1 -2
- data/spec/models/update_authentication_request_recipients_inner_spec.rb +46 -0
- data/spec/models/update_authentication_request_spec.rb +34 -0
- data/spec/models/update_document_and_send_request_spec.rb +19 -2
- data/spec/models/update_recipients_map_inner_passcode_delivery_spec.rb +46 -0
- data/spec/models/update_recipients_map_inner_spec.rb +7 -2
- data/spec/models/update_recipients_request_spec.rb +1 -2
- data/spec/models/validation_error_response_spec.rb +1 -2
- data/spec/models/webhook_response_spec.rb +1 -2
- data/spec/regressions/api_client_spec.rb +56 -1
- data/spec/spec_helper.rb +1 -2
- metadata +73 -3
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
require 'time'
|
|
14
|
+
|
|
15
|
+
module SignWell
|
|
16
|
+
module Models
|
|
17
|
+
# Audit record of a signer-side decision about a CL rule that fired against a completed field.
|
|
18
|
+
class ConditionalLogicDecisionInfo
|
|
19
|
+
# External ID of the conditional rule that fired
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :rule_id
|
|
22
|
+
|
|
23
|
+
# api_id of the field the decision applies to
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :field_api_id
|
|
26
|
+
|
|
27
|
+
# Whether the signer kept the existing signature or the value was cleared
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :decision_type
|
|
30
|
+
|
|
31
|
+
# When the decision was recorded
|
|
32
|
+
# @return [Time]
|
|
33
|
+
attr_accessor :decided_at
|
|
34
|
+
|
|
35
|
+
# Human-readable summary of the decision
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :description
|
|
38
|
+
|
|
39
|
+
class EnumAttributeValidator
|
|
40
|
+
attr_reader :datatype
|
|
41
|
+
attr_reader :allowable_values
|
|
42
|
+
|
|
43
|
+
def initialize(datatype, allowable_values)
|
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
|
45
|
+
case datatype.to_s
|
|
46
|
+
when /Integer/i
|
|
47
|
+
value.to_i
|
|
48
|
+
when /Float/i
|
|
49
|
+
value.to_f
|
|
50
|
+
else
|
|
51
|
+
value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def valid?(value)
|
|
57
|
+
!value || allowable_values.include?(value)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
62
|
+
def self.attribute_map
|
|
63
|
+
{
|
|
64
|
+
:'rule_id' => :'rule_id',
|
|
65
|
+
:'field_api_id' => :'field_api_id',
|
|
66
|
+
:'decision_type' => :'decision_type',
|
|
67
|
+
:'decided_at' => :'decided_at',
|
|
68
|
+
:'description' => :'description'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns attribute mapping this model knows about
|
|
73
|
+
def self.acceptable_attribute_map
|
|
74
|
+
attribute_map
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns all the JSON keys this model knows about
|
|
78
|
+
def self.acceptable_attributes
|
|
79
|
+
acceptable_attribute_map.values
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Attribute type mapping.
|
|
83
|
+
def self.openapi_types
|
|
84
|
+
{
|
|
85
|
+
:'rule_id' => :'String',
|
|
86
|
+
:'field_api_id' => :'String',
|
|
87
|
+
:'decision_type' => :'String',
|
|
88
|
+
:'decided_at' => :'Time',
|
|
89
|
+
:'description' => :'String'
|
|
90
|
+
}
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# List of attributes with nullable: true
|
|
94
|
+
def self.openapi_nullable
|
|
95
|
+
Set.new([
|
|
96
|
+
])
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Initializes the object
|
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
|
+
def initialize(attributes = {})
|
|
102
|
+
if (!attributes.is_a?(Hash))
|
|
103
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SignWell::ConditionalLogicDecisionInfo` initialize method"
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
107
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
109
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SignWell::ConditionalLogicDecisionInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
111
|
+
end
|
|
112
|
+
h[k.to_sym] = v
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'rule_id')
|
|
116
|
+
self.rule_id = attributes[:'rule_id']
|
|
117
|
+
else
|
|
118
|
+
self.rule_id = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'field_api_id')
|
|
122
|
+
self.field_api_id = attributes[:'field_api_id']
|
|
123
|
+
else
|
|
124
|
+
self.field_api_id = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'decision_type')
|
|
128
|
+
self.decision_type = attributes[:'decision_type']
|
|
129
|
+
else
|
|
130
|
+
self.decision_type = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'decided_at')
|
|
134
|
+
self.decided_at = attributes[:'decided_at']
|
|
135
|
+
else
|
|
136
|
+
self.decided_at = nil
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'description')
|
|
140
|
+
self.description = attributes[:'description']
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
146
|
+
# @return Array for valid properties with the reasons
|
|
147
|
+
def list_invalid_properties
|
|
148
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
149
|
+
invalid_properties = Array.new
|
|
150
|
+
if @rule_id.nil?
|
|
151
|
+
invalid_properties.push('invalid value for "rule_id", rule_id cannot be nil.')
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if @field_api_id.nil?
|
|
155
|
+
invalid_properties.push('invalid value for "field_api_id", field_api_id cannot be nil.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if @decision_type.nil?
|
|
159
|
+
invalid_properties.push('invalid value for "decision_type", decision_type cannot be nil.')
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if @decided_at.nil?
|
|
163
|
+
invalid_properties.push('invalid value for "decided_at", decided_at cannot be nil.')
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
invalid_properties
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Check to see if the all the properties in the model are valid
|
|
170
|
+
# @return true if the model is valid
|
|
171
|
+
def valid?
|
|
172
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
173
|
+
return false if @rule_id.nil?
|
|
174
|
+
return false if @field_api_id.nil?
|
|
175
|
+
return false if @decision_type.nil?
|
|
176
|
+
decision_type_validator = EnumAttributeValidator.new('String', %w[kept_signature cleared_value unknown_default_open_api])
|
|
177
|
+
return false unless decision_type_validator.valid?(@decision_type)
|
|
178
|
+
return false if @decided_at.nil?
|
|
179
|
+
true
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Custom attribute writer method with validation
|
|
183
|
+
# @param [Object] rule_id Value to be assigned
|
|
184
|
+
def rule_id=(rule_id)
|
|
185
|
+
if rule_id.nil?
|
|
186
|
+
fail ArgumentError, 'rule_id cannot be nil'
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
@rule_id = rule_id
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Custom attribute writer method with validation
|
|
193
|
+
# @param [Object] field_api_id Value to be assigned
|
|
194
|
+
def field_api_id=(field_api_id)
|
|
195
|
+
if field_api_id.nil?
|
|
196
|
+
fail ArgumentError, 'field_api_id cannot be nil'
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
@field_api_id = field_api_id
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
203
|
+
# @param [Object] decision_type Object to be assigned
|
|
204
|
+
def decision_type=(decision_type)
|
|
205
|
+
validator = EnumAttributeValidator.new('String', %w[kept_signature cleared_value unknown_default_open_api])
|
|
206
|
+
unless validator.valid?(decision_type)
|
|
207
|
+
if decision_type.is_a?(String)
|
|
208
|
+
decision_type = "unknown_default_open_api"
|
|
209
|
+
else
|
|
210
|
+
fail ArgumentError, "invalid value for \"decision_type\", must be one of #{validator.allowable_values}."
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
@decision_type = decision_type
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Custom attribute writer method with validation
|
|
217
|
+
# @param [Object] decided_at Value to be assigned
|
|
218
|
+
def decided_at=(decided_at)
|
|
219
|
+
if decided_at.nil?
|
|
220
|
+
fail ArgumentError, 'decided_at cannot be nil'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
@decided_at = decided_at
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Checks equality by comparing each attribute.
|
|
227
|
+
# @param [Object] other Object to be compared
|
|
228
|
+
def ==(o)
|
|
229
|
+
return true if self.equal?(o)
|
|
230
|
+
self.class == o.class &&
|
|
231
|
+
rule_id == o.rule_id &&
|
|
232
|
+
field_api_id == o.field_api_id &&
|
|
233
|
+
decision_type == o.decision_type &&
|
|
234
|
+
decided_at == o.decided_at &&
|
|
235
|
+
description == o.description
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# @see the `==` method
|
|
239
|
+
# @param [Object] other Object to be compared
|
|
240
|
+
def eql?(o)
|
|
241
|
+
self == o
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Calculates hash code according to all attributes.
|
|
245
|
+
# @return [Integer] Hash code
|
|
246
|
+
def hash
|
|
247
|
+
[rule_id, field_api_id, decision_type, decided_at, description].hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Builds the object from hash
|
|
251
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
252
|
+
# @return [Object] Returns the model itself
|
|
253
|
+
def self.build_from_hash(attributes)
|
|
254
|
+
return nil unless attributes.is_a?(Hash)
|
|
255
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
256
|
+
transformed_hash = {}
|
|
257
|
+
openapi_types.each_pair do |key, type|
|
|
258
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
259
|
+
transformed_hash["#{key}"] = nil
|
|
260
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
261
|
+
# check to ensure the input is an array given that the attribute
|
|
262
|
+
# is documented as an array but the input is not
|
|
263
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
264
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
265
|
+
end
|
|
266
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
267
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
new(transformed_hash)
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Deserializes the data based on type
|
|
274
|
+
# @param [String] type Data type
|
|
275
|
+
# @param [String] value Value to be deserialized
|
|
276
|
+
# @return [Object] Deserialized data
|
|
277
|
+
def self._deserialize(type, value)
|
|
278
|
+
case type.to_sym
|
|
279
|
+
when :Time
|
|
280
|
+
Time.parse(value)
|
|
281
|
+
when :Date
|
|
282
|
+
Date.parse(value)
|
|
283
|
+
when :String
|
|
284
|
+
value.to_s
|
|
285
|
+
when :Integer
|
|
286
|
+
value.to_i
|
|
287
|
+
when :Float
|
|
288
|
+
value.to_f
|
|
289
|
+
when :Boolean
|
|
290
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
291
|
+
true
|
|
292
|
+
else
|
|
293
|
+
false
|
|
294
|
+
end
|
|
295
|
+
when :Object
|
|
296
|
+
# generic object (usually a Hash), return directly
|
|
297
|
+
value
|
|
298
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
299
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
300
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
301
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
302
|
+
k_type = Regexp.last_match[:k_type]
|
|
303
|
+
v_type = Regexp.last_match[:v_type]
|
|
304
|
+
{}.tap do |hash|
|
|
305
|
+
value.each do |k, v|
|
|
306
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
else # model
|
|
310
|
+
# models (e.g. Pet) or oneOf
|
|
311
|
+
klass = SignWell::Models.const_get(type)
|
|
312
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Returns the string representation of the object
|
|
317
|
+
# @return [String] String presentation of the object
|
|
318
|
+
def to_s
|
|
319
|
+
to_hash.to_s
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
323
|
+
# @return [Hash] Returns the object in the form of hash
|
|
324
|
+
def to_body
|
|
325
|
+
to_hash
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Returns the object in the form of hash
|
|
329
|
+
# @return [Hash] Returns the object in the form of hash
|
|
330
|
+
def to_hash
|
|
331
|
+
normalize_for_serialization! if respond_to?(:normalize_for_serialization!, true)
|
|
332
|
+
|
|
333
|
+
hash = {}
|
|
334
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
335
|
+
value = self.send(attr)
|
|
336
|
+
if value.nil?
|
|
337
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
338
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
hash[param] = _to_hash(value)
|
|
342
|
+
end
|
|
343
|
+
hash
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Outputs non-array value in the form of hash
|
|
347
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
348
|
+
# @param [Object] value Any valid value
|
|
349
|
+
# @return [Hash] Returns the value in the form of hash
|
|
350
|
+
def _to_hash(value)
|
|
351
|
+
if value.is_a?(Array)
|
|
352
|
+
value.compact.map { |v| _to_hash(v) }
|
|
353
|
+
elsif value.is_a?(Hash)
|
|
354
|
+
{}.tap do |hash|
|
|
355
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
356
|
+
end
|
|
357
|
+
elsif value.respond_to? :to_hash
|
|
358
|
+
value.to_hash
|
|
359
|
+
else
|
|
360
|
+
value
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
end
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
require 'time'
|
|
14
|
+
|
|
15
|
+
module SignWell
|
|
16
|
+
module Models
|
|
17
|
+
# Conditional rule configuration
|
|
18
|
+
class ConditionalRuleInfo
|
|
19
|
+
# Conditional rule ID
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :id
|
|
22
|
+
|
|
23
|
+
# api_id of the field that owns the rule, or the external_id of a checkbox group when the rule is owned by a group (groups have no api_id)
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :target_id
|
|
26
|
+
|
|
27
|
+
# Action applied to action_field_ids when the conditions are met
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :action_type
|
|
30
|
+
|
|
31
|
+
# api_ids of fields the rule affects when triggered
|
|
32
|
+
# @return [Array<String>]
|
|
33
|
+
attr_accessor :action_field_ids
|
|
34
|
+
|
|
35
|
+
# @return [Array<ConditionalRuleInfoConditionsInner>]
|
|
36
|
+
attr_accessor :conditions
|
|
37
|
+
|
|
38
|
+
class EnumAttributeValidator
|
|
39
|
+
attr_reader :datatype
|
|
40
|
+
attr_reader :allowable_values
|
|
41
|
+
|
|
42
|
+
def initialize(datatype, allowable_values)
|
|
43
|
+
@allowable_values = allowable_values.map do |value|
|
|
44
|
+
case datatype.to_s
|
|
45
|
+
when /Integer/i
|
|
46
|
+
value.to_i
|
|
47
|
+
when /Float/i
|
|
48
|
+
value.to_f
|
|
49
|
+
else
|
|
50
|
+
value
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def valid?(value)
|
|
56
|
+
!value || allowable_values.include?(value)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
61
|
+
def self.attribute_map
|
|
62
|
+
{
|
|
63
|
+
:'id' => :'id',
|
|
64
|
+
:'target_id' => :'target_id',
|
|
65
|
+
:'action_type' => :'action_type',
|
|
66
|
+
:'action_field_ids' => :'action_field_ids',
|
|
67
|
+
:'conditions' => :'conditions'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns attribute mapping this model knows about
|
|
72
|
+
def self.acceptable_attribute_map
|
|
73
|
+
attribute_map
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns all the JSON keys this model knows about
|
|
77
|
+
def self.acceptable_attributes
|
|
78
|
+
acceptable_attribute_map.values
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Attribute type mapping.
|
|
82
|
+
def self.openapi_types
|
|
83
|
+
{
|
|
84
|
+
:'id' => :'String',
|
|
85
|
+
:'target_id' => :'String',
|
|
86
|
+
:'action_type' => :'String',
|
|
87
|
+
:'action_field_ids' => :'Array<String>',
|
|
88
|
+
:'conditions' => :'Array<ConditionalRuleInfoConditionsInner>'
|
|
89
|
+
}
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# List of attributes with nullable: true
|
|
93
|
+
def self.openapi_nullable
|
|
94
|
+
Set.new([
|
|
95
|
+
])
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Initializes the object
|
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
100
|
+
def initialize(attributes = {})
|
|
101
|
+
if (!attributes.is_a?(Hash))
|
|
102
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SignWell::ConditionalRuleInfo` initialize method"
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
106
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
107
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
108
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
109
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SignWell::ConditionalRuleInfo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
110
|
+
end
|
|
111
|
+
h[k.to_sym] = v
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'id')
|
|
115
|
+
self.id = attributes[:'id']
|
|
116
|
+
else
|
|
117
|
+
self.id = nil
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'target_id')
|
|
121
|
+
self.target_id = attributes[:'target_id']
|
|
122
|
+
else
|
|
123
|
+
self.target_id = nil
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'action_type')
|
|
127
|
+
self.action_type = attributes[:'action_type']
|
|
128
|
+
else
|
|
129
|
+
self.action_type = nil
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'action_field_ids')
|
|
133
|
+
if (value = attributes[:'action_field_ids']).is_a?(Array)
|
|
134
|
+
self.action_field_ids = value
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'conditions')
|
|
139
|
+
if (value = attributes[:'conditions']).is_a?(Array)
|
|
140
|
+
self.conditions = value
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
147
|
+
# @return Array for valid properties with the reasons
|
|
148
|
+
def list_invalid_properties
|
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
150
|
+
invalid_properties = Array.new
|
|
151
|
+
if @id.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if @target_id.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "target_id", target_id cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @action_type.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "action_type", action_type cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
invalid_properties
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Check to see if the all the properties in the model are valid
|
|
167
|
+
# @return true if the model is valid
|
|
168
|
+
def valid?
|
|
169
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
170
|
+
return false if @id.nil?
|
|
171
|
+
return false if @target_id.nil?
|
|
172
|
+
return false if @action_type.nil?
|
|
173
|
+
action_type_validator = EnumAttributeValidator.new('String', %w[show hide require unknown_default_open_api])
|
|
174
|
+
return false unless action_type_validator.valid?(@action_type)
|
|
175
|
+
true
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] id Value to be assigned
|
|
180
|
+
def id=(id)
|
|
181
|
+
if id.nil?
|
|
182
|
+
fail ArgumentError, 'id cannot be nil'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@id = id
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Custom attribute writer method with validation
|
|
189
|
+
# @param [Object] target_id Value to be assigned
|
|
190
|
+
def target_id=(target_id)
|
|
191
|
+
if target_id.nil?
|
|
192
|
+
fail ArgumentError, 'target_id cannot be nil'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
@target_id = target_id
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
199
|
+
# @param [Object] action_type Object to be assigned
|
|
200
|
+
def action_type=(action_type)
|
|
201
|
+
validator = EnumAttributeValidator.new('String', %w[show hide require unknown_default_open_api])
|
|
202
|
+
unless validator.valid?(action_type)
|
|
203
|
+
if action_type.is_a?(String)
|
|
204
|
+
action_type = "unknown_default_open_api"
|
|
205
|
+
else
|
|
206
|
+
fail ArgumentError, "invalid value for \"action_type\", must be one of #{validator.allowable_values}."
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
@action_type = action_type
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Checks equality by comparing each attribute.
|
|
213
|
+
# @param [Object] other Object to be compared
|
|
214
|
+
def ==(o)
|
|
215
|
+
return true if self.equal?(o)
|
|
216
|
+
self.class == o.class &&
|
|
217
|
+
id == o.id &&
|
|
218
|
+
target_id == o.target_id &&
|
|
219
|
+
action_type == o.action_type &&
|
|
220
|
+
action_field_ids == o.action_field_ids &&
|
|
221
|
+
conditions == o.conditions
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# @see the `==` method
|
|
225
|
+
# @param [Object] other Object to be compared
|
|
226
|
+
def eql?(o)
|
|
227
|
+
self == o
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Calculates hash code according to all attributes.
|
|
231
|
+
# @return [Integer] Hash code
|
|
232
|
+
def hash
|
|
233
|
+
[id, target_id, action_type, action_field_ids, conditions].hash
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Builds the object from hash
|
|
237
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
238
|
+
# @return [Object] Returns the model itself
|
|
239
|
+
def self.build_from_hash(attributes)
|
|
240
|
+
return nil unless attributes.is_a?(Hash)
|
|
241
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
242
|
+
transformed_hash = {}
|
|
243
|
+
openapi_types.each_pair do |key, type|
|
|
244
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
245
|
+
transformed_hash["#{key}"] = nil
|
|
246
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
247
|
+
# check to ensure the input is an array given that the attribute
|
|
248
|
+
# is documented as an array but the input is not
|
|
249
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
250
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
251
|
+
end
|
|
252
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
253
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
new(transformed_hash)
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Deserializes the data based on type
|
|
260
|
+
# @param [String] type Data type
|
|
261
|
+
# @param [String] value Value to be deserialized
|
|
262
|
+
# @return [Object] Deserialized data
|
|
263
|
+
def self._deserialize(type, value)
|
|
264
|
+
case type.to_sym
|
|
265
|
+
when :Time
|
|
266
|
+
Time.parse(value)
|
|
267
|
+
when :Date
|
|
268
|
+
Date.parse(value)
|
|
269
|
+
when :String
|
|
270
|
+
value.to_s
|
|
271
|
+
when :Integer
|
|
272
|
+
value.to_i
|
|
273
|
+
when :Float
|
|
274
|
+
value.to_f
|
|
275
|
+
when :Boolean
|
|
276
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
277
|
+
true
|
|
278
|
+
else
|
|
279
|
+
false
|
|
280
|
+
end
|
|
281
|
+
when :Object
|
|
282
|
+
# generic object (usually a Hash), return directly
|
|
283
|
+
value
|
|
284
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
285
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
286
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
287
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
288
|
+
k_type = Regexp.last_match[:k_type]
|
|
289
|
+
v_type = Regexp.last_match[:v_type]
|
|
290
|
+
{}.tap do |hash|
|
|
291
|
+
value.each do |k, v|
|
|
292
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
else # model
|
|
296
|
+
# models (e.g. Pet) or oneOf
|
|
297
|
+
klass = SignWell::Models.const_get(type)
|
|
298
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Returns the string representation of the object
|
|
303
|
+
# @return [String] String presentation of the object
|
|
304
|
+
def to_s
|
|
305
|
+
to_hash.to_s
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
|
310
|
+
def to_body
|
|
311
|
+
to_hash
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Returns the object in the form of hash
|
|
315
|
+
# @return [Hash] Returns the object in the form of hash
|
|
316
|
+
def to_hash
|
|
317
|
+
normalize_for_serialization! if respond_to?(:normalize_for_serialization!, true)
|
|
318
|
+
|
|
319
|
+
hash = {}
|
|
320
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
321
|
+
value = self.send(attr)
|
|
322
|
+
if value.nil?
|
|
323
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
324
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
hash[param] = _to_hash(value)
|
|
328
|
+
end
|
|
329
|
+
hash
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
# Outputs non-array value in the form of hash
|
|
333
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
334
|
+
# @param [Object] value Any valid value
|
|
335
|
+
# @return [Hash] Returns the value in the form of hash
|
|
336
|
+
def _to_hash(value)
|
|
337
|
+
if value.is_a?(Array)
|
|
338
|
+
value.compact.map { |v| _to_hash(v) }
|
|
339
|
+
elsif value.is_a?(Hash)
|
|
340
|
+
{}.tap do |hash|
|
|
341
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
342
|
+
end
|
|
343
|
+
elsif value.respond_to? :to_hash
|
|
344
|
+
value.to_hash
|
|
345
|
+
else
|
|
346
|
+
value
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
end
|