Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added doc for GET /approver/mileage_rates #565

Merged
merged 4 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions reference/approver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3134,6 +3134,46 @@ components:
type: number
example: 10
description: Amount per night
mileage_rate_out:
type: object
additionalProperties: false
properties:
id:
$ref: '#/components/schemas/id_integer'
org_id:
$ref: '#/components/schemas/org_id'
created_at:
$ref: '#/components/schemas/created_at'
updated_at:
$ref: '#/components/schemas/updated_at'
unit:
type: string
enum:
- KM
- MILES
vehicle_type:
type: string
example: Audi
rate:
type: number
example: 10
nullable: true
description: Amount (in Home currency) per unit.
slab_rates:
type: array
items:
type: object
properties:
rate:
type: number
nullable: true
limit:
type: number
nullable: true
is_enabled:
$ref: '#/components/schemas/is_enabled'
code:
$ref: '#/components/schemas/code'
expense_policy_rule_embed:
type: object
additionalProperties: false
Expand Down Expand Up @@ -4195,6 +4235,9 @@ tags:
- name: Projects
description: |
These APIs gives you access to manage your organisation's Projects
- name: Mileage Rates
description: |
This API gives you access to your organisation's Mileage Rates
- name: Reports
description: |
This API gives you access to your organisation's Expense Reports
Expand Down Expand Up @@ -5422,6 +5465,42 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/401'
/approver/mileage_rates:
get:
tags:
- Mileage Rates
summary: List mileage rates
operationId: mileage_rates_list
description: |
This API supports very rich filtering on all response fields and pagination via query parameters. To understand how to use these parameters, please see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering)
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
count:
$ref: '#/components/schemas/count'
offset:
$ref: '#/components/schemas/offset'
data:
type: array
items:
$ref: '#/components/schemas/mileage_rate_out'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/400'
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/401'
/approver/expense_policy_states:
get:
tags:
Expand Down
5 changes: 5 additions & 0 deletions src/approver/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ tags:
- name: Projects
description: |
These APIs gives you access to manage your organisation's Projects
- name: Mileage Rates
description: |
This API gives you access to your organisation's Mileage Rates
- name: Reports
description: |
This API gives you access to your organisation's Expense Reports
Expand Down Expand Up @@ -103,6 +106,8 @@ paths:
$ref: paths/approver@cost_centers.yaml
/approver/per_diem_rates:
$ref: paths/approver@per_diem_rates.yaml
/approver/mileage_rates:
$ref: paths/approver@mileage_rates.yaml


# /approver/suggestions/corporate_card_transactions:
Expand Down
35 changes: 35 additions & 0 deletions src/approver/paths/approver@mileage_rates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
get:
tags:
- Mileage Rates
summary: List mileage rates
operationId: mileage_rates_list
description: |
This API supports very rich filtering on all response fields and pagination via query parameters. To understand how to use these parameters, please see the [Guide to Data APIs](https://docs.fylehq.com/docs/fyle-platform-docs/ZG9jOjI3Mzk2NTM3-guide-to-data-ap-is#filtering)
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
count:
$ref: ../../components/schemas/count.yaml
offset:
$ref: ../../components/schemas/offset.yaml
data:
type: array
items:
$ref: ../../components/schemas/mileage_rate.yaml#/mileage_rate_out
'400':
description: Bad request
content:
application/json:
schema:
$ref: ../../components/schemas/400.yaml
'401':
description: Unauthorized request
content:
application/json:
schema:
$ref: ../../components/schemas/401.yaml