Skip to content

Commit

Permalink
Merge pull request #59 from Evocalize/ep-1101/order-api-docs
Browse files Browse the repository at this point in the history
EP-1101 more tweaks to the order api docs
  • Loading branch information
miguel-evocalize authored May 13, 2024
2 parents 263b643 + 1093293 commit 12c9dc2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
# necessary to get ruby 2.3 to work nicely with bundler vendor/bundle cache
# can remove once ruby 2.3 is no longer supported
- run: gem update --system
### EV: Commenting out since ruby 2.3 support is dropped.
### - run: gem update --system

- run: bundle config set deployment 'true'
- name: bundle install
Expand Down
2 changes: 1 addition & 1 deletion source/includes/_audiences.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ Returns Audience Placeholders and their associated audiences.

### HTTP Request

`GET management/v1/audience
`GET management/v1/audience`

### Request Params

Expand Down
35 changes: 18 additions & 17 deletions source/includes/_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
We return the appropriate HTTP Status code when we return an error. Additionally we do our best to provide a human
readable error message to help you figure out what went wrong.

| Error Code | HTTP Status Code | Meaning |
|---------------------------------------|------------------|--------------------------------------------------------------------|
| EV_BAD_REQUEST_INVALID_FIELDS | 400 | Request is missing required fields or has failed validation check. |
| EV_BAD_REQUEST_TOO_MANY_ITEMS | 400 | Batch request contains too many items. |
| EV_BAD_REQUEST_MALFORMED | 400 | Malformed request, e.g. a type mismatch. |
| EV_BAD_REQUEST_DUPLICATE | 400 | An object with a different id already exists. |
| EV_BAD_REQUEST_INVALID_BUDGET | 400 | The requested budget change is invalid. |
| EV_BAD_REQUEST_INVALID_SCHEDULE | 400 | The requested schedule change is invalid. |
| EV_BAD_REQUEST_INVALID_VARIABLE_VALUE | 400 | The requested variable value change is invalid. |
| EV_OBJECT_NOT_EDITABLE_TEMPORARILY | 400 | The object cannot be edited at the moment. Please try again later. |
| EV_OBJECT_NOT_FOUND | 404 | Unable to locate requested resource. |
| EV_UNAUTHORIZED_INVALID_KEY | 401 | Provided Client Key Id is invalid. |
| EV_UNAUTHORIZED_MISSING_HEADERS | 401 | Request is missing one of the required headers. |
| EV_UNAUTHORIZED_INVALID_SIGNATURE | 401 | Signature provided in `X-Evocalize-Signature` is not valid. |
| EV_UNAUTHORIZED_INVALID_SECRET | 401 | Secret provided in `X-Evocalize-Client-Key` is not valid. |
| EV_UNAUTHORIZED_EXPIRED_REQUEST | 401 | Request timestamp is over 1 minute old. |
| EV_INTERNAL_SERVER_ERROR | 500 | We had a problem with our server. Try again later. |
| Error Code | HTTP Status Code | Meaning |
|---------------------------------------|------------------|-----------------------------------------------------------------------|
| EV_BAD_REQUEST_INVALID_FIELDS | 400 | Request is missing required fields or has failed validation check. |
| EV_BAD_REQUEST_INVALID_USER_IDENTITY | 400 | Request contains an invalid user or group, e.g., user does not exist. |
| EV_BAD_REQUEST_TOO_MANY_ITEMS | 400 | Batch request contains too many items. |
| EV_BAD_REQUEST_MALFORMED | 400 | Malformed request, e.g. a type mismatch. |
| EV_BAD_REQUEST_DUPLICATE | 400 | An object with a different id already exists. |
| EV_BAD_REQUEST_INVALID_BUDGET | 400 | The requested budget change is invalid. |
| EV_BAD_REQUEST_INVALID_SCHEDULE | 400 | The requested schedule change is invalid. |
| EV_BAD_REQUEST_INVALID_VARIABLE_VALUE | 400 | The requested variable value change is invalid. |
| EV_OBJECT_NOT_EDITABLE_TEMPORARILY | 400 | The object cannot be edited at the moment. Please try again later. |
| EV_OBJECT_NOT_FOUND | 404 | Unable to locate requested resource. |
| EV_UNAUTHORIZED_INVALID_KEY | 401 | Provided Client Key Id is invalid. |
| EV_UNAUTHORIZED_MISSING_HEADERS | 401 | Request is missing one of the required headers. |
| EV_UNAUTHORIZED_INVALID_SIGNATURE | 401 | Signature provided in `X-Evocalize-Signature` is not valid. |
| EV_UNAUTHORIZED_INVALID_SECRET | 401 | Secret provided in `X-Evocalize-Client-Key` is not valid. |
| EV_UNAUTHORIZED_EXPIRED_REQUEST | 401 | Request timestamp is over 1 minute old. |
| EV_INTERNAL_SERVER_ERROR | 500 | We had a problem with our server. Try again later. |
13 changes: 11 additions & 2 deletions source/includes/_orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ until the specified monthly budget is exhausted, and renews at the start of each

- `200 OK` - Successfully created the purchase order.
- `400 BAD REQUEST` - Request is malformed or contains invalid data.
- `404 NOT FOUND` - A specified ID does not exist.

## Edit Purchase Order

Expand Down Expand Up @@ -728,6 +727,11 @@ Returns the order information given an order ID.
- `active` - The subscription interval is active.
- `pending` - The subscription interval is pending and processing renewal.

**Response Codes**:

- `200 OK` - Returning the order information.
- `404 NOT FOUND` - The order ID does not exist.

## Get Order Refund Preview By ID

Returns the order refund preview information given an order ID.
Expand Down Expand Up @@ -768,4 +772,9 @@ Returns the order refund preview information given an order ID.
| totalRefund | false | Float | The refund amount of the order after applying fees. |
| cancellationType | false | String | The type of order cancellation which can be `immediate` or `deferred`. |
| daysRemaining | false | Int | The remaining days for this order. |
| nextIntervalPaidAmount | true | String | The future interval amount to be refunded without fee. |
| nextIntervalPaidAmount | true | String | The future interval amount to be refunded without fee. |

**Response Codes**:

- `200 OK` - Returning the refund preview for the order.
- `404 NOT FOUND` - The order ID does not exist.

0 comments on commit 12c9dc2

Please sign in to comment.