From 8be5b8c97aec9636c3dbaf1f51768fdb8fe5f5ad Mon Sep 17 00:00:00 2001 From: Bradley Date: Mon, 22 Sep 2025 22:27:28 -0600 Subject: [PATCH 1/2] 3.3.4: Add `resetDurationUsed` field to `Profile` (FE-42) --- CHANGELOG.md | 4 ++++ lib/src/models/profile.dart | 6 +++++- pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd8f8e5..9ccd185 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.3.4] - 2025-09-22 + +- Add `resetDurationUsed` field to `Profile` (FE-42) + ## [3.3.2] - 2025-09-09 - Expose `allowJoin` from `ServiceRequest` (#177) diff --git a/lib/src/models/profile.dart b/lib/src/models/profile.dart index 61c134a..004abca 100644 --- a/lib/src/models/profile.dart +++ b/lib/src/models/profile.dart @@ -52,11 +52,15 @@ class Profile { /// Duration Used for this Account in minutes final int durationUsed; + /// Will duration be reset. Values: "NEVER" or "UTC_MONTH" + final String resetDurationUsed; + Profile.fromJson(Map json) : account = Account.fromJson(json['account']), type = ProfileType.fromName(json['userType']), durationAllowed = _convertSecondsToMinutes(json['durationAllowed']), - durationUsed = _convertSecondsToMinutes(json['durationUsed']); + durationUsed = _convertSecondsToMinutes(json['durationUsed']), + resetDurationUsed = json['resetDurationUsed'] ?? 'NEVER'; } int _convertSecondsToMinutes(int seconds) => diff --git a/pubspec.yaml b/pubspec.yaml index 42f2ddd..3bf4273 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_aira description: The Aira Flutter SDK. -version: 3.3.2 +version: 3.3.4 homepage: https://github.com/aira/flutter_aira environment: From 7ebbd108b147d4d0238f8d17fbe890bd339ddb61 Mon Sep 17 00:00:00 2001 From: Bradley Date: Tue, 23 Sep 2025 07:51:30 -0600 Subject: [PATCH 2/2] 3.3.5: Add `optInForMarketing` field to account creation (FE-23) --- CHANGELOG.md | 4 ++++ lib/src/platform_client.dart | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ccd185..93b88ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.3.5] - 2025-09-23 + +- Add `optInForMarketing` field to account creation (FE-23) + ## [3.3.4] - 2025-09-22 - Add `resetDurationUsed` field to `Profile` (FE-42) diff --git a/lib/src/platform_client.dart b/lib/src/platform_client.dart index a8bfc24..d35239e 100644 --- a/lib/src/platform_client.dart +++ b/lib/src/platform_client.dart @@ -234,6 +234,7 @@ class PlatformClient { String? referralCode, String? firstName, String? lastName, + bool? optInForMarketing, }) async { String body = jsonEncode({ 'authProvider': credentials.provider, @@ -246,6 +247,7 @@ class PlatformClient { 'verificationCode': credentials.password, if (firstName != null && firstName.isNotEmpty) 'firstName': firstName, if (lastName != null && lastName.isNotEmpty) 'lastName': lastName, + 'optInForMarketing': optInForMarketing == true, }); await _httpPost('/api/order/guest/basic', body);