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,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