Skip to content

Commit

Permalink
feat(Shopify Node): Update Shopify API version (#10155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom authored and cstuncsik committed Aug 1, 2024
1 parent cb7c6e9 commit 7923d3b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type {
ICredentialType,
INodeProperties,
} from 'n8n-workflow';

export class ShopifyAccessTokenApi implements ICredentialType {
name = 'shopifyAccessTokenApi';

Expand Down Expand Up @@ -51,7 +50,7 @@ export class ShopifyAccessTokenApi implements ICredentialType {

test: ICredentialTestRequest = {
request: {
baseURL: '=https://{{$credentials?.shopSubdomain}}.myshopify.com/admin/api/2019-10',
baseURL: '=https://{{$credentials?.shopSubdomain}}.myshopify.com/admin/api/2024-07',
url: '/products.json',
},
};
Expand Down
3 changes: 1 addition & 2 deletions packages/nodes-base/credentials/ShopifyApi.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {
IHttpRequestOptions,
INodeProperties,
} from 'n8n-workflow';

export class ShopifyApi implements ICredentialType {
name = 'shopifyApi';

Expand Down Expand Up @@ -63,7 +62,7 @@ export class ShopifyApi implements ICredentialType {

test: ICredentialTestRequest = {
request: {
baseURL: '=https://{{$credentials.shopSubdomain}}.myshopify.com/admin/api/2019-10',
baseURL: '=https://{{$credentials.shopSubdomain}}.myshopify.com/admin/api/2024-07',
url: '/products.json',
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Shopify/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export async function shopifyApiRequest(
const options: IRequestOptions = {
method,
qs: query,
uri: uri || `https://${credentials.shopSubdomain}.myshopify.com/admin/api/2019-10${resource}`,
uri: uri || `https://${credentials.shopSubdomain}.myshopify.com/admin/api/2024-07/${resource}`,
body,
json: true,
};
Expand Down
7 changes: 7 additions & 0 deletions packages/nodes-base/nodes/Shopify/Shopify.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ export class Shopify implements INodeType {
},
],
properties: [
{
displayName: 'Shopify API Version: 2024-07',
type: 'notice',
name: 'apiVersion',
default: '',
isNodeSetting: true,
},
{
displayName: 'Authentication',
name: 'authentication',
Expand Down

0 comments on commit 7923d3b

Please sign in to comment.