@@ -9,39 +9,22 @@ export const dinteroPaymentPayload = z
9
9
10
10
export type DinteroPaymentPayload = z . infer < typeof dinteroPaymentPayload > ;
11
11
12
- export type DinteroAddress = {
13
- first_name ?: string ;
14
- last_name ?: string ;
15
- address_line ?: string ;
16
- address_line_2 ?: string ;
17
- co_address ?: string ;
18
- business_name ?: string ;
19
- postal_code ?: string ;
20
- postal_place ?: string ;
21
- country ?: string ;
22
- phone_number ?: string ;
23
- email ?: string ;
24
- latitude ?: number ;
25
- longitude ?: number ;
26
- comment ?: string ;
27
- organization_number ?: string ;
28
- organization_type ?: string ;
29
- customer_reference ?: string ;
30
- cost_center ?: string ;
31
- } ;
32
-
33
12
export type DinteroCreateSessionArguments = {
34
13
credentials : DinteroCredentials ;
35
14
fetchCart : ( ) => Promise < Cart > ;
36
15
returnUrl : string ;
37
16
callbackUrl : string ;
38
- otherPaymentArguments ?: any ;
39
17
customer ?: {
40
18
email ?: string ;
41
19
phone ?: string ;
42
20
shippingAddress ?: DinteroAddress ;
43
21
billingAddress ?: DinteroAddress ;
44
22
} ;
23
+ express ?: {
24
+ enabled : boolean ;
25
+ expressCheckoutOptions : ExpressShipping ;
26
+ } ;
27
+ otherPaymentArguments ?: any ;
45
28
} ;
46
29
47
30
export type DinteroCredentials = {
@@ -58,3 +41,81 @@ export type DinteroPaymentVerificationArguments = {
58
41
credentials : DinteroCredentials ;
59
42
handleEvent : ( eventName : string , event : any ) => Promise < any > ;
60
43
} ;
44
+
45
+ export type DinteroAddress = {
46
+ first_name ?: string ;
47
+ last_name ?: string ;
48
+ address_line ?: string ;
49
+ address_line_2 ?: string ;
50
+ co_address ?: string ;
51
+ business_name ?: string ;
52
+ postal_code ?: string ;
53
+ postal_place ?: string ;
54
+ country ?: string ;
55
+ phone_number ?: string ;
56
+ email ?: string ;
57
+ latitude ?: number ;
58
+ longitude ?: number ;
59
+ comment ?: string ;
60
+ organization_number ?: string ;
61
+ organization_type ?: string ;
62
+ customer_reference ?: string ;
63
+ cost_center ?: string ;
64
+ } ;
65
+
66
+ type Eta = {
67
+ starts_at : string ;
68
+ ends_at : string ;
69
+ } ;
70
+
71
+ type TimeSlot = {
72
+ starts_at : string ;
73
+ ends_at : string ;
74
+ } ;
75
+
76
+ type Metadata = {
77
+ operator_dest : string ;
78
+ number_x : number ;
79
+ } ;
80
+
81
+ type Details = {
82
+ label : string ;
83
+ value : string ;
84
+ } ;
85
+
86
+ type EnvironmentalData = {
87
+ description : string ;
88
+ details : Details [ ] ;
89
+ } ;
90
+
91
+ type ShippingOption = {
92
+ id : string ;
93
+ line_id : string ;
94
+ countries ?: string [ ] ;
95
+ amount : number ;
96
+ vat_amount ?: number ;
97
+ vat ?: number ;
98
+ title : string ;
99
+ description ?: string ;
100
+ delivery_method ?: 'delivery' | 'pick_up' | 'unspecified' | 'none' ;
101
+ operator : string ;
102
+ operator_product_id ?: string ;
103
+ eta ?: Eta ;
104
+ time_slot ?: TimeSlot ;
105
+ pick_up_address ?: DinteroAddress ;
106
+ metadata ?: Metadata ;
107
+ environmental_data ?: EnvironmentalData ;
108
+ } ;
109
+
110
+ type DiscountCodes = {
111
+ max_count : number ;
112
+ callback_url : string ;
113
+ } ;
114
+
115
+ type ExpressShipping = {
116
+ shipping_options : ShippingOption [ ] ;
117
+ shipping_mode ?: string ;
118
+ discount_codes ?: DiscountCodes ;
119
+ shipping_address_callback_url ?: string ;
120
+ customer_types ?: ( 'b2c' | 'b2b' ) [ ] ;
121
+ } ;
0 commit comments