Skip to content

Commit

Permalink
v3.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Mar 15, 2024
1 parent 335b057 commit a12946e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [3.13.0] - 2024-03-15

* New network method `personalizationCategories` to store personalization categories

## [3.12.0] - 2024-03-15

* Fix shipping zone method
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In your flutter project add the dependency:
``` dart
dependencies:
...
woosignal: ^3.12.0
woosignal: ^3.13.0
```

### Usage example #
Expand Down
19 changes: 18 additions & 1 deletion lib/woosignal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import 'package:encrypt/encrypt.dart' as enc;
import 'package:encrypt/encrypt.dart';

/// WooSignal Package version
const String _wooSignalVersion = "3.12.0";
const String _wooSignalVersion = "3.13.0";

class WooSignal {
WooSignal._privateConstructor();
Expand Down Expand Up @@ -1584,4 +1584,21 @@ class WooSignal {
jsonResponse: (json) => ProductTag.fromJson(json),
);
}

/// Used for personalization of the app around the user's interests
Future<bool?> personalizationCategories(
{required List<int> categoryIds}) async {
Map<String, dynamic> payload = {
"category_ids": categoryIds,
};
Map<String, dynamic>? payloadRsp =
await _apiProvider.post("/personalization/categories", payload);

_printLog(payloadRsp.toString());
if (payloadRsp == null) {
return false;
}

return payloadRsp['status'] == 200;
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: woosignal
description: WooCommerce REST API for dart, connect a WooCommerce store and start developing with our interface for their API endpoints.
version: 3.12.0
version: 3.13.0
homepage: https://woosignal.com
repository: https://github.com/woosignal/flutter-woocommerce-api
issue_tracker: https://github.com/woosignal/flutter-woocommerce-api/issues
Expand Down

0 comments on commit a12946e

Please sign in to comment.