# Path: shippo/api_requestor.py
# def _encode_datetime(dttime):
# def _api_encode(data):
# def _build_api_url(url, query):
#     def __init__(self, key=None, client=None):
#     def request(self, method, url, params=None):
#     def handle_api_error(self, rbody, rcode, resp):
#     def request_raw(self, method, url, params=None):
#     def interpret_response(self, rbody, rcode):
#     def _check_ssl_cert(self):
# class APIRequestor(object):
#     _CERTIFICATE_VERIFIED = False
# 
# Path: shippo/error.py
# class ShippoError(Exception):
# class APIError(ShippoError):
# class APIConnectionError(ShippoError):
# class AddressError(ShippoError):
# class InvalidRequestError(ShippoError):
# class AuthenticationError(ShippoError):
#     def __init__(self, message=None, http_body=None, http_status=None,
#                  json_body=None):
#     def __init__(self, message, param, code, http_body=None,
#                  http_status=None, json_body=None):
#     def __init__(self, message, param, http_body=None,
#                  http_status=None, json_body=None):
# 
# Path: shippo/util.py

# 
# Path: shippo/config.py



import urllib.parse
import sys
import time
import warnings
import shippo.config as config
from shippo import api_requestor, error, util
from shippo.config import rates_req_timeout
    def __str__(self):
        return util.json.dumps(self, sort_keys=True, indent=2)

    @property
    def shippo_id(self):
        return self.id


class APIResource(ShippoObject):

    def refresh(self):
        self.refresh_from(self.request('get', self.instance_url()))
        return self

    @classmethod
    def class_name(cls):
        if cls == APIResource:
            raise NotImplementedError(
                'APIResource is an abstract class.  You should perform '
                'actions on its subclasses (e.g. Address, Parcel)')
        return str(urllib.parse.quote_plus(cls.__name__.lower()))

    @classmethod
    def class_url(cls):
        cls_name = cls.class_name()
        return "/v1/%ss" % (cls_name,)

    def instance_url(self):
        object_id = self.get('object_id')
        if not object_id:

# Path: shippo/api_requestor.py
# def _encode_datetime(dttime):
# def _api_encode(data):
# def _build_api_url(url, query):
#     def __init__(self, key=None, client=None):
#     def request(self, method, url, params=None):
#     def handle_api_error(self, rbody, rcode, resp):
#     def request_raw(self, method, url, params=None):
#     def interpret_response(self, rbody, rcode):
#     def _check_ssl_cert(self):
# class APIRequestor(object):
#     _CERTIFICATE_VERIFIED = False
# 
# Path: shippo/error.py
# class ShippoError(Exception):
# class APIError(ShippoError):
# class APIConnectionError(ShippoError):
# class AddressError(ShippoError):
# class InvalidRequestError(ShippoError):
# class AuthenticationError(ShippoError):
#     def __init__(self, message=None, http_body=None, http_status=None,
#                  json_body=None):
#     def __init__(self, message, param, code, http_body=None,
#                  http_status=None, json_body=None):
#     def __init__(self, message, param, http_body=None,
#                  http_status=None, json_body=None):
# 
# Path: shippo/util.py

# 
# Path: shippo/config.py



# Path: shippo/resource.py
import urllib.parse
import sys
import time
import warnings
import shippo.config as config
from shippo import api_requestor, error, util
from shippo.config import rates_req_timeout

    def __str__(self):
        return util.json.dumps(self, sort_keys=True, indent=2)

    @property
    def shippo_id(self):
        return self.id


class APIResource(ShippoObject):

    def refresh(self):
        self.refresh_from(self.request('get', self.instance_url()))
        return self

    @classmethod
    def class_name(cls):
        if cls == APIResource:
            raise NotImplementedError(
                'APIResource is an abstract class.  You should perform '
                'actions on its subclasses (e.g. Address, Parcel)')
        return str(urllib.parse.quote_plus(cls.__name__.lower()))

    @classmethod
    def class_url(cls):
        cls_name = cls.class_name()
        return "/v1/%ss" % (cls_name,)

    def instance_url(self):
        object_id = self.get('object_id')
        if not object_id:

            raise error.InvalidRequestError(