Giter Site home page Giter Site logo

cristianmarint / mercadeando-api Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 463 KB

REST API para comprar ricuras! Ordenes, pagos (efectivo, cheques e integración con la API de PayPal), roles y permisos

License: MIT License

Java 100.00%
spring-boot rest-api java maven

mercadeando-api's Introduction

Mercadeando API

REST API para comprar ricuras! Ordenes, pagos (efectivo, cheques e integración con la API de PayPal), roles y permisos

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Despliegue para conocer como desplegar el proyecto.

Pre-requisitos 📋

Que cosas necesitas para instalar el software y como instalarlas

Maven
IntelliJ es recomendado

Instalación 🔧

    git clone https://github.com/cristianmarint/Mercadeando-API
    Abre el directorio con tu IDE de preferencia, recomiendo IntelliJ
    Pon las credenciales para el servidor de Email y Paypal credencials
    y ahora ejecuta la app!

Puedes usar el archivo de Postman para realizar peticiones Usa el archivo en Resources Mercadeando Test.postman_collection.json y la respuesta se verá así:

// GET http://localhost:8080/api/v1/ordenes/2

{
    "id": 2,
    "self": {
        "rel": "self",
        "type": "GET",
        "href": "/api/v1/ordenes/2"
    },
    "activo": true,
    "fecha": "31-12-2020 20:01:01",
    "total": 38.20,
    "estado": "PAGADO",
    "pago": {
        "id": 2,
        "self": {
            "rel": "self",
            "type": "GET",
            "href": "/api/v1/pagos/2"
        },
        "total": 38.20,
        "metodo": "TARJETA_CREDITO",
        "orden": {
            "rel": "self",
            "type": "GET",
            "href": "/api/v1/ordenes/2"
        },
        "paypal_payment_id": null,
        "paypal_url": null,
        "moneda": "COP",
        "fecha": "31-12-2020 20:01:01"
    },
    "cliente": {
        "rel": "cliente",
        "type": "GET",
        "href": "/api/v1/clientes/1"
    },
    "productos": [
        {
            "id": 4,
            "codigo": "CAM4",
            "nombre": "Garbanzo Maritza premium",
            "cantidad": 3,
            "precioUnidad": 2.59,
            "precioTotal": 7.77,
            "self": {
                "rel": "self",
                "type": "GET",
                "href": "/api/v1/productos/4"
            }
        },
        {
            "id": 3,
            "codigo": "CAM3",
            "nombre": "Frijol bola roja Maritza premium",
            "cantidad": 3,
            "precioUnidad": 8.99,
            "precioTotal": 26.97,
            "self": {
                "rel": "self",
                "type": "GET",
                "href": "/api/v1/productos/3"
            }
        },
        {
            "id": 2,
            "codigo": "CAM2",
            "nombre": "Lenteja Diana",
            "cantidad": 2,
            "precioUnidad": 1.73,
            "precioTotal": 3.46,
            "self": {
                "rel": "self",
                "type": "GET",
                "href": "/api/v1/productos/2"
            }
        }
    ]
}
// POST http://localhost:8080/api/v1/auth/login

{
    "username": "admin",
    "authenticationToken": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlhdCI6MTYxMTg0NDk4OSwiZXhwIjoxNjExODQ1NTg5fQ.BCbVNMwrqyYEELCMsboWMXI87QtDcra4IeMOdrUoSK3GkHkw9rQvgiGsXDvcdIesUfjNTAIGuwFP0gnYqdELWK_cM8fXVX5gzCXsYgyi0VyT8JiC2MqeTdeVUny7MUwyBt81ky1D-LvPzWCQPR61vxcRJ-4J9gZrM4tLSgSeNyj7yGOMa7m2FPzxDuAuL-6zvqoAlQ4jwvDcLtQICvZz1iRuQL3dq0Vi71Qs2z82iwffryOfOtSErE5X3t7u1DCsluoJBUOMwx-pgMjfUPvJV4LQFOyfQ9HadmuBshHmOuy4pKfS56T-mdB5qPt4sG4DEEFjRvk6vVjxvdEGtOAw8g",
    "refreshToken": "5831eba0-1672-4162-90e0-ad2d2268b8fc",
    "expiresAt": 1611845589.966120700,
    "roles": [
        "ADMIN",
        "CAJERO"
    ],
    "permisos": [
        "EDIT_CLIENTE",
        "READ_CATEGORIA",
        "BROWSE_PAGO",
        "DELETE_CLIENTE",
        "READ_PRODUCTO",
        "ADD_PRODUCTO",
        "DELETE_PRODUCTO",
        "BROWSE_ORDEN",
        "BROWSE_CATEGORIA",
        "DELETE_CATEGORIA",
        "READ_PAGO",
        "DELETE_PAGO",
        "ADD_ORDEN",
        "EDIT_ORDEN",
        "BROWSE_PRODUCTO",
        "READ_ORDEN",
        "ADD_PAGO",
        "EDIT_CATEGORIA",
        "EDIT_PAGO",
        "EDIT_PRODUCTO",
        "READ_CLIENTE",
        "ADD_CATEGORIA",
        "DELETE_ORDEN",
        "ADD_CLIENTE",
        "BROWSE_CLIENTE"
    ]
}

Despliegue 📦

Recuerda establecer las credenciales para Email y Paypal

Construido con 🛠️

Contribuyendo 🖇️

Si tienes algo en mente crea una pull requests. 👏🏾

Versionado 📌

Usamos SemVer para el versionado. Para todas las versiones disponibles, mira los tags en este repositorio.

Autores ✒️

Menciona a todos aquellos que ayudaron a levantar el proyecto desde sus inicios

También puedes mirar la lista de todos los contribuyentes quíenes han participado en este proyecto.

Licencia 📄

Este proyecto está bajo la Licencia (MIT) - mira el archivo LICENSE para detalles

Acknowledgments

  • Chill not everything's perfect anyways.

⌨️ con ❤️ por cristianmarint 😊

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.