import 'package:http/http.dart' as http;

class OTPProvider{
  final String _url = "smart.solerpalau.mx";

  Future<void> fetchOTP(String token, String dinum, String otp, String date, String until, String year) async{
    final url = Uri.https(_url, 'PR/api/v1/quiosco/sendOTP');
    await http.post(url,
        headers: {
          'Authorization' : 'Bearer $token'
        },
        body: {
          'DINUM' : dinum,
          'OTP' : otp,
          'DATE' : date,
          'UNTIL' : until,
          'YEAR' : year
        }
    );
  }
}