Closed anastis closed 1 month ago
Before opening this issue, I have:
@shopify/*
{ logger: { level: LogSeverity.Debug } }
This is really a duplicate of https://github.com/Shopify/shopify-api-js/issues/1325 but applicable to one-time charges (ApplicationCharge class). Not sure if this is the right repo, I observe the issue in a Remix app.
ApplicationCharge
Current code: https://github.com/Shopify/shopify-app-js/blob/64e921bf80f65f9ee0f7bdf0ed9969e64e41e996/packages/apps/shopify-api/rest/admin/2024-07/application_charge.ts#L78
Previous fix in recurring charges: https://github.com/Shopify/shopify-api-js/commit/513f9e6c3bb6a9f1d289820a9a40602c5ef04d28#diff-b7fd618aa27ac126617eff6762287fed5dbe2aa82a516a1da587a788fc4bf786
The charge's currency should be a string (to be consistent with recurring charges), or perhaps a proper currency object.
currency property is an object like { 0: "U", 1: "S", 2: "D" }
{ 0: "U", 1: "S", 2: "D" }
const charges = await admin.rest.resources.ApplicationCharge.all({ session, }); console.log(charges[0].currency);
Thanks for flagging! I will add this to our work list.
Issue summary
Before opening this issue, I have:
@shopify/*
package and version:{ logger: { level: LogSeverity.Debug } }
in my configuration, when applicableDescription
This is really a duplicate of https://github.com/Shopify/shopify-api-js/issues/1325 but applicable to one-time charges (
ApplicationCharge
class). Not sure if this is the right repo, I observe the issue in a Remix app.Current code: https://github.com/Shopify/shopify-app-js/blob/64e921bf80f65f9ee0f7bdf0ed9969e64e41e996/packages/apps/shopify-api/rest/admin/2024-07/application_charge.ts#L78
Previous fix in recurring charges: https://github.com/Shopify/shopify-api-js/commit/513f9e6c3bb6a9f1d289820a9a40602c5ef04d28#diff-b7fd618aa27ac126617eff6762287fed5dbe2aa82a516a1da587a788fc4bf786
Expected behavior
The charge's currency should be a string (to be consistent with recurring charges), or perhaps a proper currency object.
Actual behavior
currency property is an object like
{ 0: "U", 1: "S", 2: "D" }
Steps to reproduce the problem