@paydock/client-sdk 1.121.0 → 1.122.3-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 (74) hide show
  1. package/README.md +283 -1
  2. package/bundles/index.cjs +2068 -94
  3. package/bundles/index.cjs.d.ts +349 -6
  4. package/bundles/index.mjs +2068 -94
  5. package/bundles/index.mjs.d.ts +349 -6
  6. package/bundles/types/checkout/checkout.d.ts +2 -0
  7. package/bundles/types/checkout/checkout.d.ts.map +1 -1
  8. package/bundles/types/checkout/layout-widgets/payment-methods-template.d.ts.map +1 -1
  9. package/bundles/types/checkout/layout-widgets/payment-methods.d.ts.map +1 -1
  10. package/bundles/types/checkout/layout-widgets/payment-template.d.ts +1 -1
  11. package/bundles/types/checkout/layout-widgets/payment-template.d.ts.map +1 -1
  12. package/bundles/types/components/link.d.ts +1 -1
  13. package/bundles/types/components/link.d.ts.map +1 -1
  14. package/bundles/types/components/wallet-background.d.ts.map +1 -1
  15. package/bundles/types/wallet-buttons/wallet-services/afterpay.wallet-service.d.ts.map +1 -1
  16. package/bundles/types/wallet-buttons/wallet-services/apple.wallet-service.d.ts.map +1 -1
  17. package/bundles/types/wallet-buttons/wallet-services/flypay-v2.wallet-service.d.ts.map +1 -1
  18. package/bundles/types/wallet-buttons/wallet-services/paypal.wallet-service.d.ts.map +1 -1
  19. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts +70 -13
  20. package/bundles/types/wallet-buttons-express/base.wallet-button-express.d.ts.map +1 -1
  21. package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts +3 -1
  22. package/bundles/types/wallet-buttons-express/enum/event.enum.d.ts.map +1 -1
  23. package/bundles/types/wallet-buttons-express/index.d.ts +109 -1
  24. package/bundles/types/wallet-buttons-express/index.d.ts.map +1 -1
  25. package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts +30 -0
  26. package/bundles/types/wallet-buttons-express/interfaces/charge-wallet-token-meta.interface.d.ts.map +1 -1
  27. package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts +2 -2
  28. package/bundles/types/wallet-buttons-express/interfaces/on-click-event-data.interface.d.ts.map +1 -1
  29. package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts +2 -2
  30. package/bundles/types/wallet-buttons-express/interfaces/on-close-event-data.interface.d.ts.map +1 -1
  31. package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts +2 -2
  32. package/bundles/types/wallet-buttons-express/interfaces/on-error-event-data.interface.d.ts.map +1 -1
  33. package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts +2 -2
  34. package/bundles/types/wallet-buttons-express/interfaces/on-payment-error-event-data.interface.d.ts.map +1 -1
  35. package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts +2 -2
  36. package/bundles/types/wallet-buttons-express/interfaces/on-payment-in-review-event-data.interface.d.ts.map +1 -1
  37. package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts +2 -2
  38. package/bundles/types/wallet-buttons-express/interfaces/on-payment-successful-event-data.interface.d.ts.map +1 -1
  39. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-data.interface.d.ts +21 -0
  40. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-data.interface.d.ts.map +1 -0
  41. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-response.interface.d.ts +9 -0
  42. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-address-change-event-response.interface.d.ts.map +1 -0
  43. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-data.interface.d.ts +13 -0
  44. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-data.interface.d.ts.map +1 -0
  45. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-response.interface.d.ts +9 -0
  46. package/bundles/types/wallet-buttons-express/interfaces/on-shipping-option-change-event-response.interface.d.ts.map +1 -0
  47. package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts +2 -2
  48. package/bundles/types/wallet-buttons-express/interfaces/on-unavailable-event-data.interface.d.ts.map +1 -1
  49. package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts +7 -0
  50. package/bundles/types/wallet-buttons-express/services/apple-pay/apple-pay.wallet-button-express.d.ts.map +1 -1
  51. package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-events.constant.d.ts +5 -0
  52. package/bundles/types/wallet-buttons-express/services/apple-pay/constants/apple-pay-events.constant.d.ts.map +1 -0
  53. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts +7 -3
  54. package/bundles/types/wallet-buttons-express/services/apple-pay/interfaces/apple-pay-wallet-meta.interface.d.ts.map +1 -1
  55. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-contact-editing-mode.type.d.ts +5 -0
  56. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-contact-editing-mode.type.d.ts.map +1 -0
  57. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-data.d.ts +21 -0
  58. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-data.d.ts.map +1 -0
  59. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-method.type.d.ts +21 -0
  60. package/bundles/types/wallet-buttons-express/services/apple-pay/types/apple-pay-shipping-method.type.d.ts.map +1 -0
  61. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-sdk.interface.d.ts +164 -0
  62. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-sdk.interface.d.ts.map +1 -0
  63. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts +1 -1
  64. package/bundles/types/wallet-buttons-express/services/paypal/interfaces/paypal-wallet-meta.interface.d.ts.map +1 -1
  65. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts +9 -3
  66. package/bundles/types/wallet-buttons-express/services/paypal/paypal.wallet-button-express.d.ts.map +1 -1
  67. package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts +6 -0
  68. package/bundles/types/wallet-buttons-express/types/shipping-event-to-response.type.d.ts.map +1 -0
  69. package/bundles/widget.umd.js +2070 -94
  70. package/bundles/widget.umd.js.d.ts +349 -6
  71. package/bundles/widget.umd.js.min.d.ts +349 -6
  72. package/bundles/widget.umd.min.js +1 -1
  73. package/docs/wallet-buttons-express.md +283 -1
  74. package/package.json +1 -1
@@ -15,6 +15,9 @@
15
15
  <dt><a href="#EVENT">EVENT</a> : <code>object</code></dt>
16
16
  <dd><p>List of available event&#39;s name in the wallet button lifecycle</p>
17
17
  </dd>
18
+ <dt><a href="#ContactFieldType">ContactFieldType</a> : <code>object</code></dt>
19
+ <dd><p>List of available contact fields for ContactFieldType</p>
20
+ </dd>
18
21
  </dl>
19
22
 
20
23
  ## Typedefs
@@ -35,6 +38,12 @@
35
38
  <dt><a href="#OnCheckoutCloseCallback">OnCheckoutCloseCallback</a> : <code>function</code></dt>
36
39
  <dd><p>Callback for onCheckoutClose method.</p>
37
40
  </dd>
41
+ <dt><a href="#OnShippingAddressChangeCallback">OnShippingAddressChangeCallback</a> ⇒ <code><a href="#OnShippingAddressChangeEventResponse">Promise.&lt;OnShippingAddressChangeEventResponse&gt;</a></code></dt>
42
+ <dd><p>Callback for onShippingAddressChange method.</p>
43
+ </dd>
44
+ <dt><a href="#OnShippingOptionsChangeCallback">OnShippingOptionsChangeCallback</a> ⇒ <code><a href="#OnShippingOptionChangeEventResponse">Promise.&lt;OnShippingOptionChangeEventResponse&gt;</a></code></dt>
45
+ <dd><p>Callback for onShippingOptionsChange method.</p>
46
+ </dd>
38
47
  <dt><a href="#OnUnavailableCallback">OnUnavailableCallback</a> : <code>function</code></dt>
39
48
  <dd><p>Callback for onUnavailable method.</p>
40
49
  </dd>
@@ -77,6 +86,25 @@ For in-depth information, please refer to the <a href="https://developer.paypal.
77
86
  <dt><a href="#OnErrorEventData">OnErrorEventData</a> : <code>object</code></dt>
78
87
  <dd><p>Interface for OnErrorEventData</p>
79
88
  </dd>
89
+ <dt><a href="#OnShippingAddressChangeEventData">OnShippingAddressChangeEventData</a> : <code>object</code></dt>
90
+ <dd><p>Interface for OnShippingAddressChangeEventData.</p>
91
+ </dd>
92
+ <dt><a href="#OnShippingAddressChangeEventResponse">OnShippingAddressChangeEventResponse</a> : <code>object</code></dt>
93
+ <dd><p>Interface for OnShippingAddressChangeEventResponse.</p>
94
+ </dd>
95
+ <dt><a href="#IApplePayShippingOption">IApplePayShippingOption</a> : <code>object</code></dt>
96
+ <dd><p>Interface for IApplePayShippingOption.
97
+ Used for adding new shippings options when customer updates the shipping address.</p>
98
+ </dd>
99
+ <dt><a href="#OnShippingOptionChangeEventData">OnShippingOptionChangeEventData</a> : <code>object</code></dt>
100
+ <dd><p>Interface for OnShippingOptionChangeEventData.</p>
101
+ </dd>
102
+ <dt><a href="#OnShippingOptionChangeEventResponse">OnShippingOptionChangeEventResponse</a> : <code>object</code></dt>
103
+ <dd><p>Interface for OnShippingOptionChangeEventResponse.</p>
104
+ </dd>
105
+ <dt><a href="#IApplePayError">IApplePayError</a> : <code>object</code></dt>
106
+ <dd><p>Interface for IApplePayError.</p>
107
+ </dd>
80
108
  </dl>
81
109
 
82
110
  <a name="ApplePayWalletMeta" id="ApplePayWalletMeta" href="#ApplePayWalletMeta">&nbsp;</a>
@@ -98,11 +126,14 @@ If the determinated value is credentials_status_unknown, the payment possbily sh
98
126
  | [merchant_capabilities] | <code>Array.&lt;(&#x27;supports3DS&#x27;\|&#x27;supportsEMV&#x27;\|&#x27;supportsCredit&#x27;\|&#x27;supportsDebit&#x27;)&gt;</code> | Array of capabilities that the merchant supports, influencing the transaction processing features available. |
99
127
  | [supported_networks] | <code>Array.&lt;(&#x27;visa&#x27;\|&#x27;masterCard&#x27;\|&#x27;amex&#x27;\|&#x27;chinaUnionPay&#x27;\|&#x27;discover&#x27;\|&#x27;interac&#x27;\|&#x27;jcb&#x27;\|&#x27;privateLabel&#x27;)&gt;</code> | List of payment networks supported by the merchant for ApplePay transactions. |
100
128
  | [required_billing_contact_fields] | <code>Array.&lt;(&#x27;email&#x27;\|&#x27;name&#x27;\|&#x27;phone&#x27;\|&#x27;postalAddress&#x27;)&gt;</code> | Contact fields required from the user for billing purposes, improving transaction verification and fraud prevention. Phone and email are currently not returned by Apple. |
101
- | [required_shipping_contact_fields] | <code>Array.&lt;(&#x27;email&#x27;\|&#x27;phone&#x27;)&gt;</code> | Shipping contact fields that are mandatory to complete the transaction. Use email and phone to collect from customer wallet in the abscense of billing one. |
129
+ | [required_shipping_contact_fields] | <code>Array.&lt;(&#x27;email&#x27;\|&#x27;phone&#x27;)&gt;</code> | Shipping contact fields that are mandatory to complete the transaction. Use email and phone to collect from customer wallet in the abscense of billing one. Required for onShippingAddressChange callback. |
102
130
  | [supported_countries] | <code>Array.&lt;string&gt;</code> | List of countries where ApplePay is supported by the merchant, restricting usage to specified regions. |
103
131
  | [style] | <code>object</code> | Styling configuration for ApplePay buttons displayed during checkout. |
104
132
  | [style.button_type] | <code>ApplePayButtonType</code> | Enum type to select the type of ApplePay button (e.g., 'buy', 'donate', etc.), providing user interface customization. |
105
133
  | [style.button_style] | <code>ApplePayButtonStyle</code> | Style applied to the ApplePay button, which can include color and form factor adjustments according to the brand's visual guidelines. |
134
+ | [shipping_editing_mode] | <code>&#x27;available&#x27;</code> \| <code>&#x27;store\_pickup&#x27;</code> | ApplePay - available for allowing editing shipping, store_pickup for not allowing editing shipping. |
135
+ | [shipping_data] | <code>object</code> | ApplePay - Preloaded data used for populate shipping address information |
136
+ | [shipping_data.email_address] | <code>string</code> | ApplePay - The shipping address email |
106
137
  | [apple_pay_capabilities] | <code>Array.&lt;(&#x27;credentials\_available&#x27;\|&#x27;credentials\_status\_unknown&#x27;\|&#x27;credentials\_unavailable&#x27;)&gt;</code> | Device capabilities needed for wallet button to be available. |
107
138
 
108
139
  <a name="PaypalWalletMeta" id="PaypalWalletMeta" href="#PaypalWalletMeta">&nbsp;</a>
@@ -235,6 +266,115 @@ Interface for OnErrorEventData
235
266
  | [chargeId] | <code>string</code> | chargeId in case it's already set after onClick event |
236
267
  | [data] | <code>Error</code> | Error object if present |
237
268
 
269
+ <a name="OnShippingAddressChangeEventData" id="OnShippingAddressChangeEventData" href="#OnShippingAddressChangeEventData">&nbsp;</a>
270
+
271
+ ## OnShippingAddressChangeEventData : <code>object</code>
272
+ Interface for OnShippingAddressChangeEventData.
273
+
274
+ **Kind**: global interface
275
+
276
+ | Param | Type | Description |
277
+ | --- | --- | --- |
278
+ | event | <code>string</code> | Event Name is 'onShippingAddressChange' |
279
+ | chargeId | <code>string</code> | chargeId set after onClick event |
280
+ | data.address_city | <code>string</code> | PayPal and ApplePay - Shipping address city |
281
+ | data.address_state | <code>string</code> | PayPal and ApplePay - Shipping address state |
282
+ | data.address_postcode | <code>string</code> | PayPal and ApplePay - Shipping address postcode |
283
+ | data.address_country | <code>string</code> | PayPal and ApplePay - Shipping address country code |
284
+ | [data.address_line1] | <code>string</code> | ApplePay - Shipping address line 1 |
285
+ | [data.address_line2] | <code>string</code> | ApplePay - Shipping address line 2 |
286
+ | [data.contact.phone] | <code>string</code> | ApplePay - Shipping contact phone |
287
+ | [data.contact.email] | <code>string</code> | ApplePay - Shipping contact email |
288
+ | [data.contact.first_name] | <code>string</code> | ApplePay - Shipping contact first name |
289
+ | [data.contact.last_name] | <code>string</code> | ApplePay - Shipping contact last name |
290
+
291
+ <a name="OnShippingAddressChangeEventResponse" id="OnShippingAddressChangeEventResponse" href="#OnShippingAddressChangeEventResponse">&nbsp;</a>
292
+
293
+ ## OnShippingAddressChangeEventResponse : <code>object</code>
294
+ Interface for OnShippingAddressChangeEventResponse.
295
+
296
+ **Kind**: global interface
297
+
298
+ | Param | Type | Description |
299
+ | --- | --- | --- |
300
+ | [token] | <code>string</code> | Updated Wallet Token if any |
301
+ | [label] | <code>string</code> | ApplePay - Required. Label to show to the customer. |
302
+ | [amount] | <code>string</code> | ApplePay - Required. New amount for shipping option. |
303
+ | [error] | <code>string</code> | PayPal and ApplePay - Error object in case of error when processing shipping address in if new address unsupported or any other possible error. |
304
+ | error.code | <code>string</code> | PayPal and ApplePay - Error code, mandatory in case of error. Possible values for Paypal are 'address_error', 'country_error', 'state_error', 'zip_error' or any other string if none applies. For ApplePay values are 'address_error', 'shipping_contact_invalid' and 'billing_contact_invalid'. |
305
+ | [error.field] | <code>string</code> | ApplePay - Error field in case of specifically showing it. Possible values for Apple Pay are 'phone', 'email', 'name', 'phonetic_name', 'address_lines', 'locality', 'postal_code', 'administrative_area', 'country', 'country_code'. |
306
+ | [error.message] | <code>string</code> | ApplePay - Custom user facing error message. |
307
+
308
+ <a name="IApplePayShippingOption" id="IApplePayShippingOption" href="#IApplePayShippingOption">&nbsp;</a>
309
+
310
+ ## IApplePayShippingOption : <code>object</code>
311
+ Interface for IApplePayShippingOption.
312
+ Used for adding new shippings options when customer updates the shipping address.
313
+
314
+ **Kind**: global interface
315
+
316
+ | Param | Type | Description |
317
+ | --- | --- | --- |
318
+ | [id] | <code>string</code> | Updated Wallet Token if any |
319
+ | [label] | <code>string</code> | ApplePay - Required. Label to show to the customer. |
320
+ | [amount] | <code>string</code> | ApplePay - Required. New amount for shipping option. |
321
+ | [detail] | <code>string</code> | ApplePay - Optional detail for shipping option. |
322
+ | [date_components_range] | <code>object</code> | ApplePay - Object that contains the dates for shipping |
323
+ | [date_components_range.start_date_components] | <code>object</code> | ApplePay - Contains the start date object |
324
+ | [date_components_range.start_date_components.years] | <code>string</code> | ApplePay - Contains the start date year |
325
+ | [date_components_range.start_date_components.months] | <code>string</code> | ApplePay - Contains the start date month |
326
+ | [date_components_range.start_date_components.days] | <code>string</code> | ApplePay - Contains the start date day |
327
+ | [date_components_range.start_date_components.hours] | <code>string</code> | ApplePay - Contains the start date hour |
328
+ | [date_components_range.end_date_components] | <code>object</code> | ApplePay - Contains the end date year |
329
+ | [date_components_range.end_date_components.years] | <code>string</code> | ApplePay - Contains the end date year |
330
+ | [date_components_range.end_date_components.months] | <code>string</code> | ApplePay - Contains the end date month |
331
+ | [date_components_range.end_date_components.days] | <code>string</code> | ApplePay - Contains the end date day |
332
+ | [date_components_range.end_date_components.hours] | <code>string</code> | ApplePay - Contains the end date hour |
333
+
334
+ <a name="OnShippingOptionChangeEventData" id="OnShippingOptionChangeEventData" href="#OnShippingOptionChangeEventData">&nbsp;</a>
335
+
336
+ ## OnShippingOptionChangeEventData : <code>object</code>
337
+ Interface for OnShippingOptionChangeEventData.
338
+
339
+ **Kind**: global interface
340
+
341
+ | Param | Type | Description |
342
+ | --- | --- | --- |
343
+ | event | <code>string</code> | Event Name is 'onShippingOptionsChange' |
344
+ | chargeId | <code>string</code> | chargeId set after onClick event |
345
+ | [data.shipping_option_id] | <code>string</code> | PayPal and ApplePay - Selected shipping option id |
346
+ | [data.amount] | <code>string</code> | Paypal and ApplePay - Selected shipping option amount |
347
+ | [data.label] | <code>string</code> | ApplePay - Selected shipping option label |
348
+ | [data.detail] | <code>string</code> | ApplePay - Selected shipping option detail |
349
+
350
+ <a name="OnShippingOptionChangeEventResponse" id="OnShippingOptionChangeEventResponse" href="#OnShippingOptionChangeEventResponse">&nbsp;</a>
351
+
352
+ ## OnShippingOptionChangeEventResponse : <code>object</code>
353
+ Interface for OnShippingOptionChangeEventResponse.
354
+
355
+ **Kind**: global interface
356
+
357
+ | Param | Type | Description |
358
+ | --- | --- | --- |
359
+ | [token] | <code>string</code> | Updated Wallet Token if any |
360
+ | [label] | <code>string</code> | ApplePay - Required. Label to show to the customer. |
361
+ | [amount] | <code>string</code> | ApplePay - Required. New amount for shipping option. |
362
+ | [error] | <code>string</code> | PayPal - Error object in case of error when processing shipping option selection. |
363
+ | error.code | <code>string</code> | Possible values for Paypal are 'method_unavailable', 'store_unavailable' or any other string if none applies. |
364
+
365
+ <a name="IApplePayError" id="IApplePayError" href="#IApplePayError">&nbsp;</a>
366
+
367
+ ## IApplePayError : <code>object</code>
368
+ Interface for IApplePayError.
369
+
370
+ **Kind**: global interface
371
+
372
+ | Param | Type | Description |
373
+ | --- | --- | --- |
374
+ | code | <code>&#x27;shipping\_contact\_invalid&#x27;</code> \| <code>&#x27;billing\_contact\_invalid&#x27;</code> \| <code>&#x27;address\_unserviceable&#x27;</code> \| <code>&#x27;coupon\_code\_invalid&#x27;</code> \| <code>&#x27;coupon\_code\_expired&#x27;</code> \| <code>&#x27;unknown&#x27;</code> | The error code for this instance. |
375
+ | contact_field | [<code>ContactFieldType</code>](#ContactFieldType) | The error code for this instance. |
376
+ | message | <code>string</code> \| <code>undefined</code> | TA localized, user-facing string that describes the error. |
377
+
238
378
  <a name="ApplePayWalletButtonExpress" id="ApplePayWalletButtonExpress" href="#ApplePayWalletButtonExpress">&nbsp;</a>
239
379
 
240
380
  ## ApplePayWalletButtonExpress ⇐ <code>BaseWalletButton</code>
@@ -253,6 +393,8 @@ Class ApplePayWalletButtonExpress to work with Apple Pay Wallet.
253
393
  * [.onPaymentInReview([handler])](#BaseWalletButton+onPaymentInReview)
254
394
  * [.onPaymentError([handler])](#BaseWalletButton+onPaymentError)
255
395
  * [.onCheckoutClose(handler)](#BaseWalletButton+onCheckoutClose)
396
+ * [.onShippingAddressChange([handler])](#BaseWalletButton+onShippingAddressChange)
397
+ * [.onShippingOptionsChange([handler])](#BaseWalletButton+onShippingOptionsChange)
256
398
  * [.onUnavailable(handler)](#BaseWalletButton+onUnavailable)
257
399
  * [.onError(handler)](#BaseWalletButton+onError)
258
400
 
@@ -429,6 +571,52 @@ button.onCheckoutClose(() => {
429
571
  console.log('Wallet checkout closes');
430
572
  });
431
573
  ```
574
+ <a name="BaseWalletButton+onShippingAddressChange" id="BaseWalletButton+onShippingAddressChange" href="#BaseWalletButton+onShippingAddressChange">&nbsp;</a>
575
+
576
+ ### applePayWalletButtonExpress.onShippingAddressChange([handler])
577
+ If shipping address data is updated, the function passed as parameter will be called.
578
+ Use this method to listen for shipping address selection or input from customer when shipping is enabled.
579
+ The event handler needs to return a new token in case a backend to backend wallet update call was executed.
580
+ In addition, if any error occured, an error string must be supplied.
581
+ By default, the event handler will be processed successfuly if neither token nor error is returned.
582
+
583
+ **Kind**: instance method of [<code>ApplePayWalletButtonExpress</code>](#ApplePayWalletButtonExpress)
584
+ **Overrides**: [<code>onShippingAddressChange</code>](#BaseWalletButton+onShippingAddressChange)
585
+
586
+ | Param | Type | Description |
587
+ | --- | --- | --- |
588
+ | [handler] | [<code>OnShippingAddressChangeCallback</code>](#OnShippingAddressChangeCallback) | Function to be called when the shipping address data is updated. |
589
+
590
+ **Example**
591
+ ```js
592
+ button.onShippingAddressChange((data) => {
593
+ const responseData = await fetch('https://your-server.com/update-shipping-info');
594
+ return { error: null, token: responseData.walletToken };
595
+ });
596
+ ```
597
+ <a name="BaseWalletButton+onShippingOptionsChange" id="BaseWalletButton+onShippingOptionsChange" href="#BaseWalletButton+onShippingOptionsChange">&nbsp;</a>
598
+
599
+ ### applePayWalletButtonExpress.onShippingOptionsChange([handler])
600
+ If shipping options data is updated, the function passed as parameter will be called.
601
+ Use this method to listen for shipping option selection from customer when shipping is enabled.
602
+ The event handler needs to return a new token in case a backend to backend wallet update call was executed.
603
+ In addition, if any error occured, an error string must be supplied.
604
+ By default, the event handler will be processed successfuly if neither token nor error is returned.
605
+
606
+ **Kind**: instance method of [<code>ApplePayWalletButtonExpress</code>](#ApplePayWalletButtonExpress)
607
+ **Overrides**: [<code>onShippingOptionsChange</code>](#BaseWalletButton+onShippingOptionsChange)
608
+
609
+ | Param | Type | Description |
610
+ | --- | --- | --- |
611
+ | [handler] | [<code>OnShippingOptionsChangeCallback</code>](#OnShippingOptionsChangeCallback) | Function to be called when the shipping options data is updated. |
612
+
613
+ **Example**
614
+ ```js
615
+ button.onShippingOptionsChange((data) => {
616
+ const responseData = await fetch('https://your-server.com/update-shipping-info');
617
+ return { error: null, token: responseData.walletToken };
618
+ });
619
+ ```
432
620
  <a name="BaseWalletButton+onUnavailable" id="BaseWalletButton+onUnavailable" href="#BaseWalletButton+onUnavailable">&nbsp;</a>
433
621
 
434
622
  ### applePayWalletButtonExpress.onUnavailable(handler)
@@ -484,6 +672,8 @@ Class PaypalWalletButtonExpress to work with Paypal Wallet.
484
672
  * [.onPaymentInReview([handler])](#BaseWalletButton+onPaymentInReview)
485
673
  * [.onPaymentError([handler])](#BaseWalletButton+onPaymentError)
486
674
  * [.onCheckoutClose(handler)](#BaseWalletButton+onCheckoutClose)
675
+ * [.onShippingAddressChange([handler])](#BaseWalletButton+onShippingAddressChange)
676
+ * [.onShippingOptionsChange([handler])](#BaseWalletButton+onShippingOptionsChange)
487
677
  * [.onUnavailable(handler)](#BaseWalletButton+onUnavailable)
488
678
  * [.onError(handler)](#BaseWalletButton+onError)
489
679
 
@@ -660,6 +850,52 @@ button.onCheckoutClose(() => {
660
850
  console.log('Wallet checkout closes');
661
851
  });
662
852
  ```
853
+ <a name="BaseWalletButton+onShippingAddressChange" id="BaseWalletButton+onShippingAddressChange" href="#BaseWalletButton+onShippingAddressChange">&nbsp;</a>
854
+
855
+ ### paypalWalletButtonExpress.onShippingAddressChange([handler])
856
+ If shipping address data is updated, the function passed as parameter will be called.
857
+ Use this method to listen for shipping address selection or input from customer when shipping is enabled.
858
+ The event handler needs to return a new token in case a backend to backend wallet update call was executed.
859
+ In addition, if any error occured, an error string must be supplied.
860
+ By default, the event handler will be processed successfuly if neither token nor error is returned.
861
+
862
+ **Kind**: instance method of [<code>PaypalWalletButtonExpress</code>](#PaypalWalletButtonExpress)
863
+ **Overrides**: [<code>onShippingAddressChange</code>](#BaseWalletButton+onShippingAddressChange)
864
+
865
+ | Param | Type | Description |
866
+ | --- | --- | --- |
867
+ | [handler] | [<code>OnShippingAddressChangeCallback</code>](#OnShippingAddressChangeCallback) | Function to be called when the shipping address data is updated. |
868
+
869
+ **Example**
870
+ ```js
871
+ button.onShippingAddressChange((data) => {
872
+ const responseData = await fetch('https://your-server.com/update-shipping-info');
873
+ return { error: null, token: responseData.walletToken };
874
+ });
875
+ ```
876
+ <a name="BaseWalletButton+onShippingOptionsChange" id="BaseWalletButton+onShippingOptionsChange" href="#BaseWalletButton+onShippingOptionsChange">&nbsp;</a>
877
+
878
+ ### paypalWalletButtonExpress.onShippingOptionsChange([handler])
879
+ If shipping options data is updated, the function passed as parameter will be called.
880
+ Use this method to listen for shipping option selection from customer when shipping is enabled.
881
+ The event handler needs to return a new token in case a backend to backend wallet update call was executed.
882
+ In addition, if any error occured, an error string must be supplied.
883
+ By default, the event handler will be processed successfuly if neither token nor error is returned.
884
+
885
+ **Kind**: instance method of [<code>PaypalWalletButtonExpress</code>](#PaypalWalletButtonExpress)
886
+ **Overrides**: [<code>onShippingOptionsChange</code>](#BaseWalletButton+onShippingOptionsChange)
887
+
888
+ | Param | Type | Description |
889
+ | --- | --- | --- |
890
+ | [handler] | [<code>OnShippingOptionsChangeCallback</code>](#OnShippingOptionsChangeCallback) | Function to be called when the shipping options data is updated. |
891
+
892
+ **Example**
893
+ ```js
894
+ button.onShippingOptionsChange((data) => {
895
+ const responseData = await fetch('https://your-server.com/update-shipping-info');
896
+ return { error: null, token: responseData.walletToken };
897
+ });
898
+ ```
663
899
  <a name="BaseWalletButton+onUnavailable" id="BaseWalletButton+onUnavailable" href="#BaseWalletButton+onUnavailable">&nbsp;</a>
664
900
 
665
901
  ### paypalWalletButtonExpress.onUnavailable(handler)
@@ -713,6 +949,28 @@ List of available event's name in the wallet button lifecycle
713
949
  | PAYMENT_IN_REVIEW | <code>string</code> | <code>&quot;paymentInReview&quot;</code> |
714
950
  | ON_CLICK | <code>string</code> | <code>&quot;onClick&quot;</code> |
715
951
  | ON_CHECKOUT_CLOSE | <code>string</code> | <code>&quot;onCheckoutClose&quot;</code> |
952
+ | ON_SHIPPING_ADDRESS_CHANGE | <code>string</code> | <code>&quot;onShippingAddressChange&quot;</code> |
953
+ | ON_SHIPPING_OPTIONS_CHANGE | <code>string</code> | <code>&quot;onShippingOptionsChange&quot;</code> |
954
+
955
+ <a name="ContactFieldType" id="ContactFieldType" href="#ContactFieldType">&nbsp;</a>
956
+
957
+ ## ContactFieldType : <code>object</code>
958
+ List of available contact fields for ContactFieldType
959
+
960
+ **Kind**: global constant
961
+
962
+ | Param | Type |
963
+ | --- | --- |
964
+ | phone | <code>string</code> |
965
+ | email | <code>string</code> |
966
+ | name | <code>string</code> |
967
+ | phonetic_name | <code>string</code> |
968
+ | address_lines | <code>string</code> |
969
+ | address_city | <code>string</code> |
970
+ | address_postcode | <code>string</code> |
971
+ | address_state | <code>string</code> |
972
+ | address_country | <code>string</code> |
973
+ | address_country_code | <code>string</code> |
716
974
 
717
975
  <a name="OnClickCallback" id="OnClickCallback" href="#OnClickCallback">&nbsp;</a>
718
976
 
@@ -770,6 +1028,30 @@ Callback for onCheckoutClose method.
770
1028
  | --- | --- |
771
1029
  | data | [<code>OnCloseEventData</code>](#OnCloseEventData) |
772
1030
 
1031
+ <a name="OnShippingAddressChangeCallback" id="OnShippingAddressChangeCallback" href="#OnShippingAddressChangeCallback">&nbsp;</a>
1032
+
1033
+ ## OnShippingAddressChangeCallback ⇒ [<code>Promise.&lt;OnShippingAddressChangeEventResponse&gt;</code>](#OnShippingAddressChangeEventResponse)
1034
+ Callback for onShippingAddressChange method.
1035
+
1036
+ **Kind**: global typedef
1037
+ **Returns**: [<code>Promise.&lt;OnShippingAddressChangeEventResponse&gt;</code>](#OnShippingAddressChangeEventResponse) - Address update result
1038
+
1039
+ | Param | Type |
1040
+ | --- | --- |
1041
+ | data | [<code>OnShippingAddressChangeEventData</code>](#OnShippingAddressChangeEventData) |
1042
+
1043
+ <a name="OnShippingOptionsChangeCallback" id="OnShippingOptionsChangeCallback" href="#OnShippingOptionsChangeCallback">&nbsp;</a>
1044
+
1045
+ ## OnShippingOptionsChangeCallback ⇒ [<code>Promise.&lt;OnShippingOptionChangeEventResponse&gt;</code>](#OnShippingOptionChangeEventResponse)
1046
+ Callback for onShippingOptionsChange method.
1047
+
1048
+ **Kind**: global typedef
1049
+ **Returns**: [<code>Promise.&lt;OnShippingOptionChangeEventResponse&gt;</code>](#OnShippingOptionChangeEventResponse) - Address update result
1050
+
1051
+ | Param | Type |
1052
+ | --- | --- |
1053
+ | data | [<code>OnShippingOptionChangeEventData</code>](#OnShippingOptionChangeEventData) |
1054
+
773
1055
  <a name="OnUnavailableCallback" id="OnUnavailableCallback" href="#OnUnavailableCallback">&nbsp;</a>
774
1056
 
775
1057
  ## OnUnavailableCallback : <code>function</code>
package/package.json CHANGED
@@ -104,7 +104,7 @@
104
104
  }
105
105
  },
106
106
  "name": "@paydock/client-sdk",
107
- "version": "1.121.0",
107
+ "version": "1.122.3-beta",
108
108
  "scripts": {
109
109
  "build:doc": "node docs/html/marked.js",
110
110
  "build:js": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",