-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shreyansh
committed
Dec 7, 2020
1 parent
ddd6e31
commit 4e869ea
Showing
11 changed files
with
120 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
V1 Admin Advance Requests Stats | ||
""" | ||
|
||
from ....internals.get_resources import GetResources | ||
|
||
|
||
class AdvanceRequestsStats(GetResources): | ||
"""Class for Advance Requests Stats APIs.""" | ||
|
||
ADVANCE_REQUESTS_STATS = '/advance_requests_stats' | ||
|
||
def __init__(self, version, role): | ||
super().__init__(version, role, AdvanceRequestsStats.ADVANCE_REQUESTS_STATS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
V1 Admin Expense Comments | ||
""" | ||
|
||
from ....internals.post_resources import PostResources | ||
|
||
|
||
class ExpenseComments(PostResources): | ||
"""Class for Expense Comments APIs.""" | ||
|
||
EXPENSE_COMMENT = '/expense_comments' | ||
|
||
def __init__(self, version, role): | ||
super().__init__(version, role, ExpenseComments.EXPENSE_COMMENT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
V1 Admin Expense Stats | ||
""" | ||
|
||
from ....internals.get_resources import GetResources | ||
|
||
|
||
class ExpenseStats(GetResources): | ||
"""Class for Expense Stats APIs.""" | ||
|
||
EXPENSE_STATS = '/expense_stats' | ||
|
||
def __init__(self, version, role): | ||
super().__init__(version, role, ExpenseStats.EXPENSE_STATS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
V1 Admin Policy | ||
""" | ||
|
||
from typing import Dict | ||
|
||
from ....internals.api_base import ApiBase | ||
|
||
|
||
class Policy: | ||
"""Class for Policy APIs.""" | ||
|
||
TEST_POLICY = '/policy_test' | ||
|
||
def __init__(self, version, role): | ||
self.version = version | ||
self.role = role | ||
|
||
def test(self, payload) -> Dict: | ||
""" | ||
Test's Policy against an expense | ||
:param payload: Expense Object | ||
:return: Policy Test Object | ||
""" | ||
api = ApiBase(self.version, self.role) | ||
|
||
return api.make_post_request( | ||
api_url=Policy.TEST_POLICY, | ||
payload=payload | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
V1 Admin Report Stats | ||
""" | ||
|
||
from ....internals.get_resources import GetResources | ||
|
||
|
||
class ReportStats(GetResources): | ||
"""Class for Report Stats APIs.""" | ||
|
||
REPORT_STATS = '/report_stats' | ||
|
||
def __init__(self, version, role): | ||
super().__init__(version, role, ReportStats.REPORT_STATS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
V1 Admin Trip Requests Stats | ||
""" | ||
|
||
from ....internals.get_resources import GetResources | ||
|
||
|
||
class TripRequestsStats(GetResources): | ||
"""Class for Trip Requests Stats APIs.""" | ||
|
||
TRIP_REQUESTS_STATS = '/trip_requests_stats' | ||
|
||
def __init__(self, version, role): | ||
super().__init__(version, role, TripRequestsStats.TRIP_REQUESTS_STATS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name='fyle', | ||
version='0.1.2-beta', | ||
version='0.1.3-beta', | ||
author='Siva Narayanan', | ||
author_email='[email protected]', | ||
description='Python SDK for accessing Fyle Platform APIs', | ||
|