Skip to content

Commit cb1c444

Browse files
committed
v3.7.0
1 parent 6fabeed commit cb1c444

File tree

7 files changed

+28
-20
lines changed

7 files changed

+28
-20
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Files and directories created by pub.
22
.dart_tool/
33
.packages
4-
.idea/
54
.flutter-plugins
65

76
# Conventional directory for build outputs.

.idea/libraries/Flutter_Plugins.xml

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [3.7.0] - 2023-07-03
2+
3+
* Update parameters for creating orders.
4+
15
## [3.6.1] - 2023-07-03
26

37
* Fix dart analysis `refer_interpolation_to_compose_strings` in project.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In your flutter project add the dependency:
1515
``` dart
1616
dependencies:
1717
...
18-
woosignal: ^3.6.1
18+
woosignal: ^3.7.0
1919
```
2020

2121
### Usage example #

lib/woosignal.dart

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import 'package:woosignal/models/response/setting_option_batch.dart';
5353
import 'package:woosignal/models/response/product_batch.dart';
5454

5555
/// WooSignal Package version
56-
const String wooSignalVersion = "3.6.1";
56+
const String wooSignalVersion = "3.7.0";
5757

5858
class WooSignal {
5959
WooSignal._privateConstructor();
@@ -1363,19 +1363,23 @@ class WooSignal {
13631363
required String name,
13641364
String type = "simple", // simple, grouped, external and variable.
13651365
required String regularPrice,
1366-
required String description,
1367-
required String shortDescription,
1368-
required Map<String, dynamic> categories,
1369-
required Map<String, dynamic> images,
1366+
String? description,
1367+
String? shortDescription,
1368+
List<Map<String, dynamic>>? categories,
1369+
List<Map<String, dynamic>>? images,
1370+
List<Map<String, dynamic>>? metaData,
13701371
}) async {
13711372
Map<String, dynamic> payload = {};
13721373
payload['name'] = name;
13731374
payload['type'] = type;
13741375
payload['regular_price'] = regularPrice;
1375-
payload['description'] = description;
1376-
payload['short_description'] = shortDescription;
1377-
payload['categories'] = categories;
1378-
payload['images'] = images;
1376+
if (description != null) payload['description'] = description;
1377+
if (shortDescription != null) {
1378+
payload['short_description'] = shortDescription;
1379+
}
1380+
if (categories != null) payload['categories'] = categories;
1381+
if (images != null) payload['images'] = images;
1382+
if (metaData != null) payload['meta_data'] = metaData;
13791383

13801384
return await _wooSignalRequest<Product?>(
13811385
method: "post",

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: woosignal
22
description: WooCommerce REST API for dart, connect a WooCommerce store and start developing with our interface for their API endpoints.
3-
version: 3.6.1
3+
version: 3.7.0
44
homepage: https://woosignal.com
55
repository: https://github.com/woosignal/flutter-woocommerce-api
66
issue_tracker: https://github.com/woosignal/flutter-woocommerce-api/issues

0 commit comments

Comments
 (0)