You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
Dart
50 lines
1.5 KiB
Dart
import 'package:diplomaticquarterapp/config/config.dart';
|
|
import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart';
|
|
import 'package:diplomaticquarterapp/core/model/pharmacies/ListUserAgreement.dart';
|
|
|
|
import 'lacum-service.dart';
|
|
|
|
class LacumRegistrationService extends LacumService{
|
|
|
|
ListUserAgreement listUserAgreement;
|
|
|
|
Future getLacumAccountInformationById(String patientIdentificationNo) async {
|
|
hasError = false;
|
|
super.error = "";
|
|
|
|
Map<String, dynamic> body = Map();
|
|
body['IdentificationNo'] = patientIdentificationNo;
|
|
|
|
try {
|
|
await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION,
|
|
onSuccess: (response, statusCode) async {
|
|
lacumInformation = LacumAccountInformation.fromJson(response);
|
|
}, onFailure: (String error, int statusCode) {
|
|
hasError = true;
|
|
super.error = error;
|
|
}, body: body);
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
Future getUserTermsAndConditionsForEPharmcy() async {
|
|
hasError = false;
|
|
super.error = "";
|
|
|
|
Map<String, dynamic> body = Map();
|
|
|
|
try {
|
|
await baseAppClient.post(LAKUM_GET_USER_TERMS_AND_CONDITIONS,
|
|
onSuccess: (response, statusCode) async {
|
|
listUserAgreement = ListUserAgreement.fromJson(response['ListUserAgreement'][0]);
|
|
}, onFailure: (String error, int statusCode) {
|
|
hasError = true;
|
|
super.error = error;
|
|
}, body: body);
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
} |