Coder Social home page Coder Social logo

mobilecustomer's Introduction

MobileCustomer is an api that works on port 8080 by default and on the 127.0.01 or localhost.

CAPABILITIES

  1. fetching all users
  2. it also can fetch a user by the user's id
  3. updates the user's number msisdn.
  4. updates network plan subscribed to network_plan
  5. delete individual users

The methods used in the design of this api are POST, GET, PUT AND DELETE

Now their endpoints follow

GET:

This can be used to fetch either all the users on the system or a specific user on the system using the individual's id

To fetch all users, the endpoint is localhost:8080/api/customers

To fetch an individual user, the id is passed as a parameter to the endpoint. That is localhost:8080/api/customers/<ID> where is the ID of the customer

DELETE:

To delete an individual's account, the delete method is implemented and the endpoint is passed the id of the individual as a parameter.

eg. localhost:8080/api/customers/<ID>

There is not a method for deleting all customers at the same time since no such API is really necessary in the real world.

PUT

To update a user's details(msisdn or network_plan), one must pass the @RequestParameter(s) to the endpoint of the API to be able to update it.

Updating a single detail: localhost:8080/api/customers/<ID>?<@RequestParameter>

In case of multiple parameters: localhost:8080/api/customers/<ID>?fistParam=firstValue&secondParam=secondValue

where <@firstRequestParameter> and <@SecondRequestParameter> are the

DATA REPRESENTATION

The phone number is represented in the form (xxx) xxx-xxxx

Length of phone number can be more than 10 but the format above only takes care of 10 digit numbers excluding country codes.

The network_plan too is enumerated with values MOBILE_POSTPAID and MOBILE_PREPAID

The database attached to this project is actually set to create/drop its table when this program runs to save space during the development state.

To change that, go to src/main/resources/application.properties and change spring.jpa.hibernate.ddl-auto=create-drop to spring.jpa.hibernate.ddl-auto=update

mobilecustomer's People

Contributors

oforisml avatar sofori006 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.