Coder Social home page Coder Social logo

toolschallenge's Introduction

ToolsChallenge

MicroServiço Criado para Consumir um JSON com finalidades de Pagamentos.

CHAMADA PARA EFETUAR O PAGAMENTO.

POST: http://localhost:8080/pagamento

BODY : {

"transacao":{

	"cartao": "1",

	"id":  "1",

	"descricao":{

		"valor": "500.50",

		"dataHora": "2",

		"estabelecimento": "teste"

	},

	"formaPagamento":{

		"tipo":"AVISTA",

		"parcelas": "1"

	}
}

}

O serviço está preparado para realizar um pagamento pelo parametro do ID da requisição. Caso esse Id já esteja pago é retornado o Json com o pagamento efetuado e status 200 - OK Caso o pagamento ainda esteja pendente e dado baixa e com o retorno created Caso de algum problema durante o pagamento é lançado um badRequest.

#CHAMDA PARA RETORNAR TODOS PAGAMENTOS

GET: http://localhost:8080/getpagamentos

É retornado a lista de todos os pagamentos feitos e cancelados tbm

#CHAMDA PARA RETORNAR PAGAMENTO POR ID

GET: http://localhost:8080/getpagamentos/id

VERIFICA SE EXISTE UM PAGAMENTO COM ESSE ID, CASO EXISTE RETONE CREATED CASO NÃO BAD REQUEST.

#CHAMADA PARA FAZER ESTORNO DE UM PAGAMENTO

GET: http://localhost:8080/setestorno/id

VERIFICA SE EXISTE UM PAGAMENTO PARA ESSE ID CASO NÃO EXISTA LANÇA EXECESSÃO CASO EXISTA FAZ O UPDATE DAQUELE PAGAMENTO E O RETORNA COMO JSON

toolschallenge's People

Contributors

brianlucas1 avatar

Watchers

 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.