@paydock/client-sdk 1.104.3-beta → 1.104.7-beta

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 (128) hide show
  1. package/README.md +729 -405
  2. package/bundles/index.cjs +29624 -8753
  3. package/bundles/index.cjs.d.ts +484 -381
  4. package/bundles/index.cjs.map +1 -1
  5. package/bundles/index.mjs +29624 -8753
  6. package/bundles/index.mjs.d.ts +484 -381
  7. package/bundles/index.mjs.map +1 -1
  8. package/bundles/types/api/api-base.d.ts +14 -6
  9. package/bundles/types/api/api-base.d.ts.map +1 -1
  10. package/bundles/types/api/api-service-internal.d.ts +2 -1
  11. package/bundles/types/api/api-service-internal.d.ts.map +1 -1
  12. package/bundles/types/api/api.d.ts +1 -1
  13. package/bundles/types/api/api.d.ts.map +1 -1
  14. package/bundles/types/canvas-3ds/canvas-3ds.d.ts +1 -1
  15. package/bundles/types/canvas-3ds/canvas-3ds.d.ts.map +1 -1
  16. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts +3 -3
  17. package/bundles/types/canvas-3ds/services/gpayments-service.d.ts.map +1 -1
  18. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts +1 -1
  19. package/bundles/types/checkout-button/afterpay/afterpay-checkout-button.d.ts.map +1 -1
  20. package/bundles/types/checkout-button/checkout-button.d.ts +1 -1
  21. package/bundles/types/checkout-button/checkout-button.d.ts.map +1 -1
  22. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts +1 -1
  23. package/bundles/types/checkout-button/paypal/paypal-checkout-button.d.ts.map +1 -1
  24. package/bundles/types/checkout-button/runner/popup.runner.d.ts +1 -1
  25. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts +1 -1
  26. package/bundles/types/checkout-button/zipmoney/zipmoney-checkout-button.d.ts.map +1 -1
  27. package/bundles/types/components/container.d.ts +1 -0
  28. package/bundles/types/components/container.d.ts.map +1 -1
  29. package/bundles/types/components/http-core.d.ts.map +1 -1
  30. package/bundles/types/components/iframe-event.d.ts +17 -11
  31. package/bundles/types/components/iframe-event.d.ts.map +1 -1
  32. package/bundles/types/components/link.d.ts +3 -2
  33. package/bundles/types/components/link.d.ts.map +1 -1
  34. package/bundles/types/components/param.d.ts +6 -8
  35. package/bundles/types/components/param.d.ts.map +1 -1
  36. package/bundles/types/components/wallet-background.d.ts +2 -1
  37. package/bundles/types/components/wallet-background.d.ts.map +1 -1
  38. package/bundles/types/configs/env/environment.cba.d.ts +1 -1
  39. package/bundles/types/configs/env/environment.cba.d.ts.map +1 -1
  40. package/bundles/types/configs/env/environment.paydock.d.ts +1 -1
  41. package/bundles/types/configs/env/environment.paydock.d.ts.map +1 -1
  42. package/bundles/types/constants/validators.d.ts +45 -0
  43. package/bundles/types/constants/validators.d.ts.map +1 -0
  44. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts +17 -13
  45. package/bundles/types/payment-source-widget/html-payment-source-widget.d.ts.map +1 -1
  46. package/bundles/types/payment-source-widget/payment-source-widget.d.ts +1 -1
  47. package/bundles/types/payment-source-widget/payment-source-widget.d.ts.map +1 -1
  48. package/bundles/types/secure-remote-commerce/index.d.ts +102 -1
  49. package/bundles/types/secure-remote-commerce/index.d.ts.map +1 -1
  50. package/bundles/types/secure-remote-commerce/interfaces.d.ts +109 -32
  51. package/bundles/types/secure-remote-commerce/interfaces.d.ts.map +1 -1
  52. package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +31 -0
  53. package/bundles/types/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts.map +1 -0
  54. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts +2 -0
  55. package/bundles/types/secure-remote-commerce/providers/mastercard-src/index.d.ts.map +1 -0
  56. package/bundles/types/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +5 -8
  57. package/bundles/types/secure-remote-commerce/providers/mastercard-src/mastercard-src.d.ts.map +1 -0
  58. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
  59. package/bundles/types/secure-remote-commerce/secure-remote-commerce.d.ts.map +1 -1
  60. package/bundles/types/shared/http/http-request.d.ts +14 -0
  61. package/bundles/types/shared/http/http-request.d.ts.map +1 -0
  62. package/bundles/types/shared/http/index.d.ts +2 -0
  63. package/bundles/types/shared/http/index.d.ts.map +1 -0
  64. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts +15 -0
  65. package/bundles/types/shared/services/instrumentation/instrumentation.agent.d.ts.map +1 -0
  66. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts +66 -0
  67. package/bundles/types/shared/services/instrumentation/instrumentation.config.d.ts.map +1 -0
  68. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts +14 -0
  69. package/bundles/types/shared/services/instrumentation/instrumentation.types.d.ts.map +1 -0
  70. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts +15 -0
  71. package/bundles/types/shared/services/instrumentation/repositories/action.repository.d.ts.map +1 -0
  72. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts +23 -0
  73. package/bundles/types/shared/services/instrumentation/repositories/error.repository.d.ts.map +1 -0
  74. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts +15 -0
  75. package/bundles/types/shared/services/instrumentation/repositories/event.repository.d.ts.map +1 -0
  76. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts +4 -0
  77. package/bundles/types/shared/services/instrumentation/repositories/index.d.ts.map +1 -0
  78. package/bundles/types/vault-display-widget/vault-display-widget.d.ts +1 -1
  79. package/bundles/types/vault-display-widget/vault-display-widget.d.ts.map +1 -1
  80. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts +2 -0
  81. package/bundles/types/wallet-buttons/apple.wallet-service.d.ts.map +1 -1
  82. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts +8 -1
  83. package/bundles/types/wallet-buttons/flypay-v2.wallet-service.d.ts.map +1 -1
  84. package/bundles/types/wallet-buttons/google.wallet-service.d.ts +7 -4
  85. package/bundles/types/wallet-buttons/google.wallet-service.d.ts.map +1 -1
  86. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts +4 -0
  87. package/bundles/types/wallet-buttons/helpers/flypay-v2.helper.d.ts.map +1 -0
  88. package/bundles/types/wallet-buttons/index.d.ts +126 -0
  89. package/bundles/types/wallet-buttons/index.d.ts.map +1 -1
  90. package/bundles/types/wallet-buttons/interfaces.d.ts +3 -0
  91. package/bundles/types/wallet-buttons/interfaces.d.ts.map +1 -1
  92. package/bundles/types/wallet-buttons/paypal.wallet-service.d.ts.map +1 -1
  93. package/bundles/types/wallet-buttons/wallet-buttons.d.ts +63 -121
  94. package/bundles/types/wallet-buttons/wallet-buttons.d.ts.map +1 -1
  95. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts +1 -1
  96. package/bundles/types/wallet-buttons/wallet-cba-buttons.d.ts.map +1 -1
  97. package/bundles/types/wallet-buttons/wallet-service.d.ts +7 -0
  98. package/bundles/types/wallet-buttons/wallet-service.d.ts.map +1 -1
  99. package/bundles/types/widget/configuration.d.ts +1 -1
  100. package/bundles/types/widget/configuration.d.ts.map +1 -1
  101. package/bundles/types/widget/html-multi-widget.d.ts +147 -76
  102. package/bundles/types/widget/html-multi-widget.d.ts.map +1 -1
  103. package/bundles/types/widget/html-widget.d.ts +1 -1
  104. package/bundles/types/widget/html-widget.d.ts.map +1 -1
  105. package/bundles/types/widget/multi-widget.d.ts.map +1 -1
  106. package/bundles/widget.umd.js +29624 -8753
  107. package/bundles/widget.umd.js.d.ts +484 -381
  108. package/bundles/widget.umd.js.map +1 -1
  109. package/bundles/widget.umd.js.min.d.ts +484 -381
  110. package/bundles/widget.umd.min.js +62 -1
  111. package/bundles/widget.umd.min.js.map +1 -1
  112. package/docs/api-ps-widget.md +12 -12
  113. package/docs/api-widget.md +211 -156
  114. package/docs/license.md +1 -1
  115. package/docs/secure-remote-commerce-examples.md +75 -101
  116. package/docs/secure-remote-commerce.md +185 -114
  117. package/docs/wallet-buttons-examples.md +48 -19
  118. package/docs/wallet-buttons.md +197 -2
  119. package/examples/multi-html-widget/simple.html +2 -1
  120. package/package.json +18 -15
  121. package/slate.md +123 -120
  122. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -8
  123. package/bundles/types/secure-remote-commerce/providers/visa-src/helper.d.ts.map +0 -1
  124. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts +0 -2
  125. package/bundles/types/secure-remote-commerce/providers/visa-src/index.d.ts.map +0 -1
  126. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.d.ts.map +0 -1
  127. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -9
  128. package/bundles/types/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts.map +0 -1
@@ -51,6 +51,12 @@
51
51
  <dt><a href="#user-content-w_STYLABLE_ELEMENT_STATE">STYLABLE_ELEMENT_STATE</a> : <code>object</code></dt>
52
52
  <dd><p>Current constant include available states of element for styling</p>
53
53
  </dd>
54
+ <dt><a href="#user-content-w_CARD_VALIDATORS">CARD_VALIDATORS</a> : <code>Record.&lt;string, string&gt;</code></dt>
55
+ <dd><p>List of available form field validators dedicated to cards and their definition</p>
56
+ </dd>
57
+ <dt><a href="#user-content-w_GENERIC_VALIDATORS">GENERIC_VALIDATORS</a> : <code>Record.&lt;string, string&gt;</code></dt>
58
+ <dd><p>List of available generic form field validators and their definition</p>
59
+ </dd>
54
60
  <dt><a href="#user-content-w_TRIGGER">TRIGGER</a> : <code>object</code></dt>
55
61
  <dd><p>List of available triggers</p>
56
62
  </dd>
@@ -63,7 +69,8 @@
63
69
  <dd><p>Interface of data from validation event.</p>
64
70
  </dd>
65
71
  <dt><a href="#user-content-w_IEventMetaData">IEventMetaData</a></dt>
66
- <dd><p>Interface of data from event.</p>
72
+ <dd><p>Contains basic information associated with the event and additional meta data
73
+ specific to the event. E.g., card info, gateway info, etc.</p>
67
74
  </dd>
68
75
  <dt><a href="#user-content-w_IEventAfterLoadData">IEventAfterLoadData</a></dt>
69
76
  <dd><p>Interface of data from event.</p>
@@ -112,33 +119,34 @@ Interface of data from validation event.
112
119
 
113
120
  | Param | Type | Description |
114
121
  | --- | --- | --- |
115
- | event | <code>string</code> | Event name |
116
- | purpose | <code>string</code> | System variable. Purpose of event |
117
- | message_source | <code>string</code> | System variable. Event source |
118
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
119
- | [form_valid] | <code>boolean</code> | Form is valid |
120
- | [invalid_fields] | <code>array</code> | Invalid form fields |
121
- | [invalid_showed_fields] | <code>array</code> | List of fields on which the error is already displayed |
122
- | [validators] | <code>array</code> | List of validators with fields |
122
+ | event | <code>string</code> | The name of the event. |
123
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
124
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
125
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
126
+ | [form_valid] | <code>boolean</code> | Indicates wether or not the form is valid. |
127
+ | [invalid_fields] | <code>Array.&lt;string&gt;</code> | Names of form fields with invalid data. |
128
+ | [invalid_showed_fields] | <code>Array.&lt;string&gt;</code> | Names of invalid form fields which are already displaying the error. |
129
+ | [validators] | <code>Partial.&lt;Record.&lt;(CardValidatorValue\|GenericValidatorValue), Array.&lt;string&gt;&gt;&gt;</code> | Object containing validator identifiers as keys and the fields subject to that validator as an array of form field names. See list of available [Generic Vallidators](#user-content-w_GENERIC_VALIDATORS) and [Card Validators](#user-content-w_CARD_VALIDATORS), |
123
130
 
124
131
  <a name="w_IEventMetaData" id="w_IEventMetaData" href="#user-content-w_IEventMetaData">&nbsp;</a>
125
132
 
126
133
  ## IEventMetaData
127
- Interface of data from event.
134
+ Contains basic information associated with the event and additional meta data
135
+ specific to the event. E.g., card info, gateway info, etc.
128
136
 
129
137
  **Kind**: global interface
130
138
 
131
139
  | Param | Type | Description |
132
140
  | --- | --- | --- |
133
- | event | <code>string</code> | Event name |
134
- | purpose | <code>string</code> | System variable. Purpose of event |
135
- | message_source | <code>string</code> | System variable. Event source |
136
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
141
+ | event | <code>string</code> | The name of the event. |
142
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
143
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
144
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
137
145
  | configuration_token | <code>string</code> | Token received from our API with widget data |
138
146
  | type | <code>string</code> | Payment type 'card', 'bank_account' |
139
147
  | gateway_type | <code>string</code> | Gateway type |
140
148
  | [card_number_last4] | <code>string</code> | Last 4 digit of your card |
141
- | [card_scheme] | <code>string</code> | Card scheme |
149
+ | [card_scheme] | <code>string</code> | Card scheme, e.g., (Visa, Mastercard and American Express (AmEx)) |
142
150
  | [card_number_length] | <code>number</code> | Card number length |
143
151
  | [account_name] | <code>string</code> | Bank account account name |
144
152
  | [account_number] | <code>string</code> | Bank account account number |
@@ -152,10 +160,10 @@ Interface of data from event.
152
160
 
153
161
  | Param | Type | Description |
154
162
  | --- | --- | --- |
155
- | event | <code>string</code> | Event name |
156
- | purpose | <code>string</code> | System variable. Purpose of event |
157
- | message_source | <code>string</code> | System variable. Event source |
158
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
163
+ | event | <code>string</code> | The name of the event. |
164
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
165
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
166
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
159
167
 
160
168
  <a name="w_IEventFinishData" id="w_IEventFinishData" href="#user-content-w_IEventFinishData">&nbsp;</a>
161
169
 
@@ -166,10 +174,10 @@ Interface of data from event.
166
174
 
167
175
  | Param | Type | Description |
168
176
  | --- | --- | --- |
169
- | event | <code>string</code> | Event name |
170
- | purpose | <code>string</code> | System variable. Purpose of event |
171
- | message_source | <code>string</code> | System variable. Event source |
172
- | [ref_id] | <code>string</code> | Custom value for identify result of processed operation |
177
+ | event | <code>string</code> | The name of the event. |
178
+ | purpose | <code>string</code> | A system variable that states the purpose of the event. |
179
+ | message_source | <code>string</code> | A system variable that identifies the event source. |
180
+ | [ref_id] | <code>string</code> | Custom unique value that identifies result of processed operation. |
173
181
  | payment_source | <code>string</code> | One time token. Result from this endpoint [API docs](https://docs.paydock.com/#tokens) |
174
182
 
175
183
  <a name="w_IPayPalMeta" id="w_IPayPalMeta" href="#user-content-w_IPayPalMeta">&nbsp;</a>
@@ -383,7 +391,7 @@ Class Widget include method for working on html and include extended by HtmlMult
383
391
  * [.setFormElements(elements)](#user-content-w_HtmlWidget+setFormElements)
384
392
  * [.setMeta(object)](#user-content-w_HtmlWidget+setMeta)
385
393
  * [.load()](#user-content-w_HtmlMultiWidget+load)
386
- * [.on(eventName, [cb])](#user-content-w_HtmlMultiWidget+on) ⇒ <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
394
+ * [.afterLoad()](#user-content-w_HtmlMultiWidget+afterLoad)
387
395
  * [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
388
396
  * [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
389
397
  * [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
@@ -396,6 +404,7 @@ Class Widget include method for working on html and include extended by HtmlMult
396
404
  * [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
397
405
  * [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
398
406
  * [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
407
+ * [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
399
408
  * [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
400
409
  * [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
401
410
  * [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
@@ -560,51 +569,38 @@ config.setMeta({
560
569
  <a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load">&nbsp;</a>
561
570
 
562
571
  ### htmlWidget.load()
563
- The final method to beginning, the load process of widget to html
572
+ Loads the widget.
573
+
574
+ Calling this method results in an iframe element being inserted and rendered in the DOM.
564
575
 
565
576
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
566
577
  **Overrides**: [<code>load</code>](#user-content-w_HtmlMultiWidget+load)
567
- <a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on">&nbsp;</a>
578
+ <a name="w_HtmlMultiWidget+afterLoad" id="w_HtmlMultiWidget+afterLoad" href="#user-content-w_HtmlMultiWidget+afterLoad">&nbsp;</a>
568
579
 
569
- ### htmlWidget.on(eventName, [cb]) ⇒ <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
570
- Listen to events of widget
580
+ ### htmlWidget.afterLoad()
581
+ Registers a form validation callback for validation events.
571
582
 
572
583
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
573
- **Overrides**: [<code>on</code>](#user-content-w_HtmlMultiWidget+on)
574
-
575
- | Param | Type | Description |
576
- | --- | --- | --- |
577
- | eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
578
- | [cb] | <code>listener</code> | |
579
-
580
- **Example**
581
-
582
- ```javascript
583
- widget.on('form_submit', function (data) {
584
- console.log(data);
585
- });
586
- // or
587
- widget.on('form_submit').then(function (data) {
588
- console.log(data);
589
- });
590
- ```
584
+ **Overrides**: [<code>afterLoad</code>](#user-content-w_HtmlMultiWidget+afterLoad)
591
585
  <a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger">&nbsp;</a>
592
586
 
593
587
  ### htmlWidget.trigger(triggers, data)
594
- This callback will be called for every trigger
588
+ Registers callback that will be invoked for every trigger.
595
589
 
596
590
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
597
591
  **Overrides**: [<code>trigger</code>](#user-content-w_HtmlMultiWidget+trigger)
598
592
 
599
593
  | Param | Type | Description |
600
594
  | --- | --- | --- |
601
- | triggers | <code>triggerName</code> | submit_form, tab |
602
- | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | which will be sending to widget |
595
+ | triggers | <code>&#x27;submit\_form&#x27;</code> \| <code>&#x27;tab&#x27;</code> | The Widget element identifier that caused the trigger. |
596
+ | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | Data that will be sent to the widget when the trigger occurs. |
603
597
 
604
598
  <a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState">&nbsp;</a>
605
599
 
606
600
  ### htmlWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
607
- Using this method you can get validation state information
601
+ Gets a reference to the form current validation state.
602
+
603
+ !Warning: do not directly modify the values of the returned object.
608
604
 
609
605
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
610
606
  **Overrides**: [<code>getValidationState</code>](#user-content-w_HtmlMultiWidget+getValidationState)
@@ -612,11 +608,13 @@ Using this method you can get validation state information
612
608
  <a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm">&nbsp;</a>
613
609
 
614
610
  ### htmlWidget.isValidForm() ⇒ <code>boolean</code>
615
- Using this method you can check if the form is valid
611
+ Checks if a given form is valid.
612
+
613
+ A form is valid if all form fields are valid.
616
614
 
617
615
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
618
616
  **Overrides**: [<code>isValidForm</code>](#user-content-w_HtmlMultiWidget+isValidForm)
619
- **Returns**: <code>boolean</code> - Form is valid
617
+ **Returns**: <code>boolean</code> - Indicates wether or not form is valid.
620
618
  <a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField">&nbsp;</a>
621
619
 
622
620
  ### htmlWidget.isInvalidField(field) ⇒ <code>boolean</code>
@@ -633,92 +631,96 @@ Using this method you can check if a specific form field is invalid
633
631
  <a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed">&nbsp;</a>
634
632
 
635
633
  ### htmlWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
636
- Using this method you can check if an error is displayed on a specific field
634
+ Checks if a given form field is displaying an error.
637
635
 
638
636
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
639
637
  **Overrides**: [<code>isFieldErrorShowed</code>](#user-content-w_HtmlMultiWidget+isFieldErrorShowed)
640
- **Returns**: <code>boolean</code> - Error is showed on field
638
+ **Returns**: <code>boolean</code> - Indicates wether or not the Error message is being displayed on the associated field.
641
639
 
642
640
  | Param | Type | Description |
643
641
  | --- | --- | --- |
644
- | field | <code>string</code> | Field name |
642
+ | field | <code>string</code> | The form field name |
645
643
 
646
644
  <a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator">&nbsp;</a>
647
645
 
648
646
  ### htmlWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
649
- Using this method you can check if a specific field is invalid
647
+ Checks if a given form field is valid or invalid by name.
650
648
 
651
649
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
652
650
  **Overrides**: [<code>isInvalidFieldByValidator</code>](#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator)
653
- **Returns**: <code>boolean</code> - Field is invalid by validator
651
+ **Returns**: <code>boolean</code> - Indicates wether or not the field is invalid based on validator intepretation.
654
652
 
655
653
  | Param | Type | Description |
656
654
  | --- | --- | --- |
657
- | field | <code>string</code> | Field name |
658
- | validator | <code>string</code> | Validator name. Available validators: `required, cardNumberValidator, expireDateValidation` |
655
+ | field | <code>string</code> | The form field name |
656
+ | validator | | The name of the validator. |
659
657
 
660
658
  <a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide">&nbsp;</a>
661
659
 
662
660
  ### htmlWidget.hide([saveSize])
663
- Using this method you can hide widget after load
661
+ Hides the widget.
662
+
663
+ E.g., use this method to hide the widget after it loads.
664
664
 
665
665
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
666
666
  **Overrides**: [<code>hide</code>](#user-content-w_HtmlMultiWidget+hide)
667
667
 
668
668
  | Param | Type | Default | Description |
669
669
  | --- | --- | --- | --- |
670
- | [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size |
670
+ | [saveSize] | <code>boolean</code> | <code>false</code> | Wether the original iframe element size should be saved before being hidden. |
671
671
 
672
672
  <a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show">&nbsp;</a>
673
673
 
674
674
  ### htmlWidget.show()
675
- Using this method you can show widget after using hide method
675
+ Shows the widget.
676
+
677
+ E.g., use this method to show the widget after it was explicitly hidden.
676
678
 
677
679
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
678
680
  **Overrides**: [<code>show</code>](#user-content-w_HtmlMultiWidget+show)
679
681
  <a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload">&nbsp;</a>
680
682
 
681
683
  ### htmlWidget.reload()
682
- Using this method you can reload widget
684
+ Reloads the widget.
683
685
 
684
686
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
685
687
  **Overrides**: [<code>reload</code>](#user-content-w_HtmlMultiWidget+reload)
686
688
  <a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements">&nbsp;</a>
687
689
 
688
690
  ### htmlWidget.hideElements(elements)
689
- Using this method you can hide any elements inside widget
691
+ Hides the specified Widget elements by their identifier.
690
692
 
691
693
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
692
694
  **Overrides**: [<code>hideElements</code>](#user-content-w_HtmlMultiWidget+hideElements)
693
695
 
694
696
  | Param | Type | Description |
695
697
  | --- | --- | --- |
696
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
698
+ | elements | <code>Array.&lt;string&gt;</code> | List of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
697
699
 
698
700
  **Example**
699
-
700
701
  ```javascript
701
702
  widget.hideElements(['submit_button', 'email']);
702
703
  ```
703
704
  <a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements">&nbsp;</a>
704
705
 
705
706
  ### htmlWidget.showElements(elements)
706
- Using this method you can show any elements inside widget
707
-
708
- * @example
709
- widget.showElements(['submit_button', 'email']);
707
+ Shows the specified Widget elements by their identifier.
710
708
 
711
709
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
712
710
  **Overrides**: [<code>showElements</code>](#user-content-w_HtmlMultiWidget+showElements)
713
711
 
714
712
  | Param | Type | Description |
715
713
  | --- | --- | --- |
716
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
714
+ | elements | <code>Array.&lt;string&gt;</code> | List of elements which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
717
715
 
716
+ **Example**
717
+ ```javascript
718
+ widget.showElements(['submit_button', 'email']);
719
+ ```
718
720
  <a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues">&nbsp;</a>
719
721
 
720
722
  ### htmlWidget.updateFormValues(fieldValues)
721
- Method for update values for form fields inside the widget
723
+ Updates the form field values inside the widget.
722
724
 
723
725
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
724
726
  **Overrides**: [<code>updateFormValues</code>](#user-content-w_HtmlMultiWidget+updateFormValues)
@@ -728,53 +730,71 @@ Method for update values for form fields inside the widget
728
730
  | fieldValues | <code>IFormValues</code> | Fields with values |
729
731
 
730
732
  **Example**
731
-
732
733
  ```javascript
733
734
  widget.updateFormValues({
734
- email: 'predefined@email.com',
735
- card_name: 'Houston'
736
- });
735
+ email: 'predefined@email.com',
736
+ card_name: 'Houston'
737
+ });
738
+ ```
739
+ <a name="w_HtmlMultiWidget+updateFormValue" id="w_HtmlMultiWidget+updateFormValue" href="#user-content-w_HtmlMultiWidget+updateFormValue">&nbsp;</a>
740
+
741
+ ### htmlWidget.updateFormValue(key, value)
742
+ Updates a single form field values inside the widget by the form field name.
743
+
744
+ **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
745
+ **Overrides**: [<code>updateFormValue</code>](#user-content-w_HtmlMultiWidget+updateFormValue)
746
+
747
+ | Param | Type | Description |
748
+ | --- | --- | --- |
749
+ | key | <code>string</code> | The form field name |
750
+ | value | <code>string</code> | The form field value |
751
+
752
+ **Example**
753
+ ```javascript
754
+ widget.updateFormValue("card_name", "John Doe");
737
755
  ```
738
756
  <a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert">&nbsp;</a>
739
757
 
740
758
  ### htmlWidget.onFinishInsert(selector, dataType)
741
- After finish event of widget, data (dataType) will be insert to input (selector)
759
+ Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
742
760
 
743
761
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
744
762
  **Overrides**: [<code>onFinishInsert</code>](#user-content-w_HtmlMultiWidget+onFinishInsert)
745
763
 
746
764
  | Param | Type | Description |
747
765
  | --- | --- | --- |
748
- | selector | <code>string</code> | css selector . [] # |
749
- | dataType | <code>string</code> | data type of IEventData object. |
766
+ | selector | <code>string</code> | A CSS selector. E.g., ".my-class", "#my-id", or others |
767
+ | dataType | <code>string</code> | The data type of IEventData object. |
750
768
 
751
769
  <a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm">&nbsp;</a>
752
770
 
753
771
  ### htmlWidget.interceptSubmitForm(selector)
754
- Widget will intercept submit of your form for processing widget
772
+ Intercepts a form submission and delegates processing to the widget.
755
773
 
756
- Process: click by submit button in your form --> submit widget ---> submit your form
774
+ An simplified example of the process:
775
+ - User clicks submit button in your form
776
+ - This implicitly triggers a submission to the widget
777
+ - The widget submits your form
757
778
 
758
779
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
759
780
  **Overrides**: [<code>interceptSubmitForm</code>](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
760
- **Note**: submit button in widget will be hidden.
781
+ **Note**: The widget's submit button will be hidden.
761
782
 
762
783
  | Param | Type | Description |
763
784
  | --- | --- | --- |
764
785
  | selector | <code>string</code> | css selector of your form |
765
786
 
766
787
  **Example**
767
-
768
- ```javascript
769
- <form id="myForm">
788
+ ```html
789
+ <body>
790
+ <form id="myForm">
770
791
  <input name="amount">
771
792
  <button type="submit">Submit</button>
772
793
  </form>
773
- <!--
774
- -->
775
- <script>
794
+ <script>
776
795
  widget.interceptSubmitForm('#myForm');
777
- </script>
796
+ </script>
797
+ </body>
778
798
  ```
779
799
  <a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit">&nbsp;</a>
780
800
 
@@ -791,7 +811,6 @@ Use this method for resize iFrame according content height
791
811
  **Kind**: instance method of [<code>HtmlWidget</code>](#user-content-w_HtmlWidget)
792
812
  **Overrides**: [<code>useAutoResize</code>](#user-content-w_HtmlMultiWidget+useAutoResize)
793
813
  **Example**
794
-
795
814
  ```javascript
796
815
  widget.useAutoResize();
797
816
  ```
@@ -1096,7 +1115,7 @@ Class HtmlMultiWidget include method for working with html
1096
1115
  * [HtmlMultiWidget](#user-content-w_HtmlMultiWidget) ⇐ [<code>MultiWidget</code>](#user-content-w_MultiWidget)
1097
1116
  * [new HtmlMultiWidget(selector, publicKey, conf)](#user-content-w_new_HtmlMultiWidget_new)
1098
1117
  * [.load()](#user-content-w_HtmlMultiWidget+load)
1099
- * [.on(eventName, [cb])](#user-content-w_HtmlMultiWidget+on) ⇒ <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
1118
+ * [.afterLoad()](#user-content-w_HtmlMultiWidget+afterLoad)
1100
1119
  * [.trigger(triggers, data)](#user-content-w_HtmlMultiWidget+trigger)
1101
1120
  * [.getValidationState()](#user-content-w_HtmlMultiWidget+getValidationState) ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
1102
1121
  * [.isValidForm()](#user-content-w_HtmlMultiWidget+isValidForm) ⇒ <code>boolean</code>
@@ -1109,6 +1128,7 @@ Class HtmlMultiWidget include method for working with html
1109
1128
  * [.hideElements(elements)](#user-content-w_HtmlMultiWidget+hideElements)
1110
1129
  * [.showElements(elements)](#user-content-w_HtmlMultiWidget+showElements)
1111
1130
  * [.updateFormValues(fieldValues)](#user-content-w_HtmlMultiWidget+updateFormValues)
1131
+ * [.updateFormValue(key, value)](#user-content-w_HtmlMultiWidget+updateFormValue)
1112
1132
  * [.onFinishInsert(selector, dataType)](#user-content-w_HtmlMultiWidget+onFinishInsert)
1113
1133
  * [.interceptSubmitForm(selector)](#user-content-w_HtmlMultiWidget+interceptSubmitForm)
1114
1134
  * [.useCheckoutAutoSubmit()](#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit)
@@ -1159,58 +1179,47 @@ var widget = new MultiWidget('#widget', 'publicKey',[ With Configurations
1159
1179
  <a name="w_HtmlMultiWidget+load" id="w_HtmlMultiWidget+load" href="#user-content-w_HtmlMultiWidget+load">&nbsp;</a>
1160
1180
 
1161
1181
  ### htmlMultiWidget.load()
1162
- The final method to beginning, the load process of widget to html
1163
-
1164
- **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1165
- <a name="w_HtmlMultiWidget+on" id="w_HtmlMultiWidget+on" href="#user-content-w_HtmlMultiWidget+on">&nbsp;</a>
1182
+ Loads the widget.
1166
1183
 
1167
- ### htmlMultiWidget.on(eventName, [cb]) <code>Promise.&lt;(IEventData\|IEventMetaData\|IEventFinishData\|IFormValidation)&gt;</code> \| <code>void</code>
1168
- Listen to events of widget
1184
+ Calling this method results in an iframe element being inserted and rendered in the DOM.
1169
1185
 
1170
1186
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1187
+ <a name="w_HtmlMultiWidget+afterLoad" id="w_HtmlMultiWidget+afterLoad" href="#user-content-w_HtmlMultiWidget+afterLoad">&nbsp;</a>
1171
1188
 
1172
- | Param | Type | Description |
1173
- | --- | --- | --- |
1174
- | eventName | <code>string</code> | Available event names [EVENT](#user-content-w_EVENT) |
1175
- | [cb] | <code>listener</code> | |
1176
-
1177
- **Example**
1189
+ ### htmlMultiWidget.afterLoad()
1190
+ Registers a form validation callback for validation events.
1178
1191
 
1179
- ```javascript
1180
- widget.on('form_submit', function (data) {
1181
- console.log(data);
1182
- });
1183
- // or
1184
- widget.on('form_submit').then(function (data) {
1185
- console.log(data);
1186
- });
1187
- ```
1192
+ **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1188
1193
  <a name="w_HtmlMultiWidget+trigger" id="w_HtmlMultiWidget+trigger" href="#user-content-w_HtmlMultiWidget+trigger">&nbsp;</a>
1189
1194
 
1190
1195
  ### htmlMultiWidget.trigger(triggers, data)
1191
- This callback will be called for every trigger
1196
+ Registers callback that will be invoked for every trigger.
1192
1197
 
1193
1198
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1194
1199
 
1195
1200
  | Param | Type | Description |
1196
1201
  | --- | --- | --- |
1197
- | triggers | <code>triggerName</code> | submit_form, tab |
1198
- | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | which will be sending to widget |
1202
+ | triggers | <code>&#x27;submit\_form&#x27;</code> \| <code>&#x27;tab&#x27;</code> | The Widget element identifier that caused the trigger. |
1203
+ | data | [<code>ITriggerData</code>](#user-content-w_ITriggerData) | Data that will be sent to the widget when the trigger occurs. |
1199
1204
 
1200
1205
  <a name="w_HtmlMultiWidget+getValidationState" id="w_HtmlMultiWidget+getValidationState" href="#user-content-w_HtmlMultiWidget+getValidationState">&nbsp;</a>
1201
1206
 
1202
1207
  ### htmlMultiWidget.getValidationState() ⇒ [<code>IFormValidation</code>](#user-content-w_IFormValidation)
1203
- Using this method you can get validation state information
1208
+ Gets a reference to the form current validation state.
1209
+
1210
+ !Warning: do not directly modify the values of the returned object.
1204
1211
 
1205
1212
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1206
1213
  **Returns**: [<code>IFormValidation</code>](#user-content-w_IFormValidation) - Form validation object
1207
1214
  <a name="w_HtmlMultiWidget+isValidForm" id="w_HtmlMultiWidget+isValidForm" href="#user-content-w_HtmlMultiWidget+isValidForm">&nbsp;</a>
1208
1215
 
1209
1216
  ### htmlMultiWidget.isValidForm() ⇒ <code>boolean</code>
1210
- Using this method you can check if the form is valid
1217
+ Checks if a given form is valid.
1218
+
1219
+ A form is valid if all form fields are valid.
1211
1220
 
1212
1221
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1213
- **Returns**: <code>boolean</code> - Form is valid
1222
+ **Returns**: <code>boolean</code> - Indicates wether or not form is valid.
1214
1223
  <a name="w_HtmlMultiWidget+isInvalidField" id="w_HtmlMultiWidget+isInvalidField" href="#user-content-w_HtmlMultiWidget+isInvalidField">&nbsp;</a>
1215
1224
 
1216
1225
  ### htmlMultiWidget.isInvalidField(field) ⇒ <code>boolean</code>
@@ -1226,85 +1235,89 @@ Using this method you can check if a specific form field is invalid
1226
1235
  <a name="w_HtmlMultiWidget+isFieldErrorShowed" id="w_HtmlMultiWidget+isFieldErrorShowed" href="#user-content-w_HtmlMultiWidget+isFieldErrorShowed">&nbsp;</a>
1227
1236
 
1228
1237
  ### htmlMultiWidget.isFieldErrorShowed(field) ⇒ <code>boolean</code>
1229
- Using this method you can check if an error is displayed on a specific field
1238
+ Checks if a given form field is displaying an error.
1230
1239
 
1231
1240
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1232
- **Returns**: <code>boolean</code> - Error is showed on field
1241
+ **Returns**: <code>boolean</code> - Indicates wether or not the Error message is being displayed on the associated field.
1233
1242
 
1234
1243
  | Param | Type | Description |
1235
1244
  | --- | --- | --- |
1236
- | field | <code>string</code> | Field name |
1245
+ | field | <code>string</code> | The form field name |
1237
1246
 
1238
1247
  <a name="w_HtmlMultiWidget+isInvalidFieldByValidator" id="w_HtmlMultiWidget+isInvalidFieldByValidator" href="#user-content-w_HtmlMultiWidget+isInvalidFieldByValidator">&nbsp;</a>
1239
1248
 
1240
1249
  ### htmlMultiWidget.isInvalidFieldByValidator(field, validator) ⇒ <code>boolean</code>
1241
- Using this method you can check if a specific field is invalid
1250
+ Checks if a given form field is valid or invalid by name.
1242
1251
 
1243
1252
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1244
- **Returns**: <code>boolean</code> - Field is invalid by validator
1253
+ **Returns**: <code>boolean</code> - Indicates wether or not the field is invalid based on validator intepretation.
1245
1254
 
1246
1255
  | Param | Type | Description |
1247
1256
  | --- | --- | --- |
1248
- | field | <code>string</code> | Field name |
1249
- | validator | <code>string</code> | Validator name. Available validators: `required, cardNumberValidator, expireDateValidation` |
1257
+ | field | <code>string</code> | The form field name |
1258
+ | validator | | The name of the validator. |
1250
1259
 
1251
1260
  <a name="w_HtmlMultiWidget+hide" id="w_HtmlMultiWidget+hide" href="#user-content-w_HtmlMultiWidget+hide">&nbsp;</a>
1252
1261
 
1253
1262
  ### htmlMultiWidget.hide([saveSize])
1254
- Using this method you can hide widget after load
1263
+ Hides the widget.
1264
+
1265
+ E.g., use this method to hide the widget after it loads.
1255
1266
 
1256
1267
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1257
1268
 
1258
1269
  | Param | Type | Default | Description |
1259
1270
  | --- | --- | --- | --- |
1260
- | [saveSize] | <code>boolean</code> | <code>false</code> | using this param you can save iframe's size |
1271
+ | [saveSize] | <code>boolean</code> | <code>false</code> | Wether the original iframe element size should be saved before being hidden. |
1261
1272
 
1262
1273
  <a name="w_HtmlMultiWidget+show" id="w_HtmlMultiWidget+show" href="#user-content-w_HtmlMultiWidget+show">&nbsp;</a>
1263
1274
 
1264
1275
  ### htmlMultiWidget.show()
1265
- Using this method you can show widget after using hide method
1276
+ Shows the widget.
1277
+
1278
+ E.g., use this method to show the widget after it was explicitly hidden.
1266
1279
 
1267
1280
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1268
1281
  <a name="w_HtmlMultiWidget+reload" id="w_HtmlMultiWidget+reload" href="#user-content-w_HtmlMultiWidget+reload">&nbsp;</a>
1269
1282
 
1270
1283
  ### htmlMultiWidget.reload()
1271
- Using this method you can reload widget
1284
+ Reloads the widget.
1272
1285
 
1273
1286
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1274
1287
  <a name="w_HtmlMultiWidget+hideElements" id="w_HtmlMultiWidget+hideElements" href="#user-content-w_HtmlMultiWidget+hideElements">&nbsp;</a>
1275
1288
 
1276
1289
  ### htmlMultiWidget.hideElements(elements)
1277
- Using this method you can hide any elements inside widget
1290
+ Hides the specified Widget elements by their identifier.
1278
1291
 
1279
1292
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1280
1293
 
1281
1294
  | Param | Type | Description |
1282
1295
  | --- | --- | --- |
1283
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1296
+ | elements | <code>Array.&lt;string&gt;</code> | List of element which can be hidden [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1284
1297
 
1285
1298
  **Example**
1286
-
1287
1299
  ```javascript
1288
1300
  widget.hideElements(['submit_button', 'email']);
1289
1301
  ```
1290
1302
  <a name="w_HtmlMultiWidget+showElements" id="w_HtmlMultiWidget+showElements" href="#user-content-w_HtmlMultiWidget+showElements">&nbsp;</a>
1291
1303
 
1292
1304
  ### htmlMultiWidget.showElements(elements)
1293
- Using this method you can show any elements inside widget
1294
-
1295
- * @example
1296
- widget.showElements(['submit_button', 'email']);
1305
+ Shows the specified Widget elements by their identifier.
1297
1306
 
1298
1307
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1299
1308
 
1300
1309
  | Param | Type | Description |
1301
1310
  | --- | --- | --- |
1302
- | elements | <code>Array.&lt;string&gt;</code> | list of element which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1311
+ | elements | <code>Array.&lt;string&gt;</code> | List of elements which can be showed [ELEMENT](#user-content-w_ELEMENT) || [FORM_FIELD](#user-content-w_FORM_FIELD) |
1303
1312
 
1313
+ **Example**
1314
+ ```javascript
1315
+ widget.showElements(['submit_button', 'email']);
1316
+ ```
1304
1317
  <a name="w_HtmlMultiWidget+updateFormValues" id="w_HtmlMultiWidget+updateFormValues" href="#user-content-w_HtmlMultiWidget+updateFormValues">&nbsp;</a>
1305
1318
 
1306
1319
  ### htmlMultiWidget.updateFormValues(fieldValues)
1307
- Method for update values for form fields inside the widget
1320
+ Updates the form field values inside the widget.
1308
1321
 
1309
1322
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1310
1323
 
@@ -1313,51 +1326,68 @@ Method for update values for form fields inside the widget
1313
1326
  | fieldValues | <code>IFormValues</code> | Fields with values |
1314
1327
 
1315
1328
  **Example**
1316
-
1317
1329
  ```javascript
1318
1330
  widget.updateFormValues({
1319
- email: 'predefined@email.com',
1320
- card_name: 'Houston'
1321
- });
1331
+ email: 'predefined@email.com',
1332
+ card_name: 'Houston'
1333
+ });
1334
+ ```
1335
+ <a name="w_HtmlMultiWidget+updateFormValue" id="w_HtmlMultiWidget+updateFormValue" href="#user-content-w_HtmlMultiWidget+updateFormValue">&nbsp;</a>
1336
+
1337
+ ### htmlMultiWidget.updateFormValue(key, value)
1338
+ Updates a single form field values inside the widget by the form field name.
1339
+
1340
+ **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1341
+
1342
+ | Param | Type | Description |
1343
+ | --- | --- | --- |
1344
+ | key | <code>string</code> | The form field name |
1345
+ | value | <code>string</code> | The form field value |
1346
+
1347
+ **Example**
1348
+ ```javascript
1349
+ widget.updateFormValue("card_name", "John Doe");
1322
1350
  ```
1323
1351
  <a name="w_HtmlMultiWidget+onFinishInsert" id="w_HtmlMultiWidget+onFinishInsert" href="#user-content-w_HtmlMultiWidget+onFinishInsert">&nbsp;</a>
1324
1352
 
1325
1353
  ### htmlMultiWidget.onFinishInsert(selector, dataType)
1326
- After finish event of widget, data (dataType) will be insert to input (selector)
1354
+ Inserts the event data (after finish event) onto the input field associated with the provided CSS selector.
1327
1355
 
1328
1356
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1329
1357
 
1330
1358
  | Param | Type | Description |
1331
1359
  | --- | --- | --- |
1332
- | selector | <code>string</code> | css selector . [] # |
1333
- | dataType | <code>string</code> | data type of IEventData object. |
1360
+ | selector | <code>string</code> | A CSS selector. E.g., ".my-class", "#my-id", or others |
1361
+ | dataType | <code>string</code> | The data type of IEventData object. |
1334
1362
 
1335
1363
  <a name="w_HtmlMultiWidget+interceptSubmitForm" id="w_HtmlMultiWidget+interceptSubmitForm" href="#user-content-w_HtmlMultiWidget+interceptSubmitForm">&nbsp;</a>
1336
1364
 
1337
1365
  ### htmlMultiWidget.interceptSubmitForm(selector)
1338
- Widget will intercept submit of your form for processing widget
1366
+ Intercepts a form submission and delegates processing to the widget.
1339
1367
 
1340
- Process: click by submit button in your form --> submit widget ---> submit your form
1368
+ An simplified example of the process:
1369
+ - User clicks submit button in your form
1370
+ - This implicitly triggers a submission to the widget
1371
+ - The widget submits your form
1341
1372
 
1342
1373
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1343
- **Note**: submit button in widget will be hidden.
1374
+ **Note**: The widget's submit button will be hidden.
1344
1375
 
1345
1376
  | Param | Type | Description |
1346
1377
  | --- | --- | --- |
1347
1378
  | selector | <code>string</code> | css selector of your form |
1348
1379
 
1349
1380
  **Example**
1350
-
1351
- ```javascript
1352
- <form id="myForm">
1381
+ ```html
1382
+ <body>
1383
+ <form id="myForm">
1353
1384
  <input name="amount">
1354
1385
  <button type="submit">Submit</button>
1355
1386
  </form>
1356
- <!--
1357
- -->
1358
- <script>
1387
+ <script>
1359
1388
  widget.interceptSubmitForm('#myForm');
1360
- </script>
1389
+ </script>
1390
+ </body>
1361
1391
  ```
1362
1392
  <a name="w_HtmlMultiWidget+useCheckoutAutoSubmit" id="w_HtmlMultiWidget+useCheckoutAutoSubmit" href="#user-content-w_HtmlMultiWidget+useCheckoutAutoSubmit">&nbsp;</a>
1363
1393
 
@@ -1372,7 +1402,6 @@ Use this method for resize iFrame according content height
1372
1402
 
1373
1403
  **Kind**: instance method of [<code>HtmlMultiWidget</code>](#user-content-w_HtmlMultiWidget)
1374
1404
  **Example**
1375
-
1376
1405
  ```javascript
1377
1406
  widget.useAutoResize();
1378
1407
  ```
@@ -2425,6 +2454,32 @@ Current constant include available states of element for styling
2425
2454
  | FOCUS | <code>string</code> | <code>&quot;focus&quot;</code> | focus. This state applies to: input |
2426
2455
  | HOVER | <code>string</code> | <code>&quot;hover&quot;</code> | focus. This state applies to: submit_button |
2427
2456
 
2457
+ <a name="w_CARD_VALIDATORS" id="w_CARD_VALIDATORS" href="#user-content-w_CARD_VALIDATORS">&nbsp;</a>
2458
+
2459
+ ## CARD\_VALIDATORS : <code>Record.&lt;string, string&gt;</code>
2460
+ List of available form field validators dedicated to cards and their definition
2461
+
2462
+ **Kind**: global constant
2463
+
2464
+ | Param | Type | Default | Description |
2465
+ | --- | --- | --- | --- |
2466
+ | CVV | <code>string</code> | <code>&quot;cardCvvValidation&quot;</code> | Asserts that CVV contains zero or more digits and is a number |
2467
+ | EXPIRY_DATE | <code>string</code> | <code>&quot;expireDateValidation&quot;</code> | Asserts value is a date in the future with format MM/YY |
2468
+ | HOLDER_NAME | <code>string</code> | <code>&quot;cardHoldernameValidation&quot;</code> | Asserts value is a name that respects the ITU-T T.50 standard (@see https://www.itu.int/rec/T-REC-T.50/en) |
2469
+ | NUMBER | <code>string</code> | <code>&quot;cardNumberValidation&quot;</code> | Asserts the value matches a known card scheme and as a the correct length. E.g., matches a 13, 16 or 19 digit bank card, **or**, a 13 to 25 digit Vii Gift card |
2470
+ | PIN | <code>string</code> | <code>&quot;cardPinValidation&quot;</code> | Asserts the value is a number with exactly 4 digits |
2471
+
2472
+ <a name="w_GENERIC_VALIDATORS" id="w_GENERIC_VALIDATORS" href="#user-content-w_GENERIC_VALIDATORS">&nbsp;</a>
2473
+
2474
+ ## GENERIC\_VALIDATORS : <code>Record.&lt;string, string&gt;</code>
2475
+ List of available generic form field validators and their definition
2476
+
2477
+ **Kind**: global constant
2478
+
2479
+ | Param | Type | Default | Description |
2480
+ | --- | --- | --- | --- |
2481
+ | REQUIRED | <code>string</code> | <code>&quot;required&quot;</code> | Asserts the input or form field has a value defined truthy value |
2482
+
2428
2483
  <a name="w_TRIGGER" id="w_TRIGGER" href="#user-content-w_TRIGGER">&nbsp;</a>
2429
2484
 
2430
2485
  ## TRIGGER : <code>object</code>