Skip to content

Commit

Permalink
don't filter out user_id on responses (#47)
Browse files Browse the repository at this point in the history
* don't filter out user_id on responses

`user_id` is already being returned by the API, but it's currently being filtered out. All this does is ensure that it's not filtered out.

* bump version for user_id

* change cassettes of deposits and transfers

Co-authored-by: keryc Diaz <[email protected]>
  • Loading branch information
matin and keryc authored Aug 25, 2020
1 parent 9a2c35d commit f590470
Show file tree
Hide file tree
Showing 16 changed files with 328 additions and 327 deletions.
1 change: 1 addition & 0 deletions cuenca/resources/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def all(cls, **query_params) -> Generator[Resource, None, None]:
class Transaction(Retrievable, Queryable):
_query_params: ClassVar = TransactionQuery

user_id: str
amount: int # in centavos
status: TransactionStatus
descriptor: str # how it appears for the customer
2 changes: 1 addition & 1 deletion cuenca/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.3.0'
__version__ = '0.3.1'
CLIENT_VERSION = __version__
API_VERSION = '2020-03-19'
2 changes: 1 addition & 1 deletion tests/resources/cassettes/test_balance_entry_retrieve.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interactions:
response:
body:
string: '{"id":"SP01","created_at":"2020-06-03T03:07:36.338000","amount":10000,"status":"succeeded","descriptor":"SPEI
1","source_uri":"/accounts/BA01","network":"spei","tracking_key":"RASTREO_1234"}'
1","source_uri":"/accounts/BA01","network":"spei","tracking_key":"RASTREO_1234","user_id":"US01"}'
headers:
Connection:
- keep-alive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interactions:
response:
body:
string: '{"id":"SP01","created_at":"2020-06-03T03:07:36.338000","amount":10000,"status":"succeeded","descriptor":"SPEI
1","source_uri":"/accounts/BA01","network":"spei","tracking_key":"RASTREO_1234"}'
1","source_uri":"/accounts/BA01","network":"spei","tracking_key":"RASTREO_1234","user_id":"US01"}'
headers:
Connection:
- keep-alive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interactions:
response:
body:
string: '{"id":"CD01","created_at":"2020-06-03T03:07:36.338000","amount":10000,"status":"succeeded","descriptor":
"Cash deposit","source_uri":null,"network":"cash","tracking_key":null}'
"Cash deposit","source_uri":null,"network":"cash","tracking_key":null,"user_id":"US01"}'
headers:
Connection:
- keep-alive
Expand Down
8 changes: 4 additions & 4 deletions tests/resources/cassettes/test_transfers_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ interactions:
response:
body:
string: '{"items":[{"id":"TRykH9-lXrS6iJocclOl4ATQ==","created_at":"2020-05-11T18:41:00.332000","updated_at":"2020-05-11T18:41:01.352000","account_number":"646180157034181180","recipient_name":"cuenca user","amount":10000,"descriptor":"Mi
primer transferencia","idempotency_key":"my_custom_id","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null},{"id":"TR41ohSc7ET4a6XNJlTQwO-g==","created_at":"2020-05-09T03:43:59.029000","updated_at":"2020-05-09T03:43:59.924000","account_number":"646180157034181180","recipient_name":"cuenca user","amount":10000,"descriptor":"Mi
primer transferencia","idempotency_key":"my_unique_id","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null},{"id":"TRbunDZEb9Q9CpFQGqZlVzQA==","created_at":"2020-05-09T03:41:12.048000","updated_at":"2020-05-09T03:41:15.932000","account_number":"646180157034181180","recipient_name":"cuenca user","amount":10000,"descriptor":"Mi
primer transferencia","idempotency_key":"2020-05-09:646180157034181180:10000","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null},{"id":"TRXrre-cmATVag5-eGrpczeQ==","created_at":"2020-05-08T23:19:34.541000","updated_at":"2020-05-08T23:19:35.873000","account_number":"646180157034181180","recipient_name":"cuenca user","amount":10000,"descriptor":"Transferencia
Demo","idempotency_key":"key_roger_3","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null}],"next_page_uri":"/transfers?created_before=2020-05-08T23%3A19%3A34.541000&status=succeeded&count=False"}'
primer transferencia","idempotency_key":"my_custom_id","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null,"user_id":"US01"},{"id":"TR41ohSc7ET4a6XNJlTQwO-g==","created_at":"2020-05-09T03:43:59.029000","updated_at":"2020-05-09T03:43:59.924000","account_number":"646180157034181180","recipient_name":"cuenca user","amount":10000,"descriptor":"Mi
primer transferencia","idempotency_key":"my_unique_id","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null,"user_id":"US01"},{"id":"TRbunDZEb9Q9CpFQGqZlVzQA==","created_at":"2020-05-09T03:41:12.048000","updated_at":"2020-05-09T03:41:15.932000","account_number":"646180157034181180","recipient_name":"cuenca user","amount":10000,"descriptor":"Mi
primer transferencia","idempotency_key":"2020-05-09:646180157034181180:10000","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null,"user_id":"US01"},{"id":"TRXrre-cmATVag5-eGrpczeQ==","created_at":"2020-05-08T23:19:34.541000","updated_at":"2020-05-08T23:19:35.873000","account_number":"646180157034181180","recipient_name":"cuenca user","amount":10000,"descriptor":"Transferencia
Demo","idempotency_key":"key_roger_3","status":"succeeded","network":"internal","destination_uri":null,"tracking_key":null,"user_id":"US01"}],"next_page_uri":"/transfers?created_before=2020-05-08T23%3A19%3A34.541000&status=succeeded&count=False"}'
headers:
Connection:
- keep-alive
Expand Down
Loading

0 comments on commit f590470

Please sign in to comment.