Developers
  • Introduction
  • Integration
    • Spring Boot Starter
      • Overview
      • Setup your project
      • Product search
      • Invoicing
      • Merchant side invoicing
      • Merchant side purchase control
      • Loyalty cards
      • Home delivery
      • Marketing & Offers
    • Custom Integration
      • Overview
      • Connection node
        • Get node version endpoint
        • Get node health endpoint
      • Product search
        • Pageable product list search endpoint
        • Product bacrode search endpoint
        • Product name search endpoint
        • Product category search endpoint
      • Invoicing
        • Receive invoice endpoint
      • Merchant side invoicing
        • Create receipt endpoint
        • Confirm receipt payment endpoint
      • Merchant side purchase control
        • Receive purchase check endpoint
        • Send purchase check result
        • Ask for purchase check data resend
      • Loyalty cards
        • Loyalty card registration endpoint
        • Loyalty card bonus endpoint
      • Home delivery
        • Receive order endpoint
        • Receive order update endpoint
        • Update order status
        • Find order by id
        • Find order by invoice id
        • Find order by institution invoice id
      • Marketing & Offers
        • Find offers endpoint
  • General
    • Data object descriptions
      • HealthStatus
      • DefaultOffer
      • DiscountOffer
      • ProductRelatedOffer
      • OfferType
      • OfferClassification
      • Order
      • OrderStatusChangeLog
      • ColorTheme
      • LoyaltyCard
      • DefaultLoyaltyCard
      • BonusLoyaltyCard
      • LoyaltyCardType
      • LoyaltyCardValidationType
      • Shipment
      • ShipmentStatus
      • Category
      • Addition
      • Address
      • Currency
      • BuyerParty
      • Campaign
      • CampaignCode
      • ClientCard
      • Information
      • Inspection
      • Invoice
      • LangCode
      • Price
      • Product
      • Quantity
      • SellerParty
      • Total
      • TotalVAT
      • Translatable
      • Receipt
      • ReceiptProduct
      • ReceiptLoyaltyCard
      • ReceiptCategory
      • VAT
    • Request & Responses
      • NodeHealthResponse
      • NodeVersionResponse
      • OfferSearchRequest
      • PickupOrderStatusChangeRequest
      • LoyaltyCardBonusResponse
      • LoyaltyCardBonusRequest
      • LoyaltyCardRegistrationResponse
      • LoyaltyCardRegistrationRequest
      • PurchaseControlCheckResendRequest
      • PurchaseControlResult
      • PurchaseControlCheckResponse
      • PurchaseControlCheckRequest
      • ReceiptPaymentConfirmationRequest
      • InstitutionRequest
      • Pageable
      • PageRequest
      • CreateReceiptRequest
      • ProductSearchRequest
    • Campaign standard
Powered by GitBook
On this page
  • Implementation
  • Methods description

Was this helpful?

  1. Integration
  2. Spring Boot Starter

Product search

Implementing product search functionality

Implementation is REQUIRED

Implementation

You only need to create a new class, implement ProductSearchAdapter interface and fill all required methods. API endpoints for product search are created automatically and secured with token.

It is important to add @Component annotation on top of the class. There is no restriction for class name or location in your project. Our SDK will find your implementation based on the interface (DI).

import ee.smarts.common.v1.Entities.product.Product;
import ee.smarts.common.v1.requests.ProductSearchRequest;
import ee.smarts.starter.adapter.ProductSearchAdapter;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ProductSearchImpl implements ProductSearchAdapter {
    @Override
    public Product searchByBarcode(ProductSearchRequest request) { 
        // implement this method
        return null;
    }
    @Override
    public List<Product> searchByName(ProductSearchRequest request) { 
        // implement this method
        return null;
    }
    @Override
    public Pageable<Product> findAll(PageRequest<ProductSearchRequest> productSearchRequest){
        // implement this method
        return null;
    }
    @Override
    public List<Category> findProductCategories(InstitutionRequest institutionRequest){
        // implement this method
        return null;
    }
}

Methods description

searchByBarcode

Method used to request product details based on product SKU code. Used for: adding product to shopping cart, adding product to shopping list, purchase check validation.

searchByName

Method used to request products which contains in the name requested string. Used for: adding product to shopping cart from catalog, adding product to pickup order from catalog.

findAll

Method used to display products in product catalog.

findProductCategories

Method used to display product categories in product catalog.

PreviousSetup your projectNextInvoicing

Last updated 5 years ago

Was this helpful?