Created
October 24, 2023 12:38
-
-
Save ballerina-github-bot/2ab90ca9654eda367c98aeb973f8dd71 to your computer and use it in GitHub Desktop.
Ballerina Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ballerina/io; | |
import record_to_edi.sorder; | |
public function main() returns error? { | |
sorder:SimpleOrder simpleOrder = | |
{header: {code: "HDR", orderId: "ORDER_200", organization: "HMart", date: "17-05-2023"}}; | |
simpleOrder.items.push({code: "ITM", item: "A680", quantity: 15}); | |
simpleOrder.items.push({code: "ITM", item: "A530", quantity: 2}); | |
simpleOrder.items.push({code: "ITM", item: "A500", quantity: 4}); | |
string ediText = check sorder:toEdiString(simpleOrder); | |
io:println(ediText); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment