-
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.
Add more API objects. Switch to new API format (#8)
* add more API objects * switch to new API format
- Loading branch information
1 parent
23ef0c0
commit fdb7d2b
Showing
25 changed files
with
150 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
from .orm_client import OrmClient # noqa: F401 | ||
from .contractor import Contractor # noqa: F401 | ||
from .contact import Contact # noqa: F401 | ||
from .account import Account # noqa: F401 | ||
from .invoice import Invoice # noqa: F401 | ||
from .invoice_originated_destination import InvoiceOriginatedDestination # noqa: F401 | ||
from .invoice_originated_network import InvoiceOriginatedNetwork # noqa: F401 | ||
from .invoice_terminated_destination import InvoiceTerminatedDestination # noqa: F401 | ||
from .invoice_terminated_network import InvoiceTerminatedNetwork # noqa: F401 | ||
|
||
from .customers_auth import CustomersAuth # noqa: F401 | ||
from .dialpeer import Dialpeer # noqa: F401 | ||
from .numberlist import Numberlist # noqa: F401 | ||
from .numberlist_item import NumberlistItem # noqa: F401 | ||
from .rateplan import Rateplan # noqa: F401 | ||
from .routing_tag import RoutingTag # noqa: F401 | ||
|
||
from .gateway import Gateway # noqa: F401 | ||
from .gateway_group import GatewayGroup # noqa: F401 | ||
|
||
from .pop import Pop # noqa: F401 | ||
from .smtp_connection import SmtpConnection # noqa: F401 | ||
from .country import Country # noqa: F401 | ||
from .network import Network # noqa: F401 | ||
from .network_type import NetworkType # noqa: F401 |
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,17 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class Account(BaseModel): | ||
class Meta: | ||
path = "accounts" | ||
type = "account" | ||
|
||
contractor = RelationField("contractor") | ||
|
||
name = AttributeField("name") | ||
balance = AttributeField("balance") | ||
min_balance = AttributeField("min-balance") | ||
max_balance = AttributeField("max-balance") | ||
|
||
def creatable_fields(self): | ||
return ["contractor", "min_balace", "max_balance"] |
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
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,41 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class Gateway(BaseModel): | ||
class Meta: | ||
path = "gateways" | ||
type = "gateways" | ||
|
||
contractor = RelationField("contractor") | ||
gateway_group = RelationField("gateway-group") | ||
pop = RelationField("pop") | ||
|
||
name = AttributeField("name") | ||
enabled = AttributeField("enabled") | ||
priority = AttributeField("priority") | ||
weight = AttributeField("weight") | ||
allow_origination = AttributeField("allow-origination") | ||
allow_termination = AttributeField("allow-termination") | ||
host = AttributeField("host") | ||
port = AttributeField("port") | ||
registered_aor_mode = AttributeField("registered-aor-mode-id") | ||
|
||
REGISTERED_AOR_MODE_DISABLE = 1 | ||
REGISTERED_AOR_MODE_AS_IS = 2 | ||
REGISTERED_AOR_MODE_REPLACE_USEPART = 3 | ||
|
||
def creatable_fields(self): | ||
return [ | ||
"contractor", | ||
"gateway-group", | ||
"pop", | ||
"name", | ||
"enabled", | ||
"priority", | ||
"weight", | ||
"allow-origination", | ||
"allow-termination", | ||
"host", | ||
"port", | ||
"registered-aor-mode-id", | ||
] |
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,11 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class GatewayGroup(BaseModel): | ||
class Meta: | ||
path = "gateway-groups" | ||
type = "gateway-groups" | ||
|
||
vendor = RelationField("vendor") | ||
|
||
name = AttributeField("name") |
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
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
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
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,9 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField # noqa: F401 | ||
|
||
|
||
class Pop(BaseModel): | ||
class Meta: | ||
path = "pops" | ||
type = "pops" | ||
|
||
name = AttributeField("name") |
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.