File tree Expand file tree Collapse file tree 4 files changed +28
-28
lines changed Expand file tree Collapse file tree 4 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public function extract(): iterable
5353 $ response = $ this ->client ->customerCustomerRepositoryV1GetListGet (
5454 queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
5555 );
56+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
5657
5758 if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \CustomerDataCustomerSearchResultsInterface
5859 && !$ response instanceof \Kiboko \Magento \V2_2 \Model \CustomerDataCustomerSearchResultsInterface
@@ -63,15 +64,14 @@ public function extract(): iterable
6364 }
6465
6566 yield $ this ->processResponse ($ response );
66- }
67-
6867
69- while ($ currentPage ++ < $ pageCount ) {
70- $ response = $ this ->client ->customerCustomerRepositoryV1GetListGet (
71- queryParameters: iterator_to_array ( $ this ->walkFilterVariants ( $ currentPage ) ),
72- );
68+ while ($ currentPage ++ < $ pageCount ) {
69+ $ response = $ this ->client ->customerCustomerRepositoryV1GetListGet (
70+ queryParameters: $ this ->applyPagination ( iterator_to_array ( $ parameters ), $ currentPage , $ this -> pageSize ),
71+ );
7372
74- yield $ this ->processResponse ($ response );
73+ yield $ this ->processResponse ($ response );
74+ }
7575 }
7676 } catch (NetworkExceptionInterface $ exception ) {
7777 $ this ->logger ->alert (
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function extract(): iterable
5252 $ response = $ this ->client ->salesInvoiceRepositoryV1GetListGet (
5353 queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
5454 );
55+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
5556
5657 if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \SalesDataInvoiceSearchResultInterface
5758 && !$ response instanceof \Kiboko \Magento \V2_2 \Model \SalesDataInvoiceSearchResultInterface
@@ -62,15 +63,14 @@ public function extract(): iterable
6263 }
6364
6465 yield $ this ->processResponse ($ response );
65- }
66-
6766
68- while ($ currentPage ++ < $ pageCount ) {
69- $ response = $ this ->client ->salesInvoiceRepositoryV1GetListGet (
70- queryParameters: iterator_to_array ( $ this ->walkFilterVariants ( $ currentPage ) ),
71- );
67+ while ($ currentPage ++ < $ pageCount ) {
68+ $ response = $ this ->client ->salesInvoiceRepositoryV1GetListGet (
69+ queryParameters: $ this ->applyPagination ( iterator_to_array ( $ parameters ), $ currentPage , $ this -> pageSize ),
70+ );
7271
73- yield $ this ->processResponse ($ response );
72+ yield $ this ->processResponse ($ response );
73+ }
7474 }
7575 } catch (NetworkExceptionInterface $ exception ) {
7676 $ this ->logger ->alert (
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function extract(): iterable
5252 $ response = $ this ->client ->salesOrderRepositoryV1GetListGet (
5353 queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
5454 );
55+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
5556
5657 if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \SalesDataOrderSearchResultInterface
5758 && !$ response instanceof \Kiboko \Magento \V2_2 \Model \SalesDataOrderSearchResultInterface
@@ -62,15 +63,14 @@ public function extract(): iterable
6263 }
6364
6465 yield $ this ->processResponse ($ response );
65- }
66-
6766
68- while ($ currentPage ++ < $ pageCount ) {
69- $ response = $ this ->client ->salesOrderRepositoryV1GetListGet (
70- queryParameters: iterator_to_array ( $ this ->walkFilterVariants ( $ currentPage ) ),
71- );
67+ while ($ currentPage ++ < $ pageCount ) {
68+ $ response = $ this ->client ->salesOrderRepositoryV1GetListGet (
69+ queryParameters: $ this ->applyPagination ( iterator_to_array ( $ parameters ), $ currentPage , $ this -> pageSize ),
70+ );
7271
73- yield $ this ->processResponse ($ response );
72+ yield $ this ->processResponse ($ response );
73+ }
7474 }
7575 } catch (NetworkExceptionInterface $ exception ) {
7676 $ this ->logger ->alert (
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function extract(): iterable
5252 $ response = $ this ->client ->catalogProductRepositoryV1GetListGet (
5353 queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
5454 );
55+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
5556
5657 if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \CatalogDataProductSearchResultsInterface
5758 && !$ response instanceof \Kiboko \Magento \V2_2 \Model \CatalogDataProductSearchResultsInterface
@@ -62,15 +63,14 @@ public function extract(): iterable
6263 }
6364
6465 yield $ this ->processResponse ($ response );
65- }
66-
6766
68- while ($ currentPage ++ < $ pageCount ) {
69- $ response = $ this ->client ->catalogProductRepositoryV1GetListGet (
70- queryParameters: iterator_to_array ( $ this ->walkFilterVariants ( $ currentPage ) ),
71- );
67+ while ($ currentPage ++ < $ pageCount ) {
68+ $ response = $ this ->client ->catalogProductRepositoryV1GetListGet (
69+ queryParameters: $ this ->applyPagination ( iterator_to_array ( $ parameters ), $ currentPage , $ this -> pageSize ),
70+ );
7271
73- yield $ this ->processResponse ($ response );
72+ yield $ this ->processResponse ($ response );
73+ }
7474 }
7575 } catch (NetworkExceptionInterface $ exception ) {
7676 $ this ->logger ->alert (
You can’t perform that action at this time.
0 commit comments