-
Notifications
You must be signed in to change notification settings - Fork 115
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
Showing
13 changed files
with
318 additions
and
11 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,3 +1,35 @@ | ||
from . import errors | ||
from .number_insight import NumberInsight | ||
from .requests import ( | ||
AdvancedAsyncInsightRequest, | ||
AdvancedSyncInsightRequest, | ||
BasicInsightRequest, | ||
StandardInsightRequest, | ||
) | ||
from .responses import ( | ||
AdvancedAsyncInsightResponse, | ||
AdvancedSyncInsightResponse, | ||
BasicInsightResponse, | ||
CallerIdentity, | ||
Carrier, | ||
RealTimeData, | ||
RoamingStatus, | ||
StandardInsightResponse, | ||
) | ||
|
||
__all__ = ['NumberInsight'] | ||
__all__ = [ | ||
'NumberInsight', | ||
'BasicInsightRequest', | ||
'StandardInsightRequest', | ||
'AdvancedAsyncInsightRequest', | ||
'AdvancedSyncInsightRequest', | ||
'BasicInsightResponse', | ||
'CallerIdentity', | ||
'Carrier', | ||
'RealTimeData', | ||
'RoamingStatus', | ||
'StandardInsightResponse', | ||
'AdvancedSyncInsightResponse', | ||
'AdvancedAsyncInsightResponse', | ||
'errors', | ||
] |
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,7 @@ | ||
{ | ||
"number": "447700900000", | ||
"remaining_balance": "32.92665294", | ||
"request_id": "434205b5-90ec-4ee2-a337-7b40d9683420", | ||
"request_price": "0.04000000", | ||
"status": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"error_text": "Invalid credentials", | ||
"status": 4 | ||
} |
8 changes: 8 additions & 0 deletions
8
number_insight/tests/data/advanced_async_insight_partial_error.json
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,8 @@ | ||
{ | ||
"error_text": "Live mobile lookup not returned", | ||
"status": 43, | ||
"number": "447700900000", | ||
"remaining_balance": "32.92665294", | ||
"request_id": "434205b5-90ec-4ee2-a337-7b40d9683420", | ||
"request_price": "0.04000000" | ||
} |
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,44 @@ | ||
{ | ||
"caller_identity": { | ||
"caller_name": "John Smith", | ||
"caller_type": "consumer", | ||
"first_name": "John", | ||
"last_name": "Smith", | ||
"subscription_type": "postpaid" | ||
}, | ||
"caller_name": "John Smith", | ||
"caller_type": "consumer", | ||
"country_code": "US", | ||
"country_code_iso3": "USA", | ||
"country_name": "United States of America", | ||
"country_prefix": "1", | ||
"current_carrier": { | ||
"country": "US", | ||
"name": "AT&T Mobility", | ||
"network_code": "310090", | ||
"network_type": "mobile" | ||
}, | ||
"first_name": "John", | ||
"international_format_number": "12345678900", | ||
"ip_warnings": "unknown", | ||
"last_name": "Smith", | ||
"lookup_outcome": 1, | ||
"lookup_outcome_message": "Partial success - some fields populated", | ||
"national_format_number": "(234) 567-8900", | ||
"original_carrier": { | ||
"country": "US", | ||
"name": "AT&T Mobility", | ||
"network_code": "310090", | ||
"network_type": "mobile" | ||
}, | ||
"ported": "not_ported", | ||
"reachable": "unknown", | ||
"refund_price": "0.01025000", | ||
"remaining_balance": "32.68590294", | ||
"request_id": "97e973e7-2e27-4fd3-9e1a-972ea14dd992", | ||
"request_price": "0.05025000", | ||
"roaming": "unknown", | ||
"status": 44, | ||
"status_message": "Lookup Handler unable to handle request", | ||
"valid_number": "valid" | ||
} |
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,36 @@ | ||
{ | ||
"status": 0, | ||
"status_message": "Success", | ||
"request_id": "1d56406b-9d52-497a-a023-b3f40b62f9b3", | ||
"international_format_number": "447700900000", | ||
"national_format_number": "07700 900000", | ||
"country_code": "GB", | ||
"country_code_iso3": "GBR", | ||
"country_name": "United Kingdom", | ||
"country_prefix": "44", | ||
"request_price": "0.00500000", | ||
"remaining_balance": "32.98665294", | ||
"current_carrier": { | ||
"network_code": "23415", | ||
"name": "Vodafone Limited", | ||
"country": "GB", | ||
"network_type": "mobile" | ||
}, | ||
"original_carrier": { | ||
"network_code": "23420", | ||
"name": "Hutchison 3G Ltd", | ||
"country": "GB", | ||
"network_type": "mobile" | ||
}, | ||
"ported": "ported", | ||
"caller_identity": { | ||
"caller_type": "consumer", | ||
"caller_name": "John Smith", | ||
"first_name": "John", | ||
"last_name": "Smith" | ||
}, | ||
"caller_name": "John Smith", | ||
"last_name": "Smith", | ||
"first_name": "John", | ||
"caller_type": "consumer" | ||
} |
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
Oops, something went wrong.