LoriApi class

Constructors

LoriApi()

Properties

authCart Cart
read / write
firebase FirebaseApi
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sales SalesApi
read / write

Methods

addProductWishlist(String productId) Future<ApiCallback<void>>
cancelOrder(String orderId) Future<ApiCallback<void>>
checkCPFPropz(String email, String cpf) Future<ApiCallback<Map<String, dynamic>>>
checkEmail(String email) Future<ApiCallback<CheckEmailResponse>>
checkTheCustomerEmail(String email) Future<ApiCallback<CustomerModel>>
clearCart() Future<ApiCallback<void>>
configureHttpRequester() → void
crateProductEvaluation(String productId, List<OpinionResponse> responses) Future<ApiCallback<void>>
createCart({String channel, bool saveAsDefault = true}) Future<ApiCallback<Cart>>
createComplaint(String description, String orderId, String complaintType, {String externalOrderId}) Future<ApiCallback<void>>
createUser(String email, String fullName, String cpf, String phoneNumber, String password, {String dateOfBirth, bool acceptedPromotionPolicy}) Future<ApiCallback<User>>
createUserAddress(UserAddress body) Future<ApiCallback<UserAddress>>
createUserPayment(String number, String cardHolder, String cvv, String expiration, String brand, String cpfCardHolder, {PaymentMethodType type = PaymentMethodType.credit}) Future<ApiCallback<PaymentMethod>>
deleteUserAddress(UserAddress body) Future<ApiCallback<void>>
deleteUserPayment(String paymentId) Future<ApiCallback<void>>
downgradeCartGiftItem(String skuId, int quantity, {String cartId, bool saveAsDefault = true}) Future<ApiCallback<void>>
downgradeCartItem(String skuId, int quantity, {String cartId, bool saveAsDefault = true}) Future<ApiCallback<void>>
finalizeCart() Future<ApiCallback<void>>
loadAddressByCep(String cep) Future<ApiCallback<AddressCep>>
Cart part. All methods that are related with app's cart. endregion END [...]
loadBanners({BannerType type = BannerType.carousel}) Future<ApiCallback<List<Banner>>>
Product part. All methods that are related with product fetching. endregion END [...]
loadCardBrand(String bin) Future<ApiCallback<String>>
loadCart({String cartId, bool saveAsDefault = true, bool reload = false, bool forceUpdate = false}) Future<ApiCallback<Cart>>
loadCartFreights() Future<ApiCallback<List<Freight>>>
loadCartInstallments() Future<ApiCallback<List<Installment>>>
loadCartModalities({String latitude, String longitude}) Future<ApiCallback<List<SellerModality>>>
loadCartPayments(bool isDealerCheckout) Future<ApiCallback<List<PaymentMethod>>>
loadCartSellerItems(String sellerId) Future<ApiCallback<List<CartItem>>>
loadCartSellers({String latitude, String longitude}) Future<ApiCallback<List<Seller>>>
loadChildrenCategories(String categoryId, {bool perSeller = false, UserAddress userAddress}) Future<ApiCallback<List<Category>>>
@Deprecated('The new API is available directly at LoriApi().sales.catalog.getChildrenCategories(String parentCategoryId)')
loadCities(String state) Future<ApiCallback<List<AddressCity>>>
loadComplaints() Future<ApiCallback<List<Complaint>>>
loadComplaintTypes() Future<ApiCallback<List<ComplaintType>>>
loadConfigurations() Future<ApiCallback<Configurations>>
loadFaq() Future<ApiCallback<List<Faq>>>
loadOrder(String orderId) Future<ApiCallback<Order>>
loadOrderInstallments(Order order) Future<ApiCallback<List<Installment>>>
loadOrderPayments(Order order) Future<ApiCallback<List<PaymentMethod>>>
loadOrders() Future<ApiCallback<List<Order>>>
User part. All methods that are related with user. endregion END [...]
loadPrivacyPolicy() Future<ApiCallback<PrivacyPolicy>>
loadProduct(String productId, {bool perSeller = false, UserAddress userAddress}) Future<ApiCallback<Product>>
Authentication part. Handle the authorization bearer obtainer + refresher. endregion END [...]
@Deprecated('The new API is available directly at LoriApi().sales.catalog.getProduct(String productId)')
loadProductCategory(String categoryId) Future<ApiCallback<Category>>
loadProductEvaluationForm() Future<ApiCallback<EvaluationForm>>
loadProductEvaluations(String productId) Future<ApiCallback<Evaluation>>
loadProductFromBarcode(String barcode, {bool perSeller = false}) Future<ApiCallback<Product>>
loadProductRelated(String productId) Future<ApiCallback<List<Product>>>
loadProductsByTag(String tags, int page, int perPage, {ProductOrder order, String continuationToken, bool perSeller = false, UserAddress userAddress}) Future<ApiCallback<ProductPaginationResult>>
@Deprecated('The new API is available directly at LoriApi().sales.catalog.getProductsByTag')
loadProductsByTerm(String term, int page, int perPage, {ProductOrder order, String continuationToken, bool perSeller = false, UserAddress userAddress}) Future<ApiCallback<ProductPaginationResult>>
@Deprecated('The new API is available directly at LoriApi().sales.catalog.getProductsBySearch')
loadProductsFromCategory(String categoryId, int page, int perPage, {ProductOrder order, String continuationToken, bool perSeller = false}) Future<ApiCallback<ProductPaginationResult>>
@Deprecated('The new API is available directly at LoriApi().sales.catalog.getProductsByCategory')
loadProductsFromSubcategory(String subcategoryId, int page, int perPage, {ProductOrder order, String continuationToken, bool perSeller = false}) Future<ApiCallback<ProductPaginationResult>>
@Deprecated('Subcategories v1 has been removed! Please use loadProductsFromCategory(String categoryId)')
loadProductSubcategories(String categoryId) Future<ApiCallback<List<Category>>>
@Deprecated('Subcategories v1 has been removed! Please use loadChildrenCategories(String categoryId)')
loadProductTerms() Future<ApiCallback<List<String>>>
loadPromotionPolicy() Future<ApiCallback<PromotionPolicy>>
loadPromotions() Future<ApiCallback<List<Promotion>>>
loadStates() Future<ApiCallback<List<AddressState>>>
loadStores({double latitude, double longitude, int page = 1, int perPage = 100000}) Future<ApiCallback<StoreResult>>
loadUser() Future<ApiCallback<User>>
loadUserPayments() Future<ApiCallback<List<PaymentMethod>>>
loadUserTerms() Future<ApiCallback<UserTerms>>
loadWishlist() Future<ApiCallback<List<Product>>>
loginClient() Future<ApiCallback<void>>
Firebase Performance Helper Methods endregion END [...]
loginUser({String username, String password, String smsCode}) Future<ApiCallback<void>>
logoutUser() Future<ApiCallback<void>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notificationOpened(String notificationId) Future<ApiCallback<void>>
parseResponseError(dynamic response) String
Order part. All methods that are related with orders. endregion END
recoverPhone(String email) Future<ApiCallback<void>>
recoverUser(String email) Future<ApiCallback<void>>
refreshLogin(AuthResponse authResponse) Future<ApiCallback<void>>
regenerateCart() Future<ApiCallback<Cart>>
removeCartVoucher(String voucherCode) Future<ApiCallback<void>>
removeProductWishlist(String productId) Future<ApiCallback<void>>
requestPasswordChange(String email, String smsCode, String password) Future<ApiCallback<void>>
requestSmsCode(String email) Future<ApiCallback<SmsRequestResult>>
restartOrder(Order order) Future<ApiCallback<void>>
setAuthToken(Dio requester, RequestOptions options) Future<RequestOptions>
toString() String
A string representation of this object. [...]
inherited
updateCartAddress(String addressId) Future<ApiCallback<void>>
updateCartCep(String cep) Future<ApiCallback<void>>
updateCartCvv(String cvv) Future<ApiCallback<void>>
updateCartDealerCode(String dealerCode) Future<ApiCallback<void>>
updateCartFingerprint(String deviceFingerprint) Future<ApiCallback<void>>
updateCartFreight(String freightReference) Future<ApiCallback<void>>
updateCartGiftItem(String skuId, int quantity, {String cartId, bool saveAsDefault = true}) Future<ApiCallback<void>>
updateCartInstallment(String installmentNumber) Future<ApiCallback<void>>
updateCartItem(String skuId, int quantity, {String cartId, bool saveAsDefault = true, bool hasReloadedCart = false}) Future<ApiCallback<void>>
updateCartLocation(String lat, String lon) Future<ApiCallback<void>>
updateCartModality(String modalityId) Future<ApiCallback<void>>
updateCartOwner() Future<ApiCallback<void>>
updateCartPaymentMethod(String paymentId) Future<ApiCallback<void>>
updateCartPickupCpf(String cpf) Future<ApiCallback<void>>
updateCartSeller(String sellerId) Future<ApiCallback<void>>
updateCartVoucher(String voucherCode) Future<ApiCallback<void>>
updateNotificationToken(String token) Future<ApiCallback<void>>
updateOrderInstallment(Order order, String installmentNumber) Future<ApiCallback<void>>
updateOrderPayment(Order order, PaymentMethod paymentMethod) Future<ApiCallback<void>>
updateOrderPaymentCvv(Order order, String cvv) Future<ApiCallback<void>>
updateUser(String fullName, String cpf, String phoneNumber, {String dateOfBirth, int gender, String password, String newPassword}) Future<ApiCallback<void>>
updateUserAddress(UserAddress body) Future<ApiCallback<void>>
updateUserPhoto(List<int> bytes) Future<ApiCallback<String>>
validateCart() Future<ApiCallback<void>>
CRM part. All methods that are related with customer relationship. endregion END [...]

Operators

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

Static Properties

appContext BuildContext
read / write
currentCategoryApiVersion int
read-only
enableLinxCommerce bool
read-only
operatingSystem String
read-only
useFilter bool
read / write
useLegacyCatalogApi bool
We are currently performing an API Migration on Lori, from the legacy api to the new one. While this migration is made, both APIs will keep working at the same time. [...]
read / write
useLegacyCommerceApi bool
read / write
useLegacyMarketingApi bool
read / write
useLegacyRetailerApi bool
read / write

Static Methods

init(String baseUrl, String clientId, String clientSecret, String operatingSystem, String operationSystemVersion, {String apiBaseUrl}) → dynamic
updateCategoryApiVersion(int categoryApiVersion) → dynamic
updateLegacyApiUrl(String legacyApiUrl) → dynamic