-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* port platforms * add retrieve_object to reduce duplicated code and validate platforms and users on update and delete * lint * same logic as fast-agave * version * remove duplicated code * bump version
- Loading branch information
1 parent
d4719bd
commit b5f595b
Showing
15 changed files
with
344 additions
and
95 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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1.8' | ||
__version__ = '0.2.0' |
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
__all__ = ['Account', 'Card', 'Transaction', 'File'] | ||
__all__ = ['Account', 'Biller', 'Card', 'Transaction', 'File', 'User'] | ||
|
||
from .accounts import Account | ||
from .billers import Biller | ||
from .cards import Card | ||
from .files import File | ||
from .transactions import Transaction | ||
from .users import User |
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,12 @@ | ||
import datetime as dt | ||
|
||
from mongoengine import DateTimeField, Document, StringField | ||
|
||
from agave.models import BaseModel | ||
from agave.models.helpers import uuid_field | ||
|
||
|
||
class Biller(BaseModel, Document): | ||
id = StringField(primary_key=True, default=uuid_field('BL')) | ||
created_at = DateTimeField(default=dt.datetime.utcnow) | ||
name = StringField(required=True) |
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,13 @@ | ||
import datetime as dt | ||
|
||
from mongoengine import DateTimeField, Document, StringField | ||
|
||
from agave.models import BaseModel | ||
from agave.models.helpers import uuid_field | ||
|
||
|
||
class User(BaseModel, Document): | ||
id = StringField(primary_key=True, default=uuid_field('US')) | ||
created_at = DateTimeField(default=dt.datetime.utcnow) | ||
name = StringField(required=True) | ||
platform_id = StringField(required=True) |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
__all__ = ['app', 'Account', 'Card', 'File', 'Transaction'] | ||
__all__ = ['app', 'Account', 'Biller', 'Card', 'File', 'Transaction', 'User'] | ||
|
||
from .accounts import Account | ||
from .base import app | ||
from .billers import Biller | ||
from .cards import Card | ||
from .files import File | ||
from .transactions import Transaction | ||
from .users import User |
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,12 @@ | ||
from agave.filters import generic_query | ||
|
||
from ..models import Biller as BillerModel | ||
from ..validators import BillerQuery | ||
from .base import app | ||
|
||
|
||
@app.resource('/billers') | ||
class Biller: | ||
model = BillerModel | ||
query_validator = BillerQuery | ||
get_query_filter = generic_query |
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,12 @@ | ||
from agave.filters import generic_query | ||
|
||
from ..models import User as UserModel | ||
from ..validators import UserQuery | ||
from .base import app | ||
|
||
|
||
@app.resource('/users') | ||
class User: | ||
model = UserModel | ||
query_validator = UserQuery | ||
get_query_filter = generic_query |
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,4 @@ | ||
TEST_DEFAULT_USER_ID = 'US123456789' | ||
TEST_DEFAULT_PLATFORM_ID = 'PT123456' | ||
TEST_SECOND_USER_ID = 'US987654321' | ||
TEST_SECOND_PLATFORM_ID = 'PT987654321' |
Oops, something went wrong.