{"title":"Codeunit 30228 Shpfy Refunds API, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/30228-shpfy-refunds-api/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":30228,"name":"Shpfy Refunds API","app":"Shopify Connector","url":"https://jonas-paprotka.de/ref/codeunit/30228-shpfy-refunds-api/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/30228-shpfy-refunds-api/source/","path":"src/Apps/W1/Shopify/App/src/Order Refunds/Codeunits/ShpfyRefundsAPI.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:30157":{"name":"Shpfy Json Helper","url":"https://jonas-paprotka.de/ref/codeunit/30157-shpfy-json-helper/"},"codeunit:30103":{"name":"Shpfy Communication Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/30103-shpfy-communication-mgt/"},"table:30142":{"name":"Shpfy Refund Header","url":"https://jonas-paprotka.de/ref/table/30142-shpfy-refund-header/"},"codeunit:30161":{"name":"Shpfy Import Order","url":"https://jonas-paprotka.de/ref/codeunit/30161-shpfy-import-order/"},"table:30114":{"name":"Shpfy Data Capture","url":"https://jonas-paprotka.de/ref/table/30114-shpfy-data-capture/"},"codeunit:30250":{"name":"Shpfy Returns API","url":"https://jonas-paprotka.de/ref/codeunit/30250-shpfy-returns-api/"},"table:30145":{"name":"Shpfy Refund Line","url":"https://jonas-paprotka.de/ref/table/30145-shpfy-refund-line/"},"codeunit:30231":{"name":"Shpfy Refund Enum Convertor","url":"https://jonas-paprotka.de/ref/codeunit/30231-shpfy-refund-enum-convertor/"},"table:30162":{"name":"Shpfy Refund Shipping Line","url":"https://jonas-paprotka.de/ref/table/30162-shpfy-refund-shipping-line/"},"table:30133":{"name":"Shpfy Order Transaction","url":"https://jonas-paprotka.de/ref/table/30133-shpfy-order-transaction/"}},"procs":[{"name":"GetRefunds","line":17,"kind":"procedure","access":"internal","params":1,"steps":[[22,"call","GetRefund",2],[22,"ext","codeunit",30157,"GetValueAsBigInteger",2],[22,"ext","codeunit",30157,"GetValueAsDateTime",2]]},{"name":"VerifyRefundCanCreateCreditMemo","line":25,"kind":"procedure","access":"internal","params":1,"steps":[[33,"call","HasPendingRefundTransactions",1]]},{"name":"GetRefund","line":55,"kind":"procedure","access":"local","params":2,"steps":[[60,"call","GetRefundHeader",3],[61,"call","CollectReturnLocations",1],[62,"call","GetRefundLines",3],[63,"call","GetRefundShippingLines",1],[65,"call","GetRefundExchangeLines",2]]},{"name":"GetRefundHeader","line":68,"kind":"procedure","access":"local","params":3,"steps":[[84,"ext","codeunit",30103,"ExecuteGraphQL",2],[85,"ext","codeunit",30157,"GetJsonObject",2],[89,"ext","codeunit",30157,"GetValueAsBigInteger",2],[90,"ext","codeunit",30103,"GetIdOfGId",1],[90,"ext","codeunit",30157,"GetValueAsText",2],[91,"ext","codeunit",30157,"GetValueAsDateTime",2],[92,"ext","codeunit",30103,"GetShopRecord",0],[93,"write",30142,"Insert"],[95,"ext","table",30142,"SetNote",1],[95,"ext","codeunit",30157,"GetValueAsText",2],[97,"ext","codeunit",30157,"GetValueIntoField",4],[98,"ext","codeunit",30157,"GetValueIntoField",4],[99,"ext","codeunit",30157,"GetValueIntoField",4],[100,"ext","codeunit",30157,"GetValueIntoField",4],[101,"ext","codeunit",30157,"GetValueIntoField",4],[105,"ext","codeunit",30161,"TranslateCurrencyCode",1],[106,"ext","codeunit",30161,"TranslateCurrencyCode",1],[107,"write",30142,"Modify"],[108,"ext","table",30114,"Add",3],[109,"call","UpdateTransactions",2]]},{"name":"GetRefundLines","line":112,"kind":"procedure","access":"local","params":3,"steps":[[123,"ext","codeunit",30103,"ExecuteGraphQL",2],[125,"ext","codeunit",30157,"GetJsonArray",2],[127,"ext","codeunit",30157,"GetValueAsText",2],[129,"ext","codeunit",30157,"GetValueAsText",2],[132,"call","FillInRefundLine",4],[132,"call","IsNonZeroOrReturnRefund",1],[133,"ext","codeunit",30157,"GetValueAsBoolean",2]]},{"name":"GetRefundShippingLines","line":136,"kind":"procedure","access":"local","params":1,"steps":[[147,"ext","codeunit",30103,"ExecuteGraphQL",2],[149,"ext","codeunit",30157,"GetJsonArray",2],[151,"ext","codeunit",30157,"GetValueAsText",2],[153,"ext","codeunit",30157,"GetValueAsText",2],[156,"call","FillInRefundShippingLine",2],[157,"ext","codeunit",30157,"GetValueAsBoolean",2]]},{"name":"GetRefundExchangeLines","line":160,"kind":"procedure","access":"local","params":2,"steps":[[176,"ext","codeunit",30103,"ExecuteGraphQL",2],[177,"ext","table",30114,"Add",3],[179,"ext","codeunit",30157,"GetJsonArray",2],[181,"ext","codeunit",30157,"GetValueAsText",2],[183,"ext","codeunit",30157,"GetValueAsText",2],[186,"ext","codeunit",30157,"GetValueAsInteger",2],[187,"ext","codeunit",30157,"GetJsonArray",2],[189,"ext","codeunit",30103,"GetIdOfGId",1],[189,"ext","codeunit",30157,"GetValueAsText",2],[191,"call","FillInExchangeRefundLine",4],[194,"ext","codeunit",30157,"GetValueAsBoolean",2]]},{"name":"CollectReturnLocations","line":197,"kind":"procedure","access":"local","params":1,"steps":[[202,"ext","codeunit",30250,"GetReturnLocations",1]]},{"name":"FillInRefundLine","line":205,"kind":"procedure","access":"internal","params":4,"steps":[[214,"ext","codeunit",30103,"GetIdOfGId",1],[214,"ext","codeunit",30157,"GetValueAsText",2],[215,"ext","codeunit",30103,"GetIdOfGId",1],[215,"ext","codeunit",30157,"GetValueAsText",2],[221,"write",30145,"Insert"],[224,"ext","codeunit",30231,"ConvertToReStockType",1],[224,"ext","codeunit",30157,"GetValueAsText",2],[227,"ext","codeunit",30157,"GetValueIntoField",4],[228,"ext","codeunit",30157,"GetValueIntoField",4],[229,"ext","codeunit",30157,"GetValueIntoField",4],[230,"ext","codeunit",30157,"GetValueIntoField",4],[231,"ext","codeunit",30157,"GetValueIntoField",4],[232,"ext","codeunit",30157,"GetValueIntoField",4],[233,"ext","codeunit",30157,"GetValueIntoField",4],[234,"ext","codeunit",30157,"GetValueIntoField",4],[238,"ext","codeunit",30157,"GetValueAsBigInteger",2],[245,"write",30145,"Modify"],[248,"ext","table",30114,"Add",3]]},{"name":"FillInRefundShippingLine","line":251,"kind":"procedure","access":"internal","params":2,"steps":[[258,"ext","codeunit",30103,"GetIdOfGId",1],[258,"ext","codeunit",30157,"GetValueAsText",2],[263,"write",30162,"Insert"],[267,"ext","codeunit",30157,"GetValueIntoField",4],[268,"ext","codeunit",30157,"GetValueIntoField",4],[269,"ext","codeunit",30157,"GetValueIntoField",4],[270,"ext","codeunit",30157,"GetValueIntoField",4],[271,"ext","codeunit",30157,"GetValueIntoField",4],[274,"write",30162,"Modify"],[277,"ext","table",30114,"Add",3]]},{"name":"FillInExchangeRefundLine","line":285,"kind":"procedure","access":"internal","params":4,"steps":[[308,"ext","codeunit",30157,"GetValueAsDecimal",2],[309,"ext","codeunit",30157,"GetValueAsDecimal",2],[310,"ext","codeunit",30157,"GetValueAsDecimal",2],[311,"ext","codeunit",30157,"GetValueAsDecimal",2],[314,"ext","codeunit",30157,"GetJsonArray",2],[316,"ext","codeunit",30157,"GetValueAsDecimal",2],[317,"ext","codeunit",30157,"GetValueAsDecimal",2],[325,"write",30145,"Insert"],[340,"write",30145,"Modify"],[342,"ext","table",30114,"Add",3]]},{"name":"UpdateTransactions","line":345,"kind":"procedure","access":"local","params":2,"steps":[[352,"ext","codeunit",30157,"GetJsonArray",2],[355,"ext","codeunit",30103,"GetIdOfGId",1],[355,"ext","codeunit",30157,"GetValueAsText",2],[359,"write",30133,"Modify"]]}]}