V1::AddressesController

User::Addresses

show

View a address

URL

GET /address/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Identifier the address

Objeto resposta

User::Address

The requested address

create

Create {User::Address} and redirect to 'show' action

URL

POST /students/:student_id/addresses or /collaborators/:collaborator_id/addresses

Parâmetros obrigatórios

Nome Tipo Descrição
address Hash

The address to create

Parâmetros opcionais

Nome Tipo Descrição
address[street] String

Street of the address

address[number] String

Number of the address

address[complement] String

Complement of the address

address[city] String

City of the address

address[state] String

State of the address

address[zip_code] String

Zip Code of the address

address[district] String

District of the address

update

Update an existing {User::Address} and redirect to 'show' action

URL

PUT/PATCH /address/:id

Parâmetros obrigatórios

Nome Tipo Descrição
address Hash

The address to create

Parâmetros opcionais

Nome Tipo Descrição
address[street] String

Street of the address

address[number] String

Number of the address

address[complement] String

Complement of the address

address[city] String

City of the address

address[state] String

State of the address

address[zip_code] String

Zip Code of the address

address[district] String

District of the address

Objeto resposta

User::Address

The created address or a list of errors

destroy

Delete address

URL

DELETE /address/:id

Parâmetros obrigatórios

Nome Tipo Descrição
id Integer

Id of an address