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: Additional fields POST /<role>/expenses #552

Merged
merged 4 commits into from
Oct 10, 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
68 changes: 67 additions & 1 deletion reference/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4158,7 +4158,36 @@ components:
minItems: 0
maxItems: 10
items:
$ref: '#/components/schemas/location'
type: object
nullable: true
properties:
city:
type: string
nullable: true
example: London
state:
type: string
nullable: true
example: London
display:
type: string
nullable: true
country:
type: string
nullable: true
example: United Kingdom
formatted_address:
type: string
nullable: true
example: 221 Baker St, Marylebone, London, United Kingdom
latitude:
type: number
nullable: true
example: 12.971599
longitude:
type: number
nullable: true
example: 77.594566
admin_expense_in:
type: object
additionalProperties: false
Expand Down Expand Up @@ -4210,6 +4239,8 @@ components:
- Admins can't assign the expense to self.
source:
$ref: '#/components/schemas/source'
code:
$ref: '#/components/schemas/code'
merchant:
$ref: '#/components/schemas/merchant'
foreign_currency:
Expand Down Expand Up @@ -4281,6 +4312,41 @@ components:
List of file ids to attach to the expense. <br>
To add new files to the expense, send the list of file ids to be attached. <br>
To remove files from the expense, send the list of all file ids except which you want to remove. <br>
hotel_is_breakfast_provided:
type: boolean
nullable: true
description: |
This field is applicable for only `Hotel` category.
mileage_rate_id:
allOf:
- $ref: '#/components/schemas/fk_integer'
description: |
Specific to mileage expense. This represents the Mileage's rate id given by Fyle
during creation of mileage rate for which this expense is created.
nullable: true
example: 9080
mileage_is_round_trip:
type: boolean
nullable: true
description: Flag stating whether this was a round trip or not.
commute_details_id:
type: integer
nullable: true
description: |
Commute details id of the expense. This id is provided by Fyle to identify a commute details.
example: 1234
commute_deduction:
type: string
nullable: true
maxLength: 12
description: |
Commute deduction type of the expense.
example: ONE_WAY
enum:
- ONE_WAY
- ROUND_TRIP
- NO_DEDUCTION
- null
expenses_in:
type: array
additionalProperties: false
Expand Down
77 changes: 76 additions & 1 deletion reference/approver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2399,7 +2399,36 @@ components:
minItems: 0
maxItems: 10
items:
$ref: '#/components/schemas/location'
type: object
nullable: true
properties:
city:
type: string
nullable: true
example: London
state:
type: string
nullable: true
example: London
display:
type: string
nullable: true
country:
type: string
nullable: true
example: United Kingdom
formatted_address:
type: string
nullable: true
example: 221 Baker St, Marylebone, London, United Kingdom
latitude:
type: number
nullable: true
example: 12.971599
longitude:
type: number
nullable: true
example: 77.594566
custom_fields:
type: array
description: |
Expand Down Expand Up @@ -2437,6 +2466,8 @@ components:
example: '2020-06-01T01:18:19.292-08:00'
source:
$ref: '#/components/schemas/source'
code:
$ref: '#/components/schemas/code'
merchant:
$ref: '#/components/schemas/merchant'
foreign_currency:
Expand Down Expand Up @@ -2499,6 +2530,50 @@ components:
$ref: '#/components/schemas/locations'
custom_fields:
$ref: '#/components/schemas/custom_fields'
file_ids:
type: array
items:
allOf:
- $ref: '#/components/schemas/fk_string'
description: |
List of file ids to attach to the expense. <br>
To add new files to the expense, send the list of file ids to be attached. <br>
To remove files from the expense, send the list of all file ids except which you want to remove. <br>
hotel_is_breakfast_provided:
type: boolean
nullable: true
description: |
This field is applicable for only `Hotel` category.
mileage_rate_id:
allOf:
- $ref: '#/components/schemas/fk_integer'
description: |
Specific to mileage expense. This represents the Mileage's rate id given by Fyle
during creation of mileage rate for which this expense is created.
nullable: true
example: 9080
mileage_is_round_trip:
type: boolean
nullable: true
description: Flag stating whether this was a round trip or not.
commute_details_id:
type: integer
nullable: true
description: |
Commute details id of the expense. This id is provided by Fyle to identify a commute details.
example: 1234
commute_deduction:
type: string
nullable: true
maxLength: 12
description: |
Commute deduction type of the expense.
example: ONE_WAY
enum:
- ONE_WAY
- ROUND_TRIP
- NO_DEDUCTION
- null
expenses_in:
type: array
additionalProperties: false
Expand Down
68 changes: 67 additions & 1 deletion reference/spender.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2244,7 +2244,36 @@ components:
minItems: 0
maxItems: 10
items:
$ref: '#/components/schemas/location'
type: object
nullable: true
properties:
city:
type: string
nullable: true
example: London
state:
type: string
nullable: true
example: London
display:
type: string
nullable: true
country:
type: string
nullable: true
example: United Kingdom
formatted_address:
type: string
nullable: true
example: 221 Baker St, Marylebone, London, United Kingdom
latitude:
type: number
nullable: true
example: 12.971599
longitude:
type: number
nullable: true
example: 77.594566
custom_fields:
type: array
description: |
Expand All @@ -2269,6 +2298,8 @@ components:
This field is not required for creating Per Diem Expenses
source:
$ref: '#/components/schemas/source'
code:
$ref: '#/components/schemas/code'
merchant:
$ref: '#/components/schemas/merchant'
foreign_currency:
Expand Down Expand Up @@ -2379,6 +2410,41 @@ components:
List of file ids to attach to the expense. <br>
To add new files to the expense, send the list of file ids to be attached. <br>
To remove files from the expense, send the list of all file ids except which you want to remove. <br>
hotel_is_breakfast_provided:
type: boolean
nullable: true
description: |
This field is applicable for only `Hotel` category.
mileage_rate_id:
allOf:
- $ref: '#/components/schemas/fk_integer'
description: |
Specific to mileage expense. This represents the Mileage's rate id given by Fyle
during creation of mileage rate for which this expense is created.
nullable: true
example: 9080
mileage_is_round_trip:
type: boolean
nullable: true
description: Flag stating whether this was a round trip or not.
commute_details_id:
type: integer
nullable: true
description: |
Commute details id of the expense. This id is provided by Fyle to identify a commute details.
example: 1234
commute_deduction:
type: string
nullable: true
maxLength: 12
description: |
Commute deduction type of the expense.
example: ONE_WAY
enum:
- ONE_WAY
- ROUND_TRIP
- NO_DEDUCTION
- null
expense_add_comment_action_in:
type: object
required:
Expand Down
Loading
Loading