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