-
Notifications
You must be signed in to change notification settings - Fork 6k
/
coupon-gateway.json
1 lines (1 loc) · 13 KB
/
coupon-gateway.json
1
{"swagger":"2.0","info":{"description":"Api Documentation","version":"1.0","title":"Api Documentation","termsOfService":"urn:tos","contact":{},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0"}},"host":"localhost:8080","basePath":"/","tags":[{"name":"org-gateway-mapping-resource","description":"Org Gateway Mapping Resource"},{"name":"coupon-gateway-resource","description":"Coupon Gateway Resource"},{"name":"gateway-resource","description":"Gateway Resource"},{"name":"coupon-resource","description":"Coupon Resource"}],"paths":{"/v1/coupon/issue":{"post":{"tags":["coupon-resource"],"summary":"issueCoupon","operationId":"issueCouponUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"issueCouponRequest","description":"issueCouponRequest","required":true,"schema":{"$ref":"#/definitions/IssueCouponRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«IssueCouponResponse»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/coupongateway/isAlive":{"get":{"tags":["coupon-gateway-resource"],"summary":"isAlive","operationId":"isAliveUsingGET","consumes":["application/json"],"produces":["*/*"],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/coupongateway/version":{"get":{"tags":["coupon-gateway-resource"],"summary":"getVersion","operationId":"getVersionUsingGET","consumes":["application/json"],"produces":["*/*"],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/VersionData"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gatewaymappings":{"get":{"tags":["org-gateway-mapping-resource"],"summary":"getAllGatewayMappingsByOrgId","operationId":"getAllGatewayMappingsByOrgIdUsingGET","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"orgId","in":"query","description":"orgId","required":true,"type":"integer","format":"int64"},{"name":"includeInactive","in":"query","description":"includeInactive","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«List«OrgCouponGatewayMapping»»"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}},"post":{"tags":["org-gateway-mapping-resource"],"summary":"createGatewayMappings","operationId":"createGatewayMappingsUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"orgCouponGatewayMapping","description":"orgCouponGatewayMapping","required":true,"schema":{"$ref":"#/definitions/OrgCouponGatewayMapping"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«OrgCouponGatewayMapping»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gatewaymappings/{gatewayMappingId}/activate":{"put":{"tags":["org-gateway-mapping-resource"],"summary":"activateGatewayMapping","operationId":"activateGatewayMappingUsingPUT","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayMappingId","in":"path","description":"gatewayMappingId","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«boolean»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gatewaymappings/{gatewayMappingId}/deactivate":{"put":{"tags":["org-gateway-mapping-resource"],"summary":"deActivateGatewayMapping","operationId":"deActivateGatewayMappingUsingPUT","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayMappingId","in":"path","description":"gatewayMappingId","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«boolean»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gatewaymappings/{id}":{"get":{"tags":["org-gateway-mapping-resource"],"summary":"getByGatewayMappingId","operationId":"getByGatewayMappingIdUsingGET","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«OrgCouponGatewayMapping»"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}},"put":{"tags":["org-gateway-mapping-resource"],"summary":"updateGatewayMappings","operationId":"updateGatewayMappingsUsingPUT","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"string"},{"in":"body","name":"orgCouponGatewayMapping","description":"orgCouponGatewayMapping","required":true,"schema":{"$ref":"#/definitions/OrgCouponGatewayMapping"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«OrgCouponGatewayMapping»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gateways":{"post":{"tags":["gateway-resource"],"summary":"create","operationId":"createUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"couponGateway","description":"couponGateway","required":true,"schema":{"$ref":"#/definitions/CouponGateway"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«CouponGateway»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gateways/":{"get":{"tags":["gateway-resource"],"summary":"getAllGateways","operationId":"getAllGatewaysUsingGET","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"includeInactive","in":"query","description":"includeInactive","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«List«CouponGateway»»"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gateways/{gatewayId}":{"get":{"tags":["gateway-resource"],"summary":"getById","operationId":"getByIdUsingGET","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayId","in":"path","description":"gatewayId","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«CouponGateway»"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}},"put":{"tags":["gateway-resource"],"summary":"update","operationId":"updateUsingPUT","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayId","in":"path","description":"gatewayId","required":true,"type":"string"},{"in":"body","name":"couponGateway","description":"couponGateway","required":true,"schema":{"$ref":"#/definitions/CouponGateway"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«CouponGateway»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gateways/{gatewayId}/activate":{"put":{"tags":["gateway-resource"],"summary":"activateGateway","operationId":"activateGatewayUsingPUT","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayId","in":"path","description":"gatewayId","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«boolean»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/v1/gateways/{gatewayId}/deactivate":{"put":{"tags":["gateway-resource"],"summary":"deActivateGateway","operationId":"deActivateGatewayUsingPUT","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"gatewayId","in":"path","description":"gatewayId","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseWrapper«boolean»"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}}},"definitions":{"ApiError":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"getIsRetryable":{"type":"boolean"},"message":{"type":"string"}}},"CouponGateway":{"type":"object","properties":{"active":{"type":"boolean"},"baseUrl":{"type":"string"},"batchSize":{"type":"integer","format":"int32"},"concurrency":{"type":"integer","format":"int32"},"createdBy":{"type":"integer","format":"int64"},"createdOn":{"type":"string","format":"date-time"},"gatewayProperties":{"type":"array","items":{"$ref":"#/definitions/Property"}},"id":{"type":"string"},"name":{"type":"string"},"requiredFields":{"type":"array","items":{"type":"string"}},"timeoutInMillis":{"type":"integer","format":"int32"},"updatedBy":{"type":"integer","format":"int64"},"updatedOn":{"type":"string","format":"date-time"}}},"CouponSeries":{"type":"object","properties":{"customProperties":{"type":"object","additionalProperties":{"type":"string"}},"discountType":{"type":"string","enum":["PERC","ABS"]},"discountValue":{"type":"number","format":"double"},"id":{"type":"integer","format":"int64"},"seriesExpiryDate":{"type":"integer","format":"int64"}}},"IssueCouponRequest":{"type":"object","properties":{"couponSeries":{"$ref":"#/definitions/CouponSeries"},"issuedBy":{"$ref":"#/definitions/OrgEntity"},"orgCouponGatewayId":{"type":"string"},"orgId":{"type":"integer","format":"int64"},"requestId":{"type":"string"},"userInfo":{"$ref":"#/definitions/UserInfo"}}},"IssueCouponResponse":{"type":"object","properties":{"issuedCouponDetails":{"$ref":"#/definitions/IssuedCouponDetails"},"serverRequestId":{"type":"string"}}},"IssuedCouponDetails":{"type":"object","properties":{"additionalInfo":{"type":"string"},"couponCode":{"type":"string"},"error":{"$ref":"#/definitions/ApiError"},"issuedTime":{"type":"integer","format":"int64"},"userInfo":{"$ref":"#/definitions/UserInfo"}}},"OrgCouponGatewayMapping":{"type":"object","properties":{"active":{"type":"boolean"},"couponGateway":{"$ref":"#/definitions/CouponGateway"},"couponGatewayId":{"type":"string"},"createdBy":{"type":"integer","format":"int64"},"createdOn":{"type":"string","format":"date-time"},"id":{"type":"string"},"orgCouponGatewayProperties":{"type":"array","items":{"$ref":"#/definitions/Property"}},"orgId":{"type":"integer","format":"int64"},"updatedBy":{"type":"integer","format":"int64"},"updatedOn":{"type":"string","format":"date-time"}}},"OrgEntity":{"type":"object","properties":{"id":{"type":"integer","format":"int64"}}},"Property":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"ResponseWrapper«CouponGateway»":{"type":"object","properties":{"data":{"$ref":"#/definitions/CouponGateway"},"errors":{"type":"array","items":{"$ref":"#/definitions/ApiError"}}}},"ResponseWrapper«IssueCouponResponse»":{"type":"object","properties":{"data":{"$ref":"#/definitions/IssueCouponResponse"},"errors":{"type":"array","items":{"$ref":"#/definitions/ApiError"}}}},"ResponseWrapper«List«CouponGateway»»":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/CouponGateway"}},"errors":{"type":"array","items":{"$ref":"#/definitions/ApiError"}}}},"ResponseWrapper«List«OrgCouponGatewayMapping»»":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/OrgCouponGatewayMapping"}},"errors":{"type":"array","items":{"$ref":"#/definitions/ApiError"}}}},"ResponseWrapper«OrgCouponGatewayMapping»":{"type":"object","properties":{"data":{"$ref":"#/definitions/OrgCouponGatewayMapping"},"errors":{"type":"array","items":{"$ref":"#/definitions/ApiError"}}}},"ResponseWrapper«boolean»":{"type":"object","properties":{"data":{"type":"boolean"},"errors":{"type":"array","items":{"$ref":"#/definitions/ApiError"}}}},"Transaction":{"type":"object","properties":{"amount":{"type":"number","format":"double"},"id":{"type":"integer","format":"int64"},"transactionNumber":{"type":"string"},"transactionTime":{"type":"integer","format":"int64"}}},"UserInfo":{"type":"object","properties":{"email":{"type":"string"},"externalId":{"type":"string"},"mobile":{"type":"string"},"transaction":{"$ref":"#/definitions/Transaction"},"userId":{"type":"integer","format":"int64"}}},"VersionData":{"type":"object","properties":{"artifactVersion":{"type":"string"}}}}}