This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
...
Code style checker
-
run command for verify code
rubocop
-
run command to correct code
rubocop -a
protect_from_forgery with: :null_session
- name
- code
- description
- active
rails g scaffold Role name code:string:index description:text active:boolean
- GET http://api.cargapp.co/api/v1/roles 'Listar'
- GET http://api.cargapp.co/api/v1/roles/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/roles/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/roles 'Crear'
- PUT http://api.cargapp.co/api/v1/roles/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/roles/:id 'Elimina'
{
"role": {
"name": "user",
"code": "USER",
"description": "Role para todos los uaurios en general",
"active": true
}
}
- password
- phone_number
- mobile_verify
- verification_code
- identifiation
- code
- uuid
- provider
- username
- referal_code
- user_referal_code
- pin
- online
- active
rails g migration AddPhoneToUser phone_number mobile_verify:boolean mobile_code identifiation uuid provider referal_code user_referal_code pin online:boolean active:boolean
- role_id
- user_id
- admin_id
- active:boolean
rails g scaffold UserRole role:references user:references admin:references active:boolean
- GET http://api.cargapp.co/api/v1/user_roles 'Listar'
- GET http://api.cargapp.co/api/v1/user_roles/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/user_roles/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/user_roles 'Crear'
- PUT http://api.cargapp.co/api/v1/user_roles/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/user_roles/:id 'Elimina'
{
"user_role": {
"role_id": 1,
"user_id": 2,
"admin_id": 1,
"active": true
}
}
- name
- code
- description
- active
rails g scaffold CargappModel name code description:text active:boolean
- GET http://api.cargapp.co/api/v1/cargapp_models 'Listar'
- GET http://api.cargapp.co/api/v1/cargapp_models/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/cargapp_models/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/cargapp_models 'Crear'
- PUT http://api.cargapp.co/api/v1/cargapp_models/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/cargapp_models/:id 'Elimina'
{
"cargapp_model": {
"name": "role",
"code": "ROLES",
"value": "roles",
"description": "Role para todos los uaurios en general",
"active": true
}
}
- name
- code
- description
- user_id
- value
- model_id
- active
rails g scaffold Parameter name code description:text user:references value cargapp_model:references active:boolean
- GET http://api.cargapp.co/api/v1/parameters 'Listar'
- GET http://api.cargapp.co/api/v1/parameters/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/parameters/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/parameters 'Crear'
- PUT http://api.cargapp.co/api/v1/parameters/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/parameters/:id 'Elimina'
{
"parameter": {
"name": "role",
"code": "ROLES",
"description": "Role para todos los uaurios en general",
"value": "roles, user_roles",
"user_id": 1,
"cargapp_model_id": 1,
"active": true
}
}
- role_id
- model_id
- action
- method
- user_id
- allow
- active
rails g scaffold Permission role:references cargapp_model:references action method allow:boolean user:references active:boolean
- GET http://api.cargapp.co/api/v1/permissions 'Listar'
- GET http://api.cargapp.co/api/v1/permissions/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/permissions/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/permissions 'Crear'
- PUT http://api.cargapp.co/api/v1/permissions/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/permissions/:id 'Elimina'
{
"permission": {
"role_id": 1,
"user_id": 1,
"cargapp_model_id": 1,
"action": "index",
"method": "GET",
"allow": true,
"active": true
}
}
- name
- code
- description
- user_id
- cargapp_model_id
- active
rails g scaffold Statu name code description:text user:references cargapp_model:references active:boolean
- GET http://api.cargapp.co/api/v1/status 'Listar'
- GET http://api.cargapp.co/api/v1/status/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/status/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/status 'Crear'
- PUT http://api.cargapp.co/api/v1/status/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/status/:id 'Elimina'
{
"statu": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"user_id": 1,
"cargapp_model_id": 1,
"active": true
}
}
- name
- code
- description
- cioc
- currency_code
- currency_name
- currency_symbol
- language_iso639
- language_name
- language_native_name
- image
- date_utc
- active
rails g scaffold Country name code description:text cioc currency_code currency_name currency_symbol language_iso639 language_name language_native_name image date_utc active:boolean
- GET http://api.cargapp.co/api/v1/countries 'Listar'
- GET http://api.cargapp.co/api/v1/countries/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/countries/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/countries 'Crear'
- PUT http://api.cargapp.co/api/v1/countries/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/countries/:id 'Elimina'
- PUT http://api.cargapp.co/api/v1/countries/migration 'Actualiza'
{
"country": {
"name": "creado",
"code": "creted",
"cioc": "creee",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"active": true,
..........
}
}
- name
- code
- description
- country_id
- active
rails g scaffold State name code description:text country:references active:boolean
- GET http://api.cargapp.co/api/v1/states 'Listar'
- GET http://api.cargapp.co/api/v1/states/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/states/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/states 'Crear'
- PUT http://api.cargapp.co/api/v1/states/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/states/:id 'Elimina'
{
"state": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"country_id": 1,
"active": true
}
}
- name
- code
- description
- state_id
- active
rails g scaffold City name code description:text state:references active:boolean
- GET http://api.cargapp.co/api/v1/cities 'Listar'
- GET http://api.cargapp.co/api/v1/cities/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/cities/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/cities 'Crear'
- PUT http://api.cargapp.co/api/v1/cities/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/cities/:id 'Elimina'
{
"city": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"state_id": 1,
"active": true
}
}
- name
- code
- description
- active
rails g scaffold DocumentType name code description:text active:boolean
- GET http://api.cargapp.co/api/v1/document_types 'Listar'
- GET http://api.cargapp.co/api/v1/document_types/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/document_types/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/document_types 'Crear'
- PUT http://api.cargapp.co/api/v1/document_types/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/document_types/:id 'Elimina'
{
"document_type": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"active": true
}
}
- name
- code
- icon
- description
- active
rails g scaffold VehicleType name code icon description:text active:boolean
- GET http://api.cargapp.co/api/v1/vehicle_types 'Listar'
- GET http://api.cargapp.co/api/v1/vehicle_types/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/vehicle_types/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/vehicle_types 'Crear'
- PUT http://api.cargapp.co/api/v1/vehicle_types/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/vehicle_types/:id 'Elimina'
{
"vehicle_type": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"icon": "image.png",
"active": true
}
}
- name
- code
- icon
- description
- active
rails g scaffold LoadType name code icon description:text active:boolean
- GET http://api.cargapp.co/api/v1/load_types 'Listar'
- GET http://api.cargapp.co/api/v1/load_types/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/load_types/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/load_types 'Crear'
- PUT http://api.cargapp.co/api/v1/load_types/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/load_types/:id 'Elimina'
{
"load_type": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"icon": "image.png",
"active": true
}
}
##Integration
- name
- description
- provider
- code
- url
- url_provider
- url_production
- url_develop
- username
- password
- phone
- pin
- token
- app_id
- client_id
- api_key
- user:references
- active
rails g scaffold CargappIntegration name description:text provider code url url_provider url_production url_develop email username password phone pin token app_id client_id api_key user:references active:boolean
- GET http://api.cargapp.co/api/v1/cargapp_integrations 'Listar'
- GET http://api.cargapp.co/api/v1/cargapp_integrations/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/cargapp_integrations/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/cargapp_integrations 'Crear'
- PUT http://api.cargapp.co/api/v1/cargapp_integrations/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/cargapp_integrations/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/cargapp_integrations/me 'Ver los del usuario'
{
"cargapp_integration": {
"name": "creado",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"provider": null,
"code": "creted",
"url": null,
"url_provider": null,
"url_production": null,
"url_develop": null,
"email": null,
"username": null,
"password": null,
"phone": null,
"pin": null,
"token": null,
"app_id": null,
"client_id": null,
"api_key": null,
"user_id": 1,
"active": true
}
}
- name
- description
- company_type
- load_type_id
- sector
- legal_representative
- address
- phone
- user_id
- constitution_date
- active
rails g scaffold Company name description:text company_type load_type:references sector legal_representative address phone user:references constitution_date:date active:boolean
- GET http://api.cargapp.co/api/v1/companies 'Listar'
- GET http://api.cargapp.co/api/v1/companies/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/companies/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/companies 'Crear'
- PUT http://api.cargapp.co/api/v1/companies/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/companies/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/companies/me 'Ver los del usuario'
{
"load_type": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"icon": "image.png",
"active": true
}
}
- title
- body
- image
- media
- status_id
- user_id
- active
rails g scaffold Ticket title body:text image media statu:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/tickets 'Listar'
- GET http://api.cargapp.co/api/v1/tickets/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/tickets/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/tickets 'Crear'
- PUT http://api.cargapp.co/api/v1/tickets/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/tickets/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/tickets/me 'Ver los del usuario'
{
"ticket": {
"title": "creado",
"body": "estado creado para el usro de los estados del modelo servicios o ofertas",
"image": "image.png",
"media": "archivo.pdf",
"statu_id": 1,
"user_id": 1,
"active": true
}
}
- document_id
- document_type_id
- file
- status_id
- user_id
- expire_date
- approved
- active
rails g scaffold Document document_id document_type:references file statu:references user:references expire_date:date approved:boolean active:boolean
- GET http://api.cargapp.co/api/v1/documents 'Listar'
- GET http://api.cargapp.co/api/v1/documents/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/documents/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/documents 'Crear'
- PUT http://api.cargapp.co/api/v1/documents/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/documents/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/documents/me 'Ver los del usuario'
{
"document": {
"document_id": "1086726268",
"document_type_id": 1,
"file": "archivo.pdf",
"expire_date": "10-09-2019"
"statu_id": 1,
"user_id": 1,
"approved": true,
"active": true
}
}
- firt_name
- last_name
- avatar
- phone
- document_id
- document_type_id
- birth_date
- user_id
rails g scaffold Profile firt_name last_name avatar phone document_id document_type:references user:references birth_date:date
- GET http://api.cargapp.co/api/v1/profiles 'Listar'
- GET http://api.cargapp.co/api/v1/profiles/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/profiles/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/profiles 'Crear'
- PUT http://api.cargapp.co/api/v1/profiles/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/profiles/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/profiles/me 'Ver los del usuario'
{
"profile": {
"firt_name": "segundo",
"last_name": "espana",
"avatar": "foto.png",
"phone": "573156257773",
"document_id": "1086726268",
"document_type_id": 1,
"birth_date": "10-09-2019",
"user_id": 1
}
}
- brand
- model
- model_year
- color
- plate
- chassis
- owner_vehicle
- vehicle_type_id
- owner_document_type_id
- owner_document_id
- user_id
- active
rails g scaffold Vehicle brand model model_year:integer color plate chassis owner_vehicle vehicle_type:references owner_document_type:references owner_document_id user:references active:boolean
- GET http://api.cargapp.co/api/v1/vehicles 'Listar'
- GET http://api.cargapp.co/api/v1/vehicles/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/vehicles/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/vehicles 'Crear'
- PUT http://api.cargapp.co/api/v1/vehicles/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/vehicles/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/vehicles/me 'Ver los del usuario'
{
"vehicle": {
"brand": "mazda",
"model": "2",
"model_year": 2019,
"color": "white",
"plate": "528-SRC"
"chassis": "segundo1w35djjd",
"owner_vehicle": "segundo españa bastidas",
"owner_document_id": "10922222",
"vehicle_type_id": 1,
"owner_document_type_id": 1,
"user_id": 1,
"active": true
}
}
- name
- body
- image
- point
- user_id
- active
rails g scaffold Challenge name body:text image point:integer user:references active:boolean
- GET http://api.cargapp.co/api/v1/challenges 'Listar'
- GET http://api.cargapp.co/api/v1/challenges/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/challenges/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/challenges 'Crear'
- PUT http://api.cargapp.co/api/v1/challenges/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/challenges/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/challenges/me 'Ver los del usuario'
{
"challenge": {
"name": "los 3 primeros viajes",
"body": "quien ejecte los primeros 3 viajes ganara 10 puntos",
"image": "image.png",
"point": 12,
"user_id": 1,
"active": true
}
}
- position
- point
- challenge_id
- user_id
- active
rails g scaffold UserChallenge position:integer point:integer challenge:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/user_challenges 'Listar'
- GET http://api.cargapp.co/api/v1/user_challenges/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/user_challenges/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/user_challenges 'Crear'
- PUT http://api.cargapp.co/api/v1/user_challenges/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/user_challenges/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/user_challenges/me 'Ver los del usuario'
{
"user_challenge": {
"position": "los 3 primeros viajes",
"point": 12,
"user_id": 1,
"challenge_id": 1,
"active": true
}
}
- name
- code
- description
- cargapp_model_id
- is_porcentage
- value
- quantity
- user_id
- active
rails g scaffold Coupon name code description is_porcentage:boolean value:integer quantity:integer cargapp_model:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/coupons 'Listar'
- GET http://api.cargapp.co/api/v1/coupons/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/coupons/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/coupons 'Crear'
- PUT http://api.cargapp.co/api/v1/coupons/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/coupons/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/coupons/me 'Ver los del usuario'
{
"coupon": {
"name": "Todos 10",
"code": "TODO10",
"description": "10% de decuento para todos",
"is_porcentage": true,
"value": 10,
"quantity": 100,
"user_id": 1,
"cargapp_model_id": 1,
"active": true
}
}
- user_id
- coupon_id
- cargapp_model_id
- applied_item_id
- offert_id
- discount
- active
rails g scaffold UserCoupon discount cargapp_model:references applied_item_id:integer coupon:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/user_coupons 'Listar'
- GET http://api.cargapp.co/api/v1/user_coupons/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/user_coupons/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/user_coupons 'Crear'
- PUT http://api.cargapp.co/api/v1/user_coupons/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/user_coupons/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/user_coupons/me 'Ver los del usuario'
{
"user_coupon": {
"discount": 10,
"applied_item_id": 1,
"cargapp_model_id": 1,
"coupon_id": 1,
"user_id": 1,
"active": true
}
}
- name
- code
- point
- description
- body
- image
- media
- expire_date
- user_id
- active
rails g scaffold Prize name code point:integer description:text body:text image media expire_date:datetime user:references active:boolean
- GET http://api.cargapp.co/api/v1/prizes 'Listar'
- GET http://api.cargapp.co/api/v1/prizes/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/prizes/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/prizes 'Crear'
- PUT http://api.cargapp.co/api/v1/prizes/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/prizes/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/prizes/me 'Ver los del usuario'
{
"prize": {
"name": "la primera carrera",
"code": "CAA1",
"point": "CAA1",
"decription": "CAA1",
"body": "CAA1",
"image": "CAA1.png",
"media": "CAA1.png",
"expire_date": "18-08-2019 12:12",
"user_id": 1,
"active": true
}
}
- point
- expire_date
- prize_id
- user_id
- active
rails g scaffold UserPrize point prize:references expire_date:datetime user:references active:boolean
- GET http://api.cargapp.co/api/v1/user_prizes 'Listar'
- GET http://api.cargapp.co/api/v1/user_prizes/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/user_prizes/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/user_prizes 'Crear'
- PUT http://api.cargapp.co/api/v1/user_prizes/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/user_prizes/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/user_prizes/me 'Ver los del usuario'
{
"user_prize": {
"point": 1,
"prize_id": 1,
"expire_date": "18-12-2019 12:12",
"user_id": 1,
"active": true
}
}
- name
- code
- icon
- description
- active
rails g scaffold ReasonType name code icon description:text active:boolean
- GET http://api.cargapp.co/api/v1/reason_types 'Listar'
- GET http://api.cargapp.co/api/v1/reason_types/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/reason_types/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/reason_types 'Crear'
- PUT http://api.cargapp.co/api/v1/reason_types/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/reason_types/:id 'Elimina'
{
"reason_type": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"icon": "image.png",
"active": true
}
}
- description
- reason_type_id
- statu_id
- user_id
- driver_id
- expire_date
- active
rails g scaffold Blocking description:text reason:references statu:references expire_date:datetime user:references driver:references active:boolean
- GET http://api.cargapp.co/api/v1/user_coupons 'Listar'
- GET http://api.cargapp.co/api/v1/user_coupons/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/user_coupons/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/user_coupons 'Crear'
- PUT http://api.cargapp.co/api/v1/user_coupons/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/user_coupons/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/user_coupons/me 'Ver los del usuario'
{
"Prize": {
"point": 1,
"prize_id": 1,
"expire_date": "18-12-2019 12:12",
"user_id": 1,
"active": true
}
}
- model
- action
- item
- message
- user_id
rails g scaffold Activity model action item message user:references
- GET http://api.cargapp.co/api/v1/activities 'Listar'
- GET http://api.cargapp.co/api/v1/activities/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/activities/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/activities 'Crear'
- PUT http://api.cargapp.co/api/v1/activities/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/activities/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/activities/me 'Ver los del usuario'
{
"activity": {
"model": "profiles",
"action": "me",
"item": "1"
"message": "ingreso al perfil"
"user_id": 1
}
}
- name
- uuid
- description
- app_id
- secret_id
- token
- password
- user_id
- active
rails g scaffold PaymentMethod name uuid description:text email aap_id secret_id token password user:references active:boolean
- GET http://api.cargapp.co/api/v1/payment_methods 'Listar'
- GET http://api.cargapp.co/api/v1/payment_methods/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/payment_methods/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/payment_methods 'Crear'
- PUT http://api.cargapp.co/api/v1/payment_methods/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/payment_methods/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/payment_methods/me 'Ver los del usuario'
{
"payment_method": {
"name": "efectivo",
"uuid": "cargapp2019",
"description": "metodo de pago en efectivo",
"email": "[email protected]",
"app_id": "cargapp2019",
"secret_id": "cargapp2019",
"token": "cargapp2019",
"password": "cargapp2019",
"user_id": 1,
"active": true
}
}
- uuid
- token
- card_number
- expiration
- cvv
- observation
- user_id
- payment_method_id
- active
rails g scaffold UserPaymentMethod email uuid token card_number expiration:date cvv observation:text user:references payment_method:references active:boolean
- GET http://api.cargapp.co/api/v1/user_payment_methods 'Listar'
- GET http://api.cargapp.co/api/v1/user_payment_methods/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/user_payment_methods/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/user_payment_methods 'Crear'
- PUT http://api.cargapp.co/api/v1/user_payment_methods/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/user_payment_methods/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/user_payment_methods/me 'Ver los del usuario'
{
"user_payment_method": {
"email": "[email protected]",
"uuid": "cargapp2019",
"token": "cargapp2019",
"card_number": "123456789",
"expiration": "02/29",
"cvv": "029",
"observation": "metodo de pago en efectivo",
"payment_method_id": 1,
"user_id": 1,
"active": true
}
}
- name
- origin
- destination
- cause
- sense
- novelty
- geolocation
- image
- start_date
- end_date
- report_type
- user_id
- active
rails g scaffold Report name origin destination cause sense novelty geolocation image start_date:date end_date:date report_type user:references active:boolean
- GET http://api.cargapp.co/api/v1/report_types 'Listar'
- GET http://api.cargapp.co/api/v1/report_types/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/report_types/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/report_types 'Crear'
- PUT http://api.cargapp.co/api/v1/report_types/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/report_types/:id 'Elimina'
{
"report_type": {
"name": "creado",
"code": "creted",
"description": "estado creado para el usro de los estados del modelo servicios o ofertas",
"icon": "image.png",
"active": true
}
}
- name
- origin
- origin_city_id
- origin_address
- origin_longitude
- origin_latitude
- destination
- destination_city_id
- destination_address
- destination_latitude
- destination_longitude
- price
- description
- note
- user_id
- company_id
- user_driver_id
- user_receiver_id
- vehicle_type_id
- vehicle_id
- statu_id
- expiration_date
- contact
- active
rails g scaffold Service name origin origin_city:references origin_address origin_longitude origin_latitude destination destination_city:references destination_address destination_latitude destination_longitude price:integer description:text note:text user:references company:references user_driver:references user_receiver:references vehicle_type:references vehicle:references statu:references expiration_date:date contact active:boolean
- GET http://api.cargapp.co/api/v1/services 'Listar'
- GET http://api.cargapp.co/api/v1/services/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/services/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/services 'Crear'
- PUT http://api.cargapp.co/api/v1/services/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/services/:id 'Elimina'
{
"service": {
"name": "cali, medellin"
.....
"active": true
}
}
- name
- document_type
- document_type_id
- document
- service_id
- user_id
- active
rails g scaffold ServiceDocument name document_type document service:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/services_documents 'Listar'
- GET http://api.cargapp.co/api/v1/services_documents/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/services_documents/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/services_documents 'Crear'
- PUT http://api.cargapp.co/api/v1/services_documents/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/services_documents/:id 'Elimina'
{
"service_document": {
"name": "factura de venta de producto",
"document_type": "FACTURA",
"document": "filel.pdf",
"service_id": 1,
"user_id": 1,
"active": true
}
}
- origin_city_id
- destination_city_id
- user_id
- active
rails g scaffold FavoriteRoute origin_city:references destination_city:references active:boolean
- GET http://api.cargapp.co/api/v1/favorite_routes 'Listar'
- GET http://api.cargapp.co/api/v1/favorite_routes/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/favorite_routes/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/favorite_routes 'Crear'
- PUT http://api.cargapp.co/api/v1/favorite_routes/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/favorite_routes/:id 'Elimina'
{
"favorite_route": {
"origin_city_id": 1,
"destination_city_id": 2,
"service_id": 1,
"user_id": 1,
"active": true
}
}
- id
- name
- price
- description
- body
- image
- url
- media
- have_discoun
- is_percentage
- discoun
- user_id
- active
rails g scaffold CargappAd name price:integer description:text body:text image url media have_discoun:boolean is_percentage:boolean discoun:integer user:references active:boolean
- GET http://api.cargapp.co/api/v1/cargapp_ads 'Listar'
- GET http://api.cargapp.co/api/v1/cargapp_ads/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/cargapp_ads/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/cargapp_ads 'Crear'
- PUT http://api.cargapp.co/api/v1/cargapp_ads/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/cargapp_ads/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/cargapp_ads/me 'Ver las del usuario'
{
"favorite_route": {
"origin_city_id": 1,
"destination_city_id": 2,
"service_id": 1,
"user_id": 1,
"active": true
}
}
- id
- longitude
- latitude
- city_id
- user_id
- active
rails g scaffold UserLocation longitude latitude city:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/user_locations 'Listar'
- GET http://api.cargapp.co/api/v1/user_locations/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/user_locations/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/user_locations 'Crear'
- PUT http://api.cargapp.co/api/v1/user_locations/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/user_locations/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/user_locations/me 'Ver las del usuario'
{
"user_location": {
"longitude": 1,
"latitude": 2,
"city_id": 1,
"user_id": 1,
"active": true
}
}
- id
- longitude
- latitude
- city_id
- user_id
- service_id
- active
rails g scaffold ServiceLocation longitude latitude city:references user:references service:references active:boolean
- GET http://api.cargapp.co/api/v1/service_locations 'Listar'
- GET http://api.cargapp.co/api/v1/service_locations/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/service_locations/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/service_locations 'Crear'
- PUT http://api.cargapp.co/api/v1/service_locations/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/service_locations/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/service_locations/me 'Ver las del usuario'
{
"service_location": {
"longitude": 1,
"latitude": 2,
"city_id": 1,
"user_id": 1,
"service_id": 1,
"active": true
}
}
- id
- account_number
- account_type
- bank
- user_id
- statu_id
- active
rails g scaffold BankAccount account_number:integer account_type bank user:references statu:references active:boolean
- GET http://api.cargapp.co/api/v1/bank_accounts 'Listar'
- GET http://api.cargapp.co/api/v1/bank_accounts/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/bank_accounts/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/bank_accounts 'Crear'
- PUT http://api.cargapp.co/api/v1/bank_accounts/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/bank_accounts/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/bank_accounts/me 'Ver las del usuario'
{
"bank_account": {
"account_number": 1,
"account_type": 2,
"bank": 1,
"user_id": 1,
"statu_id": 1,
"active": true
}
}
- id
- service_point
- driver_point
- point
- service_id
- user_id
- driver_id
- active
rails g scaffold RateService service_point:integer driver_point:integer point:integer service:references user:references driver:references active:boolean
- GET http://api.cargapp.co/api/v1/rate_services 'Listar'
- GET http://api.cargapp.co/api/v1/rate_services/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/rate_services/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/rate_services 'Crear'
- PUT http://api.cargapp.co/api/v1/rate_services/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/rate_services/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/rate_services/me 'Ver las del usuario'
{
"rate_service": {
"service_point": 1,
"driver_point": 2,
"point": 1,
"service_id": 1,
"user_id": 1,
"driver_id": 1,
"active": true
}
}
- id
- uuid
- amount
- transaction_code
- observation
- payment_method_id
- statu_id
- generator_id
- receiver_id
- user_id
- bank_account_id
- service_id
- company_id
- active
rails g scaffold CargappPayment uuid amount:integer transaction_code observation:text payment_method:references statu:references generator:references receiver:references bank_account:references service:references company:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/cargapp_payments 'Listar'
- GET http://api.cargapp.co/api/v1/cargapp_payments/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/cargapp_payments/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/cargapp_payments 'Crear'
- PUT http://api.cargapp.co/api/v1/cargapp_payments/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/cargapp_payments/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/cargapp_payments/me 'Ver las del usuario'
{
"cargapp_payment": {
"uuid": "asdasd5",
"amount": 20,
"transaction_code": "445454",
"observation": "asdasdasd",
"payment_method_id": 1,
"statu_id": 7,
"generator_id": 1,
"receiver_id": 2,
"bank_account_id": 1,
"service_id": 11,
"company_id": 2,
"user_id": 1,
"active": true
}
}
- id
- uuid
- total
- sub_total
- taxes
- transaction_code
- observation
- coupon_id
- coupon_code
- coupon_amount
- user_payment_method_id
- payment_method_id
- statu_id
- user_id
- is_service
- service_id
- active
rails g scaffold Payment uuid total:integer sub_total:integer taxes:integer transaction_code observation:text coupon:references coupon_code coupon_amount:integer user_payment_method:references payment_method:references statu:references service:references is_service:boolean user:references active:boolean
- GET http://api.cargapp.co/api/v1/cargapp_payments 'Listar'
- GET http://api.cargapp.co/api/v1/cargapp_payments/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/cargapp_payments/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/cargapp_payments 'Crear'
- PUT http://api.cargapp.co/api/v1/cargapp_payments/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/cargapp_payments/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/cargapp_payments/me 'Ver las del usuario'
{
"payment": {
"uuid": "",
"total": null,
"sub_total": null,
"taxes": null,
"transaction_code": "",
"observation": "",
"coupon_id": null,
"coupon_code": "",
"coupon_amount": null,
"user_payment_method_id": 4,
"payment_method_id": 1,
"statu_id": 6,
"service_id": 11,
"is_service": true,
"user_id": 1,
"active": false
}
}
- id
- user_id
- company_id
- active
rails g scaffold CompanyUser company:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/company_users 'Listar'
- GET http://api.cargapp.co/api/v1/company_users/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/company_users/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/company_users 'Crear'
- PUT http://api.cargapp.co/api/v1/company_users/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/company_users/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/company_users/me 'Ver las del usuario'
{
"company_user": {
"company_id": 1,
"user_id": 2,
"active": true
}
}
- id
- service_id
- user_id
- position
- approved
- expiration_date
- active
rails g scaffold ServiceUser service:references user:references position:integer approved:boolean expiration_date:date active:boolean
- GET http://api.cargapp.co/api/v1/company_users 'Listar'
- GET http://api.cargapp.co/api/v1/company_users/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/company_users/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/company_users 'Crear'
- PUT http://api.cargapp.co/api/v1/company_users/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/company_users/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/company_users/me 'Ver las del usuario'
{
"payment": {
"uuid": "",
"total": null,
"sub_total": null,
"taxes": null,
"transaction_code": "",
"observation": "",
"coupon_id": null,
"coupon_code": "",
"coupon_amount": null,
"user_payment_method_id": 4,
"payment_method_id": 1,
"statu_id": 6,
"service_id": 11,
"is_service": true,
"user_id": 1,
"active": false
}
}
rails g scaffold Room name note service:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/rooms 'Listar'
- GET http://api.cargapp.co/api/v1/rooms/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/rooms/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/rooms 'Crear'
- PUT http://api.cargapp.co/api/v1/rooms/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/rooms/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/rooms/me 'Ver las del usuario'
{
"room": {
"name": "",
"note": null,
"service_id": 11,
"user_id": 1,
"active": false
}
}
rails g scaffold RoomUser service:references room:references user:references active:boolean
- GET http://api.cargapp.co/api/v1/room_users 'Listar'
- GET http://api.cargapp.co/api/v1/room_users/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/room_users/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/room_users 'Crear'
- PUT http://api.cargapp.co/api/v1/room_users/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/room_users/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/room_users/me 'Ver las del usuario'
{
"room_user": {
"service_id": 11,
"room_id": 1,
"user_id": 1,
"active": false
}
}
Messages
- room
- message_type
- uuid
- message
- file
- user
- active
rails g scaffold Message room:references message_type uuid message file user:references active:boolean
- GET http://api.cargapp.co/api/v1/messages 'Listar'
- GET http://api.cargapp.co/api/v1/messages/active 'Ver activos'
- GET http://api.cargapp.co/api/v1/messages/:id 'Ver detalle'
- POST http://api.cargapp.co/api/v1/messages 'Crear'
- PUT http://api.cargapp.co/api/v1/messages/:id 'Actualiza'
- DELETE http://api.cargapp.co/api/v1/messages/:id 'Elimina'
- GET http://api.cargapp.co/api/v1/messages/me 'Ver las del usuario'
{
"message": {
"room_id": 1,
"message_type": "text",
"uuid": "1122522",
"message": "hola mundo",
"file": "url.png"
"user_id": 1,
"active": false
}
}
irb -r oauth2 app = "ZRylaRGgSD19_gOQVoumEmLueIWlcaBLkw2EkcIKG7Y123456" secret = "UaF6H-ETL8XlY04V5_U3eUSyehHVHiopXU__bcAcIXI123456" client = OAuth2::Client.new(app, secret, site: 'http://localhost:3000') token = client.password.get_token('[email protected]', '123456') puts token.token
irb -r oauth2 app = "ZRylaRGgSD19_gOQVoumEmLueIWlcaBLkw2EkcIKG7Y" secret = "UaF6H-ETL8XlY04V5_U3eUSyehHVHiopXU__bcAcIXI" client = OAuth2::Client.new(app, secret, site: 'http://localhost:3000') token = client.password.get_token('[email protected]', '123456') puts token.token