@@ -47,8 +47,8 @@ public function test_refresh_transactions(): void
4747 public function test_sync_transactions_minimal (): void
4848 {
4949 $ response = $ this ->getPlaidClient ()->transactions ->sync (
50- "access_token "
51- );
50+ "access_token "
51+ );
5252
5353 $ this ->assertEquals ("POST " , $ response ->method );
5454 $ this ->assertEquals ("2020-09-14 " , $ response ->version );
@@ -63,9 +63,9 @@ public function test_sync_transactions_minimal(): void
6363 public function test_sync_transactions_cursor_only (): void
6464 {
6565 $ response = $ this ->getPlaidClient ()->transactions ->sync (
66- "access_token " ,
67- "last_cursor_123 " ,
68- );
66+ "access_token " ,
67+ "last_cursor_123 " ,
68+ );
6969
7070 $ this ->assertEquals ("POST " , $ response ->method );
7171 $ this ->assertEquals ("2020-09-14 " , $ response ->version );
@@ -81,11 +81,11 @@ public function test_sync_transactions_cursor_only(): void
8181 public function test_sync_transactions_all_params (): void
8282 {
8383 $ response = $ this ->getPlaidClient ()->transactions ->sync (
84- "access_token " ,
85- "last_cursor_123 " ,
86- 100 ,
87- ["include_personal_finance_category " => true ],
88- );
84+ "access_token " ,
85+ "last_cursor_123 " ,
86+ 100 ,
87+ ["include_personal_finance_category " => true ],
88+ );
8989
9090 $ this ->assertEquals ("POST " , $ response ->method );
9191 $ this ->assertEquals ("2020-09-14 " , $ response ->version );
@@ -98,4 +98,23 @@ public function test_sync_transactions_all_params(): void
9898 $ this ->assertEquals (100 , $ response ->params ->count );
9999 $ this ->assertEquals ((object ) ["include_personal_finance_category " => true ], $ response ->params ->options );
100100 }
101+
102+ public function test_recurring_transactions (): void
103+ {
104+ $ response = $ this ->getPlaidClient ()->transactions ->recurring (
105+ "access_token " ,
106+ ["acct_123 " , "acct_456 " ],
107+ ["option1 " => "value1 " ],
108+ );
109+
110+ $ this ->assertEquals ("POST " , $ response ->method );
111+ $ this ->assertEquals ("2020-09-14 " , $ response ->version );
112+ $ this ->assertEquals ("application/json " , $ response ->content );
113+ $ this ->assertEquals ("/transactions/recurring/get " , $ response ->path );
114+ $ this ->assertEquals ("client_id " , $ response ->params ->client_id );
115+ $ this ->assertEquals ("secret " , $ response ->params ->secret );
116+ $ this ->assertEquals ("access_token " , $ response ->params ->access_token );
117+ $ this ->assertEquals (["acct_123 " , "acct_456 " ], $ response ->params ->account_ids );
118+ $ this ->assertEquals ((object ) ["option1 " => "value1 " ], $ response ->params ->options );
119+ }
101120}
0 commit comments