-
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.
- Loading branch information
1 parent
7267018
commit 3c80cae
Showing
10 changed files
with
175 additions
and
0 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 +1,7 @@ | ||
from .contact import Contact # noqa: F401 | ||
from .invoice.py 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 | ||
|
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,46 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class Invoice(BaseModel): | ||
class Meta: | ||
path = "billing/invoices" | ||
type = "invoices" | ||
|
||
account = RelationField("account") | ||
originated_destinations = RelationField("originated-destinations") | ||
originated_networks = RelationField("originated-networks") | ||
terminated_destinations = RelationField("terminated-destinations") | ||
terminated_networks = RelationField("terminated-networks") | ||
|
||
reference = AttributeField("reference") | ||
state = AttributeField("state") | ||
invoice_type = AttributeField("invoice-type") | ||
start_date = AttributeField("start-date") | ||
end_date = AttributeField("end-date") | ||
amount_spent = AttributeField("amount-spent") | ||
amount_earned = AttributeField("amount-earned") | ||
|
||
originated_amount_spent = AttributeField("originated-amount-spent") | ||
originated_amount_earned = AttributeField("originated-amount-earned") | ||
originated_calls_count = AttributeField("originated-calls-count") | ||
originated_successful_calls_count = AttributeField("originated-successful-calls-count") | ||
originated_calls_duration = AttributeField("originated-calls-duration") | ||
originated_billing_duration = AttributeField("originated-billing-duration") | ||
originated_first_call_at = AttributeField("originated-first-call-at") | ||
originated_last_call_at = AttributeField("originated-last-call-at") | ||
|
||
terminated_amount_spent = AttributeField("terminated-amount-spent") | ||
terminated_amount_earned = AttributeField("terminated-amount-earned") | ||
terminated_calls_count = AttributeField("terminated-calls-count") | ||
terminated_successful_calls_count = AttributeField("terminated-successful-calls-count") | ||
terminated_calls_duration = AttributeField("terminated-calls-duration") | ||
terminated_billing_duration = AttributeField("terminated-billing-duration") | ||
terminated_first_call_at = AttributeField("terminated-first-call-at") | ||
terminated_last_call_at = AttributeField("terminated-last-call-at") | ||
|
||
def creatable_fields(self): | ||
return [ | ||
"account", | ||
"start_date", | ||
"end_date" | ||
] |
23 changes: 23 additions & 0 deletions
23
yeti_switch_api/orm/billing/invoice_originated_destination.py
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,23 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class InvoiceOriginatedDestination(BaseModel): | ||
class Meta: | ||
path = "billing/invoice-originated-destinations" | ||
type = "invoice-originated-destinations" | ||
|
||
invoice = RelationField("invoice") | ||
country = RelationField("country") | ||
network = RelationField("network") | ||
|
||
amount = AttributeField("amount") | ||
billing_duration = AttributeField("billing-duration") | ||
calls_count = AttributeField("calls-count") | ||
successful_calls_count = AttributeField("successful-calls-count") | ||
calls_duration = AttributeField("calls-duration") | ||
dst_prefix = AttributeField("dst-prefix") | ||
first_call_at = AttributeField("first-call-at") | ||
last_call_at = AttributeField("last-call-at") | ||
rate = AttributeField("rate") | ||
spent = AttributeField("spent") | ||
|
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,22 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class InvoiceOriginatedNetwork(BaseModel): | ||
class Meta: | ||
path = "billing/invoice-originated-networks" | ||
type = "invoice-originated-networks" | ||
|
||
invoice = RelationField("invoice") | ||
country = RelationField("country") | ||
network = RelationField("network") | ||
|
||
amount = AttributeField("amount") | ||
billing_duration = AttributeField("billing-duration") | ||
calls_count = AttributeField("calls-count") | ||
successful_calls_count = AttributeField("successful-calls-count") | ||
calls_duration = AttributeField("calls-duration") | ||
first_call_at = AttributeField("first-call-at") | ||
last_call_at = AttributeField("last-call-at") | ||
rate = AttributeField("rate") | ||
spent = AttributeField("spent") | ||
|
23 changes: 23 additions & 0 deletions
23
yeti_switch_api/orm/billing/invoice_terminated_destination.py
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,23 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class InvoiceTerminatedDestination(BaseModel): | ||
class Meta: | ||
path = "billing/invoice-terminated-destinations" | ||
type = "invoice-terminated-destinations" | ||
|
||
invoice = RelationField("invoice") | ||
country = RelationField("country") | ||
network = RelationField("network") | ||
|
||
amount = AttributeField("amount") | ||
billing_duration = AttributeField("billing-duration") | ||
calls_count = AttributeField("calls-count") | ||
successful_calls_count = AttributeField("successful-calls-count") | ||
calls_duration = AttributeField("calls-duration") | ||
dst_prefix = AttributeField("dst-prefix") | ||
first_call_at = AttributeField("first-call-at") | ||
last_call_at = AttributeField("last-call-at") | ||
rate = AttributeField("rate") | ||
spent = AttributeField("spent") | ||
|
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,22 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField | ||
|
||
|
||
class InvoiceTerminatedNetwork(BaseModel): | ||
class Meta: | ||
path = "billing/invoice-terminated-networks" | ||
type = "invoice-terminated-networks" | ||
|
||
invoice = RelationField("invoice") | ||
country = RelationField("country") | ||
network = RelationField("network") | ||
|
||
amount = AttributeField("amount") | ||
billing_duration = AttributeField("billing-duration") | ||
calls_count = AttributeField("calls-count") | ||
successful_calls_count = AttributeField("successful-calls-count") | ||
calls_duration = AttributeField("calls-duration") | ||
first_call_at = AttributeField("first-call-at") | ||
last_call_at = AttributeField("last-call-at") | ||
rate = AttributeField("rate") | ||
spent = AttributeField("spent") | ||
|
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,4 @@ | ||
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,11 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField # noqa: F401 | ||
|
||
|
||
class Country(BaseModel): | ||
class Meta: | ||
path = "system/countries" | ||
type = "countries" | ||
|
||
name = AttributeField("name") | ||
host = AttributeField("iso2") | ||
|
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,10 @@ | ||
from ..base_model import BaseModel, AttributeField, RelationField # noqa: F401 | ||
|
||
|
||
class Network(BaseModel): | ||
class Meta: | ||
path = "system/networks" | ||
type = "networks" | ||
|
||
name = AttributeField("name") | ||
type = RelationField("network-type") |
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 NetworkType(BaseModel): | ||
class Meta: | ||
path = "system/network-types" | ||
type = "network-types" | ||
|
||
name = AttributeField("name") |