How to use the recurly.Resource function in recurly

To help you get started, we’ve selected a few recurly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github recurly / recurly-client-python / tests / test_resource.py View on Github external
def cast(obj, class_name=None, resp=None):
    return Resource.cast_json(obj, class_name, resp)
github recurly / recurly-client-python / tests / mock_resources.py View on Github external
"my_bool": bool,
        "my_datetime": datetime,
        "my_sub_resource": "MySubResource",
        "my_sub_resources": ["MySubResource"],
    }


class MySubResource(Resource):
    schema = {"object": str, "my_string": str}


class Error(Resource):
    schema = {"object": str, "message": str, "params": list, "type": str}


class Empty(Resource):
    schema = {}
github recurly / recurly-client-python / tests / mock_resources.py View on Github external
from recurly import Resource
import datetime


class MyResource(Resource):
    schema = {
        "object": str,
        "my_string": str,
        "my_int": int,
        "my_float": float,
        "my_bool": bool,
        "my_datetime": datetime,
        "my_sub_resource": "MySubResource",
        "my_sub_resources": ["MySubResource"],
    }


class MySubResource(Resource):
    schema = {"object": str, "my_string": str}
github recurly / recurly-client-python / tests / mock_resources.py View on Github external
"object": str,
        "my_string": str,
        "my_int": int,
        "my_float": float,
        "my_bool": bool,
        "my_datetime": datetime,
        "my_sub_resource": "MySubResource",
        "my_sub_resources": ["MySubResource"],
    }


class MySubResource(Resource):
    schema = {"object": str, "my_string": str}


class Error(Resource):
    schema = {"object": str, "message": str, "params": list, "type": str}


class Empty(Resource):
    schema = {}
github recurly / recurly-client-python / tests / mock_resources.py View on Github external
class MyResource(Resource):
    schema = {
        "object": str,
        "my_string": str,
        "my_int": int,
        "my_float": float,
        "my_bool": bool,
        "my_datetime": datetime,
        "my_sub_resource": "MySubResource",
        "my_sub_resources": ["MySubResource"],
    }


class MySubResource(Resource):
    schema = {"object": str, "my_string": str}


class Error(Resource):
    schema = {"object": str, "message": str, "params": list, "type": str}


class Empty(Resource):
    schema = {}
github recurly / recurly-client-python / recurly / js.py View on Github external
def fetch(token):
    url = urljoin(recurly.base_uri(), 'recurly_js/result/%s' % token)
    resp, elem = recurly.Resource.element_for_url(url)
    cls = recurly.Resource.value_for_element(elem)
    return cls.from_element(elem)
github recurly / recurly-client-python / recurly / js.py View on Github external
def fetch(token):
    url = urljoin(recurly.base_uri(), 'recurly_js/result/%s' % token)
    resp, elem = recurly.Resource.element_for_url(url)
    cls = recurly.Resource.value_for_element(elem)
    return cls.from_element(elem)