Giter Club home page Giter Club logo

banking-api-clean-architecture's Introduction

Banking API - Clean Architecture

Banking API - Clean Architecture . "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjEiLCJ1c2VySWQiOiIxIiwic3ViIjoiYWRtaW4iLCJqdGkiOiIwNDNiNWEzMC02ZTRiLTQ3NDctODgzOS0wNjRmZTViZGE5ODUiLCJlbWFpbCI6ImFkbWluQGhlbnJ5Z3VzdGF2by5jb20iLCJyb2xlIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJBZG1pbiIsImV4cCI6MTUzOTMwNjY4MiwiaXNzIjoiaHR0cHM6Ly9zaG9wcGluZ2NhcnQuY29tIiwiYXVkIjoiaHR0cHM6Ly9zaG9wcGluZ2NhcnQuY29tIn0.OrqUMcE05E97aWlvWPgzWuiAX8DgDpTtgU-MLcxy-ek"

JWT setx JWT_TOKEN_KEY "SUPERPASSWORD123"

setx JWT_ISSUER "https://shoppingcart.com"

setx JWT_AUDIENCE "https://shoppingcart.com"

SecurityAlgorithms.HmacSha256

URL: https://shoppingcartidentity.cfapps.io/api/auth/login swagger : https://shoppingcartidentity.cfapps.io/swagger/index.html

POST:

public class LoginDto { public string Email { get; set; }

    public string Password { get; set; }

    public bool RememberMe { get; set; }
}

RESPONSE:

login Response:

{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1laWRlbnRpZmllciI6IjEiLCJ1c2VySWQiOiIxIiwic3ViIjoiYWRtaW4iLCJqdGkiOiIwNDNiNWEzMC02ZTRiLTQ3NDctODgzOS0wNjRmZTViZGE5ODUiLCJlbWFpbCI6ImFkbWluQGhlbnJ5Z3VzdGF2by5jb20iLCJyb2xlIjoiYWRtaW4iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJBZG1pbiIsImV4cCI6MTUzOTMwNjY4MiwiaXNzIjoiaHR0cHM6Ly9zaG9wcGluZ2NhcnQuY29tIiwiYXVkIjoiaHR0cHM6Ly9zaG9wcGluZ2NhcnQuY29tIn0.OrqUMcE05E97aWlvWPgzWuiAX8DgDpTtgU-MLcxy-ek" }


Role: admin email: [email protected] passowrd: P@$$w0rd

Role: member Email: [email protected] password: P@$$w0rd

Get: api/orders

Devuelve una lista de

public class OrderHeaderOutput { public int Id { get; set; } public string FullName { get; set; } public string Address { get; set; } public string OrderDate { get; set; } public decimal Total { get; set; } public string Currency { get; set; } }

Get: api/orders/{id}

devuelve un objecto

public class OrderOutputDto { public int Id { get; set; } public string FullName { get; set; } public string Address { get; set; } public string OrderDate { get; set; } public decimal Total { get; set; } public string Currency { get; set; }

    public List <OrderItemOutputDto>  OrderItems { get; set; }
}

public class OrderItemOutputDto { public int ProductId { get; set; } public string ProductName { get; set; } public string PictureUrl { get; set; } public decimal Unit { get; set; } public decimal UnitPrice { get; set; } public decimal Total { get; set; } public string Currency { get; set; } }

Post: api/orders

recibe un objecto

public string FirstName { get; set; } public string LastName { get; set; } public string Address { get; set; } public string CreditCardNumber { get; set; } public string CreditCardAuthCode { get; set; } public List OrderItems { get; set; }

public class OrderItemInputDto { public int ProductId { get; set; } public string ProductName { get; set; } public string PictureUrl { get; set; } public decimal Unit { get; set; } public decimal UnitPrice { get; set; } public string Currency { get; set; } }


Rabbitmq

setx RABBITMQ_URL rabbitmq://mtnnoeer:[email protected]/mtnnoeer setx RABBITMQ_USERNAME mtnnoeer setx RABBITMQ_PASSWORD uSiU0yzxrGeuTMIcvYSMHKsw7z5G1DJH

cuando la orden esta completada emite un evento llamado : Common.Messaging.OrderCompletedEvent

Ejemplo clase:

namespace Common.Messaging { public class OrderCompletedEvent { public string BuyerId { get; set; } public OrderCompletedEvent(string buyerId) { BuyerId = buyerId; } } }


banking-api-clean-architecture's People

Contributors

frankche88 avatar juanmorenomotta avatar lbran7236 avatar borisvera avatar ebautista-unmsm avatar fllancachagua avatar sergioide007 avatar

Watchers

James Cloos avatar Abel Aghorighor avatar

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.