Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ 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)

## [3.3.2] - 2025-09-09

- Expose `allowJoin` from `ServiceRequest` (#177)
Expand Down
6 changes: 5 additions & 1 deletion lib/src/models/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Comment on lines +55 to +56

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks to provide the doc comment! I am okay with the String type here for v1.
Let's consider other type later in the future if we have more types coming.


Profile.fromJson(Map<String, dynamic> 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) =>
Expand Down
2 changes: 2 additions & 0 deletions lib/src/platform_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ class PlatformClient {
String? referralCode,
String? firstName,
String? lastName,
bool? optInForMarketing,
}) async {
String body = jsonEncode({
'authProvider': credentials.provider,
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_aira
description: The Aira Flutter SDK.
version: 3.3.2
version: 3.3.4
homepage: https://github.com/aira/flutter_aira

environment:
Expand Down