@@ -46,7 +46,7 @@ import 'package:encrypt/encrypt.dart';
46
46
import 'dart:convert' ;
47
47
48
48
/// WooSignal Package version
49
- const String wooSignalVersion = "1.0.3 " ;
49
+ const String wooSignalVersion = "1.0.4 " ;
50
50
51
51
class WooSignalShopify {
52
52
WooSignalShopify ._privateConstructor ();
@@ -247,6 +247,55 @@ class WooSignalShopify {
247
247
jsonResponse: (json) => OrderCreatedResponse .fromJson (json));
248
248
}
249
249
250
+ Future <List <Product >?> getProductsJson ({
251
+ int ? limit,
252
+ String ? productType,
253
+ int ? collectionId,
254
+ String ? createdAtMax,
255
+ String ? createdAtMin,
256
+ String ? fields,
257
+ String ? handle,
258
+ List <int >? ids,
259
+ String ? presentmentCurrencies,
260
+ String ? publishedAtMax,
261
+ String ? publishedAtMin,
262
+ String ? publishedStatus,
263
+ int ? sinceId,
264
+ String ? status,
265
+ String ? title,
266
+ String ? updatedAtMax,
267
+ String ? updatedAtMin,
268
+ String ? vendor,
269
+ }) async {
270
+ Map <String , dynamic > payload = {};
271
+ if (limit != null ) payload["limit" ] = limit;
272
+ if (productType != null ) payload["product_type" ] = productType;
273
+ if (collectionId != null ) payload["collection_id" ] = collectionId;
274
+ if (createdAtMax != null ) payload["created_at_max" ] = createdAtMax;
275
+ if (createdAtMin != null ) payload["created_at_min" ] = createdAtMin;
276
+ if (fields != null ) payload["fields" ] = fields;
277
+ if (handle != null ) payload["handle" ] = handle;
278
+ if (ids != null ) payload["ids" ] = ids;
279
+ if (presentmentCurrencies != null ) {
280
+ payload["presentment_currencies" ] = presentmentCurrencies;
281
+ }
282
+ if (publishedAtMax != null ) payload["published_at_max" ] = publishedAtMax;
283
+ if (publishedAtMin != null ) payload["published_at_min" ] = publishedAtMin;
284
+ if (publishedStatus != null ) payload["published_status" ] = publishedStatus;
285
+ if (sinceId != null ) payload["since_id" ] = sinceId;
286
+ if (status != null ) payload["status" ] = status;
287
+ if (title != null ) payload["title" ] = title;
288
+ if (updatedAtMax != null ) payload["updated_at_max" ] = updatedAtMax;
289
+ if (updatedAtMin != null ) payload["updated_at_min" ] = updatedAtMin;
290
+ if (vendor != null ) payload["vendor" ] = vendor;
291
+
292
+ return await _wooSignalRequest <List <Product >>(
293
+ path: "products/json" ,
294
+ method: "post" ,
295
+ payload: payload,
296
+ jsonResponse: (json) => List <Product >.from (json));
297
+ }
298
+
250
299
Future <ShopifyProductResponse ?> getProducts ({
251
300
int ? first,
252
301
String ? after,
@@ -525,11 +574,12 @@ class WooSignalShopify {
525
574
if (accessToken != null ) payload["access_token" ] = accessToken;
526
575
527
576
return await _wooSignalRequest <AuthCustomerInfo >(
528
- path: "auth/customer" ,
529
- method: "get" ,
530
- payload: payload,
531
- jsonResponse: (json) => AuthCustomerInfo .fromJson (json),
532
- auth: true );
577
+ path: "auth/customer" ,
578
+ method: "get" ,
579
+ payload: payload,
580
+ jsonResponse: (json) => AuthCustomerInfo .fromJson (json),
581
+ auth: true ,
582
+ );
533
583
}
534
584
535
585
/// Search products
0 commit comments