RESTful Service Endpoints - McGill-ECSE321-Winter2022/project-group-group-08 GitHub Wiki
Person
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /createPerson/{email} | String firstName, String lastName, String phoneNum, String address | PersonDto |
Get | Read by id | /getPersonByEmail/{email} | - | PersonDto |
Get | Read by firstName | /getPersonsByFirstName/{firstName} | - | List<PersonDto> |
Get | Read by lastName | /getPersonsByLastName/{lastName} | - | List<PersonDto> |
Get | Read by address | /getPersonsByAddress/{address} | - | List<PersonDto> |
Get | Read all | /getAllPersons | - | List<PersonDto> |
Put | Update | /updatePerson/{email} | String firstName, String lastName, String phoneNum, String address | PersonDto |
Delete | Delete | /deletePerson/{email} | - | PersonDto |
Delete | Delete all | /deleteAllPersons | - | List<PersonDto> |
Account
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /createAccount/{username} | String password, boolean inTown, int totalPoints, String personEmail | AccountDto |
Get | Read by id | /getAccountByUsername/{username} | - | AccountDto |
Get | Login | /loginAccount | - | AccountDto |
Get | Read all | /getAllAccounts | - | List<AccountDto> |
Get | Read account with word | /getAccountByUsernameContaining/{word} | - | List<AccountDto> |
Get | Read account with points between | /getAccountsByTotalPointsBetween/{minPoints}/{maxPoints} | - | List<AccountDto> |
Get | Read account with points between | /getAccountsInTown/{inTown} | - | List<AccountDto> |
Put | Update | /updateAccount/{username} | String password, boolean inTown, int totalPoints, String personEmail | AccountDto |
Delete | Delete | /deleteAccount/{username} | - | AccountDto |
Delete | Delete | /deleteAllAccounts | - | AccountDto |
Customer
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /customer | TierClass tierClass, boolean ban, String personEmail | CustomerDto |
Patch | Update | /customer/update/{id} | int id, TierClass tierClass, boolean ban, String personEmail | CustomerDto |
Get | Read by id | /customer/{id} | int id | CustomerDto |
Get | Read all | /allCustomers | - | List<CustomerDto> |
Get | Read all by tier | /allCustomersByTier | TierClass tier | List<CustomerDto> |
Get | Read all by ban | /allCustomersByBan | boolean ban | List<CustomerDto> |
Delete | Delete | /customer/delete/{id} | int id | CustomerDto |
Employee
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /employee | String personEmail | EmployeeDto |
Patch | Update | /employee /update/{id} | int id, String personEmail | EmployeeDto |
Get | Read by id | /employee /{id} | int id | EmployeeDto |
Get | Read all | /allEmployees | - | List<EmployeeDto> |
Delete | Delete | /employee /delete/{id} | int id | EmployeeDto |
UserRole
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Get | Read by id | /getRoleById /{id} | int id | UserRoleDto |
Get | Read all | /getAllUserRoles | - | List<UserRoleDto> |
Item
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /item/ | String name, int price, int point, int returnPolicy, boolean pickup, int inStoreQuantity | ItemDto |
Get | Read by id | /item/{id} | - | ItemDto |
Get | Read all | /item/all | - | List<ItemDto> |
Get | Read all items with name that contains X | /item/name/{name} | - | List<ItemDto> |
Get | Read all items with a given price range | /item/price/{minPrice}/{maxPrice} | - | List<ItemDto> |
Get | Read all items with a given point range | /item/point/{minPoint}/{maxPoint} | - | List<ItemDto> |
Get | Read all items with a given return policy range | /item/returnPolicy/{minReturnPolicy}/{maxReturnPolicy} | - | List<ItemDto> |
Get | Read all items with a given in store quantity range | /item/inStoreQuantity/{minInStoreQuantity}/{maxInStoreQuantity} | - | List<ItemDto> |
Patch | Update | /item/{id} | String name, int price, int point, int returnPolicy, boolean pickup, int inStoreQuantity | ItemDto |
Delete | Delete | /item/delete/{id} | - | boolean |
Quantity
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /quantity/ | int count, int itemId, int cartId | QuantityDto |
Get | Read by id | /quantity/{id} | - | QuantityDto |
Get | Read all | /quantity/all | - | List<QuantityDto> |
Get | Read all quantities associated with item id | /quantity/itemId/{itemId} | - | List<QuantityDto> |
Get | Read all quantities associated with cart id | /quantity/cartId/{cartId} | - | List<QuantityDto> |
Patch | Update | /quantity/{id} | int count, int itemId, int cartId | QuantityDto |
Delete | Delete | /quantity/delete/{id} | - | QuantityDto |
Manager
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /manager/ | string personEmail | ManagerDto |
Get | Read by id | /manager/{id} | - | ManagerDto |
Patch | Update | /manager/update/{id} | int id, string personEmail | ManagerDto |
Delete | Delete | /manager/delete/{id} | - | ManagerDto |
Cart
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /cart/ | Date date, String username | CartDto |
Get | Read by id | /cart/{id} | - | CartDto |
Get | Read all | /cart/all | - | List<CartDto> |
Get | Read all carts associated with account id | /cart/accountId/{accountId} | - | List<CartDto> |
Patch | Update | /cart/update/{id} | int count, int itemId, int cartId | CartDto |
Delete | Delete | /cart/delete/{id} | - | CartDto |
GroceryStoreSystem
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /grocerystoresystem/ | String storename, String address, int employeeDiscount | GroceryStoreSystemDto |
Get | Read by store name | /grocerystoresystem/{storename} | - | GroceryStoreSystemDto |
Patch | Update | /grocerystoresystem/update/{storename} | String address, int employeeDiscount | GroceryStoreSystemDto |
Delete | Delete | /grocerystoresystem/delete/{storename} | - | GroceryStoreSystemDto |
BusinessHour
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /businesshour/emloyee | Weekday day, Boolean working, int employeeId, Time startTime, Time endTime | BusinessHourDto |
Post | Create | /businesshour/groeryStoreSystem | Weekday day, Boolean working, String name, Time startTime, Time endTime | BusinessHourDto |
Get | Read by id | /businesshour/{id} | - | BusinessHourDto |
Get | Read all | /businesshour/all | - | List<BusinessHourDto> |
Patch | Update | /businesshour/update/{id} | int id, Weekday day, Boolean working, String storeName, int employeeId, Time startTime, Time endTime | BusinessHourDto |
Delete | Delete | /businesshour/delete/{id} | - | BusinessHourDto |
Receipt
Mapping | Description | URL | Request Parameters | Return |
---|---|---|---|---|
Post | Create | /receipt/ | int cartid, ReceiptStatus receiptStatus, ReceiptType receiptType | ReceiptDto |
Get | Read by id | /receipt/{id} | - | ReceiptDto |
Get | Read all | /receipt/all | - | List<ReceiptDto> |
Get | Read all receipt associated with receipt status | /receipt/getWithStatus | ReceiptStatus status | List<ReceiptDto> |
Get | Read all receipt associated with receipt type | /receipt/getWithType | ReceiptType type | List<ReceiptDto> |
Get | Read all receipt associated with receipt status and type | /receipt/getWithTypeAndStatus | ReceiptStatus status, ReceiptType type | List<ReceiptDto> |
Patch | Update | /receipt/update/{id} | int receiptNum, int cartid, ReceiptStatus receiptStatus, ReceiptType receiptType | ReceiptDto |
Delete | Delete | /receipt/delete/{id} | - | ReceiptDto |