Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
/ selibrary Public archive

SDK para obtener acceso a los servicios de nauta y micubacel.

License

Notifications You must be signed in to change notification settings

todo-devs/selibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

selibrary

MiCubacel

import 'package:selibrary/selibrary.dart';

class Client extends ICubacelClient {
  Future<void> start() async {
    try {
      await login('55555555', 'password');
      await loadMyAccount();

      print(welcomeMessage);
      print(userName);
      print(phoneNumber);
      print(credit);
      print(expire);
      print(creditBonus);
      print(expireBonus);
      print(date);
      print(payableBalance);
      print(isActiveBonusServices);

      buys.forEach((p) {
        print('');
        print('');
        print('PRODUCT: ');
        print(p.title);
        print('ES BONO: ${p.isBonusPackage}');
        print('${p.restData} ${p.dataInfo}');
        print(p.percent);
        print(p.expireDate);
        print(p.packageId);
        print(p.isStatusOrange);
        print(p.isStatusRed);
      });

      final friends = familyAndFriends;

      print('Family And Friends');
      print(friends.title);
      print(friends.changesFree);
      print(friends.subscriber);
      print('Phones');
      friends.phoneNumbers.forEach((p) {
        print(p.title);
        print(p.phoneNumber);
      });

      await loadProducts();

      products.forEach((p) {
        print('\n\nProduct:');
        print(p.title);
        print(p.price);
        print(p.description);
      });

      await products[5].buy();

      print('');
    } on CommunicationException catch (e) {
      print(e.message);
    } on LoginException catch (e) {
      print(e.message);
    } on OperationException catch (e) {
      print(e.message);
    }
  }
}

void main(List<String> args) async {
  Client client = Client();

  await client.start();
}

About

SDK para obtener acceso a los servicios de nauta y micubacel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages