V1::CouponsController
Coupons
create
Create new coupon
URL
POST /couponsParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
coupon | Hash | The coupon to create |
Objeto resposta
Coupon | The created coupon or a list of errors |
show
Show coupon info
URL
GET /coupons/:guidParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
guid | String | Identifier the coupon |
Objeto resposta
Coupon | The requested coupon |
update
Update an existing coupon and redirect to 'show' action
URL
PUT/PATCH /coupon/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | The id of the coupon to update |
coupon | Hash | The coupon to update |
Objeto resposta
Coupon | The updated coupon or a list of errors |
destroy
Destroy a coupon if unused
URL
DELETE /coupon/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | The id of the coupon to destroy |
index
Get a list of coupons
URL
GET /products/:product_id/couponsParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
product_id | Integer | The id of the product |
Objeto resposta
Array<Invoice> | The desired coupons |