Skip to content

Commit f7247ab

Browse files
author
WooSignal
committed
Tweaks and bugs resolved
1 parent ab791cb commit f7247ab

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.0.7] - 2020-05-08
2+
3+
* Tweaks and bugs resolved
4+
15
## [1.0.6] - 2020-04-09
26

37
* Ability to create Product reviews

lib/models/payload/order_wc.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class LineItems {
316316
int productId;
317317
String name;
318318
int variationId;
319-
String tax_class;
319+
String taxClass;
320320
String subtotal;
321321
String total;
322322
int quantity;
@@ -325,7 +325,7 @@ class LineItems {
325325
{this.productId,
326326
this.name,
327327
this.variationId,
328-
this.tax_class,
328+
this.taxClass,
329329
this.subtotal,
330330
this.total,
331331
this.quantity});
@@ -334,7 +334,7 @@ class LineItems {
334334
productId = json['product_id'];
335335
name = json['name'];
336336
variationId = json['variation_id'];
337-
tax_class = json['tax_class'];
337+
taxClass = json['tax_class'];
338338
subtotal = json['subtotal'];
339339
total = json['total'];
340340
quantity = json['quantity'];
@@ -347,8 +347,8 @@ class LineItems {
347347
if (this.variationId != null) {
348348
data['variation_id'] = this.variationId;
349349
}
350-
if (this.tax_class != null) {
351-
data['tax_class'] = this.tax_class;
350+
if (this.taxClass != null) {
351+
data['tax_class'] = this.taxClass;
352352
}
353353
data['subtotal'] = this.subtotal;
354354
data['total'] = this.total;

lib/models/response/product_category.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020, WooSignal.
1+
// Copyright (c) 2020, WooSignal Ltd
22
// All rights reserved.
33
//
44
// Redistribution and use in source and binary forms are permitted
@@ -96,7 +96,7 @@ class Image {
9696
dateCreatedGmt = json['date_created_gmt'];
9797
dateModified = json['date_modified'];
9898
dateModifiedGmt = json['date_modified_gmt'];
99-
src = json['src'];
99+
src = (json['src'] != null && json['src'] is String) ? json['src'] : "";
100100
name = json['name'];
101101
alt = json['alt'];
102102
}

lib/models/response/product_variation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class ProductVariation {
115115
downloadExpiry = json['download_expiry'],
116116
taxStatus = json['tax_status'],
117117
taxClass = json['tax_class'],
118-
manageStock = json['manage_stock'],
118+
manageStock = (json['manage_stock'] != null && json['manage_stock'] is bool) ? json['manage_stock'] : false,
119119
stockQuantity = json['stock_quantity'],
120120
stockStatus = json['stock_status'],
121121
backorders = json['backorders'],

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: 1.0.6
3+
version: 1.0.7
44
homepage: https://woosignal.com
55
repository: https://github.com/woosignal/flutter-woocommerce-api
66

0 commit comments

Comments
 (0)