@shopify/shopify-api
Version:
Shopify API Library for Node - accelerate development with support for authentication, graphql proxy, webhooks
1 lines • 4.32 kB
Source Map (JSON)
{"version":3,"file":"application_charge.mjs","sources":["../../../../../../../rest/admin/2023-01/application_charge.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {Base, FindAllResponse} from '../../base';\nimport {ResourcePath, ResourceNames} from '../../types';\nimport {Session} from '../../../lib/session/session';\nimport {ApiVersion} from '../../../lib/types';\n\ninterface FindArgs {\n session: Session;\n id: number | string;\n fields?: unknown;\n}\ninterface AllArgs {\n [key: string]: unknown;\n session: Session;\n since_id?: unknown;\n fields?: unknown;\n}\n\nexport class ApplicationCharge extends Base {\n public static apiVersion = ApiVersion.January23;\n\n protected static hasOne: {[key: string]: typeof Base} = {};\n protected static hasMany: {[key: string]: typeof Base} = {};\n protected static paths: ResourcePath[] = [\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [], \"path\": \"application_charges.json\"},\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [\"id\"], \"path\": \"application_charges/<id>.json\"},\n {\"http_method\": \"post\", \"operation\": \"post\", \"ids\": [], \"path\": \"application_charges.json\"}\n ];\n protected static resourceNames: ResourceNames[] = [\n {\n \"singular\": \"application_charge\",\n \"plural\": \"application_charges\"\n }\n ];\n\n public static async find(\n {\n session,\n id,\n fields = null\n }: FindArgs\n ): Promise<ApplicationCharge | null> {\n const result = await this.baseFind<ApplicationCharge>({\n session: session,\n requireIds: true,\n urlIds: {\"id\": id},\n params: {\"fields\": fields},\n });\n return result.data ? result.data[0] : null;\n }\n\n public static async all(\n {\n session,\n since_id = null,\n fields = null,\n ...otherArgs\n }: AllArgs\n ): Promise<FindAllResponse<ApplicationCharge>> {\n const response = await this.baseFind<ApplicationCharge>({\n session: session,\n urlIds: {},\n params: {\"since_id\": since_id, \"fields\": fields, ...otherArgs},\n });\n\n return response;\n }\n\n public confirmation_url: string | null;\n public created_at: string | null;\n public currency: string | null;\n public id: string | null;\n public name: string | null;\n public price: string | number | null;\n public return_url: string | null;\n public status: string | null;\n public test: boolean | null;\n public updated_at: string | null;\n}\n"],"names":[],"mappings":";;;AAAA;;AAEwH;AAmBlH,MAAO,iBAAkB,SAAQ,IAAI,CAAA;AAClC,IAAA,OAAO,UAAU,GAAG,UAAU,CAAC,SAAS;AAErC,IAAA,OAAO,MAAM,GAAiC,EAAE;AAChD,IAAA,OAAO,OAAO,GAAiC,EAAE;IACjD,OAAO,KAAK,GAAmB;AACvC,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,0BAA0B,EAAC;AACzF,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,+BAA+B,EAAC;AAClG,QAAA,EAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,0BAA0B;KAC3F;IACS,OAAO,aAAa,GAAoB;AAChD,QAAA;AACE,YAAA,UAAU,EAAE,oBAAoB;AAChC,YAAA,QAAQ,EAAE;AACX;KACF;AAEM,IAAA,aAAa,IAAI,CACtB,EACE,OAAO,EACP,EAAE,EACF,MAAM,GAAG,IAAI,EACJ,EAAA;AAEX,QAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAoB;AACpD,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,MAAM,EAAE,EAAC,IAAI,EAAE,EAAE,EAAC;AAClB,YAAA,MAAM,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC;AAC3B,SAAA,CAAC;AACF,QAAA,OAAO,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,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