DONUZ Dart SDK

A Sdk foi criada com o proposito de facilitar o uso para os clientes da Donuz com uma forma intuitiva de utilizar as apis e facilitar o desenvolvimento de aplicações com flutter/dart

Instalação

a) Add in your pubspec.yaml:

dependencies:
donuz_dart_sdk: <last-version>

or use:

dart pub add donuz_dart_sdk

b) Run:

    flutter pub get

c) init SDK:


late DonuzSDK donuzSDK;
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  donuzSDK = DonuzSDK(
      config: DonuzConfig(donuzToken: '<YOUR TOKEN>', appId: '<YOUR APPID>'));
  await donuzSDK.init();

  runApp(const MyApp());
}

Examples

Retorna as informações do estabelecimento informado no appId na configuracão da sdk

    donuzSDK.establisment.findEstablishmentById();

Retorna todos os prêmios cadastrados.

    await donuzSDK.prizes.getPrizes();

Faz o Login do usuario

   await donuzSDK.user.makeLogin(username: '12345678909',password: '12345678909');

Faz o Logout do usuario.

  await donuzSDK.user.makeLogout();

Libraries

modules/establishment/models/admin_model
modules/feedback/models/answer_question
modules/app/models/app_config_model
modules/app/repositories/app_config_repository
modules/app/app_module
modules/wallet/models/balance_model
modules/establishment/models/banners_model
modules/base_module
modules/common/models/base_response_donuz_model
modules/establishment/repositories/branch_repository
modules/establishment/models/branch_user_model
modules/establishment/models/branchs_model
modules/gifts/usercases/change_gift_status
modules/redemption/usercases/change_voucher_status
modules/common/common_module
modules/common/config/config
modules/contact/models/contact_model
modules/contact/contact_module
modules/contact/repositories/contact_repository
modules/coupon/coupon_module
modules/coupon/repositories/coupon_repository
modules/coupon/user_cases/coupon_status
modules/coupon/models/coupon_status
modules/establishment/models/custom_config_model
modules/establishment/models/dashboard_model
modules/establishment/usercases/dashboard_statistics
modules/user/usercases/delete_user
donuz_dart_sdk
modules/common/extensions/enun_extension
modules/establishment/constants/establishiment_constants
modules/establishment/usercases/establishment_login
modules/establishment/models/establishment_model
modules/establishment/establishment_module
modules/establishment/repositories/establishment_repository
modules/feedback/models/feedback_model
modules/feedback/feedback_module
modules/feedback/respositories/feedback_repository
modules/app/usercases/find_app_config
modules/establishment/usercases/find_establishment_banners
modules/establishment/usercases/find_establishment_by_id
modules/feedback/usercases/find_feedback
modules/gifts/usercases/find_gifts
modules/wallet/usercases/find_ranking
modules/redemption/usercases/get_all_rescues
modules/redemption/usercases/get_avaliable_vouchers
modules/wallet/usercases/get_balance
modules/wallet/usercases/get_balance_by_id
modules/establishment/usercases/get_branchs
modules/establishment/usercases/get_custom_config
modules/establishment/usercases/get_establishment_settings
modules/user/usercases/get_logged_user_token
modules/pdv/usercases/get_pdv_settings
modules/wallet/usercases/get_point_extract
modules/prizes/usercases/get_prize_by_id
modules/prizes/usercases/get_prize_categories
modules/prizes/usercases/get_prizes
modules/redemption/usercases/get_redemption_by_id
modules/establishment/usercases/get_regulation
modules/wallet/usercases/get_rules_point
modules/user/usercases/get_user
modules/user/usercases/get_user_notifications
modules/gifts/gift_module
modules/gifts/repositories/gift_repository
modules/gifts/models/gift_status_enum
modules/gifts/models/gifts_model
modules/common/services/http_service
modules/wallet/usercases/insert_point
modules/wallet/usercases/insert_punctuable_code
modules/wallet/usercases/insert_punctuable_qr_code
modules/establishment/usercases/locate_branch_with_code
modules/common/models/location_coordinates_model
modules/user/constants/login_constants
modules/user/models/login_model
modules/user/repositories/login_repository
modules/contact/usercases/make_contact
modules/user/usercases/make_login
modules/user/usercases/make_logout
modules/user/usercases/mark_as_read_notification
modules/pdv/pdv_module
modules/pdv/models/pdv_settings_model
modules/pdv/repositories/pdv_settings_repository
modules/wallet/models/point_insert_model
modules/wallet/models/points_model
modules/wallet/repositories/points_repository
modules/wallet/models/points_rules
modules/prizes/models/prize_category_model
modules/prizes/models/prize_model
modules/prizes/repositories/prize_repository
modules/prizes/models/prizes_model
modules/prizes/prizes_module
modules/wallet/models/ranking_model
modules/redemption/usercases/redemption_by_date
modules/redemption/redemption_module
modules/redemption/models/redemptions_by_date_model
modules/user/usercases/register_user
modules/establishment/models/regulation_model
modules/establishment/repositories/regulation_repository
modules/user/usercases/remember_password
modules/redemption/models/rescue_model
modules/redemption/usercases/rescue_prize
modules/redemption/repositories/rescue_repository
modules/feedback/usercases/response_feedback
modules/establishment/usercases/search_by_location
modules/establishment/usercases/search_by_name
modules/establishment/usercases/search_by_slug
modules/establishment/usercases/search_my_locales
modules/coupon/user_cases/send_coupon
modules/user/usercases/send_sms_before_registration
modules/establishment/usercases/set_custom_config
modules/establishment/models/settings_model
modules/establishment/repositories/settings_repository
modules/common/services/storage_service
modules/common/utils/string_util
modules/wallet/usercases/transfer
modules/user/usercases/update_notification_token
modules/user/usercases/update_user
modules/user/models/upload_user_image_model
modules/user/usercases/upload_user_photo
modules/user/models/user_model
modules/user/user_module
modules/user/models/user_notifications
modules/user/repositories/user_repository
modules/wallet/wallet_module