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
53
53
$ response = $ this ->client ->customerCustomerRepositoryV1GetListGet (
54
54
queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
55
55
);
56
+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
56
57
57
58
if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \CustomerDataCustomerSearchResultsInterface
58
59
&& !$ response instanceof \Kiboko \Magento \V2_2 \Model \CustomerDataCustomerSearchResultsInterface
@@ -63,15 +64,14 @@ public function extract(): iterable
63
64
}
64
65
65
66
yield $ this ->processResponse ($ response );
66
- }
67
-
68
67
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
+ );
73
72
74
- yield $ this ->processResponse ($ response );
73
+ yield $ this ->processResponse ($ response );
74
+ }
75
75
}
76
76
} catch (NetworkExceptionInterface $ exception ) {
77
77
$ this ->logger ->alert (
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function extract(): iterable
52
52
$ response = $ this ->client ->salesInvoiceRepositoryV1GetListGet (
53
53
queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
54
54
);
55
+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
55
56
56
57
if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \SalesDataInvoiceSearchResultInterface
57
58
&& !$ response instanceof \Kiboko \Magento \V2_2 \Model \SalesDataInvoiceSearchResultInterface
@@ -62,15 +63,14 @@ public function extract(): iterable
62
63
}
63
64
64
65
yield $ this ->processResponse ($ response );
65
- }
66
-
67
66
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
+ );
72
71
73
- yield $ this ->processResponse ($ response );
72
+ yield $ this ->processResponse ($ response );
73
+ }
74
74
}
75
75
} catch (NetworkExceptionInterface $ exception ) {
76
76
$ this ->logger ->alert (
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function extract(): iterable
52
52
$ response = $ this ->client ->salesOrderRepositoryV1GetListGet (
53
53
queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
54
54
);
55
+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
55
56
56
57
if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \SalesDataOrderSearchResultInterface
57
58
&& !$ response instanceof \Kiboko \Magento \V2_2 \Model \SalesDataOrderSearchResultInterface
@@ -62,15 +63,14 @@ public function extract(): iterable
62
63
}
63
64
64
65
yield $ this ->processResponse ($ response );
65
- }
66
-
67
66
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
+ );
72
71
73
- yield $ this ->processResponse ($ response );
72
+ yield $ this ->processResponse ($ response );
73
+ }
74
74
}
75
75
} catch (NetworkExceptionInterface $ exception ) {
76
76
$ this ->logger ->alert (
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public function extract(): iterable
52
52
$ response = $ this ->client ->catalogProductRepositoryV1GetListGet (
53
53
queryParameters: $ this ->applyPagination (iterator_to_array ($ parameters ), $ currentPage , $ this ->pageSize ),
54
54
);
55
+ $ pageCount = (int ) ceil ($ response ->getTotalCount () / $ this ->pageSize );
55
56
56
57
if (!$ response instanceof \Kiboko \Magento \V2_1 \Model \CatalogDataProductSearchResultsInterface
57
58
&& !$ response instanceof \Kiboko \Magento \V2_2 \Model \CatalogDataProductSearchResultsInterface
@@ -62,15 +63,14 @@ public function extract(): iterable
62
63
}
63
64
64
65
yield $ this ->processResponse ($ response );
65
- }
66
-
67
66
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
+ );
72
71
73
- yield $ this ->processResponse ($ response );
72
+ yield $ this ->processResponse ($ response );
73
+ }
74
74
}
75
75
} catch (NetworkExceptionInterface $ exception ) {
76
76
$ this ->logger ->alert (
You can’t perform that action at this time.
0 commit comments