# Path: async_v20/endpoints/base.py
# class EndPoint(object):
#     """Base object representation of an endpoint"""
# 
#     # Default host to use unless otherwise specified by a derived class
#     host = 'REST'
# 
#     # Path needs to be a Path object
#     path = ()
# 
#     # the HTTP verb to use for this endpoint
#     method = ''
# 
#     # description of endpoint
#     description = ''
# 
#     # parameters required to send to endpoint
#     parameters = {}
# 
#     # valid responses
#     responses = {}
# 
#     # error msgs'
#     error = ()
# 
#     # json format the data body as per the response_schema below
#     request_schema = {}
# 
# HEADER = 'header'
# 
# PATH = 'path'
# 
# QUERY = 'query'


from .annotations import *
from .base import EndPoint, HEADER, PATH, QUERY
from ..definitions.primitives import *
from ..definitions.types import *

    # valid responses
    responses = {200: {'tradeClientExtensionsModifyTransaction': TradeClientExtensionsModifyTransaction,
                       'relatedTransactionIDs': ArrayTransactionID, 'lastTransactionID': TransactionID},
                 400: {'tradeClientExtensionsModifyRejectTransaction': TradeClientExtensionsModifyRejectTransaction,
                       'lastTransactionID': TransactionID, 'relatedTransactionIDs': ArrayTransactionID,
                       'errorCode': str, 'errorMessage': str},
                 404: {'tradeClientExtensionsModifyRejectTransaction': TradeClientExtensionsModifyRejectTransaction,
                       'lastTransactionID': TransactionID, 'relatedTransactionIDs': ArrayTransactionID,
                       'errorCode': str, 'errorMessage': str}}

    # error msgs'
    error = (401, 405)

    # json schema representation
    request_schema = {ClientExtensions: 'clientExtensions'}


class PUTTradesSpecifierOrders(EndPoint):
    # the HTTP verb to use for this endpoint
    method = 'PUT'

    # path to endpoint
    path = ('/v3/accounts/', AccountID, '/trades/', TradeSpecifier, '/orders')

    # description of endpoint
    description = 'Create, replace and cancel a Trade’s dependent Orders ' \
                  '(Take Profit, Stop Loss and Trailing Stop Loss) through the Trade itself'

    # parameters required to send to endpoint

# Path: async_v20/endpoints/base.py
# class EndPoint(object):
#     """Base object representation of an endpoint"""
# 
#     # Default host to use unless otherwise specified by a derived class
#     host = 'REST'
# 
#     # Path needs to be a Path object
#     path = ()
# 
#     # the HTTP verb to use for this endpoint
#     method = ''
# 
#     # description of endpoint
#     description = ''
# 
#     # parameters required to send to endpoint
#     parameters = {}
# 
#     # valid responses
#     responses = {}
# 
#     # error msgs'
#     error = ()
# 
#     # json format the data body as per the response_schema below
#     request_schema = {}
# 
# HEADER = 'header'
# 
# PATH = 'path'
# 
# QUERY = 'query'


# Path: async_v20/endpoints/trade.py
from .annotations import *
from .base import EndPoint, HEADER, PATH, QUERY
from ..definitions.primitives import *
from ..definitions.types import *


    # valid responses
    responses = {200: {'tradeClientExtensionsModifyTransaction': TradeClientExtensionsModifyTransaction,
                       'relatedTransactionIDs': ArrayTransactionID, 'lastTransactionID': TransactionID},
                 400: {'tradeClientExtensionsModifyRejectTransaction': TradeClientExtensionsModifyRejectTransaction,
                       'lastTransactionID': TransactionID, 'relatedTransactionIDs': ArrayTransactionID,
                       'errorCode': str, 'errorMessage': str},
                 404: {'tradeClientExtensionsModifyRejectTransaction': TradeClientExtensionsModifyRejectTransaction,
                       'lastTransactionID': TransactionID, 'relatedTransactionIDs': ArrayTransactionID,
                       'errorCode': str, 'errorMessage': str}}

    # error msgs'
    error = (401, 405)

    # json schema representation
    request_schema = {ClientExtensions: 'clientExtensions'}


class PUTTradesSpecifierOrders(EndPoint):
    # the HTTP verb to use for this endpoint
    method = 'PUT'

    # path to endpoint
    path = ('/v3/accounts/', AccountID, '/trades/', TradeSpecifier, '/orders')

    # description of endpoint
    description = 'Create, replace and cancel a Trade’s dependent Orders ' \
                  '(Take Profit, Stop Loss and Trailing Stop Loss) through the Trade itself'

    # parameters required to send to endpoint

    parameters = {Authorization: (HEADER, 'Authorization'), AcceptDatetimeFormat: (HEADER, 'Accept-Datetime-Format'),