├── .flutter-plugins-dependencies ├── .github └── workflows │ └── publish.yml ├── .gitignore ├── .idea ├── .gitignore ├── caches │ └── deviceStreaming.xml ├── libraries │ ├── Dart_Packages.xml │ ├── Dart_SDK.xml │ └── Flutter_Plugins.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── woosignal_app │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── ephemeral │ │ │ ├── flutter_lldb_helper.py │ │ │ └── flutter_lldbinit │ ├── Podfile │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── pubspec.yaml └── test │ └── widget_test.dart ├── lib ├── models │ ├── collection.dart │ ├── image.dart │ ├── links.dart │ ├── menu_link.dart │ ├── meta_data.dart │ ├── payload │ │ └── order_wc.dart │ ├── response │ │ ├── api_data.dart │ │ ├── continent.dart │ │ ├── countries.dart │ │ ├── coupon.dart │ │ ├── coupon_batch.dart │ │ ├── currencies.dart │ │ ├── customer.dart │ │ ├── customer_batch.dart │ │ ├── customer_download.dart │ │ ├── dimension.dart │ │ ├── order.dart │ │ ├── order_batch.dart │ │ ├── order_notes.dart │ │ ├── payment_gateway.dart │ │ ├── product.dart │ │ ├── product_attribute_term.dart │ │ ├── product_attributes.dart │ │ ├── product_batch.dart │ │ ├── product_category.dart │ │ ├── product_category_collection.dart │ │ ├── product_review.dart │ │ ├── product_shipping_class.dart │ │ ├── product_tag.dart │ │ ├── product_variation.dart │ │ ├── refund.dart │ │ ├── reports.dart │ │ ├── sale_report.dart │ │ ├── setting_option.dart │ │ ├── setting_option_batch.dart │ │ ├── shipping_method.dart │ │ ├── shipping_zone.dart │ │ ├── shipping_zone_location.dart │ │ ├── system_status.dart │ │ ├── tax_classes.dart │ │ ├── tax_rate.dart │ │ ├── top_seller_report.dart │ │ └── woosignal_app.dart │ └── self.dart ├── money_formatter │ ├── money_formatter.dart │ └── src │ │ ├── flutter_money_formatter_base.dart │ │ └── utils │ │ ├── compact_format_type.dart │ │ ├── money_formatter_compare.dart │ │ ├── money_formatter_output.dart │ │ ├── money_formatter_settings.dart │ │ └── utilities.dart ├── networking │ └── api_provider.dart └── woosignal.dart ├── pubspec.yaml ├── screenshots └── logo.png ├── test └── woosignal_woocommerce_api_test.dart └── woosignal-woocommerce-api.iml /.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"app_badge_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/app_badge_plus-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-11.4.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_local_notifications-19.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_timezone-4.1.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"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":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"app_badge_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/app_badge_plus-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-11.4.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_local_notifications-19.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_timezone-4.1.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_android-2.1.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"app_badge_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/app_badge_plus-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-11.4.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_local_notifications-19.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_timezone-4.1.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"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":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_macos-3.1.0/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-11.4.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-6.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_timezone-4.1.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.2/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_linux-3.1.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-11.4.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_local_notifications_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_local_notifications_windows-1.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_timezone-4.1.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.2/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"device_info_plus","path":"/Users/anthony/.pub-cache/hosted/pub.dev/device_info_plus-11.4.0/","dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"flutter_timezone","path":"/Users/anthony/.pub-cache/hosted/pub.dev/flutter_timezone-4.1.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/shared_preferences_web-2.1.0/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/Users/anthony/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"app_badge_plus","dependencies":[]},{"name":"device_info_plus","dependencies":[]},{"name":"flutter_local_notifications","dependencies":["flutter_local_notifications_linux","flutter_local_notifications_windows"]},{"name":"flutter_local_notifications_linux","dependencies":[]},{"name":"flutter_local_notifications_windows","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":"flutter_timezone","dependencies":[]},{"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"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2025-05-23 15:00:48.065215","version":"3.32.0","swift_package_manager_enabled":{"ios":false,"macos":false}} -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | # .github/workflows/publish.yml 2 | name: Publish to pub.dev 3 | 4 | on: 5 | push: 6 | tags: 7 | - 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v' 8 | 9 | # Publish using the reusable workflow from dart-lang. 10 | jobs: 11 | publish-package: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Checkout code 16 | uses: actions/checkout@v3 17 | 18 | - name: Set up Flutter 19 | uses: subosito/flutter-action@v2 20 | 21 | - name: Get dependencies 22 | run: flutter pub get 23 | 24 | - name: Analyze code 25 | run: flutter analyze 26 | 27 | - name: Format code 28 | run: dart format . 29 | 30 | - name: Check publish warnings 31 | run: flutter pub publish --dry-run 32 | 33 | - name: Publish package 34 | uses: k-paxian/dart-package-publisher@master 35 | with: 36 | credentialJson: ${{ secrets.CREDENTIAL_SECRET }} 37 | flutter: true 38 | skipTests: true -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub. 2 | .dart_tool/ 3 | .packages 4 | .flutter-plugins 5 | 6 | # Conventional directory for build outputs. 7 | build/ 8 | 9 | # Omit committing pubspec.lock for library packages; see 10 | # https://dart.dev/guides/libraries/private-files#pubspeclock. 11 | pubspec.lock 12 | lib/env.dart -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # GitHub Copilot persisted chat sessions 5 | /copilot/chatSessions 6 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [4.2.0] - 2025-05-23 2 | 3 | * Add money formatter into library 4 | 5 | ## [4.1.6] - 2025-05-23 6 | 7 | * Pubspec.yaml dependency updates. 8 | 9 | ## [4.1.5] - 2025-04-09 10 | 11 | * Pubspec.yaml dependency updates. 12 | 13 | ## [4.1.4] - 2025-03-27 14 | 15 | * Pubspec.yaml dependency updates. 16 | 17 | ## [4.1.3] - 2025-02-27 18 | 19 | * Pubspec.yaml dependency updates. 20 | 21 | ## [4.1.2] - 2025-02-07 22 | 23 | * Pubspec.yaml dependency updates. 24 | 25 | ## [4.1.1] - 2025-01-05 26 | 27 | * Pubspec.yaml dependency updates. 28 | 29 | ## [4.1.0] - 2024-12-31 30 | 31 | * Update copyright year 32 | * Update example 33 | * Pubspec.yaml dependency updates. 34 | 35 | ## [4.0.3] - 2024-12-16 36 | 37 | * Pubspec.yaml dependency updates. 38 | 39 | ## [4.0.2] - 2024-11-25 40 | 41 | * Pubspec.yaml dependency updates. 42 | 43 | ## [4.0.1] - 2024-11-23 44 | 45 | * Pubspec.yaml dependency updates. 46 | 47 | ## [4.0.0] - 2024-11-06 48 | 49 | * Update project to use device_meta v2 50 | * Pubspec.yaml dependency updates. 51 | 52 | ## [3.14.10] - 2024-08-17 53 | 54 | * Merge @paolodellaquila PR to fix product_variation image 55 | * Update example 56 | 57 | ## [3.14.9] - 2024-08-17 58 | 59 | * Pubspec.yaml dependency updates. 60 | 61 | ## [3.14.8] - 2024-07-08 62 | 63 | * Pubspec.yaml dependency updates. 64 | 65 | ## [3.14.7] - 2024-06-15 66 | 67 | * Pubspec.yaml dependency updates. 68 | 69 | ## [3.14.6] - 2024-05-13 70 | 71 | * Pubspec.yaml dependency updates. 72 | 73 | ## [3.14.5] - 2024-05-10 74 | 75 | * Pubspec.yaml dependency updates. 76 | 77 | ## [3.14.4] - 2024-05-02 78 | 79 | * Pubspec.yaml dependency updates. 80 | 81 | ## [3.14.3] - 2024-04-26 82 | 83 | * Pubspec.yaml dependency updates. 84 | 85 | ## [3.14.2] - 2024-04-23 86 | 87 | * Pubspec.yaml dependency updates. 88 | 89 | ## [3.14.1] - 2024-04-09 90 | 91 | * Pubspec.yaml dependency updates. 92 | 93 | ## [3.14.0] - 2024-04-06 94 | 95 | * Add toJson method to `Product` class 96 | * Pubspec.yaml dependency updates. 97 | 98 | ## [3.13.5] - 2024-04-03 99 | 100 | * Pubspec.yaml dependency updates. 101 | 102 | ## [3.13.4] - 2024-03-27 103 | 104 | * Pubspec.yaml dependency updates. 105 | 106 | ## [3.13.3] - 2024-03-27 107 | 108 | * Pubspec.yaml dependency updates. 109 | 110 | ## [3.13.3] - 2024-03-21 111 | 112 | * Pubspec.yaml dependency updates. 113 | 114 | ## [3.13.2] - 2024-03-18 115 | 116 | * Pubspec.yaml dependency updates. 117 | 118 | ## [3.13.1] - 2024-03-17 119 | 120 | * Pubspec.yaml dependency updates. 121 | 122 | ## [3.13.0] - 2024-03-15 123 | 124 | * New network method `personalizationCategories` to store personalization categories 125 | 126 | ## [3.12.0] - 2024-03-15 127 | 128 | * Fix shipping zone method 129 | * Change MetaData `value` to dynamic 130 | 131 | ## [3.11.1] - 2024-03-11 132 | 133 | * Dart format 134 | 135 | ## [3.11.0] - 2024-03-11 136 | 137 | * Ability to set the users WP User ID in the networking class 138 | 139 | ## [3.10.0] - 2024-03-07 140 | 141 | * Added the ability to fetch the order of your product categories from WooSignal 142 | * Pubspec.yaml dependency updates. 143 | 144 | ## [3.9.2] - 2024-02-28 145 | 146 | * Pubspec.yaml dependency updates. 147 | 148 | ## [3.8.2] - 2024-01-01 149 | 150 | * Update license date 151 | * Fix Dart analysis issues 152 | * Pubspec.yaml dependency updates. 153 | 154 | ## [3.8.1] - 2023-10-05 155 | 156 | * Pubspec.yaml dependency updates. 157 | 158 | ## [3.8.0] - 2023-07-12 159 | 160 | * Encryption for app info response. 161 | * New Firebase config fields added to `WooSignalApp` class. 162 | * Pubspec.yaml dependency updates. 163 | 164 | ## [3.7.1] - 2023-07-03 165 | 166 | * Update parameters for creating orders. 167 | 168 | ## [3.7.0] - 2023-07-03 169 | 170 | * Update parameters for creating orders. 171 | 172 | ## [3.6.1] - 2023-07-03 173 | 174 | * Fix dart analysis `refer_interpolation_to_compose_strings` in project. 175 | 176 | ## [3.6.0] - 2023-07-03 177 | 178 | * Fix orderBy parameter for `getProducts()`. 179 | * Add transactionId in `OrderWC` class. 180 | * More parameters added for `createCoupon()`. 181 | 182 | ## [3.5.0] - 2023-05-28 183 | 184 | * Refactor products.dart to product.dart 185 | * Pubspec.yaml dependency updates. 186 | 187 | ## [3.4.0] - 2023-05-18 188 | 189 | * Add new attributes to `Product` class 190 | * Pubspec.yaml dependency updates. 191 | 192 | * ## [3.3.0] - 2023-03-04 193 | 194 | * New endpoint for Stripe Payment Intents. 195 | * Pubspec.yaml dependency updates. 196 | 197 | ## [3.2.3] - 2023-02-22 198 | 199 | * Flutter version bump 200 | 201 | ## [3.2.2] - 2023-02-20 202 | 203 | * Add logo to package 204 | * Pubspec.yaml dependency updates. 205 | 206 | ## [3.2.1] - 2022-12-28 207 | 208 | * Update copyright version 209 | 210 | ## [3.2.0] - 2022-11-03 211 | 212 | * Add Menu Links to `WooSignalApp` class 213 | * Fix expected API return types for Dimension 214 | * Dependency updates 215 | 216 | ## [3.1.1] - 2022-08-29 217 | 218 | * Dependency updates 219 | 220 | ## [3.1.0] - 2022-05-19 221 | 222 | * New API for product tags 223 | * Flutter format 224 | * Dependency updates 225 | * Dart version 2.17 226 | 227 | ## [3.0.5] - 2022-01-29 228 | 229 | * Version added to woosignal.dart 230 | * Flutter format 231 | * Improvements as per Dart analysis 232 | 233 | ## [3.0.4] - 2022-01-28 234 | 235 | * Add new variables to woosignal_app 236 | * Update arguments for product review 237 | * Dependency updates 238 | 239 | ## [3.0.3] - 2022-01-03 240 | 241 | * Update coupon property types 242 | * Improvements as per analysis 243 | 244 | ## [3.0.2] - 2021-12-19 245 | 246 | * Update Readme 247 | 248 | ## [3.0.1] - 2021-12-18 249 | 250 | * Gracefully handle bad responses 251 | * Flutter format 252 | 253 | ## [3.0.0] - 2021-12-16 254 | 255 | * Breaking changes 256 | * Major refactor to woosignal.dart class 257 | * Added CustomerDownload model 258 | * Ability to store theme colors, theme font and social links in WooSignalApp class 259 | * Dependency updates 260 | 261 | ## [2.2.1] - 2021-11-02 262 | 263 | * Update readme 264 | 265 | ## [2.2.0] - 2021-11-02 266 | 267 | * Add new variables to woosignal_app 268 | * Dependency updates 269 | 270 | ## [2.1.0] - 2021-07-19 271 | 272 | * Add locale var to woosignal_app 273 | * Dependency updates 274 | 275 | ## [2.0.2] - 2021-04-11 276 | 277 | * Add theme var to woosignal_app 278 | 279 | ## [2.0.1] - 2021-04-10 280 | 281 | * null check on Order vars 282 | * flutter format 283 | 284 | ## [2.0.0] - 2021-04-10 285 | 286 | * Added null safety support 287 | * Dependency updates 288 | 289 | ## [1.5.1+1] - 2021-03-27 290 | 291 | * Update README 292 | 293 | ## [1.5.1] - 2021-03-27 294 | 295 | * Fixed small issue with the image and product model 296 | 297 | ## [1.5.0] - 2021-03-17 298 | 299 | * Refactor classes 300 | * Ability to fetch app meta data 301 | * Changes as per dart analysis log 302 | 303 | ## [1.4.0] - 2021-03-08 304 | 305 | * Refactor classes 306 | * Ability to fetch app meta data 307 | * New method for initializing API 308 | 309 | ## [1.3.1] - 2020-12-20 310 | 311 | * README updates 312 | 313 | ## [1.3.0] - 2020-12-20 314 | 315 | * New WooCommerce APIs 316 | 317 | ## [1.2.1] - 2020-10-30 318 | 319 | * Dependency updates 320 | 321 | ## [1.2.0] - 2020-09-05 322 | 323 | * New method to retrieve a product 324 | 325 | ## [1.1.2] - 2020-07-22 326 | 327 | * Update FreeShipping model for minimum spend 328 | * New endpoint for app status 329 | 330 | ## [1.1.1] - 2020-07-03 331 | 332 | * Fix MetaData for orders 333 | 334 | ## [1.1.0] - 2020-06-16 335 | 336 | * New MetaData base class for models 337 | * New update order method 338 | * Bug fixes 339 | 340 | ## [1.0.9] - 2020-06-03 341 | 342 | * Resolved bug with MetaData on models 343 | * Removed Shipping Zone Methods (use Shipping Methods going forward for WooCommerce shipping) 344 | 345 | ## [1.0.8] - 2020-05-08 346 | 347 | * Readme update 348 | 349 | ## [1.0.7] - 2020-05-08 350 | 351 | * Tweaks and bugs resolved 352 | 353 | ## [1.0.6] - 2020-04-09 354 | 355 | * Ability to create Product reviews 356 | 357 | ## [1.0.5] - 2020-04-03 358 | 359 | * Tweaks to ProductReviews model 360 | 361 | ## [1.0.4] - 2020-03-28 362 | 363 | * bug fix for ProductReviews 364 | 365 | ## [1.0.3] - 2020-03-28 366 | 367 | * Changes to woosignal class and bug fixes 368 | 369 | ## [1.0.2] - 2019-10-31 370 | 371 | * Tweaks and bugs resolved 372 | 373 | ## [1.0.1] - 2019-10-29 374 | 375 | * Bugs resolved, added pubspec.yaml to example, new documentation URL 376 | 377 | ## [1.0.0] - 2019-06-15 378 | 379 | * Tweaks and fixes 380 | 381 | ## [0.0.3] - 2019-06-15 382 | 383 | * added example, formatting classes 384 | 385 | ## [0.0.2] - 2019-06-14 386 | 387 | * Changes to pubspec description, formatting classes, example added, homepage URL update 388 | 389 | ## [0.0.1] - 2019-06-13 390 | 391 | * Initial Release 392 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2025 by WooSignal Ltd All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 2 | 3 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 4 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 5 | Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 6 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WooCommerce API Dart plugin 2 | 3 | [Official WooSignal WooCommerce package](https://woosignal.com) 4 | 5 | Build apps for WooCommerce easier with our new package. 6 | Our API provides many requests types e.g. getProducts, getOrders and many more. 7 | Free to get started, see the simple examples below. 8 | 9 | For help getting started with WooSignal, view our 10 | [online documentation](https://woosignal.com/docs/api/1.0/overview), which offers a more detail guide. 11 | 12 | ### Getting Started # 13 | In your flutter project add the dependency: 14 | 15 | ``` dart 16 | dependencies: 17 | ... 18 | woosignal: ^4.2.0 19 | ``` 20 | 21 | ### Usage example # 22 | Import `woosignal.dart` 23 | ``` dart 24 | import 'package:woosignal/woosignal.dart'; 25 | ``` 26 | 27 | ### Example using WooSignal API for WooCommerce 28 | 29 | ``` dart 30 | import 'package:woosignal/woosignal.dart'; 31 | 32 | ... 33 | 34 | // EXAMPLE GET PRODUCTS 35 | _getProducts() async { 36 | 37 | // Step 1 - Initialize WooSignal 38 | await WooSignal.instance.init(appKey: "your app key"); 39 | 40 | // Step 2 - Call an API 41 | List products = await WooSignal.instance.getProducts(); 42 | 43 | print(products[0].name); // prints a product name 44 | }); 45 | } 46 | ``` 47 | 48 | ### Available API Requests 49 | 50 | #### WooCommerce - Products 51 | - Get Products 52 | - Retrieve a Product by id 53 | - Update a Product by id 54 | - Delete a Product by id 55 | - Create a Product 56 | - Batch update Products 57 | 58 | [See Products API](https://woosignal.com/docs/api/1.0/products#list-all-products) 59 | 60 | 61 | #### WooCommerce - Product Variations 62 | - Get Product Variations 63 | - Retrieve a Product Variation by id 64 | 65 | [See Product Variations API](https://woosignal.com/docs/api/1.0/products-variations) 66 | 67 | 68 | #### WooCommerce - Product Attributes 69 | - Get Product Attributes 70 | 71 | [See Product Attributes API](https://woosignal.com/docs/api/1.0/products-attributes) 72 | 73 | 74 | #### WooCommerce - Products Attribute Terms 75 | - Get Products Attribute Terms 76 | 77 | [See Products Attribute Terms API](https://woosignal.com/docs/api/1.0/products-attribute-terms) 78 | 79 | #### WooCommerce - Product Categories 80 | - Get Product Categories 81 | 82 | [See Product Categories API](https://woosignal.com/docs/api/1.0/product-categories) 83 | 84 | 85 | #### WooCommerce - Products Shipping Classes 86 | - Get Products Shipping Classes 87 | 88 | [See Products Shipping Classes API](https://woosignal.com/docs/api/1.0/product-shipping-classes) 89 | 90 | 91 | #### WooCommerce - Product Reviews 92 | - Get Product Reviews 93 | 94 | [See Product Reviews API](https://woosignal.com/docs/api/1.0/product-reviews) 95 | 96 | 97 | #### WooCommerce - Tax Rates 98 | - Get Tax Rates 99 | 100 | [See Tax Rates API](https://woosignal.com/docs/api/1.0/tax-rates) 101 | 102 | 103 | #### WooCommerce - Tax Classes 104 | - Get Tax Classes 105 | 106 | [See Tax Classes API](https://woosignal.com/docs/api/1.0/tax-classes) 107 | 108 | 109 | #### WooCommerce - Shipping Zones 110 | - Get Shipping Zones 111 | - Retrieve a Shipping Zone by id 112 | 113 | [See Tax Classes API](https://woosignal.com/docs/api/1.0/tax-classes) 114 | 115 | 116 | #### WooCommerce - Shipping Zone Locations 117 | - Get Shipping Zone Locations 118 | - Retrieve a Shipping Zone Location by id 119 | 120 | [See Shipping Zone Locations API](https://woosignal.com/docs/api/1.0/shipping-zone-locations) 121 | 122 | 123 | #### WooCommerce - Shipping Methods 124 | - Get Shipping Methods 125 | 126 | [See Shipping Methods API](https://woosignal.com/docs/api/1.0/shipping-methods) 127 | 128 | 129 | #### WooCommerce - Orders 130 | - Get Orders 131 | - Retrieve a Order by id 132 | - Create an Order 133 | - Update an Order 134 | - Batch update Orders 135 | 136 | [See Order API](https://woosignal.com/docs/api/1.0/orders) 137 | 138 | 139 | #### WooCommerce - Customers 140 | - Get Customers 141 | - Create a Customer 142 | - Delete a Customer 143 | - Update a Customer 144 | - Batch update Customers 145 | 146 | [See Customers API](https://woosignal.com/docs/api/1.0/customers) 147 | 148 | #### WooCommerce - API Orders Notes 149 | - List all Orders Notes 150 | - Retrieve a Orders Notes by id 151 | - Delete a Orders Notes by id 152 | - Create a Orders Notes 153 | 154 | [See Orders Notes API](https://woosignal.com/docs/api/1.0/order-notes) 155 | 156 | #### WooCommerce - Refunds 157 | - Get refunds from an order id 158 | - Retrieve a retrieve and view a specific refund from an order 159 | - Delete a delete an order refund. 160 | - Create a new refund for an order 161 | 162 | [See Refunds API](https://woosignal.com/docs/api/1.0/order-refund) 163 | 164 | #### WooCommerce - Coupons 165 | - Get all coupons. 166 | - Retrieve and view a specific coupon by ID 167 | - Update a coupon. 168 | - Delete a coupon. 169 | - Batch update Coupons. 170 | 171 | [See Coupons API](https://woosignal.com/docs/api/1.0/coupons) 172 | 173 | #### WooCommerce - Reports 174 | - Get Reports 175 | - Retrieve a report of Sales 176 | - Retrieve a report of Top Sellers 177 | - Retrieve a report of the Total Coupons 178 | - Retrieve a report of the Total Customers 179 | - Retrieve a report of the Total Orders 180 | - Retrieve a report of the Total Products 181 | - Retrieve a report of the Total Reviews 182 | 183 | [See Reports API](https://woosignal.com/docs/api/1.0/reports) 184 | 185 | #### WooCommerce - Data 186 | - Retrieve a list of available data endpoints. 187 | - Get continents. 188 | - Retrieve continent data. 189 | - Get countries. 190 | - Retrieve country data. 191 | - Get currencies. 192 | - Retrieve currency data. 193 | - Retrieve current currency data. 194 | 195 | [See Data API](https://woosignal.com/docs/api/1.0/data) 196 | 197 | #### WooCommerce - System Status 198 | - Get System Status Items 199 | 200 | [See System Status API](https://woosignal.com/docs/api/1.0/system-status) 201 | 202 | #### WooCommerce - Payment gateways 203 | - Retrieve a Payment Gateway by id 204 | - Get all the Payment Gateways 205 | - Update a Payment Gateway 206 | 207 | [See Payment gateways API](https://woosignal.com/docs/api/1.0/payment-gateways) 208 | 209 | #### WooCommerce - Setting options 210 | - Retrieve a specific Setting Option 211 | - Get all the Setting Options 212 | - Update a Setting Option by id 213 | - Batch update Setting Options 214 | 215 | [See Setting options API](https://woosignal.com/docs/api/1.0/setting-options) 216 | 217 | 218 | Disclaimer: This plugin is not affiliated with or supported by Automattic, Inc. All logos and trademarks are the property of their respective owners. 219 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the static analysis results for your project (errors, 2 | # warnings, and lints). 3 | # 4 | # This enables the 'recommended' set of lints from `package:lints`. 5 | # This set helps identify many issues that may lead to problems when running 6 | # or consuming Dart code, and enforces writing Dart using a single, idiomatic 7 | # style and format. 8 | # 9 | # If you want a smaller set of lints you can change this to specify 10 | # 'package:lints/core.yaml'. These are just the most critical lints 11 | # (the recommended set includes the core lints). 12 | # The core lints are also what is used by pub.dev for scoring packages. 13 | 14 | include: package:lints/recommended.yaml 15 | 16 | # Uncomment the following section to specify additional rules. 17 | 18 | # linter: 19 | # rules: 20 | # - camel_case_types 21 | 22 | # analyzer: 23 | # exclude: 24 | # - path/to/excluded/files/** 25 | 26 | # For more information about the core and recommended set of lints, see 27 | # https://dart.dev/go/core-lints 28 | 29 | # For additional information about configuring this file, see 30 | # https://dart.dev/guides/language/analysis-options 31 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | #.idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 216dee60c0cc9449f0b29bcf922974d612263e24 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # Example - Returns first product name 2 | 3 | A new WooCommerce Flutter project. 4 | 5 | ## Getting Started 6 | 7 | Follow our easy guide online to generate a new app key to start making WooCommerce API requests. 8 | [documentation](https://woosignal.com/docs/api/1.0/overview). 9 | 10 | For help getting started with Flutter, view our online 11 | [documentation](https://flutter.io/) -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.example.woosignal_app" 38 | minSdkVersion 16 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 59 | } 60 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/woosignal_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.woosignal_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/ephemeral/flutter_lldb_helper.py: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | import lldb 6 | 7 | def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): 8 | """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" 9 | base = frame.register["x0"].GetValueAsAddress() 10 | page_len = frame.register["x1"].GetValueAsUnsigned() 11 | 12 | # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the 13 | # first page to see if handled it correctly. This makes diagnosing 14 | # misconfiguration (e.g. missing breakpoint) easier. 15 | data = bytearray(page_len) 16 | data[0:8] = b'IHELPED!' 17 | 18 | error = lldb.SBError() 19 | frame.GetThread().GetProcess().WriteMemory(base, data, error) 20 | if not error.Success(): 21 | print(f'Failed to write into {base}[+{page_len}]', error) 22 | return 23 | 24 | def __lldb_init_module(debugger: lldb.SBDebugger, _): 25 | target = debugger.GetDummyTarget() 26 | # Caveat: must use BreakpointCreateByRegEx here and not 27 | # BreakpointCreateByName. For some reasons callback function does not 28 | # get carried over from dummy target for the later. 29 | bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") 30 | bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) 31 | bp.SetAutoContinue(True) 32 | print("-- LLDB integration loaded --") 33 | -------------------------------------------------------------------------------- /example/ios/Flutter/ephemeral/flutter_lldbinit: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | command script import --relative-to-command-file flutter_lldb_helper.py 6 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | haider_app 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:woosignal/woosignal.dart'; 3 | import 'package:woosignal/models/response/product.dart'; 4 | 5 | void main() => runApp(MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return MaterialApp( 11 | title: 'WooSignal Demo', 12 | theme: ThemeData( 13 | primarySwatch: Colors.blue, 14 | ), 15 | home: MyHomePage(title: 'WooSignal Demo Home Page'), 16 | ); 17 | } 18 | } 19 | 20 | class MyHomePage extends StatefulWidget { 21 | MyHomePage({super.key, required this.title}); 22 | 23 | final String title; 24 | 25 | @override 26 | createState() => _MyHomePageState(); 27 | } 28 | 29 | class _MyHomePageState extends State { 30 | String _productName = ""; 31 | 32 | _incrementCounter() async { 33 | // CREATING AN INSTANCE FOR WOOSIGNAL 34 | await WooSignal.instance.init(appKey: "your app key"); 35 | 36 | List products = await WooSignal.instance.getProducts(); 37 | if (products.isNotEmpty) { 38 | _productName = products[0].name ?? ""; 39 | } 40 | setState(() {}); 41 | } 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return Scaffold( 46 | appBar: AppBar( 47 | title: Text(widget.title), 48 | ), 49 | body: Center( 50 | child: Column( 51 | mainAxisAlignment: MainAxisAlignment.center, 52 | children: [ 53 | Text('Tap the light bulb to get a product'), 54 | if (_productName != "") 55 | Text( 56 | 'WooCommerce product :\n $_productName', 57 | ), 58 | ], 59 | ), 60 | ), 61 | floatingActionButton: FloatingActionButton( 62 | onPressed: _incrementCounter, 63 | tooltip: 'Increment', 64 | child: Icon(Icons.lightbulb_outline), 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: woosignal_woocommerce_example 2 | description: Demonstrates how to use the woosignal plugin. 3 | 4 | environment: 5 | sdk: '>=2.19.0 <4.0.0' 6 | 7 | dependencies: 8 | woosignal: 9 | path: ../ 10 | flutter: 11 | sdk: flutter 12 | dev_dependencies: 13 | lints: ^1.0.0 14 | test: ^1.16.0 15 | flutter_test: 16 | sdk: flutter 17 | 18 | flutter: 19 | 20 | uses-material-design: true 21 | 22 | # To add assets to your application, add an assets section, like this: 23 | # assets: 24 | # - images/a_dot_burr.jpeg 25 | # - images/a_dot_ham.jpeg 26 | 27 | # An image asset can refer to one or more resolution-specific "variants", see 28 | # https://flutter.io/assets-and-images/#resolution-aware. 29 | 30 | # For details regarding adding assets from package dependencies, see 31 | # https://flutter.io/assets-and-images/#from-packages 32 | 33 | # To add custom fonts to your application, add a fonts section here, 34 | # in this "flutter" section. Each entry in this list should have a 35 | # "family" key with the font family name, and a "fonts" key with a 36 | # list giving the asset and other descriptors for the font. For 37 | # example: 38 | # fonts: 39 | # - family: Schyler 40 | # fonts: 41 | # - asset: fonts/Schyler-Regular.ttf 42 | # - asset: fonts/Schyler-Italic.ttf 43 | # style: italic 44 | # - family: Trajan Pro 45 | # fonts: 46 | # - asset: fonts/TrajanPro.ttf 47 | # - asset: fonts/TrajanPro_Bold.ttf 48 | # weight: 700 49 | # 50 | # For details regarding fonts from package dependencies, 51 | # see https://flutter.io/custom-fonts/#from-packages -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | void main() {} 9 | -------------------------------------------------------------------------------- /lib/models/collection.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class Collection { 17 | String? href; 18 | 19 | Collection({this.href}); 20 | 21 | Collection.fromJson(Map json) { 22 | href = json['href']; 23 | } 24 | 25 | Map toJson() { 26 | final Map data = {}; 27 | data['href'] = href; 28 | return data; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/models/image.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class Image { 17 | int? id; 18 | DateTime? dateCreated; 19 | DateTime? dateCreatedGMT; 20 | DateTime? dateModified; 21 | DateTime? dateModifiedGMT; 22 | String? src; 23 | String? name; 24 | String? alt; 25 | 26 | Image(this.id, this.src, this.name, this.alt, this.dateCreated, 27 | this.dateCreatedGMT, this.dateModified, this.dateModifiedGMT); 28 | 29 | Image.fromJson(Map json) { 30 | id = json['id']; 31 | src = (json['src'] is String ? json['src'] : json['src'].toString()); 32 | name = json['name']; 33 | alt = json['alt']; 34 | if (json['date_created'] != null) { 35 | dateCreated = DateTime.parse(json['date_created']); 36 | } 37 | if (json['date_modified_gmt'] != null) { 38 | dateModifiedGMT = DateTime.parse(json['date_modified_gmt']); 39 | } 40 | if (json['date_modified'] != null) { 41 | dateModified = DateTime.parse(json['date_modified']); 42 | } 43 | if (json['date_created_gmt'] != null) { 44 | dateCreatedGMT = DateTime.parse(json['date_created_gmt']); 45 | } 46 | } 47 | 48 | Map toJson() => { 49 | 'id': id, 50 | 'src': src, 51 | 'name': name, 52 | 'alt': alt, 53 | 'date_created': dateCreated, 54 | 'date_modified_gmt': dateModifiedGMT, 55 | 'date_modified': dateModified, 56 | 'date_created_gmt': dateCreatedGMT 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /lib/models/links.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/collection.dart'; 17 | import 'package:woosignal/models/self.dart'; 18 | 19 | class Links { 20 | List? self; 21 | List? collection; 22 | List? up; 23 | List? describes; 24 | 25 | Links({this.self, this.collection, this.up}); 26 | 27 | Links.fromJson(Map json) { 28 | if (json['self'] != null) { 29 | self = []; 30 | json['self'].forEach((v) { 31 | self!.add(Self.fromJson(v)); 32 | }); 33 | } 34 | if (json['collection'] != null) { 35 | collection = []; 36 | json['collection'].forEach((v) { 37 | collection!.add(Collection.fromJson(v)); 38 | }); 39 | } 40 | if (json['up'] != null) { 41 | up = []; 42 | json['up'].forEach((v) { 43 | up!.add(Collection.fromJson(v)); 44 | }); 45 | } 46 | if (json['describes'] != null) { 47 | describes = []; 48 | json['describes'].forEach((v) { 49 | describes!.add(Collection.fromJson(v)); 50 | }); 51 | } 52 | } 53 | 54 | Map toJson() { 55 | final Map data = {}; 56 | if (self != null) { 57 | data['self'] = self!.map((v) => v.toJson()).toList(); 58 | } 59 | if (collection != null) { 60 | data['collection'] = collection!.map((v) => v.toJson()).toList(); 61 | } 62 | if (up != null) { 63 | data['up'] = up!.map((v) => v.toJson()).toList(); 64 | } 65 | if (describes != null) { 66 | data['describes'] = describes!.map((v) => v.toJson()).toList(); 67 | } 68 | return data; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lib/models/menu_link.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class MenuLink { 17 | late String label; 18 | late String linkUrl; 19 | late String iconUrl; 20 | late int order; 21 | 22 | MenuLink( 23 | {required this.label, 24 | required this.linkUrl, 25 | required this.iconUrl, 26 | required this.order}); 27 | 28 | MenuLink.fromJson(Map json) { 29 | label = json['label']; 30 | linkUrl = json['link_url']; 31 | iconUrl = json['icon_url']; 32 | order = json['order']; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/models/meta_data.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class MetaData { 17 | int? id; 18 | String? key; 19 | String? value; 20 | 21 | MetaData({this.id, this.key, this.value}); 22 | 23 | MetaData.fromJson(Map json) { 24 | id = json['id']; 25 | key = json['key'].toString(); 26 | value = json['value'].toString(); 27 | } 28 | 29 | Map toJson() { 30 | final Map data = {}; 31 | data['id'] = id; 32 | data['key'] = key; 33 | data['value'] = value.toString(); 34 | return data; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/models/response/api_data.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ApiData { 19 | ApiData({ 20 | this.slug, 21 | this.description, 22 | this.links, 23 | }); 24 | 25 | String? slug; 26 | String? description; 27 | Links? links; 28 | 29 | factory ApiData.fromJson(Map json) => ApiData( 30 | slug: json["slug"], 31 | description: json["description"], 32 | links: Links.fromJson(json["_links"]), 33 | ); 34 | 35 | Map toJson() => { 36 | "slug": slug, 37 | "description": description, 38 | "_links": links!.toJson(), 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /lib/models/response/continent.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class Continents { 19 | Continents({ 20 | this.code, 21 | this.name, 22 | this.countries, 23 | this.links, 24 | }); 25 | 26 | String? code; 27 | String? name; 28 | List? countries; 29 | Links? links; 30 | 31 | Continents.fromJson(Map json) { 32 | code = json["code"]; 33 | name = json["name"]; 34 | countries = 35 | List.from(json["countries"].map((x) => Country.fromJson(x))); 36 | links = Links.fromJson(json["_links"]); 37 | } 38 | 39 | Map toJson() => { 40 | "code": code, 41 | "name": name, 42 | "countries": List.from(countries!.map((x) => x.toJson())), 43 | "_links": links!.toJson(), 44 | }; 45 | } 46 | 47 | class Country { 48 | Country({ 49 | this.code, 50 | this.name, 51 | this.states, 52 | this.currencyCode, 53 | this.currencyPos, 54 | this.decimalSep, 55 | this.dimensionUnit, 56 | this.numDecimals, 57 | this.thousandSep, 58 | this.weightUnit, 59 | }); 60 | 61 | String? code; 62 | String? name; 63 | List? states; 64 | String? currencyCode; 65 | CurrencyPos? currencyPos; 66 | Sep? decimalSep; 67 | DimensionUnit? dimensionUnit; 68 | int? numDecimals; 69 | Sep? thousandSep; 70 | WeightUnit? weightUnit; 71 | 72 | factory Country.fromJson(Map json) => Country( 73 | code: json["code"], 74 | name: json["name"], 75 | states: List.from(json["states"].map((x) => State.fromJson(x))), 76 | currencyCode: json["currency_code"], 77 | currencyPos: json["currency_pos"] == null 78 | ? null 79 | : currencyPosValues.map[json["currency_pos"]], 80 | decimalSep: json["decimal_sep"] == null 81 | ? null 82 | : sepValues.map[json["decimal_sep"]], 83 | dimensionUnit: json["dimension_unit"] == null 84 | ? null 85 | : dimensionUnitValues.map[json["dimension_unit"]], 86 | numDecimals: json["num_decimals"], 87 | thousandSep: json["thousand_sep"] == null 88 | ? null 89 | : sepValues.map[json["thousand_sep"]], 90 | weightUnit: json["weight_unit"] == null 91 | ? null 92 | : weightUnitValues.map[json["weight_unit"]], 93 | ); 94 | 95 | Map toJson() => { 96 | "code": code, 97 | "name": name, 98 | "states": List.from(states!.map((x) => x.toJson())), 99 | "currency_code": currencyCode, 100 | "currency_pos": currencyPos == null 101 | ? null 102 | : currencyPosValues.reverse![currencyPos!], 103 | "decimal_sep": 104 | decimalSep == null ? null : sepValues.reverse![decimalSep!], 105 | "dimension_unit": dimensionUnit == null 106 | ? null 107 | : dimensionUnitValues.reverse![dimensionUnit!], 108 | "num_decimals": numDecimals, 109 | "thousand_sep": 110 | thousandSep == null ? null : sepValues.reverse![thousandSep!], 111 | "weight_unit": 112 | weightUnit == null ? null : weightUnitValues.reverse![weightUnit!], 113 | }; 114 | } 115 | 116 | enum CurrencyPos { left, leftSpace, right, rightSpace } 117 | 118 | final currencyPosValues = EnumValues({ 119 | "left": CurrencyPos.left, 120 | "left_space": CurrencyPos.leftSpace, 121 | "right": CurrencyPos.right, 122 | "right_space": CurrencyPos.rightSpace 123 | }); 124 | 125 | enum Sep { empty, sep, purple } 126 | 127 | final sepValues = EnumValues({".": Sep.empty, " ": Sep.purple, ",": Sep.sep}); 128 | 129 | enum DimensionUnit { cm, inch } 130 | 131 | final dimensionUnitValues = 132 | EnumValues({"cm": DimensionUnit.cm, "in": DimensionUnit.inch}); 133 | 134 | class State { 135 | State({ 136 | this.code, 137 | this.name, 138 | }); 139 | 140 | String? code; 141 | String? name; 142 | 143 | factory State.fromJson(Map json) => State( 144 | code: json["code"], 145 | name: json["name"], 146 | ); 147 | 148 | Map toJson() => { 149 | "code": code, 150 | "name": name, 151 | }; 152 | } 153 | 154 | enum WeightUnit { kg, oz } 155 | 156 | final weightUnitValues = EnumValues({"kg": WeightUnit.kg, "oz": WeightUnit.oz}); 157 | 158 | class EnumValues { 159 | Map map; 160 | Map? reverseMap; 161 | 162 | EnumValues(this.map); 163 | 164 | Map? get reverse { 165 | reverseMap ??= map.map((k, v) => MapEntry(v, k)); 166 | return reverseMap; 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /lib/models/response/countries.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class Countries { 19 | Countries({ 20 | this.code, 21 | this.name, 22 | this.states, 23 | this.links, 24 | }); 25 | 26 | String? code; 27 | String? name; 28 | List? states; 29 | Links? links; 30 | 31 | factory Countries.fromJson(Map json) => Countries( 32 | code: json["code"], 33 | name: json["name"], 34 | states: List.from(json["states"].map((x) => State.fromJson(x))), 35 | links: Links.fromJson(json["_links"]), 36 | ); 37 | 38 | Map toJson() => { 39 | "code": code, 40 | "name": name, 41 | "states": List.from(states!.map((x) => x.toJson())), 42 | "_links": links!.toJson(), 43 | }; 44 | } 45 | 46 | class State { 47 | State({ 48 | this.code, 49 | this.name, 50 | }); 51 | 52 | String? code; 53 | String? name; 54 | 55 | factory State.fromJson(Map json) => State( 56 | code: json["code"], 57 | name: json["name"], 58 | ); 59 | 60 | Map toJson() => { 61 | "code": code, 62 | "name": name, 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /lib/models/response/coupon.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | import 'package:woosignal/models/payload/order_wc.dart'; 18 | 19 | class Coupon { 20 | int? id; 21 | String? code; 22 | String? amount; 23 | String? dateCreated; 24 | String? dateCreatedGmt; 25 | String? dateModified; 26 | String? dateModifiedGmt; 27 | String? discountType; 28 | String? description; 29 | String? dateExpires; 30 | String? dateExpiresGmt; 31 | int? usageCount; 32 | bool? individualUse; 33 | List? productIds; 34 | List? excludedProductIds; 35 | int? usageLimit; 36 | int? usageLimitPerUser; 37 | int? limitUsageToXItems; 38 | bool? freeShipping; 39 | List? productCategories; 40 | List? excludedProductCategories; 41 | bool? excludeSaleItems; 42 | String? minimumAmount; 43 | String? maximumAmount; 44 | List? emailRestrictions; 45 | List? usedBy; 46 | List? metaData; 47 | Links? links; 48 | 49 | Coupon( 50 | {this.id, 51 | this.code, 52 | this.amount, 53 | this.dateCreated, 54 | this.dateCreatedGmt, 55 | this.dateModified, 56 | this.dateModifiedGmt, 57 | this.discountType, 58 | this.description, 59 | this.dateExpires, 60 | this.dateExpiresGmt, 61 | this.usageCount, 62 | this.individualUse, 63 | this.productIds, 64 | this.excludedProductIds, 65 | this.usageLimit, 66 | this.usageLimitPerUser, 67 | this.limitUsageToXItems, 68 | this.freeShipping, 69 | this.productCategories, 70 | this.excludedProductCategories, 71 | this.excludeSaleItems, 72 | this.minimumAmount, 73 | this.maximumAmount, 74 | this.emailRestrictions, 75 | this.usedBy, 76 | this.metaData, 77 | this.links}); 78 | 79 | Coupon.fromJson(Map json) { 80 | id = json['id']; 81 | code = json['code']; 82 | amount = json['amount']; 83 | dateCreated = json['date_created']; 84 | dateCreatedGmt = json['date_created_gmt']; 85 | dateModified = json['date_modified']; 86 | dateModifiedGmt = json['date_modified_gmt']; 87 | discountType = json['discount_type']; 88 | description = json['description']; 89 | dateExpires = json['date_expires']; 90 | dateExpiresGmt = json['date_expires_gmt']; 91 | usageCount = json['usage_count']; 92 | individualUse = json['individual_use']; 93 | productIds = 94 | (json['product_ids'] != null) ? json['product_ids'].cast() : null; 95 | excludedProductIds = (json['excluded_product_ids'] != null) 96 | ? json['excluded_product_ids'].cast() 97 | : null; 98 | usageLimit = json['usage_limit']; 99 | usageLimitPerUser = json['usage_limit_per_user']; 100 | limitUsageToXItems = json['limit_usage_to_x_items']; 101 | freeShipping = json['free_shipping']; 102 | productCategories = (json['product_categories'] != null) 103 | ? json['product_categories'].cast() 104 | : null; 105 | excludedProductCategories = (json['excluded_product_categories'] != null) 106 | ? json['excluded_product_categories'].cast() 107 | : null; 108 | excludeSaleItems = json['exclude_sale_items']; 109 | minimumAmount = json['minimum_amount']; 110 | maximumAmount = json['maximum_amount']; 111 | emailRestrictions = (json['email_restrictions'] != null) 112 | ? json['email_restrictions'].cast() 113 | : null; 114 | usedBy = (json['used_by'] != null) ? json['used_by'].cast() : null; 115 | if (json['meta_data'] != null) { 116 | metaData = []; 117 | json['meta_data'].forEach((v) { 118 | metaData!.add(MetaData.fromJson(v)); 119 | }); 120 | } 121 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 122 | } 123 | 124 | Map toJson() { 125 | final Map data = {}; 126 | data['id'] = id; 127 | data['code'] = code; 128 | data['amount'] = amount; 129 | data['date_created'] = dateCreated; 130 | data['date_created_gmt'] = dateCreatedGmt; 131 | data['date_modified'] = dateModified; 132 | data['date_modified_gmt'] = dateModifiedGmt; 133 | data['discount_type'] = discountType; 134 | data['description'] = description; 135 | data['date_expires'] = dateExpires; 136 | data['date_expires_gmt'] = dateExpiresGmt; 137 | data['usage_count'] = usageCount; 138 | data['individual_use'] = individualUse; 139 | data['product_ids'] = productIds; 140 | data['excluded_product_ids'] = excludedProductIds; 141 | data['usage_limit'] = usageLimit; 142 | data['usage_limit_per_user'] = usageLimitPerUser; 143 | data['limit_usage_to_x_items'] = limitUsageToXItems; 144 | data['free_shipping'] = freeShipping; 145 | data['product_categories'] = productCategories; 146 | data['excluded_product_categories'] = excludedProductCategories; 147 | data['exclude_sale_items'] = excludeSaleItems; 148 | data['minimum_amount'] = minimumAmount; 149 | data['maximum_amount'] = maximumAmount; 150 | data['email_restrictions'] = emailRestrictions; 151 | data['used_by'] = usedBy; 152 | if (metaData != null) { 153 | data['meta_data'] = metaData!.map((v) => v.toJson()).toList(); 154 | } 155 | if (links != null) { 156 | data['_links'] = links!.toJson(); 157 | } 158 | return data; 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /lib/models/response/coupon_batch.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class CouponBatch { 19 | CouponBatch({ 20 | this.create, 21 | this.update, 22 | this.delete, 23 | }); 24 | 25 | List? create; 26 | List? update; 27 | List? delete; 28 | 29 | factory CouponBatch.fromJson(Map json) => CouponBatch( 30 | create: 31 | List.from(json["create"].map((x) => Create.fromJson(x))), 32 | update: 33 | List.from(json["update"].map((x) => Create.fromJson(x))), 34 | delete: 35 | List.from(json["delete"].map((x) => Create.fromJson(x))), 36 | ); 37 | 38 | Map toJson() => { 39 | "create": List.from(create!.map((x) => x.toJson())), 40 | "update": List.from(update!.map((x) => x.toJson())), 41 | "delete": List.from(delete!.map((x) => x.toJson())), 42 | }; 43 | } 44 | 45 | class Create { 46 | Create({ 47 | this.id, 48 | this.code, 49 | this.amount, 50 | this.dateCreated, 51 | this.dateCreatedGmt, 52 | this.dateModified, 53 | this.dateModifiedGmt, 54 | this.discountType, 55 | this.description, 56 | this.dateExpires, 57 | this.dateExpiresGmt, 58 | this.usageCount, 59 | this.individualUse, 60 | this.productIds, 61 | this.excludedProductIds, 62 | this.usageLimit, 63 | this.usageLimitPerUser, 64 | this.limitUsageToXItems, 65 | this.freeShipping, 66 | this.productCategories, 67 | this.excludedProductCategories, 68 | this.excludeSaleItems, 69 | this.minimumAmount, 70 | this.maximumAmount, 71 | this.emailRestrictions, 72 | this.usedBy, 73 | this.metaData, 74 | this.links, 75 | }); 76 | 77 | int? id; 78 | String? code; 79 | String? amount; 80 | DateTime? dateCreated; 81 | DateTime? dateCreatedGmt; 82 | DateTime? dateModified; 83 | DateTime? dateModifiedGmt; 84 | String? discountType; 85 | String? description; 86 | dynamic dateExpires; 87 | dynamic dateExpiresGmt; 88 | int? usageCount; 89 | bool? individualUse; 90 | List? productIds; 91 | List? excludedProductIds; 92 | dynamic usageLimit; 93 | dynamic usageLimitPerUser; 94 | dynamic limitUsageToXItems; 95 | bool? freeShipping; 96 | List? productCategories; 97 | List? excludedProductCategories; 98 | bool? excludeSaleItems; 99 | String? minimumAmount; 100 | String? maximumAmount; 101 | List? emailRestrictions; 102 | List? usedBy; 103 | List? metaData; 104 | Links? links; 105 | 106 | factory Create.fromJson(Map json) => Create( 107 | id: json["id"], 108 | code: json["code"], 109 | amount: json["amount"], 110 | dateCreated: DateTime.parse(json["date_created"]), 111 | dateCreatedGmt: DateTime.parse(json["date_created_gmt"]), 112 | dateModified: DateTime.parse(json["date_modified"]), 113 | dateModifiedGmt: DateTime.parse(json["date_modified_gmt"]), 114 | discountType: json["discount_type"], 115 | description: json["description"], 116 | dateExpires: json["date_expires"], 117 | dateExpiresGmt: json["date_expires_gmt"], 118 | usageCount: json["usage_count"], 119 | individualUse: json["individual_use"], 120 | productIds: List.from(json["product_ids"].map((x) => x)), 121 | excludedProductIds: 122 | List.from(json["excluded_product_ids"].map((x) => x)), 123 | usageLimit: json["usage_limit"], 124 | usageLimitPerUser: json["usage_limit_per_user"], 125 | limitUsageToXItems: json["limit_usage_to_x_items"], 126 | freeShipping: json["free_shipping"], 127 | productCategories: 128 | List.from(json["product_categories"].map((x) => x)), 129 | excludedProductCategories: List.from( 130 | json["excluded_product_categories"].map((x) => x)), 131 | excludeSaleItems: json["exclude_sale_items"], 132 | minimumAmount: json["minimum_amount"], 133 | maximumAmount: json["maximum_amount"], 134 | emailRestrictions: 135 | List.from(json["email_restrictions"].map((x) => x)), 136 | usedBy: List.from(json["used_by"].map((x) => x)), 137 | metaData: List.from(json["meta_data"].map((x) => x)), 138 | links: Links.fromJson(json["_links"]), 139 | ); 140 | 141 | Map toJson() => { 142 | "id": id, 143 | "code": code, 144 | "amount": amount, 145 | "date_created": dateCreated!.toIso8601String(), 146 | "date_created_gmt": dateCreatedGmt!.toIso8601String(), 147 | "date_modified": dateModified!.toIso8601String(), 148 | "date_modified_gmt": dateModifiedGmt!.toIso8601String(), 149 | "discount_type": discountType, 150 | "description": description, 151 | "date_expires": dateExpires, 152 | "date_expires_gmt": dateExpiresGmt, 153 | "usage_count": usageCount, 154 | "individual_use": individualUse, 155 | "product_ids": List.from(productIds!.map((x) => x)), 156 | "excluded_product_ids": 157 | List.from(excludedProductIds!.map((x) => x)), 158 | "usage_limit": usageLimit, 159 | "usage_limit_per_user": usageLimitPerUser, 160 | "limit_usage_to_x_items": limitUsageToXItems, 161 | "free_shipping": freeShipping, 162 | "product_categories": 163 | List.from(productCategories!.map((x) => x)), 164 | "excluded_product_categories": 165 | List.from(excludedProductCategories!.map((x) => x)), 166 | "exclude_sale_items": excludeSaleItems, 167 | "minimum_amount": minimumAmount, 168 | "maximum_amount": maximumAmount, 169 | "email_restrictions": 170 | List.from(emailRestrictions!.map((x) => x)), 171 | "used_by": List.from(usedBy!.map((x) => x)), 172 | "meta_data": List.from(metaData!.map((x) => x)), 173 | "_links": links!.toJson(), 174 | }; 175 | } 176 | -------------------------------------------------------------------------------- /lib/models/response/currencies.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class Currencies { 19 | Currencies({ 20 | this.code, 21 | this.name, 22 | this.symbol, 23 | this.links, 24 | }); 25 | 26 | String? code; 27 | String? name; 28 | String? symbol; 29 | Links? links; 30 | 31 | factory Currencies.fromJson(Map json) => Currencies( 32 | code: json["code"], 33 | name: json["name"], 34 | symbol: json["symbol"], 35 | links: Links.fromJson(json["_links"]), 36 | ); 37 | 38 | Map toJson() => { 39 | "code": code, 40 | "name": name, 41 | "symbol": symbol, 42 | "_links": links!.toJson(), 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /lib/models/response/customer.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | import '../meta_data.dart'; 19 | 20 | class Customer { 21 | int? id; 22 | String? dateCreated; 23 | String? dateCreatedGmt; 24 | String? dateModified; 25 | String? dateModifiedGmt; 26 | String? email; 27 | String? firstName; 28 | String? lastName; 29 | String? role; 30 | String? username; 31 | Billing? billing; 32 | Shipping? shipping; 33 | bool? isPayingCustomer; 34 | String? avatarUrl; 35 | List? metaData; 36 | Links? links; 37 | 38 | Customer( 39 | {this.id, 40 | this.dateCreated, 41 | this.dateCreatedGmt, 42 | this.dateModified, 43 | this.dateModifiedGmt, 44 | this.email, 45 | this.firstName, 46 | this.lastName, 47 | this.role, 48 | this.username, 49 | this.billing, 50 | this.shipping, 51 | this.isPayingCustomer, 52 | this.avatarUrl, 53 | this.metaData, 54 | this.links}); 55 | 56 | Customer.fromJson(Map json) { 57 | id = json['id']; 58 | dateCreated = json['date_created']; 59 | dateCreatedGmt = json['date_created_gmt']; 60 | dateModified = json['date_modified']; 61 | dateModifiedGmt = json['date_modified_gmt']; 62 | email = json['email']; 63 | firstName = json['first_name']; 64 | lastName = json['last_name']; 65 | role = json['role']; 66 | username = json['username']; 67 | billing = 68 | json['billing'] != null ? Billing.fromJson(json['billing']) : null; 69 | shipping = 70 | json['shipping'] != null ? Shipping.fromJson(json['shipping']) : null; 71 | isPayingCustomer = json['is_paying_customer']; 72 | avatarUrl = json['avatar_url']; 73 | metaData = 74 | (json['meta_data'] as List).map((i) => MetaData.fromJson(i)).toList(); 75 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 76 | } 77 | 78 | Map toJson() { 79 | final Map data = {}; 80 | data['id'] = id; 81 | data['date_created'] = dateCreated; 82 | data['date_created_gmt'] = dateCreatedGmt; 83 | data['date_modified'] = dateModified; 84 | data['date_modified_gmt'] = dateModifiedGmt; 85 | data['email'] = email; 86 | data['first_name'] = firstName; 87 | data['last_name'] = lastName; 88 | data['role'] = role; 89 | data['username'] = username; 90 | if (billing != null) { 91 | data['billing'] = billing!.toJson(); 92 | } 93 | if (shipping != null) { 94 | data['shipping'] = shipping!.toJson(); 95 | } 96 | data['is_paying_customer'] = isPayingCustomer; 97 | data['avatar_url'] = avatarUrl; 98 | if (metaData != null) { 99 | data['meta_data'] = metaData!.map((v) => v.toJson()).toList(); 100 | } 101 | if (links != null) { 102 | data['_links'] = links!.toJson(); 103 | } 104 | return data; 105 | } 106 | } 107 | 108 | class Billing { 109 | String? firstName; 110 | String? lastName; 111 | String? company; 112 | String? address1; 113 | String? address2; 114 | String? city; 115 | String? state; 116 | String? postcode; 117 | String? country; 118 | String? email; 119 | String? phone; 120 | 121 | Billing( 122 | {this.firstName, 123 | this.lastName, 124 | this.company, 125 | this.address1, 126 | this.address2, 127 | this.city, 128 | this.state, 129 | this.postcode, 130 | this.country, 131 | this.email, 132 | this.phone}); 133 | 134 | Billing.fromJson(Map json) { 135 | firstName = json['first_name']; 136 | lastName = json['last_name']; 137 | company = json['company']; 138 | address1 = json['address_1']; 139 | address2 = json['address_2']; 140 | city = json['city']; 141 | state = json['state']; 142 | postcode = json['postcode']; 143 | country = json['country']; 144 | email = json['email']; 145 | phone = json['phone']; 146 | } 147 | 148 | Map toJson() { 149 | final Map data = {}; 150 | data['first_name'] = firstName; 151 | data['last_name'] = lastName; 152 | data['company'] = company; 153 | data['address_1'] = address1; 154 | data['address_2'] = address2; 155 | data['city'] = city; 156 | data['state'] = state; 157 | data['postcode'] = postcode; 158 | data['country'] = country; 159 | data['email'] = email; 160 | data['phone'] = phone; 161 | return data; 162 | } 163 | } 164 | 165 | class Shipping { 166 | String? firstName; 167 | String? lastName; 168 | String? company; 169 | String? address1; 170 | String? address2; 171 | String? city; 172 | String? state; 173 | String? postcode; 174 | String? country; 175 | 176 | Shipping( 177 | {this.firstName, 178 | this.lastName, 179 | this.company, 180 | this.address1, 181 | this.address2, 182 | this.city, 183 | this.state, 184 | this.postcode, 185 | this.country}); 186 | 187 | Shipping.fromJson(Map json) { 188 | firstName = json['first_name']; 189 | lastName = json['last_name']; 190 | company = json['company']; 191 | address1 = json['address_1']; 192 | address2 = json['address_2']; 193 | city = json['city']; 194 | state = json['state']; 195 | postcode = json['postcode']; 196 | country = json['country']; 197 | } 198 | 199 | Map toJson() { 200 | final Map data = {}; 201 | data['first_name'] = firstName; 202 | data['last_name'] = lastName; 203 | data['company'] = company; 204 | data['address_1'] = address1; 205 | data['address_2'] = address2; 206 | data['city'] = city; 207 | data['state'] = state; 208 | data['postcode'] = postcode; 209 | data['country'] = country; 210 | return data; 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /lib/models/response/customer_batch.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class CustomerBatch { 19 | CustomerBatch({ 20 | this.create, 21 | this.update, 22 | this.delete, 23 | }); 24 | List? create; 25 | List? update; 26 | List? delete; 27 | 28 | factory CustomerBatch.fromJson(Map json) => CustomerBatch( 29 | create: List.from( 30 | json["create"].map((x) => Customers.fromJson(x))), 31 | update: List.from( 32 | json["update"].map((x) => Customers.fromJson(x))), 33 | delete: List.from( 34 | json["delete"].map((x) => Customers.fromJson(x))), 35 | ); 36 | 37 | Map toJson() => { 38 | "create": List.from(create!.map((x) => x.toJson())), 39 | "update": List.from(update!.map((x) => x.toJson())), 40 | "delete": List.from(delete!.map((x) => x.toJson())), 41 | }; 42 | } 43 | 44 | class Customers { 45 | Customers({ 46 | this.id, 47 | this.dateCreated, 48 | this.dateCreatedGmt, 49 | this.dateModified, 50 | this.dateModifiedGmt, 51 | this.email, 52 | this.firstName, 53 | this.lastName, 54 | this.role, 55 | this.username, 56 | this.billing, 57 | this.shipping, 58 | this.isPayingCustomer, 59 | this.avatarUrl, 60 | this.metaData, 61 | this.links, 62 | }); 63 | 64 | int? id; 65 | DateTime? dateCreated; 66 | DateTime? dateCreatedGmt; 67 | DateTime? dateModified; 68 | DateTime? dateModifiedGmt; 69 | String? email; 70 | String? firstName; 71 | String? lastName; 72 | String? role; 73 | String? username; 74 | Ing? billing; 75 | Ing? shipping; 76 | bool? isPayingCustomer; 77 | String? avatarUrl; 78 | List? metaData; 79 | Links? links; 80 | 81 | factory Customers.fromJson(Map json) => Customers( 82 | id: json["id"], 83 | dateCreated: DateTime.parse(json["date_created"]), 84 | dateCreatedGmt: DateTime.parse(json["date_created_gmt"]), 85 | dateModified: DateTime.parse(json["date_modified"]), 86 | dateModifiedGmt: DateTime.parse(json["date_modified_gmt"]), 87 | email: json["email"], 88 | firstName: json["first_name"], 89 | lastName: json["last_name"], 90 | role: json["role"], 91 | username: json["username"], 92 | billing: Ing.fromJson(json["billing"]), 93 | shipping: Ing.fromJson(json["shipping"]), 94 | isPayingCustomer: json["is_paying_customer"], 95 | avatarUrl: json["avatar_url"], 96 | metaData: List.from(json["meta_data"].map((x) => x)), 97 | links: Links.fromJson(json["_links"]), 98 | ); 99 | 100 | Map toJson() => { 101 | "id": id, 102 | "date_created": dateCreated!.toIso8601String(), 103 | "date_created_gmt": dateCreatedGmt!.toIso8601String(), 104 | "date_modified": dateModified!.toIso8601String(), 105 | "date_modified_gmt": dateModifiedGmt!.toIso8601String(), 106 | "email": email, 107 | "first_name": firstName, 108 | "last_name": lastName, 109 | "role": role, 110 | "username": username, 111 | "billing": billing!.toJson(), 112 | "shipping": shipping!.toJson(), 113 | "is_paying_customer": isPayingCustomer, 114 | "avatar_url": avatarUrl, 115 | "meta_data": List.from(metaData!.map((x) => x)), 116 | "_links": links!.toJson(), 117 | }; 118 | } 119 | 120 | class Ing { 121 | Ing({ 122 | this.firstName, 123 | this.lastName, 124 | this.company, 125 | this.address1, 126 | this.address2, 127 | this.city, 128 | this.state, 129 | this.postcode, 130 | this.country, 131 | this.email, 132 | this.phone, 133 | }); 134 | 135 | String? firstName; 136 | String? lastName; 137 | String? company; 138 | String? address1; 139 | String? address2; 140 | String? city; 141 | String? state; 142 | String? postcode; 143 | String? country; 144 | String? email; 145 | String? phone; 146 | 147 | factory Ing.fromJson(Map json) => Ing( 148 | firstName: json["first_name"], 149 | lastName: json["last_name"], 150 | company: json["company"], 151 | address1: json["address_1"], 152 | address2: json["address_2"], 153 | city: json["city"], 154 | state: json["state"], 155 | postcode: json["postcode"], 156 | country: json["country"], 157 | email: json["email"], 158 | phone: json["phone"], 159 | ); 160 | 161 | Map toJson() => { 162 | "first_name": firstName, 163 | "last_name": lastName, 164 | "company": company, 165 | "address_1": address1, 166 | "address_2": address2, 167 | "city": city, 168 | "state": state, 169 | "postcode": postcode, 170 | "country": country, 171 | "email": email, 172 | "phone": phone, 173 | }; 174 | } 175 | -------------------------------------------------------------------------------- /lib/models/response/customer_download.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class CustomerDownload { 19 | String? downloadId; 20 | String? downloadUrl; 21 | int? productId; 22 | String? productName; 23 | String? downloadName; 24 | int? orderId; 25 | String? orderKey; 26 | String? downloadsRemaining; 27 | String? accessExpires; 28 | String? accessExpiresGmt; 29 | File? file; 30 | Links? links; 31 | 32 | CustomerDownload( 33 | {this.downloadId, 34 | this.downloadUrl, 35 | this.productId, 36 | this.productName, 37 | this.downloadName, 38 | this.orderId, 39 | this.orderKey, 40 | this.downloadsRemaining, 41 | this.accessExpires, 42 | this.accessExpiresGmt, 43 | this.file, 44 | this.links}); 45 | 46 | CustomerDownload.fromJson(Map json) { 47 | downloadId = json['download_id']; 48 | downloadUrl = json['download_url']; 49 | productId = json['product_id']; 50 | productName = json['product_name']; 51 | downloadName = json['download_name']; 52 | orderId = json['order_id']; 53 | orderKey = json['order_key']; 54 | downloadsRemaining = json['downloads_remaining']; 55 | accessExpires = json['access_expires']; 56 | accessExpiresGmt = json['access_expires_gmt']; 57 | file = json['file'] != null ? File.fromJson(json['file']) : null; 58 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 59 | } 60 | 61 | Map toJson() { 62 | final Map data = {}; 63 | data['download_id'] = downloadId; 64 | data['download_url'] = downloadUrl; 65 | data['product_id'] = productId; 66 | data['product_name'] = productName; 67 | data['download_name'] = downloadName; 68 | data['order_id'] = orderId; 69 | data['order_key'] = orderKey; 70 | data['downloads_remaining'] = downloadsRemaining; 71 | data['access_expires'] = accessExpires; 72 | data['access_expires_gmt'] = accessExpiresGmt; 73 | if (file != null) { 74 | data['file'] = file!.toJson(); 75 | } 76 | if (links != null) { 77 | data['_links'] = links!.toJson(); 78 | } 79 | return data; 80 | } 81 | } 82 | 83 | class File { 84 | String? name; 85 | String? file; 86 | 87 | File({this.name, this.file}); 88 | 89 | File.fromJson(Map json) { 90 | name = json['name']; 91 | file = json['file']; 92 | } 93 | 94 | Map toJson() { 95 | final Map data = {}; 96 | data['name'] = name; 97 | data['file'] = file; 98 | return data; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /lib/models/response/dimension.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class Dimension { 17 | final String? length; 18 | final String? width; 19 | final String? height; 20 | 21 | Dimension(this.length, this.height, this.width); 22 | 23 | Dimension.fromJson(Map json) 24 | : length = 25 | json['length'] is int ? json['length'].toString() : json['length'], 26 | width = json['width'] is int ? json['width'].toString() : json['width'], 27 | height = 28 | json['height'] is int ? json['height'].toString() : json['height']; 29 | 30 | Map toJson() => 31 | {'length': length, 'width': width, 'height': height}; 32 | } 33 | -------------------------------------------------------------------------------- /lib/models/response/order_notes.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class OrderNote { 19 | OrderNote({ 20 | this.id, 21 | this.author, 22 | this.dateCreated, 23 | this.dateCreatedGmt, 24 | this.note, 25 | this.customerNote, 26 | this.links, 27 | }); 28 | 29 | int? id; 30 | String? author; 31 | DateTime? dateCreated; 32 | DateTime? dateCreatedGmt; 33 | String? note; 34 | bool? customerNote; 35 | Links? links; 36 | 37 | factory OrderNote.fromJson(Map json) => OrderNote( 38 | id: json["id"], 39 | author: json["author"], 40 | dateCreated: DateTime.parse(json["date_created"]), 41 | dateCreatedGmt: DateTime.parse(json["date_created_gmt"]), 42 | note: json["note"], 43 | customerNote: json["customer_note"], 44 | links: Links.fromJson(json["_links"]), 45 | ); 46 | 47 | Map toJson() => { 48 | "id": id, 49 | "author": author, 50 | "date_created": dateCreated!.toIso8601String(), 51 | "date_created_gmt": dateCreatedGmt!.toIso8601String(), 52 | "note": note, 53 | "customer_note": customerNote, 54 | "_links": links!.toJson(), 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /lib/models/response/product_attribute_term.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ProductAttributeTerm { 19 | int? id; 20 | String? name; 21 | String? slug; 22 | String? description; 23 | int? menuOrder; 24 | int? count; 25 | Links? links; 26 | 27 | ProductAttributeTerm( 28 | {this.id, 29 | this.name, 30 | this.slug, 31 | this.description, 32 | this.menuOrder, 33 | this.count, 34 | this.links}); 35 | 36 | ProductAttributeTerm.fromJson(Map json) { 37 | id = json['id']; 38 | name = json['name']; 39 | slug = json['slug']; 40 | description = json['description']; 41 | menuOrder = json['menu_order']; 42 | count = json['count']; 43 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 44 | } 45 | 46 | Map toJson() { 47 | final Map data = {}; 48 | data['id'] = id; 49 | data['name'] = name; 50 | data['slug'] = slug; 51 | data['description'] = description; 52 | data['menu_order'] = menuOrder; 53 | data['count'] = count; 54 | if (links != null) { 55 | data['_links'] = links!.toJson(); 56 | } 57 | return data; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/models/response/product_attributes.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ProductAttribute { 19 | int? id; 20 | String? name; 21 | String? slug; 22 | String? type; 23 | String? orderBy; 24 | bool? hasArchives; 25 | Links? links; 26 | 27 | ProductAttribute( 28 | {this.id, 29 | this.name, 30 | this.slug, 31 | this.type, 32 | this.orderBy, 33 | this.hasArchives, 34 | this.links}); 35 | 36 | ProductAttribute.fromJson(Map json) { 37 | id = json['id']; 38 | name = json['name']; 39 | slug = json['slug']; 40 | type = json['type']; 41 | orderBy = json['order_by']; 42 | hasArchives = json['has_archives']; 43 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 44 | } 45 | 46 | Map toJson() { 47 | final Map data = {}; 48 | data['id'] = id; 49 | data['name'] = name; 50 | data['slug'] = slug; 51 | data['type'] = type; 52 | data['order_by'] = orderBy; 53 | data['has_archives'] = hasArchives; 54 | if (links != null) { 55 | data['_links'] = links!.toJson(); 56 | } 57 | return data; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/models/response/product_category.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/image.dart'; 17 | import 'package:woosignal/models/links.dart'; 18 | 19 | class ProductCategory { 20 | int? id; 21 | String? name; 22 | String? slug; 23 | int? parent; 24 | String? description; 25 | String? display; 26 | Image? image; 27 | int? menuOrder; 28 | int? count; 29 | Links? links; 30 | 31 | ProductCategory( 32 | {this.id, 33 | this.name, 34 | this.slug, 35 | this.parent, 36 | this.description, 37 | this.display, 38 | this.image, 39 | this.menuOrder, 40 | this.count, 41 | this.links}); 42 | 43 | ProductCategory.fromJson(Map json) { 44 | id = json['id']; 45 | name = json['name']; 46 | slug = json['slug']; 47 | parent = json['parent']; 48 | description = json['description']; 49 | display = json['display']; 50 | image = json['image'] != null ? Image.fromJson(json['image']) : null; 51 | menuOrder = json['menu_order']; 52 | count = json['count']; 53 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 54 | } 55 | 56 | Map toJson() { 57 | final Map data = {}; 58 | data['id'] = id; 59 | data['name'] = name; 60 | data['slug'] = slug; 61 | data['parent'] = parent; 62 | data['description'] = description; 63 | data['display'] = display; 64 | if (image != null) { 65 | data['image'] = image!.toJson(); 66 | } 67 | data['menu_order'] = menuOrder; 68 | data['count'] = count; 69 | if (links != null) { 70 | data['_links'] = links!.toJson(); 71 | } 72 | return data; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/models/response/product_category_collection.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class ProductCategoryCollection { 17 | String? collectionId; 18 | int? position; 19 | 20 | ProductCategoryCollection({this.collectionId, this.position}); 21 | 22 | ProductCategoryCollection.fromJson(Map json) { 23 | collectionId = json['product_category_id']; 24 | position = json['position']; 25 | } 26 | 27 | Map toJson() { 28 | final Map data = {}; 29 | data['product_category_id'] = collectionId; 30 | data['position'] = position; 31 | return data; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/models/response/product_review.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ProductReview { 19 | int? id; 20 | String? dateCreated; 21 | String? dateCreatedGmt; 22 | int? productId; 23 | String? status; 24 | String? reviewer; 25 | String? reviewerEmail; 26 | String? review; 27 | int? rating; 28 | bool? verified; 29 | Map? reviewerAvatarUrls; 30 | Links? links; 31 | 32 | ProductReview( 33 | {this.id, 34 | this.dateCreated, 35 | this.dateCreatedGmt, 36 | this.productId, 37 | this.status, 38 | this.reviewer, 39 | this.reviewerEmail, 40 | this.review, 41 | this.rating, 42 | this.verified, 43 | this.reviewerAvatarUrls, 44 | this.links}); 45 | 46 | ProductReview.fromJson(Map json) { 47 | id = json['id']; 48 | dateCreated = json['date_created']; 49 | dateCreatedGmt = json['date_created_gmt']; 50 | productId = json['product_id']; 51 | status = json['status']; 52 | reviewer = json['reviewer']; 53 | reviewerEmail = json['reviewer_email']; 54 | review = json['review']; 55 | rating = json['rating']; 56 | verified = json['verified']; 57 | reviewerAvatarUrls = json['reviewer_avatar_urls'] != null 58 | ? (json['reviewer_avatar_urls']) 59 | : null; 60 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 61 | } 62 | 63 | Map toJson() { 64 | final Map data = {}; 65 | data['id'] = id; 66 | data['date_created'] = dateCreated; 67 | data['date_created_gmt'] = dateCreatedGmt; 68 | data['product_id'] = productId; 69 | data['status'] = status; 70 | data['reviewer'] = reviewer; 71 | data['reviewer_email'] = reviewerEmail; 72 | // ignore: unnecessary_this 73 | data['review'] = this.review; 74 | data['rating'] = rating; 75 | data['verified'] = verified; 76 | if (reviewerAvatarUrls != null) { 77 | data['reviewer_avatar_urls'] = reviewerAvatarUrls.toString(); 78 | } 79 | if (links != null) { 80 | data['_links'] = links!.toJson(); 81 | } 82 | return data; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/models/response/product_shipping_class.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ProductShippingClass { 19 | int? id; 20 | String? name; 21 | String? slug; 22 | String? description; 23 | int? count; 24 | Links? links; 25 | 26 | ProductShippingClass( 27 | {this.id, 28 | this.name, 29 | this.slug, 30 | this.description, 31 | this.count, 32 | this.links}); 33 | 34 | ProductShippingClass.fromJson(Map json) { 35 | id = json['id']; 36 | name = json['name']; 37 | slug = json['slug']; 38 | description = json['description']; 39 | count = json['count']; 40 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 41 | } 42 | 43 | Map toJson() { 44 | final Map data = {}; 45 | data['id'] = id; 46 | data['name'] = name; 47 | data['slug'] = slug; 48 | data['description'] = description; 49 | data['count'] = count; 50 | if (links != null) { 51 | data['_links'] = links!.toJson(); 52 | } 53 | return data; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/models/response/product_tag.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ProductTag { 19 | int? id; 20 | String? name; 21 | String? slug; 22 | String? description; 23 | int? count; 24 | Links? links; 25 | 26 | ProductTag( 27 | {this.id, 28 | this.name, 29 | this.slug, 30 | this.description, 31 | this.count, 32 | this.links}); 33 | 34 | ProductTag.fromJson(Map json) { 35 | id = json['id']; 36 | name = json['name']; 37 | slug = json['slug']; 38 | description = json['description']; 39 | count = json['count']; 40 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 41 | } 42 | 43 | Map toJson() { 44 | final Map data = {}; 45 | data['id'] = id; 46 | data['name'] = name; 47 | data['slug'] = slug; 48 | data['description'] = description; 49 | data['count'] = count; 50 | if (links != null) { 51 | data['_links'] = links!.toJson(); 52 | } 53 | return data; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/models/response/product_variation.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/image.dart'; 17 | import 'package:woosignal/models/response/dimension.dart'; 18 | 19 | import '../meta_data.dart'; 20 | 21 | class ProductVariation { 22 | int? id; 23 | DateTime? dateCreated; 24 | DateTime? dateCreatedGmt; 25 | DateTime? dateModified; 26 | DateTime? dateModifiedGmt; 27 | String? description; 28 | String? permalink; 29 | String? sku; 30 | String? price; 31 | String? regularPrice; 32 | String? salePrice; 33 | DateTime? dateOnSaleFrom; 34 | DateTime? dateOnSaleFromGmt; 35 | DateTime? dateOnSaleTo; 36 | DateTime? dateOnSaleToGmt; 37 | bool? onSale; 38 | String? status; 39 | bool? purchasable; 40 | bool? virtual; 41 | bool? downloadable; 42 | List downloads; 43 | int? downloadLimit; 44 | int? downloadExpiry; 45 | String? taxStatus; 46 | String? taxClass; 47 | bool? manageStock; 48 | int? stockQuantity; 49 | String? stockStatus; 50 | String? backorders; 51 | bool? backordersAllowed; 52 | bool? backOrdered; 53 | List attributes; 54 | String? weight; 55 | String? shippingClass; 56 | int? shippingClassId; 57 | int? menuOrder; 58 | Dimension dimensions; 59 | List metaData; 60 | Image? image; 61 | 62 | ProductVariation( 63 | this.id, 64 | this.dateCreated, 65 | this.dateCreatedGmt, 66 | this.dateModified, 67 | this.dateModifiedGmt, 68 | this.description, 69 | this.permalink, 70 | this.sku, 71 | this.price, 72 | this.attributes, 73 | this.regularPrice, 74 | this.salePrice, 75 | this.dateOnSaleFrom, 76 | this.dateOnSaleFromGmt, 77 | this.dateOnSaleTo, 78 | this.dateOnSaleToGmt, 79 | this.onSale, 80 | this.status, 81 | this.purchasable, 82 | this.virtual, 83 | this.downloadable, 84 | this.downloads, 85 | this.downloadLimit, 86 | this.downloadExpiry, 87 | this.taxStatus, 88 | this.taxClass, 89 | this.manageStock, 90 | this.stockQuantity, 91 | this.stockStatus, 92 | this.backorders, 93 | this.backordersAllowed, 94 | this.backOrdered, 95 | this.weight, 96 | this.shippingClass, 97 | this.shippingClassId, 98 | this.menuOrder, 99 | this.dimensions, 100 | this.metaData, 101 | this.image); 102 | 103 | ProductVariation.fromJson(Map json) 104 | : id = json['id'], 105 | permalink = json['permalink'], 106 | status = json['status'], 107 | description = json['description'], 108 | sku = json['sku'], 109 | price = json['price'], 110 | regularPrice = json['regular_price'], 111 | salePrice = json['sale_price'], 112 | onSale = json['on_sale'], 113 | purchasable = json['purchasable'], 114 | virtual = json['virtual'], 115 | downloadable = json['downloadable'], 116 | downloads = (json['downloads'] as List) 117 | .map((i) => Download.fromJson(i)) 118 | .toList(), 119 | downloadLimit = json['download_limit'], 120 | downloadExpiry = json['download_expiry'], 121 | taxStatus = json['tax_status'], 122 | taxClass = json['tax_class'], 123 | manageStock = 124 | (json['manage_stock'] != null && json['manage_stock'] is bool) 125 | ? json['manage_stock'] 126 | : false, 127 | stockQuantity = json['stock_quantity'], 128 | stockStatus = json['stock_status'], 129 | backorders = json['backorders'], 130 | backordersAllowed = json['backorders_allowed'], 131 | backOrdered = json['backordered'], 132 | weight = json['weight'], 133 | dimensions = Dimension.fromJson(json['dimensions']), 134 | shippingClass = json['shipping_class'], 135 | shippingClassId = json['shipping_class_id'], 136 | menuOrder = json['menu_order'], 137 | attributes = (json['attributes'] as List) 138 | .map((i) => Attribute.fromJson(i)) 139 | .toList(), 140 | metaData = (json['meta_data'] as List) 141 | .map((i) => MetaData.fromJson(i)) 142 | .toList(), 143 | image = Image.fromJson(json['image']); 144 | } 145 | 146 | class Category { 147 | final int? id; 148 | final String? name; 149 | final String? slug; 150 | 151 | Category(this.id, this.name, this.slug); 152 | 153 | Category.fromJson(Map json) 154 | : id = json['id'], 155 | name = json['name'], 156 | slug = json['slug']; 157 | 158 | Map toJson() => { 159 | 'id': id, 160 | 'name': name, 161 | 'slug': slug, 162 | }; 163 | } 164 | 165 | class Attribute { 166 | final int? id; 167 | final String? name; 168 | final String? option; 169 | 170 | Attribute(this.id, this.name, this.option); 171 | 172 | Attribute.fromJson(Map json) 173 | : id = json['id'], 174 | name = json['name'], 175 | option = json['option']; 176 | 177 | Map toJson() => { 178 | 'id': id, 179 | 'name': name, 180 | 'option': option, 181 | }; 182 | } 183 | 184 | class Download { 185 | final String? id; 186 | final String? name; 187 | final String? file; 188 | 189 | Download(this.id, this.name, this.file); 190 | 191 | Download.fromJson(Map json) 192 | : id = json['id'], 193 | name = json['name'], 194 | file = json['file']; 195 | 196 | Map toJson() => { 197 | 'id': id, 198 | 'name': name, 199 | 'file': file, 200 | }; 201 | } 202 | -------------------------------------------------------------------------------- /lib/models/response/refund.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class Refund { 19 | Refund({ 20 | this.id, 21 | this.dateCreated, 22 | this.dateCreatedGmt, 23 | this.amount, 24 | this.reason, 25 | this.refundedBy, 26 | this.refundedPayment, 27 | this.metaData, 28 | this.lineItems, 29 | this.links, 30 | }); 31 | 32 | int? id; 33 | DateTime? dateCreated; 34 | DateTime? dateCreatedGmt; 35 | String? amount; 36 | String? reason; 37 | int? refundedBy; 38 | bool? refundedPayment; 39 | List? metaData; 40 | List? lineItems; 41 | Links? links; 42 | 43 | factory Refund.fromJson(Map json) => Refund( 44 | id: json["id"], 45 | dateCreated: DateTime.parse(json["date_created"]), 46 | dateCreatedGmt: DateTime.parse(json["date_created_gmt"]), 47 | amount: json["amount"], 48 | reason: json["reason"], 49 | refundedBy: json["refunded_by"], 50 | refundedPayment: json["refunded_payment"], 51 | metaData: List.from(json["meta_data"].map((x) => x)), 52 | lineItems: List.from(json["line_items"].map((x) => x)), 53 | links: Links.fromJson(json["_links"]), 54 | ); 55 | 56 | Map toJson() => { 57 | "id": id, 58 | "date_created": dateCreated!.toIso8601String(), 59 | "date_created_gmt": dateCreatedGmt!.toIso8601String(), 60 | "amount": amount, 61 | "reason": reason, 62 | "refunded_by": refundedBy, 63 | "refunded_payment": refundedPayment, 64 | "meta_data": List.from(metaData!.map((x) => x)), 65 | "line_items": List.from(lineItems!.map((x) => x)), 66 | "_links": links!.toJson(), 67 | }; 68 | } 69 | -------------------------------------------------------------------------------- /lib/models/response/reports.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class Reports { 19 | Reports({ 20 | this.slug, 21 | this.description, 22 | this.links, 23 | }); 24 | 25 | String? slug; 26 | String? description; 27 | Links? links; 28 | 29 | factory Reports.fromJson(Map json) => Reports( 30 | slug: json["slug"], 31 | description: json["description"], 32 | links: Links.fromJson(json["_links"]), 33 | ); 34 | 35 | Map toJson() => { 36 | "slug": slug, 37 | "description": description, 38 | "_links": links!.toJson(), 39 | }; 40 | } 41 | 42 | class About { 43 | About({ 44 | this.href, 45 | }); 46 | 47 | String? href; 48 | 49 | factory About.fromJson(Map json) => About( 50 | href: json["href"], 51 | ); 52 | 53 | Map toJson() => { 54 | "href": href, 55 | }; 56 | } 57 | 58 | class Total { 59 | Total({ 60 | this.sales, 61 | this.orders, 62 | this.items, 63 | this.tax, 64 | this.shipping, 65 | this.discount, 66 | this.customers, 67 | }); 68 | 69 | String? sales; 70 | int? orders; 71 | int? items; 72 | String? tax; 73 | String? shipping; 74 | String? discount; 75 | int? customers; 76 | 77 | factory Total.fromJson(Map json) => Total( 78 | sales: json["sales"], 79 | orders: json["orders"], 80 | items: json["items"], 81 | tax: json["tax"], 82 | shipping: json["shipping"], 83 | discount: json["discount"], 84 | customers: json["customers"], 85 | ); 86 | 87 | Map toJson() => { 88 | "sales": sales, 89 | "orders": orders, 90 | "items": items, 91 | "tax": tax, 92 | "shipping": shipping, 93 | "discount": discount, 94 | "customers": customers, 95 | }; 96 | } 97 | 98 | class TotalReport { 99 | TotalReport({ 100 | this.slug, 101 | this.name, 102 | this.total, 103 | }); 104 | 105 | String? slug; 106 | String? name; 107 | int? total; 108 | 109 | factory TotalReport.fromJson(Map json) => TotalReport( 110 | slug: json["slug"], 111 | name: json["name"], 112 | total: json["total"], 113 | ); 114 | 115 | Map toJson() => { 116 | "slug": slug, 117 | "name": name, 118 | "total": total, 119 | }; 120 | } 121 | -------------------------------------------------------------------------------- /lib/models/response/sale_report.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class SalesReports { 17 | SalesReports({ 18 | this.totalSales, 19 | this.netSales, 20 | this.averageSales, 21 | this.totalOrders, 22 | this.totalItems, 23 | this.totalTax, 24 | this.totalShipping, 25 | this.totalRefunds, 26 | this.totalDiscount, 27 | this.totalsGroupedBy, 28 | this.totals, 29 | this.totalCustomers, 30 | this.links, 31 | }); 32 | 33 | String? totalSales; 34 | String? netSales; 35 | String? averageSales; 36 | int? totalOrders; 37 | int? totalItems; 38 | String? totalTax; 39 | String? totalShipping; 40 | int? totalRefunds; 41 | String? totalDiscount; 42 | String? totalsGroupedBy; 43 | dynamic totals; 44 | int? totalCustomers; 45 | Links? links; 46 | 47 | factory SalesReports.fromJson(Map json) => SalesReports( 48 | totalSales: json["total_sales"], 49 | netSales: json["net_sales"], 50 | averageSales: json["average_sales"], 51 | totalOrders: json["total_orders"], 52 | totalItems: json["total_items"], 53 | totalTax: json["total_tax"], 54 | totalShipping: json["total_shipping"], 55 | totalRefunds: json["total_refunds"], 56 | totalDiscount: json["total_discount"], 57 | totalsGroupedBy: json["totals_grouped_by"], 58 | totals: json['totals'], 59 | totalCustomers: json["total_customers"], 60 | links: Links.fromJson(json["_links"]), 61 | ); 62 | 63 | Map toJson() => { 64 | "total_sales": totalSales, 65 | "net_sales": netSales, 66 | "average_sales": averageSales, 67 | "total_orders": totalOrders, 68 | "total_items": totalItems, 69 | "total_tax": totalTax, 70 | "total_shipping": totalShipping, 71 | "total_refunds": totalRefunds, 72 | "total_discount": totalDiscount, 73 | "totals_grouped_by": totalsGroupedBy, 74 | "totals": totals.toJson(), 75 | "total_customers": totalCustomers, 76 | "_links": links!.toJson(), 77 | }; 78 | } 79 | 80 | class Links { 81 | Links({ 82 | this.about, 83 | }); 84 | 85 | List? about; 86 | 87 | factory Links.fromJson(Map json) => Links( 88 | about: List.from(json["about"].map((x) => About.fromJson(x))), 89 | ); 90 | 91 | Map toJson() => { 92 | "about": List.from(about!.map((x) => x.toJson())), 93 | }; 94 | } 95 | 96 | class About { 97 | About({ 98 | this.href, 99 | }); 100 | 101 | String? href; 102 | 103 | factory About.fromJson(Map json) => About( 104 | href: json["href"], 105 | ); 106 | 107 | Map toJson() => { 108 | "href": href, 109 | }; 110 | } 111 | -------------------------------------------------------------------------------- /lib/models/response/setting_option.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class SettingOption { 19 | SettingOption({ 20 | this.id, 21 | this.label, 22 | this.description, 23 | this.type, 24 | this.settingOptionDefault, 25 | this.tip, 26 | this.value, 27 | this.links, 28 | this.options, 29 | }); 30 | 31 | String? id; 32 | String? label; 33 | String? description; 34 | String? type; 35 | String? settingOptionDefault; 36 | String? tip; 37 | String? value; 38 | Links? links; 39 | Map? options; 40 | 41 | factory SettingOption.fromJson(Map json) => SettingOption( 42 | id: json["id"], 43 | label: json["label"], 44 | description: json["description"], 45 | type: json["type"], 46 | settingOptionDefault: json["default"], 47 | tip: json["tip"], 48 | value: json["value"], 49 | links: Links.fromJson(json["_links"]), 50 | options: json["options"] == null 51 | ? null 52 | : Map.from(json["options"]) 53 | .map((k, v) => MapEntry(k, v)), 54 | ); 55 | 56 | Map toJson() => { 57 | "id": id, 58 | "label": label, 59 | "description": description, 60 | "type": type, 61 | "default": settingOptionDefault, 62 | "tip": tip, 63 | "value": value, 64 | "_links": links!.toJson(), 65 | "options": options == null 66 | ? null 67 | : Map.from(options!).map((k, v) => MapEntry(k, v)), 68 | }; 69 | } 70 | -------------------------------------------------------------------------------- /lib/models/response/setting_option_batch.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class SettingOptionBatch { 19 | SettingOptionBatch({ 20 | this.update, 21 | }); 22 | 23 | List? update; 24 | 25 | factory SettingOptionBatch.fromJson(Map json) => 26 | SettingOptionBatch( 27 | update: 28 | List.from(json["update"].map((x) => Update.fromJson(x))), 29 | ); 30 | 31 | Map toJson() => { 32 | "update": List.from(update!.map((x) => x.toJson())), 33 | }; 34 | } 35 | 36 | class Update { 37 | Update({ 38 | this.id, 39 | this.label, 40 | this.description, 41 | this.type, 42 | this.updateDefault, 43 | this.options, 44 | this.tip, 45 | this.value, 46 | this.links, 47 | }); 48 | 49 | String? id; 50 | String? label; 51 | String? description; 52 | String? type; 53 | String? updateDefault; 54 | Map? options; 55 | String? tip; 56 | String? value; 57 | Links? links; 58 | 59 | factory Update.fromJson(Map json) => Update( 60 | id: json["id"], 61 | label: json["label"], 62 | description: json["description"], 63 | type: json["type"], 64 | updateDefault: json["default"], 65 | options: json["options"] == null 66 | ? null 67 | : Map.from(json["options"]) 68 | .map((k, v) => MapEntry(k, v)), 69 | tip: json["tip"], 70 | value: json["value"], 71 | links: Links.fromJson(json["_links"]), 72 | ); 73 | 74 | Map toJson() => { 75 | "id": id, 76 | "label": label, 77 | "description": description, 78 | "type": type, 79 | "default": updateDefault, 80 | "options": options == null 81 | ? null 82 | : Map.from(options!).map((k, v) => MapEntry(k, v)), 83 | "tip": tip, 84 | "value": value, 85 | "_links": links!.toJson(), 86 | }; 87 | } 88 | -------------------------------------------------------------------------------- /lib/models/response/shipping_method.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class WSShipping { 17 | int? parentId; 18 | String? name; 19 | List? locations; 20 | Methods? methods; 21 | 22 | WSShipping({this.parentId, this.name, this.locations, this.methods}); 23 | 24 | WSShipping.fromJson(Map json) { 25 | parentId = json['parent_id']; 26 | name = json['name']; 27 | if (json['locations'] != null) { 28 | locations = []; 29 | json['locations'].forEach((v) { 30 | locations!.add(Locations.fromJson(v)); 31 | }); 32 | } 33 | methods = 34 | json['methods'] != null ? Methods.fromJson(json['methods']) : null; 35 | } 36 | 37 | Map toJson() { 38 | final Map data = {}; 39 | data['parent_id'] = parentId; 40 | data['name'] = name; 41 | if (locations != null) { 42 | data['locations'] = locations!.map((v) => v.toJson()).toList(); 43 | } 44 | if (methods != null) { 45 | data['methods'] = methods!.toJson(); 46 | } 47 | return data; 48 | } 49 | } 50 | 51 | class Locations { 52 | String? code; 53 | String? type; 54 | 55 | Locations({this.code, this.type}); 56 | 57 | Locations.fromJson(Map json) { 58 | code = json['code']; 59 | type = json['type']; 60 | } 61 | 62 | Map toJson() { 63 | final Map data = {}; 64 | data['code'] = code; 65 | data['type'] = type; 66 | return data; 67 | } 68 | } 69 | 70 | class Methods { 71 | List? freeShipping; 72 | List? flatRate; 73 | List? localPickup; 74 | 75 | Methods({this.freeShipping, this.flatRate, this.localPickup}); 76 | 77 | Methods.fromJson(Map json) { 78 | if (json['free_shipping'] != null) { 79 | freeShipping = []; 80 | json['free_shipping'].forEach((v) { 81 | freeShipping!.add(FreeShipping.fromJson(v)); 82 | }); 83 | } 84 | if (json['flat_rate'] != null) { 85 | flatRate = []; 86 | json['flat_rate'].forEach((v) { 87 | flatRate!.add(FlatRate.fromJson(v)); 88 | }); 89 | } 90 | if (json['local_pickup'] != null) { 91 | localPickup = []; 92 | json['local_pickup'].forEach((v) { 93 | localPickup!.add(LocalPickup.fromJson(v)); 94 | }); 95 | } 96 | } 97 | 98 | Map toJson() { 99 | final Map data = {}; 100 | if (freeShipping != null) { 101 | data['free_shipping'] = freeShipping!.map((v) => v.toJson()).toList(); 102 | } 103 | if (flatRate != null) { 104 | data['flat_rate'] = flatRate!.map((v) => v.toJson()).toList(); 105 | } 106 | if (localPickup != null) { 107 | data['local_pickup'] = localPickup!.map((v) => v.toJson()).toList(); 108 | } 109 | return data; 110 | } 111 | } 112 | 113 | class FreeShipping { 114 | int? id; 115 | String? title; 116 | String? methodId; 117 | String? cost; 118 | String? minimumOrderAmount; 119 | 120 | FreeShipping( 121 | {this.id, this.title, this.methodId, this.cost, this.minimumOrderAmount}); 122 | 123 | FreeShipping.fromJson(Map json) { 124 | id = json['id']; 125 | title = json['title']; 126 | methodId = json['method_id']; 127 | cost = json['cost']; 128 | if (json['cost'] != null && json['cost'] == 'min_amount') { 129 | if (json['kind'] != null && json['kind'] != "") { 130 | minimumOrderAmount = json['kind']['min_amount']; 131 | } 132 | } 133 | } 134 | 135 | Map toJson() { 136 | final Map data = {}; 137 | data['id'] = id; 138 | data['title'] = title; 139 | data['method_id'] = methodId; 140 | data['cost'] = cost; 141 | if (minimumOrderAmount != null) { 142 | data['minimum_order_amount'] = minimumOrderAmount; 143 | } 144 | return data; 145 | } 146 | } 147 | 148 | class FlatRate { 149 | int? id; 150 | String? title; 151 | String? methodId; 152 | String? cost; 153 | String? classCost; 154 | String? calculationType; 155 | bool? taxable; 156 | List? shippingClasses; 157 | 158 | FlatRate( 159 | {this.id, 160 | this.title, 161 | this.methodId, 162 | this.cost, 163 | this.classCost, 164 | this.calculationType, 165 | this.taxable, 166 | this.shippingClasses}); 167 | 168 | FlatRate.fromJson(Map json) { 169 | id = json['id']; 170 | title = json['title']; 171 | methodId = json['method_id']; 172 | cost = json['cost']; 173 | classCost = json['class_cost']; 174 | calculationType = json['calculation_type']; 175 | taxable = json['taxable']; 176 | if (json['shipping_classes'] != null) { 177 | shippingClasses = []; 178 | json['shipping_classes'].forEach((v) { 179 | shippingClasses!.add(ShippingClasses.fromJson(v)); 180 | }); 181 | } 182 | } 183 | 184 | Map toJson() { 185 | final Map data = {}; 186 | data['id'] = id; 187 | data['title'] = title; 188 | data['method_id'] = methodId; 189 | data['cost'] = cost; 190 | data['class_cost'] = classCost; 191 | data['calculation_type'] = calculationType; 192 | data['taxable'] = taxable; 193 | if (shippingClasses != null) { 194 | data['shipping_classes'] = 195 | shippingClasses!.map((v) => v.toJson()).toList(); 196 | } 197 | return data; 198 | } 199 | } 200 | 201 | class ShippingClasses { 202 | String? id; 203 | String? cost; 204 | 205 | ShippingClasses({this.id, this.cost}); 206 | 207 | ShippingClasses.fromJson(Map json) { 208 | id = json['id']; 209 | cost = json['cost']; 210 | } 211 | 212 | Map toJson() { 213 | final Map data = {}; 214 | data['id'] = id; 215 | data['cost'] = cost; 216 | return data; 217 | } 218 | } 219 | 220 | class LocalPickup { 221 | int? id; 222 | String? title; 223 | String? methodId; 224 | bool? taxable; 225 | String? cost; 226 | 227 | LocalPickup({this.id, this.title, this.methodId, this.taxable, this.cost}); 228 | 229 | LocalPickup.fromJson(Map json) { 230 | id = json['id']; 231 | title = json['title']; 232 | methodId = json['method_id']; 233 | taxable = json['taxable']; 234 | cost = json['cost']; 235 | } 236 | 237 | Map toJson() { 238 | final Map data = {}; 239 | data['id'] = id; 240 | data['title'] = title; 241 | data['method_id'] = methodId; 242 | data['taxable'] = taxable; 243 | data['cost'] = cost; 244 | return data; 245 | } 246 | } 247 | -------------------------------------------------------------------------------- /lib/models/response/shipping_zone.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ShippingZone { 19 | int? id; 20 | String? name; 21 | int? order; 22 | Links? links; 23 | 24 | ShippingZone({this.id, this.name, this.order, this.links}); 25 | 26 | ShippingZone.fromJson(Map json) { 27 | id = json['id']; 28 | name = json['name']; 29 | order = json['order']; 30 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 31 | } 32 | 33 | Map toJson() { 34 | final Map data = {}; 35 | data['id'] = id; 36 | data['name'] = name; 37 | data['order'] = order; 38 | if (links != null) { 39 | data['_links'] = links!.toJson(); 40 | } 41 | return data; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/models/response/shipping_zone_location.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class ShippingZoneLocation { 19 | String? code; 20 | String? type; 21 | Links? links; 22 | 23 | ShippingZoneLocation({this.code, this.type, this.links}); 24 | 25 | ShippingZoneLocation.fromJson(Map json) { 26 | code = json['code']; 27 | type = json['type']; 28 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 29 | } 30 | 31 | Map toJson() { 32 | final Map data = {}; 33 | data['code'] = code; 34 | data['type'] = type; 35 | if (links != null) { 36 | data['_links'] = links!.toJson(); 37 | } 38 | return data; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/models/response/tax_classes.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class TaxClass { 19 | String? slug; 20 | String? name; 21 | Links? links; 22 | 23 | TaxClass({this.slug, this.name, this.links}); 24 | 25 | TaxClass.fromJson(Map json) { 26 | slug = json['slug']; 27 | name = json['name']; 28 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 29 | } 30 | 31 | Map toJson() { 32 | final Map data = {}; 33 | data['slug'] = slug; 34 | data['name'] = name; 35 | if (links != null) { 36 | data['_links'] = links!.toJson(); 37 | } 38 | return data; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/models/response/tax_rate.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/links.dart'; 17 | 18 | class TaxRate { 19 | int? id; 20 | String? country; 21 | String? state; 22 | String? postcode; 23 | String? city; 24 | String? rate; 25 | String? name; 26 | int? priority; 27 | bool? compound; 28 | bool? shipping; 29 | int? order; 30 | String? taxClass; 31 | Links? links; 32 | 33 | TaxRate( 34 | {this.id, 35 | this.country, 36 | this.state, 37 | this.postcode, 38 | this.city, 39 | this.rate, 40 | this.name, 41 | this.priority, 42 | this.compound, 43 | this.shipping, 44 | this.order, 45 | this.taxClass, 46 | this.links}); 47 | 48 | TaxRate.fromJson(Map json) { 49 | id = json['id']; 50 | country = json['country']; 51 | state = json['state']; 52 | postcode = json['postcode']; 53 | city = json['city']; 54 | rate = json['rate']; 55 | name = json['name']; 56 | priority = json['priority']; 57 | compound = json['compound']; 58 | shipping = json['shipping']; 59 | order = json['order']; 60 | taxClass = json['class']; 61 | links = json['_links'] != null ? Links.fromJson(json['_links']) : null; 62 | } 63 | 64 | Map toJson() { 65 | final Map data = {}; 66 | data['id'] = id; 67 | data['country'] = country; 68 | data['state'] = state; 69 | data['postcode'] = postcode; 70 | data['city'] = city; 71 | data['rate'] = rate; 72 | data['name'] = name; 73 | data['priority'] = priority; 74 | data['compound'] = compound; 75 | data['shipping'] = shipping; 76 | data['order'] = order; 77 | data['class'] = taxClass; 78 | if (links != null) { 79 | data['_links'] = links!.toJson(); 80 | } 81 | return data; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/models/response/top_seller_report.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class TopSellerReport { 17 | TopSellerReport({ 18 | this.title, 19 | this.productId, 20 | this.quantity, 21 | this.links, 22 | }); 23 | 24 | String? title; 25 | int? productId; 26 | int? quantity; 27 | Links? links; 28 | 29 | factory TopSellerReport.fromJson(Map json) => 30 | TopSellerReport( 31 | title: json["title"], 32 | productId: json["product_id"], 33 | quantity: json["quantity"], 34 | links: Links.fromJson(json["_links"]), 35 | ); 36 | 37 | Map toJson() => { 38 | "title": title, 39 | "product_id": productId, 40 | "quantity": quantity, 41 | "_links": links!.toJson(), 42 | }; 43 | } 44 | 45 | class Links { 46 | Links({ 47 | this.about, 48 | this.product, 49 | }); 50 | 51 | List? about; 52 | List? product; 53 | 54 | factory Links.fromJson(Map json) => Links( 55 | about: List.from(json["about"].map((x) => About.fromJson(x))), 56 | product: 57 | List.from(json["product"].map((x) => About.fromJson(x))), 58 | ); 59 | 60 | Map toJson() => { 61 | "about": List.from(about!.map((x) => x.toJson())), 62 | "product": List.from(product!.map((x) => x.toJson())), 63 | }; 64 | } 65 | 66 | class About { 67 | About({ 68 | this.href, 69 | }); 70 | 71 | String? href; 72 | 73 | factory About.fromJson(Map json) => About( 74 | href: json["href"], 75 | ); 76 | 77 | Map toJson() => { 78 | "href": href, 79 | }; 80 | } 81 | -------------------------------------------------------------------------------- /lib/models/response/woosignal_app.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'package:woosignal/models/menu_link.dart'; 17 | import 'package:woosignal/models/response/product_category_collection.dart'; 18 | 19 | class WooSignalApp { 20 | String? appName; 21 | String? appLogo; 22 | String? appTermsLink; 23 | String? appPrivacyLink; 24 | int? appDebug; 25 | int? appStatus; 26 | CurrencyMeta? currencyMeta; 27 | List? bannerImages; 28 | bool? stripeLiveMode; 29 | String? stripeAccount; 30 | int? wpLoginEnabled; 31 | bool? couponEnabled; 32 | bool? showProductReviews; 33 | bool? showRelatedProducts; 34 | bool? showUpsellProducts; 35 | String? wpLoginBaseUrl; 36 | String? wpLoginForgotPasswordUrl; 37 | String? wpLoginWpApiPath; 38 | int? productPricesIncludeTax; 39 | int? disableShipping; 40 | String? theme; 41 | String? locale; 42 | String? paypalLocale; 43 | String? paypalEmail; 44 | bool? stripeEnabled; 45 | bool? codEnabled; 46 | bool? paypalEnabled; 47 | bool? wishlistEnabled; 48 | bool? paypalLiveMode; 49 | String? stripeCountryCode; 50 | String? themeFont; 51 | Map? socialLinks; 52 | List menuLinks = []; 53 | Map? themeColors; 54 | Map? firebaseOptionsIos = {}; 55 | Map? firebaseOptionsAndroid = {}; 56 | bool? firebaseFcmIsEnabled; 57 | List productCategoryCollections = []; 58 | 59 | WooSignalApp( 60 | {this.appName, 61 | this.appLogo, 62 | this.appTermsLink, 63 | this.appPrivacyLink, 64 | this.appDebug, 65 | this.appStatus, 66 | this.currencyMeta, 67 | this.bannerImages, 68 | this.stripeLiveMode, 69 | this.stripeAccount, 70 | this.wpLoginEnabled, 71 | this.wpLoginBaseUrl, 72 | this.wpLoginForgotPasswordUrl, 73 | this.wpLoginWpApiPath, 74 | this.productPricesIncludeTax, 75 | this.disableShipping, 76 | this.theme, 77 | this.locale, 78 | this.paypalLocale, 79 | this.paypalEmail, 80 | this.stripeEnabled, 81 | this.codEnabled, 82 | this.paypalEnabled, 83 | this.paypalLiveMode, 84 | this.stripeCountryCode, 85 | this.couponEnabled, 86 | this.wishlistEnabled, 87 | this.themeFont, 88 | this.socialLinks, 89 | this.menuLinks = const [], 90 | this.themeColors, 91 | this.productCategoryCollections = const [], 92 | this.firebaseOptionsIos = const {}, 93 | this.firebaseOptionsAndroid = const {}}); 94 | 95 | WooSignalApp.fromJson(Map json) { 96 | appName = json['app_name']; 97 | appLogo = json['app_logo']; 98 | appTermsLink = json['app_termslink']; 99 | appPrivacyLink = json['app_privacylink']; 100 | appDebug = json['app_debug']; 101 | appStatus = json['app_status']; 102 | currencyMeta = json['currency_meta'] != null 103 | ? CurrencyMeta.fromJson(json['currency_meta']) 104 | : null; 105 | bannerImages = json['banner_images'].cast(); 106 | stripeLiveMode = json['stripe_live_mode']; 107 | stripeAccount = json['stripe_account']; 108 | wpLoginEnabled = json['wp_login_enabled']; 109 | if (json['wishlist_enabled'] is int && json['wishlist_enabled'] == 1) { 110 | wishlistEnabled = true; 111 | } else { 112 | wishlistEnabled = false; 113 | } 114 | if (json['coupon_enabled'] is int && json['coupon_enabled'] == 1) { 115 | couponEnabled = true; 116 | } else { 117 | couponEnabled = false; 118 | } 119 | if (json['show_product_reviews'] is int && 120 | json['show_product_reviews'] == 1) { 121 | showProductReviews = true; 122 | } else { 123 | showProductReviews = false; 124 | } 125 | if (json['show_related_products'] is int && 126 | json['show_related_products'] == 1) { 127 | showRelatedProducts = true; 128 | } else { 129 | showRelatedProducts = false; 130 | } 131 | if (json['show_upsell_products'] is int && 132 | json['show_upsell_products'] == 1) { 133 | showUpsellProducts = true; 134 | } else { 135 | showUpsellProducts = false; 136 | } 137 | if (json['collections'] != null) { 138 | productCategoryCollections = List.from(json['collections']) 139 | .map((collection) => ProductCategoryCollection.fromJson(collection)) 140 | .toList(); 141 | } 142 | wpLoginBaseUrl = json['wp_login_base_url']; 143 | wpLoginForgotPasswordUrl = json['wp_login_forgot_password_url']; 144 | wpLoginWpApiPath = json['wp_login_wp_api_path']; 145 | productPricesIncludeTax = json['product_prices_include_tax']; 146 | disableShipping = json['disable_shipping']; 147 | theme = json['theme']; 148 | locale = json['locale']; 149 | paypalLocale = json['paypal_locale'] ?? "en-GB"; 150 | paypalEmail = json['paypal_email'] ?? ""; 151 | stripeEnabled = (json['stripe_enabled'] ?? 0) == 1 ? true : false; 152 | codEnabled = (json['cod_enabled'] ?? 0) == 1 ? true : false; 153 | paypalEnabled = (json['paypal_enabled'] ?? 0) == 1 ? true : false; 154 | paypalLiveMode = (json['paypal_live_mode'] ?? 0) == 1 ? true : false; 155 | stripeCountryCode = json['stripe_country_code'] ?? "GB"; 156 | if (json.containsKey('theme_font') && json['theme_font'] != null) { 157 | themeFont = json['theme_font']; 158 | } 159 | if (json.containsKey('social_links') && 160 | json['social_links'] is Map?) { 161 | socialLinks = json['social_links']; 162 | } 163 | if (json.containsKey('theme_colors') && 164 | json['theme_colors'] is Map?) { 165 | themeColors = json['theme_colors']; 166 | } 167 | 168 | if (json.containsKey('firebase_config') && 169 | json['firebase_config'] is Map?) { 170 | Map firebaseConfig = json['firebase_config']; 171 | if (firebaseConfig.containsKey('firebase_options_ios') && 172 | firebaseConfig['firebase_options_ios'] != null) { 173 | firebaseOptionsIos = firebaseConfig['firebase_options_ios']; 174 | } 175 | 176 | if (firebaseConfig.containsKey('firebase_options_android') && 177 | firebaseConfig['firebase_options_android'] != null) { 178 | firebaseOptionsAndroid = firebaseConfig['firebase_options_android']; 179 | } 180 | } 181 | 182 | if (json['firebase_fcm_enabled'] != null) { 183 | firebaseFcmIsEnabled = 184 | json['firebase_fcm_enabled'].toString() == "1" ? true : false; 185 | } 186 | 187 | if (json.containsKey('menu_links')) { 188 | menuLinks = List.from(json['menu_links']) 189 | .map((bet) => MenuLink.fromJson(bet)) 190 | .toList(); 191 | } 192 | } 193 | 194 | Map toJson() { 195 | final Map data = {}; 196 | data['app_name'] = appName; 197 | data['app_logo'] = appLogo; 198 | data['app_termslink'] = appTermsLink; 199 | data['app_privacylink'] = appPrivacyLink; 200 | data['app_debug'] = appDebug; 201 | data['wishlist_enabled'] = wishlistEnabled; 202 | data['coupon_enabled'] = couponEnabled; 203 | data['app_status'] = appStatus; 204 | if (currencyMeta != null) { 205 | data['currency_meta'] = currencyMeta!.toJson(); 206 | } 207 | data['banner_images'] = bannerImages; 208 | data['stripe_live_mode'] = stripeLiveMode; 209 | data['stripe_account'] = stripeAccount; 210 | data['wp_login_enabled'] = wpLoginEnabled; 211 | data['wp_login_base_url'] = wpLoginBaseUrl; 212 | data['wp_login_forgot_password_url'] = wpLoginForgotPasswordUrl; 213 | data['wp_login_wp_api_path'] = wpLoginWpApiPath; 214 | data['product_prices_include_tax'] = productPricesIncludeTax; 215 | data['disable_shipping'] = disableShipping; 216 | data['theme'] = theme; 217 | data['locale'] = locale; 218 | data['paypal_locale'] = paypalLocale; 219 | data['paypal_email'] = paypalEmail; 220 | data['stripe_enabled'] = stripeEnabled; 221 | data['cod_enabled'] = codEnabled; 222 | data['paypal_enabled'] = paypalEnabled; 223 | data['stripe_country_code'] = stripeCountryCode; 224 | data['theme_font'] = themeFont; 225 | data['social_links'] = socialLinks; 226 | data['theme_colors'] = themeColors; 227 | if (firebaseOptionsIos != null) { 228 | data['firebase_config']['firebase_options_ios'] = firebaseOptionsIos; 229 | } 230 | if (firebaseOptionsAndroid != null) { 231 | data['firebase_config']['firebase_options_android'] = 232 | firebaseOptionsAndroid; 233 | } 234 | data['fcm_enabled'] = firebaseFcmIsEnabled; 235 | return data; 236 | } 237 | } 238 | 239 | class CurrencyMeta { 240 | String? symbol; 241 | String? name; 242 | String? symbolNative; 243 | int? decimalDigits; 244 | int? rounding; 245 | String? code; 246 | String? namePlural; 247 | 248 | CurrencyMeta( 249 | {this.symbol, 250 | this.name, 251 | this.symbolNative, 252 | this.decimalDigits, 253 | this.rounding, 254 | this.code, 255 | this.namePlural}); 256 | 257 | CurrencyMeta.fromJson(Map json) { 258 | symbol = json['symbol']; 259 | name = json['name']; 260 | symbolNative = json['symbol_native']; 261 | decimalDigits = json['decimal_digits']; 262 | rounding = json['rounding']; 263 | code = json['code']; 264 | namePlural = json['name_plural']; 265 | } 266 | 267 | Map toJson() { 268 | final Map data = {}; 269 | data['symbol'] = symbol; 270 | data['name'] = name; 271 | data['symbol_native'] = symbolNative; 272 | data['decimal_digits'] = decimalDigits; 273 | data['rounding'] = rounding; 274 | data['code'] = code; 275 | data['name_plural'] = namePlural; 276 | return data; 277 | } 278 | } 279 | -------------------------------------------------------------------------------- /lib/models/self.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | class Self { 17 | String? href; 18 | 19 | Self({this.href}); 20 | 21 | Self.fromJson(Map json) { 22 | href = json['href']; 23 | } 24 | 25 | Map toJson() { 26 | final Map data = {}; 27 | data['href'] = href; 28 | return data; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/money_formatter/money_formatter.dart: -------------------------------------------------------------------------------- 1 | export 'src/utils/compact_format_type.dart'; 2 | export 'src/utils/money_formatter_settings.dart'; 3 | export 'src/utils/money_formatter_output.dart'; 4 | export 'src/utils/money_formatter_compare.dart'; 5 | export 'src/flutter_money_formatter_base.dart'; 6 | -------------------------------------------------------------------------------- /lib/money_formatter/src/flutter_money_formatter_base.dart: -------------------------------------------------------------------------------- 1 | import 'package:intl/intl.dart'; 2 | 3 | import '/money_formatter/src/utils/compact_format_type.dart'; 4 | import '/money_formatter/src/utils/money_formatter_settings.dart'; 5 | import '/money_formatter/src/utils/money_formatter_output.dart'; 6 | import '/money_formatter/src/utils/money_formatter_compare.dart'; 7 | 8 | part 'utils/utilities.dart'; 9 | 10 | /// [FlutterMoneyFormatter] instance 11 | class MoneyFormatter { 12 | late _Utilities _utilities; 13 | 14 | /// Init instance of [FlutterMoneyFormatter] 15 | /// 16 | /// [amount] (@required) the number that will be formatted 17 | MoneyFormatter({required this.amount, this.settings}) { 18 | settings = settings ?? MoneyFormatterSettings(); 19 | output = _getOutput(); 20 | comparator = MoneyFormatterCompare(amount: amount); 21 | } 22 | 23 | /// Amount number that will be formatted. 24 | double amount; 25 | 26 | /// The formatter settings 27 | MoneyFormatterSettings? settings; 28 | 29 | /// Returns compiled and formatted output in several formats. 30 | late MoneyFormatterOutput output; 31 | 32 | /// Comparator 33 | late MoneyFormatterCompare comparator; 34 | 35 | /// output builder 36 | MoneyFormatterOutput _getOutput() { 37 | _utilities = _Utilities(amount: amount, settings: settings); 38 | 39 | String urs = _utilities.refineSeparator; 40 | int decSepCharPos = urs.indexOf(settings?.decimalSeparator ?? '˘'); 41 | 42 | return MoneyFormatterOutput( 43 | nonSymbol: urs, 44 | symbolOnLeft: '${settings?.symbol ?? ''}${_utilities.spacer}$urs', 45 | symbolOnRight: '$urs${_utilities.spacer}${settings?.symbol ?? ''}', 46 | compactNonSymbol: _compactNonSymbol, 47 | compactSymbolOnLeft: 48 | '${settings?.symbol ?? ''}${_utilities.spacer}$_compactNonSymbol', 49 | compactSymbolOnRight: 50 | '$_compactNonSymbol${_utilities.spacer}${settings?.symbol ?? ''}', 51 | fractionDigitsOnly: 52 | urs.substring((-1 == decSepCharPos ? 0 : decSepCharPos + 1)), 53 | withoutFractionDigits: urs.substring( 54 | 0, -1 == decSepCharPos ? urs.length - 1 : decSepCharPos)); 55 | } 56 | 57 | /// returns FlutterMoneyFormatter after calculating amount. 58 | MoneyFormatter fastCalc( 59 | {required FastCalcType type, required double amount}) { 60 | switch (type) { 61 | case FastCalcType.addition: 62 | this.amount += amount; 63 | break; 64 | 65 | case FastCalcType.substraction: 66 | this.amount -= amount; 67 | break; 68 | 69 | case FastCalcType.multiplication: 70 | this.amount *= amount; 71 | break; 72 | 73 | case FastCalcType.division: 74 | this.amount /= amount; 75 | break; 76 | 77 | case FastCalcType.percentageAddition: 78 | this.amount += (amount / 100) * this.amount; 79 | break; 80 | 81 | case FastCalcType.percentageSubstraction: 82 | this.amount -= (amount / 100) * this.amount; 83 | break; 84 | } 85 | 86 | return this; 87 | } 88 | 89 | /// Copies current instance and change some values to the new instance. 90 | MoneyFormatter copyWith( 91 | {double? amount, 92 | String? symbol, 93 | String? thousandSeparator, 94 | String? decimalSeparator, 95 | int? fractionDigits, 96 | String? symbolAndNumberSeparator, 97 | CompactFormatType? compactFormatType}) { 98 | MoneyFormatterSettings? ts = settings; 99 | 100 | MoneyFormatterSettings mfs = MoneyFormatterSettings( 101 | symbol: symbol ?? ts?.symbol, 102 | thousandSeparator: thousandSeparator ?? ts?.thousandSeparator, 103 | decimalSeparator: decimalSeparator ?? ts?.decimalSeparator, 104 | symbolAndNumberSeparator: 105 | symbolAndNumberSeparator ?? ts?.symbolAndNumberSeparator, 106 | fractionDigits: fractionDigits ?? ts?.fractionDigits, 107 | compactFormatType: compactFormatType ?? ts?.compactFormatType); 108 | 109 | return MoneyFormatter(amount: amount ?? this.amount, settings: mfs); 110 | } 111 | 112 | /// Returns compact format number without currency symbol 113 | String get _compactNonSymbol { 114 | String compacted = _utilities.baseCompact.format(amount); 115 | String numerics = RegExp(r'(\d+\.\d+)|(\d+)') 116 | .allMatches(compacted) 117 | // ignore: no_wildcard_variable_uses 118 | .map((_) => _.group(0)) 119 | .toString() 120 | .replaceAll('(', '') 121 | .replaceAll(')', ''); 122 | 123 | String alphas = compacted.replaceAll(numerics, ''); 124 | 125 | String reformat = NumberFormat.currency( 126 | symbol: '', 127 | decimalDigits: 128 | !numerics.contains('.') ? 0 : settings?.fractionDigits) 129 | .format(num.parse(numerics)); 130 | 131 | return '$reformat$alphas'; 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /lib/money_formatter/src/utils/compact_format_type.dart: -------------------------------------------------------------------------------- 1 | /// An enum to be used on compact text format 2 | enum CompactFormatType { short, long } 3 | -------------------------------------------------------------------------------- /lib/money_formatter/src/utils/money_formatter_compare.dart: -------------------------------------------------------------------------------- 1 | /// [MoneyFormatterCompare] instance. 2 | /// 3 | /// This instance is used to hold utilities in comparing values held by [FlutterMoneyFormatter] 4 | class MoneyFormatterCompare { 5 | MoneyFormatterCompare({required this.amount}); 6 | 7 | final double amount; 8 | 9 | /// Check current instance amount is lower than [amount] or not 10 | bool isLowerThan(double amount) => this.amount < amount; 11 | 12 | /// Check current instance amount is greater than [amount] or not 13 | bool isGreaterThan(double amount) => this.amount > amount; 14 | 15 | /// Check current instance amount is equal than [amount] or not 16 | bool isEqual(double amount) => this.amount == amount; 17 | 18 | /// Check current instance amount is equal or lower than [amount] or not 19 | bool isEqualOrLowerThan(double amount) => this.amount <= amount; 20 | 21 | /// Check current instance amount is equal or greater than [amount] or not 22 | bool isEqualOrGreaterThan(double amount) => this.amount >= amount; 23 | } 24 | -------------------------------------------------------------------------------- /lib/money_formatter/src/utils/money_formatter_output.dart: -------------------------------------------------------------------------------- 1 | class MoneyFormatterOutput { 2 | /// Init instance of [MoneyFormatterOutput] 3 | MoneyFormatterOutput( 4 | {required this.nonSymbol, 5 | required this.symbolOnLeft, 6 | required this.symbolOnRight, 7 | required this.compactNonSymbol, 8 | required this.compactSymbolOnLeft, 9 | required this.compactSymbolOnRight, 10 | required this.fractionDigitsOnly, 11 | required this.withoutFractionDigits}); 12 | 13 | /// Returns formatted number without currency symbol 14 | final String nonSymbol; 15 | 16 | /// Returns formatted number with currency symbol on the left side. 17 | final String symbolOnLeft; 18 | 19 | /// Returns formatted number with currency symbol on the right side. 20 | final String symbolOnRight; 21 | 22 | /// Returns compact format number without currency symbol 23 | final String compactNonSymbol; 24 | 25 | /// Returns compact format number with currency symbol on the left side. 26 | final String compactSymbolOnLeft; 27 | 28 | /// Returns compact format number with currency symbol on the right side. 29 | final String compactSymbolOnRight; 30 | 31 | /// Returns decimal-only with length as specified on fractionDigits. 32 | final String fractionDigitsOnly; 33 | 34 | /// Returns formatted number without decimal. 35 | final String withoutFractionDigits; 36 | } 37 | -------------------------------------------------------------------------------- /lib/money_formatter/src/utils/money_formatter_settings.dart: -------------------------------------------------------------------------------- 1 | import '/money_formatter/src/utils/compact_format_type.dart'; 2 | 3 | /// [MoneyFormatterSettings] instance. 4 | /// 5 | /// This instance is used as a configurator for the [FlutterMoneyFormatter] instance. 6 | /// You can change the output of [FlutterMoneyFormatter] through this instance. 7 | class MoneyFormatterSettings { 8 | /// Init instance of [MoneyFormatterSettings] 9 | MoneyFormatterSettings( 10 | {this.symbol, 11 | this.thousandSeparator, 12 | this.decimalSeparator, 13 | this.symbolAndNumberSeparator, 14 | this.fractionDigits, 15 | this.compactFormatType}) { 16 | symbol = symbol ?? '\$'; 17 | thousandSeparator = thousandSeparator ?? ','; 18 | decimalSeparator = decimalSeparator ?? '.'; 19 | symbolAndNumberSeparator = symbolAndNumberSeparator ?? ' '; 20 | fractionDigits = fractionDigits ?? 2; 21 | compactFormatType = compactFormatType ?? CompactFormatType.short; 22 | } 23 | 24 | /// The [symbol] that will be used on formatted output, default value is $ (Dollar Sign) 25 | String? symbol; 26 | 27 | // The character that will be used as thousand separator on formatted output, default value is ',' (comma) 28 | String? thousandSeparator; 29 | 30 | /// The character that will be used as decimal separator on formatted output, default value is '.' (dot) 31 | String? decimalSeparator; 32 | 33 | /// The character that will be used as separator between the numbers and the symbol. 34 | String? symbolAndNumberSeparator; 35 | 36 | /// The fraction digits that will be used on formatted output, default value is 2. 37 | int? fractionDigits; 38 | 39 | /// Compact format type, for example using 'million' or 'M' 40 | CompactFormatType? compactFormatType; 41 | } 42 | -------------------------------------------------------------------------------- /lib/money_formatter/src/utils/utilities.dart: -------------------------------------------------------------------------------- 1 | part of '../flutter_money_formatter_base.dart'; 2 | 3 | enum FastCalcType { 4 | addition, 5 | substraction, 6 | multiplication, 7 | division, 8 | percentageAddition, 9 | percentageSubstraction 10 | } 11 | 12 | class _Utilities { 13 | _Utilities({required this.amount, this.settings}) { 14 | settings = settings ?? MoneyFormatterSettings(); 15 | } 16 | 17 | final double amount; 18 | 19 | MoneyFormatterSettings? settings; 20 | 21 | /// Returns formatted number 22 | String get baseFormat => NumberFormat.currency( 23 | symbol: '', decimalDigits: settings?.fractionDigits, locale: 'en_US') 24 | .format(amount); 25 | 26 | /// Returns formatted number with refined separator chars 27 | String get refineSeparator => baseFormat 28 | .replaceAll(',', '(,)') 29 | .replaceAll('.', '(.)') 30 | .replaceAll('(,)', settings?.thousandSeparator ?? ' ') 31 | .replaceAll('(.)', settings?.decimalSeparator ?? ' '); 32 | 33 | /// Returns spacer as `spaceBetweenSymbolAndNumber` value 34 | String get spacer => settings?.symbolAndNumberSeparator ?? ' '; 35 | 36 | /// Returns base compact format 37 | NumberFormat get baseCompact => 38 | settings?.compactFormatType == CompactFormatType.short 39 | ? NumberFormat.compact() 40 | : NumberFormat.compactLong(); 41 | } 42 | -------------------------------------------------------------------------------- /lib/networking/api_provider.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2025, WooSignal Ltd. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms are permitted 5 | // provided that the above copyright notice and this paragraph are 6 | // duplicated in all such forms and that any documentation, 7 | // advertising materials, and other materials related to such 8 | // distribution and use acknowledge that the software was developed 9 | // by the WooSignal. The name of the 10 | // WooSignal may not be used to endorse or promote products derived 11 | // from this software without specific prior written permission. 12 | // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 13 | // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 14 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 15 | 16 | import 'dart:convert'; 17 | import 'package:device_meta/device_meta.dart'; 18 | import 'package:dio/dio.dart'; 19 | import 'dart:io' show Platform; 20 | import 'package:flutter/foundation.dart' show kIsWeb; 21 | 22 | class ApiProvider { 23 | late Dio _dio; 24 | bool _debugMode; 25 | late final String _apiKey; 26 | late final String _version; 27 | Map _deviceMeta = {}; 28 | 29 | /// Set the device meta 30 | Future setDeviceMeta() async { 31 | DeviceMeta deviceMeta = 32 | await DeviceMeta.init(storageKey: "woosignal_woocommerce"); 33 | 34 | if (kIsWeb) { 35 | _deviceMeta = { 36 | "model": 'X Model', 37 | "brand": 'X Brand', 38 | "manufacturer": "X Manufacturer", 39 | "version": 'X Version', 40 | "uuid": '1234567890', 41 | "platform_type": "web", 42 | "api_version": "$_version/v1", 43 | "sdk_name": "woosignal-woocommerce" 44 | }; 45 | return; 46 | } 47 | 48 | if (Platform.environment.containsKey('FLUTTER_TEST')) { 49 | _deviceMeta = { 50 | "model": 'X Model', 51 | "brand": 'X Brand', 52 | "manufacturer": "X Manufacturer", 53 | "version": 'X Version', 54 | "uuid": '1234567890', 55 | "platform_type": "testing", 56 | "api_version": "$_version/v1", 57 | "sdk_name": "woosignal-woocommerce" 58 | }; 59 | return; 60 | } 61 | _deviceMeta = { 62 | "model": deviceMeta.model, 63 | "brand": deviceMeta.brand, 64 | "manufacturer": deviceMeta.manufacturer, 65 | "version": deviceMeta.version, 66 | "uuid": deviceMeta.uuid, 67 | "platform_type": deviceMeta.platformType, 68 | "api_version": "$_version/v1", 69 | "sdk_name": "woosignal-woocommerce" 70 | }; 71 | } 72 | 73 | /// set the WP user id 74 | void setWpUserId(String wpUserId) { 75 | _deviceMeta['wp_user_id'] = wpUserId; 76 | _setDioHeaders(); 77 | } 78 | 79 | /// set the FCM token 80 | void setFcmToken(String token) { 81 | if (_deviceMeta.containsKey('fcm_token')) { 82 | _deviceMeta['fcm_token'] = token; 83 | } else { 84 | _deviceMeta.addAll({"fcm_token": token}); 85 | } 86 | _setDioHeaders(); 87 | } 88 | 89 | /// set the [ApiProvider]'s debugMode 90 | void setDebugMode(bool debugMode) { 91 | _debugMode = debugMode; 92 | } 93 | 94 | /// Init Dio class 95 | _initDio() { 96 | BaseOptions options = BaseOptions(baseUrl: "https://api.woosignal.com/v3"); 97 | _dio = Dio(options); 98 | } 99 | 100 | /// Set the http headers for Dio 101 | _setDioHeaders() { 102 | _dio.options.headers = { 103 | "Authorization": "Bearer $_apiKey", 104 | "Content-Type": "application/json", 105 | "X-DMETA": json.encode(_deviceMeta).toString() 106 | }; 107 | } 108 | 109 | /// Constructor requires a [appKey] from WooSignal 110 | ApiProvider( 111 | {required String appKey, required String version, bool debugMode = true}) 112 | : _apiKey = appKey, 113 | _debugMode = debugMode, 114 | _version = version; 115 | 116 | /// Initialize class 117 | Future init() async { 118 | _initDio(); 119 | await setDeviceMeta(); 120 | await _setDioHeaders(); 121 | } 122 | 123 | /// Print to the console with a [log] response 124 | void _printLog(String log) { 125 | if (_debugMode == true) { 126 | print("WOOSIGNAL LOG: $log"); 127 | } 128 | } 129 | 130 | /// HTTP POST request using a [url] and [data] payload 131 | Future post(url, data) async { 132 | try { 133 | Response response = 134 | await _dio.post(url, data: {"data": json.encode(data)}); 135 | return response.data; 136 | } catch (error, stacktrace) { 137 | _printLog("$error stackTrace: $stacktrace"); 138 | return null; 139 | } 140 | } 141 | 142 | /// HTTP GET request using a [url] 143 | Future get(url, {dynamic data}) async { 144 | try { 145 | Response response = await _dio.get(url, data: data); 146 | return response.data; 147 | } catch (error, stacktrace) { 148 | _printLog("$error stackTrace: $stacktrace"); 149 | return null; 150 | } 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: woosignal 2 | description: WooCommerce REST API for dart, connect a WooCommerce store and start developing with our interface for their API endpoints. 3 | version: 4.2.0 4 | homepage: https://woosignal.com 5 | repository: https://github.com/woosignal/flutter-woocommerce-api 6 | issue_tracker: https://github.com/woosignal/flutter-woocommerce-api/issues 7 | documentation: https://woosignal.com/docs/api/1.0/overview 8 | 9 | environment: 10 | sdk: '>=3.0.0 <4.0.0' 11 | 12 | dependencies: 13 | dio: ^5.8.0+1 14 | device_meta: ^2.1.7 15 | encrypt: ^5.0.3 16 | intl: ^0.20.2 17 | 18 | flutter: 19 | sdk: flutter 20 | 21 | dev_dependencies: 22 | lints: ^5.0.0 23 | test: ^1.25.8 24 | 25 | screenshots: 26 | - description: The WooSignal package logo. 27 | path: screenshots/logo.png -------------------------------------------------------------------------------- /screenshots/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woosignal/flutter-woocommerce-api/b9f8b08b94f9458703bfac7381d44f7cc9d3cd7b/screenshots/logo.png -------------------------------------------------------------------------------- /test/woosignal_woocommerce_api_test.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /woosignal-woocommerce-api.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | --------------------------------------------------------------------------------