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,297 @@
|
|
|
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
|
+
# Branding for this document's embedded requesting and signing experiences. Every property is optional and independent. A property you supply overrides the selected API Application; one you omit inherits from it, then from the SignWell default. `company_logo` has one extra step between those two: the account's Settings > Branding logo, which applies on paid plans only. The colors and the border radius have no account step — omitting one falls straight through to the SignWell default. On Update and Send Document the object is a patch: only the properties you send change, and a property sent as `null` clears your override so the value inherits again. Sending `branding` itself as `null` clears every property.
|
|
18
|
+
class EmbeddedBrandingRequest
|
|
19
|
+
# @return [EmbeddedBrandingRequestCompanyLogo]
|
|
20
|
+
attr_accessor :company_logo
|
|
21
|
+
|
|
22
|
+
# Accent color for this document's embedded pages, as a 6-digit HEX value. Returned normalized to `#RRGGBB`.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :accent_color
|
|
25
|
+
|
|
26
|
+
# Button label color for this document's embedded pages, as a 6-digit HEX value. Returned normalized to `#RRGGBB`.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :button_label_color
|
|
29
|
+
|
|
30
|
+
# Link color for this document's embedded pages, as a 6-digit HEX value. Returned normalized to `#RRGGBB`.
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :link_color
|
|
33
|
+
|
|
34
|
+
# Corner radius of buttons on this document's embedded pages, in pixels. Must be between 0 and 25.
|
|
35
|
+
# @return [Integer]
|
|
36
|
+
attr_accessor :button_border_radius
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'company_logo' => :'company_logo',
|
|
42
|
+
:'accent_color' => :'accent_color',
|
|
43
|
+
:'button_label_color' => :'button_label_color',
|
|
44
|
+
:'link_color' => :'link_color',
|
|
45
|
+
:'button_border_radius' => :'button_border_radius'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns attribute mapping this model knows about
|
|
50
|
+
def self.acceptable_attribute_map
|
|
51
|
+
attribute_map
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
acceptable_attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'company_logo' => :'EmbeddedBrandingRequestCompanyLogo',
|
|
63
|
+
:'accent_color' => :'String',
|
|
64
|
+
:'button_label_color' => :'String',
|
|
65
|
+
:'link_color' => :'String',
|
|
66
|
+
:'button_border_radius' => :'Integer'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
:'company_logo',
|
|
74
|
+
:'accent_color',
|
|
75
|
+
:'button_label_color',
|
|
76
|
+
:'link_color',
|
|
77
|
+
:'button_border_radius'
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SignWell::EmbeddedBrandingRequest` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SignWell::EmbeddedBrandingRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
93
|
+
end
|
|
94
|
+
h[k.to_sym] = v
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'company_logo')
|
|
98
|
+
self.company_logo = attributes[:'company_logo']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'accent_color')
|
|
102
|
+
self.accent_color = attributes[:'accent_color']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'button_label_color')
|
|
106
|
+
self.button_label_color = attributes[:'button_label_color']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'link_color')
|
|
110
|
+
self.link_color = attributes[:'link_color']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'button_border_radius')
|
|
114
|
+
self.button_border_radius = attributes[:'button_border_radius']
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
120
|
+
# @return Array for valid properties with the reasons
|
|
121
|
+
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
123
|
+
invalid_properties = Array.new
|
|
124
|
+
if !@button_border_radius.nil? && @button_border_radius > 25
|
|
125
|
+
invalid_properties.push('invalid value for "button_border_radius", must be smaller than or equal to 25.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if !@button_border_radius.nil? && @button_border_radius < 0
|
|
129
|
+
invalid_properties.push('invalid value for "button_border_radius", must be greater than or equal to 0.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if !@button_border_radius.nil? && @button_border_radius > 25
|
|
140
|
+
return false if !@button_border_radius.nil? && @button_border_radius < 0
|
|
141
|
+
true
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] button_border_radius Value to be assigned
|
|
146
|
+
def button_border_radius=(button_border_radius)
|
|
147
|
+
if !button_border_radius.nil? && button_border_radius > 25
|
|
148
|
+
fail ArgumentError, 'invalid value for "button_border_radius", must be smaller than or equal to 25.'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if !button_border_radius.nil? && button_border_radius < 0
|
|
152
|
+
fail ArgumentError, 'invalid value for "button_border_radius", must be greater than or equal to 0.'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@button_border_radius = button_border_radius
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Checks equality by comparing each attribute.
|
|
159
|
+
# @param [Object] other Object to be compared
|
|
160
|
+
def ==(o)
|
|
161
|
+
return true if self.equal?(o)
|
|
162
|
+
self.class == o.class &&
|
|
163
|
+
company_logo == o.company_logo &&
|
|
164
|
+
accent_color == o.accent_color &&
|
|
165
|
+
button_label_color == o.button_label_color &&
|
|
166
|
+
link_color == o.link_color &&
|
|
167
|
+
button_border_radius == o.button_border_radius
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @see the `==` method
|
|
171
|
+
# @param [Object] other Object to be compared
|
|
172
|
+
def eql?(o)
|
|
173
|
+
self == o
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Calculates hash code according to all attributes.
|
|
177
|
+
# @return [Integer] Hash code
|
|
178
|
+
def hash
|
|
179
|
+
[company_logo, accent_color, button_label_color, link_color, button_border_radius].hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Builds the object from hash
|
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
184
|
+
# @return [Object] Returns the model itself
|
|
185
|
+
def self.build_from_hash(attributes)
|
|
186
|
+
return nil unless attributes.is_a?(Hash)
|
|
187
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
188
|
+
transformed_hash = {}
|
|
189
|
+
openapi_types.each_pair do |key, type|
|
|
190
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
191
|
+
transformed_hash["#{key}"] = nil
|
|
192
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
193
|
+
# check to ensure the input is an array given that the attribute
|
|
194
|
+
# is documented as an array but the input is not
|
|
195
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
196
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
197
|
+
end
|
|
198
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
199
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
new(transformed_hash)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Deserializes the data based on type
|
|
206
|
+
# @param [String] type Data type
|
|
207
|
+
# @param [String] value Value to be deserialized
|
|
208
|
+
# @return [Object] Deserialized data
|
|
209
|
+
def self._deserialize(type, value)
|
|
210
|
+
case type.to_sym
|
|
211
|
+
when :Time
|
|
212
|
+
Time.parse(value)
|
|
213
|
+
when :Date
|
|
214
|
+
Date.parse(value)
|
|
215
|
+
when :String
|
|
216
|
+
value.to_s
|
|
217
|
+
when :Integer
|
|
218
|
+
value.to_i
|
|
219
|
+
when :Float
|
|
220
|
+
value.to_f
|
|
221
|
+
when :Boolean
|
|
222
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
223
|
+
true
|
|
224
|
+
else
|
|
225
|
+
false
|
|
226
|
+
end
|
|
227
|
+
when :Object
|
|
228
|
+
# generic object (usually a Hash), return directly
|
|
229
|
+
value
|
|
230
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
231
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
232
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
233
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
234
|
+
k_type = Regexp.last_match[:k_type]
|
|
235
|
+
v_type = Regexp.last_match[:v_type]
|
|
236
|
+
{}.tap do |hash|
|
|
237
|
+
value.each do |k, v|
|
|
238
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
else # model
|
|
242
|
+
# models (e.g. Pet) or oneOf
|
|
243
|
+
klass = SignWell::Models.const_get(type)
|
|
244
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Returns the string representation of the object
|
|
249
|
+
# @return [String] String presentation of the object
|
|
250
|
+
def to_s
|
|
251
|
+
to_hash.to_s
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
255
|
+
# @return [Hash] Returns the object in the form of hash
|
|
256
|
+
def to_body
|
|
257
|
+
to_hash
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Returns the object in the form of hash
|
|
261
|
+
# @return [Hash] Returns the object in the form of hash
|
|
262
|
+
def to_hash
|
|
263
|
+
normalize_for_serialization! if respond_to?(:normalize_for_serialization!, true)
|
|
264
|
+
|
|
265
|
+
hash = {}
|
|
266
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
267
|
+
value = self.send(attr)
|
|
268
|
+
if value.nil?
|
|
269
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
270
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
hash[param] = _to_hash(value)
|
|
274
|
+
end
|
|
275
|
+
hash
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Outputs non-array value in the form of hash
|
|
279
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
280
|
+
# @param [Object] value Any valid value
|
|
281
|
+
# @return [Hash] Returns the value in the form of hash
|
|
282
|
+
def _to_hash(value)
|
|
283
|
+
if value.is_a?(Array)
|
|
284
|
+
value.compact.map { |v| _to_hash(v) }
|
|
285
|
+
elsif value.is_a?(Hash)
|
|
286
|
+
{}.tap do |hash|
|
|
287
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
288
|
+
end
|
|
289
|
+
elsif value.respond_to? :to_hash
|
|
290
|
+
value.to_hash
|
|
291
|
+
else
|
|
292
|
+
value
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
end
|
|
@@ -0,0 +1,236 @@
|
|
|
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
|
+
# Logo shown on this document's embedded pages. Supply either `file_url` or `file_base64`, never both — sending both returns a `422`. Sending `company_logo` replaces the logo outright, so whichever source you omit is cleared; sending it as `null` removes the logo. Recommended size is 300 x 60 px with a transparent background; these are recommendations, not validated. In responses this property is `\"provided\"` — the URL and the Base64 payload are never returned.
|
|
18
|
+
class EmbeddedBrandingRequestCompanyLogo
|
|
19
|
+
# Public `http` or `https` URL of the logo image. The value has to parse as one — anything else returns a `422`. SignWell never requests the URL when the document is created, so it is not checked for reachability or for what it points at. If the URL turns out to be unreachable, slow, or not a usable image when the page loads, the page falls back to the no-logo experience rather than erroring.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :file_url
|
|
22
|
+
|
|
23
|
+
# RFC 4648 Base64 string of the logo image. The 300 KB limit applies to the decoded image, not to the string you send, so a valid string runs about a third larger. The decoded image must be one of image/jpeg, image/png, image/gif, image/tiff, image/webp, image/svg+xml, image/heic, image/heif, image/avif. A payload that cannot be decoded, is not one of those formats, or is over the size limit returns a `422`. A payload that is accepted here but still fails to render when the page loads falls back to the no-logo experience.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :file_base64
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'file_url' => :'file_url',
|
|
31
|
+
:'file_base64' => :'file_base64'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns attribute mapping this model knows about
|
|
36
|
+
def self.acceptable_attribute_map
|
|
37
|
+
attribute_map
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
acceptable_attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'file_url' => :'String',
|
|
49
|
+
:'file_base64' => :'String'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SignWell::EmbeddedBrandingRequestCompanyLogo` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SignWell::EmbeddedBrandingRequestCompanyLogo`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'file_url')
|
|
76
|
+
self.file_url = attributes[:'file_url']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'file_base64')
|
|
80
|
+
self.file_base64 = attributes[:'file_base64']
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
invalid_properties
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Check to see if the all the properties in the model are valid
|
|
94
|
+
# @return true if the model is valid
|
|
95
|
+
def valid?
|
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
97
|
+
true
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Checks equality by comparing each attribute.
|
|
101
|
+
# @param [Object] other Object to be compared
|
|
102
|
+
def ==(o)
|
|
103
|
+
return true if self.equal?(o)
|
|
104
|
+
self.class == o.class &&
|
|
105
|
+
file_url == o.file_url &&
|
|
106
|
+
file_base64 == o.file_base64
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# @see the `==` method
|
|
110
|
+
# @param [Object] other Object to be compared
|
|
111
|
+
def eql?(o)
|
|
112
|
+
self == o
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Calculates hash code according to all attributes.
|
|
116
|
+
# @return [Integer] Hash code
|
|
117
|
+
def hash
|
|
118
|
+
[file_url, file_base64].hash
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Builds the object from hash
|
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
123
|
+
# @return [Object] Returns the model itself
|
|
124
|
+
def self.build_from_hash(attributes)
|
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
|
126
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
127
|
+
transformed_hash = {}
|
|
128
|
+
openapi_types.each_pair do |key, type|
|
|
129
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
130
|
+
transformed_hash["#{key}"] = nil
|
|
131
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
132
|
+
# check to ensure the input is an array given that the attribute
|
|
133
|
+
# is documented as an array but the input is not
|
|
134
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
135
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
136
|
+
end
|
|
137
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
138
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
new(transformed_hash)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Deserializes the data based on type
|
|
145
|
+
# @param [String] type Data type
|
|
146
|
+
# @param [String] value Value to be deserialized
|
|
147
|
+
# @return [Object] Deserialized data
|
|
148
|
+
def self._deserialize(type, value)
|
|
149
|
+
case type.to_sym
|
|
150
|
+
when :Time
|
|
151
|
+
Time.parse(value)
|
|
152
|
+
when :Date
|
|
153
|
+
Date.parse(value)
|
|
154
|
+
when :String
|
|
155
|
+
value.to_s
|
|
156
|
+
when :Integer
|
|
157
|
+
value.to_i
|
|
158
|
+
when :Float
|
|
159
|
+
value.to_f
|
|
160
|
+
when :Boolean
|
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
162
|
+
true
|
|
163
|
+
else
|
|
164
|
+
false
|
|
165
|
+
end
|
|
166
|
+
when :Object
|
|
167
|
+
# generic object (usually a Hash), return directly
|
|
168
|
+
value
|
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
|
175
|
+
{}.tap do |hash|
|
|
176
|
+
value.each do |k, v|
|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
else # model
|
|
181
|
+
# models (e.g. Pet) or oneOf
|
|
182
|
+
klass = SignWell::Models.const_get(type)
|
|
183
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the string representation of the object
|
|
188
|
+
# @return [String] String presentation of the object
|
|
189
|
+
def to_s
|
|
190
|
+
to_hash.to_s
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_body
|
|
196
|
+
to_hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Returns the object in the form of hash
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_hash
|
|
202
|
+
normalize_for_serialization! if respond_to?(:normalize_for_serialization!, true)
|
|
203
|
+
|
|
204
|
+
hash = {}
|
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
206
|
+
value = self.send(attr)
|
|
207
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Outputs non-array value in the form of hash
|
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
219
|
+
# @param [Object] value Any valid value
|
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
|
221
|
+
def _to_hash(value)
|
|
222
|
+
if value.is_a?(Array)
|
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
|
224
|
+
elsif value.is_a?(Hash)
|
|
225
|
+
{}.tap do |hash|
|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
227
|
+
end
|
|
228
|
+
elsif value.respond_to? :to_hash
|
|
229
|
+
value.to_hash
|
|
230
|
+
else
|
|
231
|
+
value
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
end
|