CampaignApi class

A class to handle API interactions related to campaigns.

Constructors

CampaignApi({required Dio dio, required String baseUrl, required String apiKey})
Constructs a CampaignApi instance.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

create({required String text, required String senderId, String? name, List<ContactModel>? contacts = const [], List<String>? groupsIds = const [], SMSType? type = SMSType.sms, DateTime? scheduledDate, CampaignRecurringDayModel? recurring}) Future<ApiResponseModel<CampaignModel?>>
Creates a new campaign.
get({required String id}) Future<ApiResponseModel<CampaignDetailsModel>>
Fetches a list of campaigns.
list({required String senderId}) Future<ApiResponseModel<List<CampaignModel>>>
Fetches a list of campaigns.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toggleEnable({required String id}) Future<ApiResponseModel<CampaignModel?>>
Toggles the enabled state of a campaign.
toString() String
A string representation of this object.
inherited
update({required String id, DateTime? scheduledDate, CampaignRecurringDayModel? recurring}) Future<ApiResponseModel<CampaignModel?>>
Updates an existing campaign.

Operators

operator ==(Object other) bool
The equality operator.
inherited