cobrand_login = {
    'applicationId': '123AW47RQ6#R7FAS657G6878',
    'cobrandId': 1,
    'locale': 'en_US',
    'session': {'cobSession': '12345687890'}
}

user_login = {
    'user': {
        'id': 1,
        'loginName': 'user_name',
        'name': {'first': 'John', 'last': 'Doe'},
        'preferences': {'currency': 'USD',
                        'dateFormat': 'MM/dd/yyyy',
                        'timeZone': 'PST'},
        'session': {'userSession': '12345687890'}
    }
}

accounts = {'account': [
    {'CONTAINER': 'creditCard',
     'accountName': 'Citi Double Cash Card',
     'accountNumber': 'xxxx0000',
     'accountStatus': 'ACTIVE',
     'accountType': 'CREDIT',
     'amountDue': {'amount': 287.22, 'currency': 'USD'},
     'availableCredit': {'amount': 5425.5, 'currency': 'USD'},
     'balance': {'amount': 553.6, 'currency': 'USD'},
     'dueDate': '2016-10-21',
     'holderProfile': [{'name': {'displayed': 'Captain'}}],
     'id': 1,
     'includeInNetWorth': True,
     'isAsset': False,
     'isManual': False,
     'createdDate': '2016-09-30T17:07:26Z',
     'lastUpdated': '2016-09-30T17:07:26Z',
     'minimumAmountDue': {'amount': 0, 'currency': 'USD'},
     'providerAccountId': 10139863,
     'providerId': '1603',
     'providerName': 'Citibank (online.citibank.com)',
     'refreshinfo': {'lastRefreshAttempt': '2016-09-30T17:07:26Z',
                     'lastRefreshed': '2016-09-30T17:07:26Z',
                     'nextRefreshScheduled': '2016-10-01T22:52:01Z',
                     'statusCode': 0,
                     'statusMessage': 'OK'},
     'totalCreditLine': {'amount': 6000, 'currency': 'USD'},
     'url': 'BILL_VALID'},
    {'CONTAINER': 'bill',
     'accountNumber': 'xxxx0146',
     'accountStatus': 'ACTIVE',
     'accountType': 'UTILITY',
     'amountDue': {'amount': 53.17, 'currency': 'USD'},
     'balance': {'amount': 53.17, 'currency': 'USD'},
     'dueDate': '2016-10-15',
     'id': 2,
     'isAsset': False,
     'isManual': False,
     'createdDate': '2016-09-29T17:28:41Z',
     'lastUpdated': '2016-09-29T17:28:41Z',
     'providerAccountId': 10139712,
     'providerId': '6437',
     'providerName': 'Eversource',
     'refreshinfo': {'lastRefreshAttempt': '2016-09-29T17:28:41Z',
                     'lastRefreshed': '2016-09-29T17:28:41Z',
                     'nextRefreshScheduled': '2016-10-03T21:36:40Z',
                     'statusCode': 0,
                     'statusMessage': 'OK'},
     'url': 'BILL_VALID'},
    {'CONTAINER': 'bank',
     'accountName': 'Online Savings Account',
     'accountNumber': 'xxxx0000',
     'accountStatus': 'ACTIVE',
     'accountType': 'SAVINGS',
     'availableBalance': {'amount': 3511.93,
                          'currency': 'USD'},
     'balance': {'amount': 3511.93, 'currency': 'USD'},
     'currentBalance': {'amount': 3511.93, 'currency': 'USD'},
     'holderProfile': [{'name': {'displayed': 'Captain Contrast'}}],
     'id': 3,
     'includeInNetWorth': True,
     'interestRate': 0.9951,
     'isAsset': True,
     'isManual': False,
     'createdDate': '2016-09-29T17:28:41Z',
     'lastUpdated': '2016-09-30T02:09:35Z',
     'providerAccountId': 10139705,
     'providerId': '9565',
     'providerName': 'Ally Bank',
     'refreshinfo': {'lastRefreshAttempt': '2016-09-30T02:09:35Z',
                     'lastRefreshed': '2016-09-30T02:09:35Z',
                     'nextRefreshScheduled': '2016-09-30T23:15:34Z',
                     'statusCode': 0,
                     'statusMessage': 'OK'}},
    {'CONTAINER': 'bank',
     'accountName': 'Interest Checking',
     'accountNumber': 'xxxx0000',
     'accountStatus': 'ACTIVE',
     'accountType': 'CHECKING',
     'availableBalance': {'amount': 3541.77,
                          'currency': 'USD'},
     'balance': {'amount': 3541.77, 'currency': 'USD'},
     'currentBalance': {'amount': 3541.77, 'currency': 'USD'},
     'holderProfile': [{'name': {'displayed': 'Captain Contrast'}}],
     'id': 4,
     'includeInNetWorth': True,
     'interestRate': 0.1,
     'isAsset': True,
     'isManual': False,
     'createdDate': '2016-09-29T17:28:41Z',
     'lastUpdated': '2016-09-30T02:09:35Z',
     'providerAccountId': 10139705,
     'providerId': '9565',
     'providerName': 'Ally Bank',
     'refreshinfo': {'lastRefreshAttempt': '2016-09-30T02:09:35Z',
                     'lastRefreshed': '2016-09-30T02:09:35Z',
                     'nextRefreshScheduled': '2016-09-30T23:15:34Z',
                     'statusCode': 0,
                     'statusMessage': 'OK'}},
    {'CONTAINER': 'creditCard',
     'accountNumber': 'xxxx0000',
     'accountStatus': 'ACTIVE',
     'accountType': 'OTHER',
     'availableCash': {'amount': 600, 'currency': 'USD'},
     'availableCredit': {'amount': 1363, 'currency': 'USD'},
     'balance': {'amount': 1636.44, 'currency': 'USD'},
     'id': 5,
     'includeInNetWorth': True,
     'isAsset': False,
     'isManual': False,
     'createdDate': '2016-09-29T17:28:41Z',
     'lastUpdated': '2016-09-29T17:04:40Z',
     'providerAccountId': 10119492,
     'providerId': '16441',
     'providerName': 'Dag Site',
     'refreshinfo': {'lastRefreshAttempt': '2016-09-29T17:04:39Z',
                     'lastRefreshed': '2016-09-29T17:04:39Z',
                     'nextRefreshScheduled': '2016-10-01T00:02:42Z',
                     'statusCode': 0,
                     'statusMessage': 'OK'},
     'totalCashLimit': {'amount': 600, 'currency': 'USD'},
     'totalCreditLine': {'amount': 3000, 'currency': 'USD'},
     'url': 'BILL_VALID'},
    {'CONTAINER': 'bank',
     'accountName': 'TESTDATA1',
     'accountNumber': 'xxxx0000',
     'accountStatus': 'ACTIVE',
     'availableBalance': {'amount': 65454.78,
                          'currency': 'USD'},
     'balance': {'amount': 9044.78, 'currency': 'USD'},
     'currentBalance': {'amount': 9044.78, 'currency': 'USD'},
     'holderProfile': [{'name': {'displayed': 'accountHolder'}}],
     'id': 6,
     'includeInNetWorth': True,
     'isAsset': True,
     'isManual': False,
     'createdDate': '2016-09-29T17:28:41Z',
     'lastUpdated': '2016-09-29T17:04:39Z',
     'providerAccountId': 10119492,
     'providerId': '16441',
     'providerName': 'Dag Site',
     'refreshinfo': {
         'lastRefreshAttempt': '2016-09-29T17:04:39Z',
         'lastRefreshed': '2016-09-29T17:04:39Z',
         'nextRefreshScheduled': '2016-10-01T10:33:12Z',
         'statusCode': 0,
         'statusMessage': 'OK'
     }
     }]
}

access_tokens = {
    'user': {
        'accessTokens': [{
            'appId': '10003600',
            'value': '4125c5d0b712a927d4aab049def7cd25a'
                     'a9d3251122d260ea294f3b00c4d834d'
        }]
    }
}

transactions = {'transaction': [
    {'CONTAINER': 'creditCard',
     'accountId': 1,
     'amount': {'amount': 16.72, 'currency': 'USD'},
     'baseType': 'DEBIT',
     'category': 'Restaurants',
     'categoryId': 22,
     'categorySource': 'SYSTEM',
     'categoryType': 'EXPENSE',
     'date': '2017-02-27',
     'description': {'original': 'PHO BASIL - BOSTON BOSTON MA'},
     'highLevelCategoryId': 10000011,
     'id': 1,
     'isManual': False,
     'postDate': '2017-02-27',
     'status': 'POSTED',
     'transactionDate': '2017-02-26'},
    {'CONTAINER': 'creditCard',
     'accountId': 1,
     'amount': {'amount': 224.92, 'currency': 'USD'},
     'baseType': 'CREDIT',
     'category': 'Credit Card Payments',
     'categoryId': 26,
     'categorySource': 'SYSTEM',
     'categoryType': 'TRANSFER',
     'date': '2017-02-21',
     'description': {'original': 'PAYMENT THANK YO',
                     'simple': 'Payment Thank Yo'},
     'highLevelCategoryId': 10000018,
     'id': 2,
     'isManual': False,
     'merchant': {'id': '28320',
                  'name': 'Payment Thank Yo',
                  'source': 'YODLEE'},
     'postDate': '2017-02-21',
     'status': 'POSTED',
     'transactionDate': '2017-02-21'},
    {'CONTAINER': 'bank',
     'accountId': 2,
     'amount': {'amount': 1299.95, 'currency': 'USD'},
     'baseType': 'CREDIT',
     'category': 'Salary/Regular Income',
     'categoryId': 29,
     'categorySource': 'SYSTEM',
     'categoryType': 'INCOME',
     'date': '2017-01-12',
     'description': {'original': 'DIRECT DEPOSIT FIDELITY',
                     'simple': 'Fidelity Investments'},
     'highLevelCategoryId': 10000012,
     'id': 1,
     'isManual': False,
     'merchant': {'id': '14164',
                  'name': 'Fidelity Investments',
                  'source': 'YODLEE'},
     'postDate': '2017-01-12',
     'status': 'POSTED'},
    {'CONTAINER': 'bank',
     'accountId': 2,
     'amount': {'amount': 2315, 'currency': 'USD'},
     'baseType': 'DEBIT',
     'category': 'Insurance',
     'categoryId': 14,
     'categorySource': 'SYSTEM',
     'categoryType': 'EXPENSE',
     'date': '2017-01-04',
     'description': {'original': 'Check Paid # 1051'},
     'highLevelCategoryId': 10000020,
     'id': 2,
     'isManual': False,
     'postDate': '2017-01-04',
     'status': 'POSTED'}
]}

rules = [{
    'categoryLevelId': 3,
    'memId': 1,
    'ruleClauses': [{
        'field': 'description',
        'fieldValue': 'BILL PAYMENT EVERSOURCE',
        'operation': 'stringContains',
        'ruleClauseId': 1,
        'userDefinedRuleId': 1
    }],
    'rulePriority': 3,
    'transactionCategorisationId': 14,
    'userDefinedRuleId': 1
}]

provider_accounts = {
    'providerAccount': [{
        'aggregationSource': 'USER',
        'createdDate': '2016-05-06',
        'id': 1,
        'isManual': False,
        'providerId': 16441,
        'refreshInfo': {
            'lastRefreshAttempt': '2016-12-09T16:38:52Z',
            'lastRefreshed': '2016-12-09T16:38:52Z',
            'nextRefreshScheduled': '2016-12-11T19:22:33Z',
            'status': 'FAILED',
            'statusCode': 414,
            'statusMessage': 'NO_ACCOUNT_FOUND'
        }},
        {
        'aggregationSource': 'USER',
        'createdDate': '2016-11-10',
        'id': 2,
        'isManual': False,
        'lastUpdated': '2016-12-09T16:39:33Z',
        'providerId': 643,
        'refreshInfo': {
            'lastRefreshAttempt': '2016-12-09T16:39:33Z',
            'lastRefreshed': '2016-12-09T16:39:33Z',
            'nextRefreshScheduled': '2016-12-11T02:38:44Z',
            'status': 'SUCCESS',
            'statusCode': 0,
            'statusMessage': 'OK'
        }},
        {
        'aggregationSource': 'USER',
        'createdDate': '2016-11-10',
        'id': 3,
        'isManual': False,
        'lastUpdated': '2016-12-09T16:38:17Z',
        'providerId': 9565,
        'refreshInfo': {
            'lastRefreshAttempt': '2016-12-09T16:38:17Z',
            'lastRefreshed': '2016-12-09T16:38:17Z',
            'nextRefreshScheduled': '2016-12-11T10:08:15Z',
            'status': 'SUCCESS',
            'statusCode': 0,
            'statusMessage': 'OK'
        }}
    ]

}
