Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 890 Bytes

coupon-request.md

File metadata and controls

35 lines (27 loc) · 890 Bytes

Coupon Request

Structure

CouponRequest

Fields

Name Type Tags Description
Coupon *models.CouponPayload Optional -
RestrictedProducts map[string]bool Optional An object where the keys are product_ids and the values are booleans indicating if the coupon should be applicable to the product
RestrictedComponents map[string]bool Optional An object where the keys are component_ids and the values are booleans indicating if the coupon should be applicable to the component

Example (as JSON)

{
  "coupon": {
    "name": "name4",
    "code": "code2",
    "description": "description6",
    "percentage": "String3",
    "amount_in_cents": 230
  },
  "restricted_products": {
    "key0": true
  },
  "restricted_components": {
    "key0": true
  }
}