coveralls: 
[![Coverage Status](https://coveralls.io/builds/16288275/badge)](https://coveralls.io/builds/16288275)

Coverage remained the same at 100.0% when pulling **19757302b91677ce5e659bbb28fc124dd5ef4ab7 on janjitsu:master** into **9e1660516600a94f949259465c371acf7256f5ae on andreroggeri:master**.

andreroggeri: Muito obrigado @janjitsu 🤑
diff --git a/pynubank/nubank.py b/pynubank/nubank.py
index 3ba66af..ae31690 100644
--- a/pynubank/nubank.py
+++ b/pynubank/nubank.py
@@ -54,6 +54,7 @@ class Nubank:
         self.headers['Authorization'] = 'Bearer {}'.format(data['access_token'])
         self.feed_url = data['_links']['events']['href']
         self.query_url = data['_links']['ghostflame']['href']
+        self.bills_url = data['_links']['bills_summary']['href']
 
     def get_card_feed(self):
         request = requests.get(self.feed_url, headers=self.headers)
@@ -63,6 +64,10 @@ class Nubank:
         feed = self.get_card_feed()
         return list(filter(lambda x: x['category'] == 'transaction', feed['events']))
 
+    def get_card_bills(self):
+        request = requests.get(self.bills_url, headers=self.headers)
+        return json.loads(request.content.decode('utf-8'))
+
     def get_account_feed(self):
         data = self._make_graphql_request('account_feed')
         return data['data']['viewer']['savingsAccount']['feed']

Acessar faturas do cartão
Olá, gostaria de um método para acessar as faturas do cartão!
diff --git a/tests/test_nubank_client.py b/tests/test_nubank_client.py
index 6626e1f..787a858 100644
--- a/tests/test_nubank_client.py
+++ b/tests/test_nubank_client.py
@@ -104,6 +104,132 @@ def events_return():
         }
     }
 
+@pytest.fixture
+def bills_return():
+    return {
+        "_links": {
+            "future": {
+                "href": "https://prod-s0-billing.nubank.com.br/api/accounts/abcde-fghi-jklmn-opqrst-uvxz/bills/future"
+            },
+            "open": {
+                "href": "https://prod-s0-billing.nubank.com.br/api/accounts/abcde-fghi-jklmn-opqrst-uvxz/bills/open"
+            }
+        },
+        "bills": [
+            {
+                "state": "future",
+                "summary": {
+                    "adjustments": "0",
+                    "close_date": "2018-05-03",
+                    "due_date": "2018-05-10",
+                    "effective_due_date": "2018-05-10",
+                    "expenses": "126.94",
+                    "fees": "0",
+                    "interest": 0,
+                    "interest_charge": "0",
+                    "interest_rate": "0.1375",
+                    "interest_reversal": "0",
+                    "international_tax": "0",
+                    "minimum_payment": 0,
+                    "open_date": "2018-04-03",
+                    "paid": 0,
+                    "past_balance": 0,
+                    "payments": "0",
+                    "precise_minimum_payment": "0",
+                    "precise_total_balance": "126.94",
+                    "previous_bill_balance": "0",
+                    "tax": "0",
+                    "total_accrued": "0",
+                    "total_balance": 12694,
+                    "total_credits": "0",
+                    "total_cumulative": 12694,
+                    "total_financed": "0",
+                    "total_international": "0",
+                    "total_national": "126.94",
+                    "total_payments": "0"
+                }
+            },
+            {
+                "_links": {
+                    "self": {
+                        "href": "https://prod-s0-billing.nubank.com.br/api/accounts/abcde-fghi-jklmn-opqrst-uvxz/bills/open"
+                    }
+                },
+                "state": "open",
+                "summary": {
+                    "adjustments": "0",
+                    "close_date": "2018-04-03",
+                    "due_date": "2018-04-10",
+                    "effective_due_date": "2018-04-10",
+                    "expenses": "303.36",
+                    "fees": "0",
+                    "interest": 0,
+                    "interest_charge": "0",
+                    "interest_rate": "0.1375",
+                    "interest_reversal": "0",
+                    "international_tax": "0",
+                    "minimum_payment": 0,
+                    "open_date": "2018-03-03",
+                    "paid": 0,
+                    "past_balance": 0,
+                    "payments": "-285.15",
+                    "precise_minimum_payment": "0",
+                    "precise_total_balance": "303.362041645013",
+                    "previous_bill_balance": "285.152041645013",
+                    "tax": "0",
+                    "total_accrued": "0",
+                    "total_balance": 30336,
+                    "total_credits": "0",
+                    "total_cumulative": 30336,
+                    "total_financed": "0",
+                    "total_international": "0",
+                    "total_national": "303.36",
+                    "total_payments": "-285.15"
+                }
+            },
+            {
+                "_links": {
+                    "self": {
+                        "href": "https://prod-s0-billing.nubank.com.br/api/bills/abcde-fghi-jklmn-opqrst-uvxz"
+                    }
+                },
+                "href": "nuapp://bill/abcde-fghi-jklmn-opqrst-uvxz",
+                "id": "abcde-fghi-jklmn-opqrst-uvxz",
+                "state": "overdue",
+                "summary": {
+                    "adjustments": "-63.99106066",
+                    "close_date": "2018-03-03",
+                    "due_date": "2018-03-10",
+                    "effective_due_date": "2018-03-12",
+                    "expenses": "364.14",
+                    "fees": "0",
+                    "interest": 0,
+                    "interest_charge": "0",
+                    "interest_rate": "0.1375",
+                    "interest_reversal": "0",
+                    "international_tax": "0",
+                    "minimum_payment": 8003,
+                    "open_date": "2018-02-03",
+                    "paid": 28515,
+                    "past_balance": -1500,
+                    "payments": "-960.47",
+                    "precise_minimum_payment": "480.02544320601300",
+                    "precise_total_balance": "285.152041645013",
+                    "previous_bill_balance": "945.473102305013",
+                    "remaining_minimum_payment": 0,
+                    "tax": "0",
+                    "total_accrued": "0",
+                    "total_balance": 28515,
+                    "total_credits": "-64.18",
+                    "total_cumulative": 30015,
+                    "total_financed": "0",
+                    "total_international": "0",
+                    "total_national": "364.32893934",
+                    "total_payments": "-960.47"
+                }
+            },
+        ]
+    }
 
 @pytest.fixture
 def account_balance_return():
@@ -192,6 +318,55 @@ def test_get_card_feed(monkeypatch, authentication_return, events_return):
     assert events[0]['href'] == 'nuapp://transaction/abcde-fghi-jklmn-opqrst-uvxz'
     assert events[0]['_links']['self']['href'] == 'https://prod-s0-webapp-proxy.nubank.com.br/api/proxy/_links_123'
 
+def test_get_card_bills(monkeypatch, authentication_return, bills_return):
+    response = create_fake_response(authentication_return)
+    monkeypatch.setattr('requests.post', MagicMock(return_value=response))
+    nubank_client = Nubank('12345678909', '12345678')
+
+    response = create_fake_response(bills_return)
+    monkeypatch.setattr('requests.get', MagicMock(return_value=response))
+
+    bills_response = nubank_client.get_card_bills()
+    assert bills_response['_links']['future']['href'] == 'https://prod-s0-billing.nubank.com.br/api/accounts/abcde-fghi-jklmn-opqrst-uvxz/bills/future'
+    assert bills_response['_links']['open']['href'] == 'https://prod-s0-billing.nubank.com.br/api/accounts/abcde-fghi-jklmn-opqrst-uvxz/bills/open'
+
+    bills = bills_response['bills']
+    assert len(bills) == 3
+    assert bills[2]['_links']['self']['href'] == "https://prod-s0-billing.nubank.com.br/api/bills/abcde-fghi-jklmn-opqrst-uvxz"
+    assert bills[2]['href'] == 'nuapp://bill/abcde-fghi-jklmn-opqrst-uvxz'
+    assert bills[2]['id'] == 'abcde-fghi-jklmn-opqrst-uvxz'
+    assert bills[2]['state'] == 'overdue'
+
+    summary = bills[2]['summary']
+    assert summary["adjustments"] == "-63.99106066"
+    assert summary["close_date"] == "2018-03-03"
+    assert summary["due_date"] == "2018-03-10"
+    assert summary["effective_due_date"] == "2018-03-12"
+    assert summary["expenses"] == "364.14"
+    assert summary["fees"] == "0"
+    assert summary["interest"] == 0
+    assert summary["interest_charge"] == "0"
+    assert summary["interest_rate"] == "0.1375"
+    assert summary["interest_reversal"] == "0"
+    assert summary["international_tax"] == "0"
+    assert summary["minimum_payment"] == 8003
+    assert summary["open_date"] == "2018-02-03"
+    assert summary["paid"] == 28515
+    assert summary["past_balance"] == -1500
+    assert summary["payments"] == "-960.47"
+    assert summary["precise_minimum_payment"] == "480.02544320601300"
+    assert summary["precise_total_balance"] == "285.152041645013"
+    assert summary["previous_bill_balance"] == "945.473102305013"
+    assert summary["remaining_minimum_payment"] == 0
+    assert summary["tax"] == "0"
+    assert summary["total_accrued"] == "0"
+    assert summary["total_balance"] == 28515
+    assert summary["total_credits"] == "-64.18"
+    assert summary["total_cumulative"] == 30015
+    assert summary["total_financed"] == "0"
+    assert summary["total_international"] == "0"
+    assert summary["total_national"] == "364.32893934"
+    assert summary["total_payments"] == "-960.47"
 
 def test_get_card_statements(monkeypatch, authentication_return, events_return):
     response = create_fake_response(authentication_return)

pip install -e .
parse_log_pytest
requirements.txt
nose pytest
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi==2025.1.31
chardet==3.0.4
exceptiongroup==1.2.2
idna==2.5
iniconfig==2.1.0
nose==1.3.7
packaging==24.2
pluggy==1.5.0
-e git+https://github.com/andreroggeri/pynubank.git@9e1660516600a94f949259465c371acf7256f5ae#egg=pynubank
pytest==8.3.5
requests==2.18.1
tomli==2.2.1
urllib3==1.21.1

name: pynubank
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - certifi==2025.1.31
      - chardet==3.0.4
      - exceptiongroup==1.2.2
      - idna==2.5
      - iniconfig==2.1.0
      - nose==1.3.7
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - requests==2.18.1
      - tomli==2.2.1
      - urllib3==1.21.1
prefix: /opt/conda/envs/pynubank

tests/test_nubank_client.py::test_get_card_bills
tests/test_nubank_client.py::test_authentication_failure_raise_exception[100] tests/test_nubank_client.py::test_authentication_failure_raise_exception[101] tests/test_nubank_client.py::test_authentication_failure_raise_exception[102] tests/test_nubank_client.py::test_authentication_failure_raise_exception[103] tests/test_nubank_client.py::test_authentication_failure_raise_exception[201] tests/test_nubank_client.py::test_authentication_failure_raise_exception[202] tests/test_nubank_client.py::test_authentication_failure_raise_exception[203] tests/test_nubank_client.py::test_authentication_failure_raise_exception[204] tests/test_nubank_client.py::test_authentication_failure_raise_exception[205] tests/test_nubank_client.py::test_authentication_failure_raise_exception[206] tests/test_nubank_client.py::test_authentication_failure_raise_exception[207] tests/test_nubank_client.py::test_authentication_failure_raise_exception[208] tests/test_nubank_client.py::test_authentication_failure_raise_exception[226] tests/test_nubank_client.py::test_authentication_failure_raise_exception[300] tests/test_nubank_client.py::test_authentication_failure_raise_exception[301] tests/test_nubank_client.py::test_authentication_failure_raise_exception[302] tests/test_nubank_client.py::test_authentication_failure_raise_exception[303] tests/test_nubank_client.py::test_authentication_failure_raise_exception[304] tests/test_nubank_client.py::test_authentication_failure_raise_exception[305] tests/test_nubank_client.py::test_authentication_failure_raise_exception[306] tests/test_nubank_client.py::test_authentication_failure_raise_exception[307] tests/test_nubank_client.py::test_authentication_failure_raise_exception[308] tests/test_nubank_client.py::test_authentication_failure_raise_exception[400] tests/test_nubank_client.py::test_authentication_failure_raise_exception[401] tests/test_nubank_client.py::test_authentication_failure_raise_exception[402] tests/test_nubank_client.py::test_authentication_failure_raise_exception[403] tests/test_nubank_client.py::test_authentication_failure_raise_exception[404] tests/test_nubank_client.py::test_authentication_failure_raise_exception[405] tests/test_nubank_client.py::test_authentication_failure_raise_exception[406] tests/test_nubank_client.py::test_authentication_failure_raise_exception[407] tests/test_nubank_client.py::test_authentication_failure_raise_exception[408] tests/test_nubank_client.py::test_authentication_failure_raise_exception[409] tests/test_nubank_client.py::test_authentication_failure_raise_exception[410] tests/test_nubank_client.py::test_authentication_failure_raise_exception[411] tests/test_nubank_client.py::test_authentication_failure_raise_exception[412] tests/test_nubank_client.py::test_authentication_failure_raise_exception[413] tests/test_nubank_client.py::test_authentication_failure_raise_exception[414] tests/test_nubank_client.py::test_authentication_failure_raise_exception[415] tests/test_nubank_client.py::test_authentication_failure_raise_exception[416] tests/test_nubank_client.py::test_authentication_failure_raise_exception[417] tests/test_nubank_client.py::test_authentication_failure_raise_exception[418] tests/test_nubank_client.py::test_authentication_failure_raise_exception[420] tests/test_nubank_client.py::test_authentication_failure_raise_exception[421] tests/test_nubank_client.py::test_authentication_failure_raise_exception[422] tests/test_nubank_client.py::test_authentication_failure_raise_exception[423] tests/test_nubank_client.py::test_authentication_failure_raise_exception[424] tests/test_nubank_client.py::test_authentication_failure_raise_exception[426] tests/test_nubank_client.py::test_authentication_failure_raise_exception[428] tests/test_nubank_client.py::test_authentication_failure_raise_exception[429] tests/test_nubank_client.py::test_authentication_failure_raise_exception[431] tests/test_nubank_client.py::test_authentication_failure_raise_exception[440] tests/test_nubank_client.py::test_authentication_failure_raise_exception[444] tests/test_nubank_client.py::test_authentication_failure_raise_exception[449] tests/test_nubank_client.py::test_authentication_failure_raise_exception[450] tests/test_nubank_client.py::test_authentication_failure_raise_exception[451] tests/test_nubank_client.py::test_authentication_failure_raise_exception[495] tests/test_nubank_client.py::test_authentication_failure_raise_exception[496] tests/test_nubank_client.py::test_authentication_failure_raise_exception[497] tests/test_nubank_client.py::test_authentication_failure_raise_exception[498] tests/test_nubank_client.py::test_authentication_failure_raise_exception[499] tests/test_nubank_client.py::test_authentication_failure_raise_exception[500] tests/test_nubank_client.py::test_authentication_failure_raise_exception[501] tests/test_nubank_client.py::test_authentication_failure_raise_exception[502] tests/test_nubank_client.py::test_authentication_failure_raise_exception[503] tests/test_nubank_client.py::test_authentication_failure_raise_exception[504] tests/test_nubank_client.py::test_authentication_failure_raise_exception[505] tests/test_nubank_client.py::test_authentication_failure_raise_exception[506] tests/test_nubank_client.py::test_authentication_failure_raise_exception[507] tests/test_nubank_client.py::test_authentication_failure_raise_exception[508] tests/test_nubank_client.py::test_authentication_failure_raise_exception[509] tests/test_nubank_client.py::test_authentication_failure_raise_exception[510] tests/test_nubank_client.py::test_authentication_failure_raise_exception[511] tests/test_nubank_client.py::test_authentication_failure_raise_exception[520] tests/test_nubank_client.py::test_authentication_failure_raise_exception[521] tests/test_nubank_client.py::test_authentication_failure_raise_exception[522] tests/test_nubank_client.py::test_authentication_failure_raise_exception[523] tests/test_nubank_client.py::test_authentication_failure_raise_exception[524] tests/test_nubank_client.py::test_authentication_failure_raise_exception[525] tests/test_nubank_client.py::test_authentication_failure_raise_exception[526] tests/test_nubank_client.py::test_authentication_failure_raise_exception[527] tests/test_nubank_client.py::test_authentication_failure_raise_exception[530] tests/test_nubank_client.py::test_authentication_failure_raise_exception[598] tests/test_nubank_client.py::test_authentication_succeeds tests/test_nubank_client.py::test_get_card_feed tests/test_nubank_client.py::test_get_card_statements tests/test_nubank_client.py::test_get_account_balance tests/test_nubank_client.py::test_get_account_feed tests/test_nubank_client.py::test_get_account_statements tests/test_nubank_client.py::test_grapql_query_raises_exeption[100] tests/test_nubank_client.py::test_grapql_query_raises_exeption[101] tests/test_nubank_client.py::test_grapql_query_raises_exeption[102] tests/test_nubank_client.py::test_grapql_query_raises_exeption[103] tests/test_nubank_client.py::test_grapql_query_raises_exeption[201] tests/test_nubank_client.py::test_grapql_query_raises_exeption[202] tests/test_nubank_client.py::test_grapql_query_raises_exeption[203] tests/test_nubank_client.py::test_grapql_query_raises_exeption[204] tests/test_nubank_client.py::test_grapql_query_raises_exeption[205] tests/test_nubank_client.py::test_grapql_query_raises_exeption[206] tests/test_nubank_client.py::test_grapql_query_raises_exeption[207] tests/test_nubank_client.py::test_grapql_query_raises_exeption[208] tests/test_nubank_client.py::test_grapql_query_raises_exeption[226] tests/test_nubank_client.py::test_grapql_query_raises_exeption[300] tests/test_nubank_client.py::test_grapql_query_raises_exeption[301] tests/test_nubank_client.py::test_grapql_query_raises_exeption[302] tests/test_nubank_client.py::test_grapql_query_raises_exeption[303] tests/test_nubank_client.py::test_grapql_query_raises_exeption[304] tests/test_nubank_client.py::test_grapql_query_raises_exeption[305] tests/test_nubank_client.py::test_grapql_query_raises_exeption[306] tests/test_nubank_client.py::test_grapql_query_raises_exeption[307] tests/test_nubank_client.py::test_grapql_query_raises_exeption[308] tests/test_nubank_client.py::test_grapql_query_raises_exeption[400] tests/test_nubank_client.py::test_grapql_query_raises_exeption[401] tests/test_nubank_client.py::test_grapql_query_raises_exeption[402] tests/test_nubank_client.py::test_grapql_query_raises_exeption[403] tests/test_nubank_client.py::test_grapql_query_raises_exeption[404] tests/test_nubank_client.py::test_grapql_query_raises_exeption[405] tests/test_nubank_client.py::test_grapql_query_raises_exeption[406] tests/test_nubank_client.py::test_grapql_query_raises_exeption[407] tests/test_nubank_client.py::test_grapql_query_raises_exeption[408] tests/test_nubank_client.py::test_grapql_query_raises_exeption[409] tests/test_nubank_client.py::test_grapql_query_raises_exeption[410] tests/test_nubank_client.py::test_grapql_query_raises_exeption[411] tests/test_nubank_client.py::test_grapql_query_raises_exeption[412] tests/test_nubank_client.py::test_grapql_query_raises_exeption[413] tests/test_nubank_client.py::test_grapql_query_raises_exeption[414] tests/test_nubank_client.py::test_grapql_query_raises_exeption[415] tests/test_nubank_client.py::test_grapql_query_raises_exeption[416] tests/test_nubank_client.py::test_grapql_query_raises_exeption[417] tests/test_nubank_client.py::test_grapql_query_raises_exeption[418] tests/test_nubank_client.py::test_grapql_query_raises_exeption[420] tests/test_nubank_client.py::test_grapql_query_raises_exeption[421] tests/test_nubank_client.py::test_grapql_query_raises_exeption[422] tests/test_nubank_client.py::test_grapql_query_raises_exeption[423] tests/test_nubank_client.py::test_grapql_query_raises_exeption[424] tests/test_nubank_client.py::test_grapql_query_raises_exeption[426] tests/test_nubank_client.py::test_grapql_query_raises_exeption[428] tests/test_nubank_client.py::test_grapql_query_raises_exeption[429] tests/test_nubank_client.py::test_grapql_query_raises_exeption[431] tests/test_nubank_client.py::test_grapql_query_raises_exeption[440] tests/test_nubank_client.py::test_grapql_query_raises_exeption[444] tests/test_nubank_client.py::test_grapql_query_raises_exeption[449] tests/test_nubank_client.py::test_grapql_query_raises_exeption[450] tests/test_nubank_client.py::test_grapql_query_raises_exeption[451] tests/test_nubank_client.py::test_grapql_query_raises_exeption[495] tests/test_nubank_client.py::test_grapql_query_raises_exeption[496] tests/test_nubank_client.py::test_grapql_query_raises_exeption[497] tests/test_nubank_client.py::test_grapql_query_raises_exeption[498] tests/test_nubank_client.py::test_grapql_query_raises_exeption[499] tests/test_nubank_client.py::test_grapql_query_raises_exeption[500] tests/test_nubank_client.py::test_grapql_query_raises_exeption[501] tests/test_nubank_client.py::test_grapql_query_raises_exeption[502] tests/test_nubank_client.py::test_grapql_query_raises_exeption[503] tests/test_nubank_client.py::test_grapql_query_raises_exeption[504] tests/test_nubank_client.py::test_grapql_query_raises_exeption[505] tests/test_nubank_client.py::test_grapql_query_raises_exeption[506] tests/test_nubank_client.py::test_grapql_query_raises_exeption[507] tests/test_nubank_client.py::test_grapql_query_raises_exeption[508] tests/test_nubank_client.py::test_grapql_query_raises_exeption[509] tests/test_nubank_client.py::test_grapql_query_raises_exeption[510] tests/test_nubank_client.py::test_grapql_query_raises_exeption[511] tests/test_nubank_client.py::test_grapql_query_raises_exeption[520] tests/test_nubank_client.py::test_grapql_query_raises_exeption[521] tests/test_nubank_client.py::test_grapql_query_raises_exeption[522] tests/test_nubank_client.py::test_grapql_query_raises_exeption[523] tests/test_nubank_client.py::test_grapql_query_raises_exeption[524] tests/test_nubank_client.py::test_grapql_query_raises_exeption[525] tests/test_nubank_client.py::test_grapql_query_raises_exeption[526] tests/test_nubank_client.py::test_grapql_query_raises_exeption[527] tests/test_nubank_client.py::test_grapql_query_raises_exeption[530] tests/test_nubank_client.py::test_grapql_query_raises_exeption[598]
pynubank/nubank.py
pynubank/nubank.py