Skip to content

Commit

Permalink
v3.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agordn52 committed Apr 6, 2024
1 parent a03a1ce commit 2645ddc
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.0.1/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.0/","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.8/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.2.0/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.2.0/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"flutter_secure_storage_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.1.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-04-03 16:52:57.218643","version":"3.19.5"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.0.1/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.2.2/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.0/","native_build":true,"dependencies":[]},{"name":"path_provider_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.8/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.2.0/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","native_build":false,"dependencies":[]},{"name":"flutter_secure_storage_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.0.0/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.2.0/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-9.1.2/","dependencies":[]},{"name":"flutter_secure_storage_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.1.2/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0/","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-04-06 23:38:30.756655","version":"3.19.5"}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [3.14.0] - 2024-04-06

* Add toJson method to `Product` class
* Pubspec.yaml dependency updates.

## [3.13.5] - 2024-04-03

* Pubspec.yaml dependency updates.
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.13.5
woosignal: ^3.14.0
```

### Usage example #
Expand Down
62 changes: 62 additions & 0 deletions lib/models/response/product.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,68 @@ class Product {
metaData = (json['meta_data'] as List)
.map((i) => MetaData.fromJson(i))
.toList();

Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'slug': slug,
'permalink': permalink,
'type': type,
'status': status,
'featured': featured,
'catalog_visibility': catalogVisibility,
'description': description,
'short_description': shortDescription,
'sku': sku,
'price': price,
'regular_price': regularPrice,
'sale_price': salePrice,
'price_html': priceHtml,
'on_sale': onSale,
'purchasable': purchasable,
'total_sales': totalSales,
'virtual': virtual,
'downloadable': downloadable,
'downloads': downloads.map((i) => i.toJson()).toList(),
'download_limit': downloadLimit,
'download_expiry': downloadExpiry,
'external_url': externalUrl,
'button_text': buttonText,
'tax_status': taxStatus,
'tax_class': taxClass,
'manage_stock': manageStock,
'stock_quantity': stockQuantity,
'stock_status': stockStatus,
'backorders': backorders,
'backorders_allowed': backordersAllowed,
'backordered': backordered,
'sold_individually': soldIndividually,
'weight': weight,
'dimensions': dimensions.toJson(),
'shipping_required': shippingRequired,
'shipping_taxable': shippingTaxable,
'shipping_class': shippingClass,
'shipping_class_id': shippingClassId,
'reviews_allowed': reviewsAllowed,
'average_rating': averageRating,
'rating_count': ratingCount,
'related_ids': relatedIds,
'upsell_ids': upsellIds,
'cross_sell_ids': crossSellIds,
'parent_id': parentId,
'purchase_note': purchaseNote,
'categories': categories.map((i) => i.toJson()).toList(),
'tags': tags.map((i) => i.toJson()).toList(),
'images': images.map((i) => i.toJson()).toList(),
'attributes': attributes.map((i) => i.toJson()).toList(),
'default_attributes': defaultAttributes.map((i) => i.toJson()).toList(),
'variations': variations,
'grouped_products': groupedProducts,
'menu_order': menuOrder,
'meta_data': metaData.map((i) => i.toJson()).toList(),
'date_created': dateCreated,
'date_created_gmt': dateCreatedGMT,
};
}

class Tag {
Expand Down
2 changes: 1 addition & 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.13.5";
const String _wooSignalVersion = "3.14.0";

class WooSignal {
WooSignal._privateConstructor();
Expand Down
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.13.5
version: 3.14.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 2645ddc

Please sign in to comment.