@akinon/pz-tabby-extension 2.0.19-rc.3 → 2.0.19

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.
package/CHANGELOG.md CHANGED
@@ -1,20 +1,6 @@
1
1
  # @akinon/pz-tabby-extension
2
2
 
3
- ## 2.0.19-rc.3
4
-
5
- ### Patch Changes
6
-
7
- - a3e2acbf: ZERO-4487: ensure Tabby shipping_address city/address/zip are never empty
8
-
9
- ## 2.0.19-rc.2
10
-
11
- ### Patch Changes
12
-
13
- - c97525a3: ZERO-4487: derive Tabby order_history payment_method from payment type
14
-
15
- ## 2.0.19-rc.1
16
-
17
- ## 2.0.19-rc.0
3
+ ## 2.0.19
18
4
 
19
5
  ## 2.0.18
20
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-tabby-extension",
3
- "version": "2.0.19-rc.3",
3
+ "version": "2.0.19",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
@@ -67,9 +67,9 @@ export const TabbyPaymentGateway = async ({
67
67
  salt,
68
68
  hash,
69
69
  shipping_address: {
70
- city: preOrder?.pre_order?.shipping_address?.city?.name || 'N/A',
71
- address: preOrder?.pre_order?.shipping_address?.line || 'N/A',
72
- zip: preOrder?.pre_order?.shipping_address?.postcode || '00000'
70
+ city: preOrder?.pre_order?.shipping_address?.city?.name,
71
+ address: preOrder?.pre_order?.shipping_address?.line,
72
+ zip: preOrder?.pre_order?.shipping_address?.postcode ?? '0'
73
73
  },
74
74
  order_items: preOrder?.pre_order?.basket?.basketitem_set?.map(
75
75
  (item: any) => ({
@@ -93,10 +93,7 @@ export const TabbyPaymentGateway = async ({
93
93
  orderHistory?.results?.map((order_history: any) => ({
94
94
  purchased_at: order_history?.created_date,
95
95
  amount: order_history?.amount,
96
- payment_method:
97
- order_history?.payment_option?.payment_type === 'pay_on_delivery'
98
- ? 'cod'
99
- : 'card',
96
+ payment_method: order_history?.card === null ? 'cod' : 'card',
100
97
  status: getOrderStatus(order_history?.status?.value),
101
98
  buyer: {
102
99
  phone: order_history?.billing_address?.phone_number,
@@ -104,9 +101,9 @@ export const TabbyPaymentGateway = async ({
104
101
  name: `${order_history?.billing_address?.first_name} ${order_history?.billing_address?.last_name}`
105
102
  },
106
103
  shipping_address: {
107
- city: order_history?.shipping_address?.city?.name || 'N/A',
108
- address: order_history?.shipping_address?.line || 'N/A',
109
- zip: order_history?.shipping_address?.postcode || '00000'
104
+ city: order_history?.shipping_address?.city?.name,
105
+ address: order_history?.shipping_address?.line,
106
+ zip: order_history?.shipping_address?.postcode ?? '0'
110
107
  },
111
108
  order_items: groupByProductId(order_history?.orderitem_set)
112
109
  })) ?? []