Skip to content

Commit 533ec93

Browse files
committed
some adjusts
1 parent 2c7b260 commit 533ec93

File tree

2 files changed

+45
-6
lines changed

2 files changed

+45
-6
lines changed

components/xendit/actions/create-invoice/create-invoice.mjs

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,40 @@ export default {
5454
description: "Mobile phone number of the customer in E164 format",
5555
optional: true,
5656
},
57-
addresses: {
58-
type: "string[]",
59-
label: "Addresses",
60-
description: "A list of objects of customer's addresses",
57+
addressCity: {
58+
type: "string",
59+
label: "City",
60+
description: "The city of the customer",
61+
optional: true,
62+
},
63+
addressCountry: {
64+
type: "string",
65+
label: "Country",
66+
description: "The country of the customer",
67+
optional: true,
68+
},
69+
addressPostalCode: {
70+
type: "string",
71+
label: "Postal Code",
72+
description: "The postal code of the customer",
73+
optional: true,
74+
},
75+
addressstate: {
76+
type: "string",
77+
label: "State",
78+
description: "The state of the customer",
79+
optional: true,
80+
},
81+
addressLine1: {
82+
type: "string",
83+
label: "Address Line 1",
84+
description: "The address line 1 of the customer",
85+
optional: true,
86+
},
87+
addressLine2: {
88+
type: "string",
89+
label: "Address Line 2",
90+
description: "The address line 2 of the customer",
6191
optional: true,
6292
},
6393
invoiceCreatedNotification: {
@@ -150,7 +180,16 @@ export default {
150180
surname: this.surname,
151181
email: this.email,
152182
mobile_number: this.mobileNumber,
153-
addresses: parseObject(this.addresses),
183+
addresses: [
184+
{
185+
city: this.addressCity,
186+
country: this.addressCountry,
187+
postal_code: this.addressPostalCode,
188+
state: this.addressstate,
189+
street_line1: this.addressLine1,
190+
street_line2: this.addressLine2,
191+
},
192+
],
154193
},
155194
customer_notification_preference: {
156195
invoice_created: parseObject(this.invoiceCreatedNotification),

components/xendit/actions/create-payout/create-payout.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default {
9292
account_number: this.accountNumber,
9393
account_type: this.accountType,
9494
},
95-
amount: this.amount,
95+
amount: parseFloat(this.amount),
9696
description: this.description,
9797
currency: this.currency,
9898
receipt_notification: {

0 commit comments

Comments
 (0)