Skip to content

Commit

Permalink
Changes for adding support for expense creation from receipt upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikeyrajvaidya authored Apr 27, 2022
1 parent b1bc6be commit 1b46dc1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fyle/platform/apis/v1beta/spender/expenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ class Expenses(ListResources, ListAllResources, PostResources):

EXPENSES = '/expenses'
ATTACH_RECEIPT = '/expenses/attach_receipt'
CREATE_FROM_RECEIPT = '/expenses/create_from_receipt'

def attach_receipt(self, payload):
return self.api.make_post_request(
api_url=Expenses.ATTACH_RECEIPT,
payload=payload
)

def create_expense_from_receipt(self, payload):
return self.api.make_post_request(
api_url=Expenses.CREATE_FROM_RECEIPT,
payload=payload
)

def __init__(self, version, role):
super().__init__(version, role, Expenses.EXPENSES)

Expand Down

0 comments on commit 1b46dc1

Please sign in to comment.