DemoListBill.php 554 B

123456789101112131415161718192021222324
  1. <?php
  2. require('../../vendor/autoload.php');
  3. use Volc\Service\Billing;
  4. $client = Billing::getInstance();
  5. // call below method if you dont set ak and sk in ~/.volc/config
  6. $ak = "<Your AK>";
  7. $sk = "<Your SK>";
  8. $client->setAccessKey($ak);
  9. $client->setSecretKey($sk);
  10. $response = $client->listBill(['query' => [
  11. 'BillPeriod' => '2022-01',
  12. 'Limit' => 10,
  13. 'Offset' => 0,
  14. 'Product' => '',
  15. 'BillingMode' => '',
  16. 'BillCategoryParent' => '',
  17. 'PayStatus' => '',
  18. 'IgnoreZero' => '0',
  19. 'NeedRecordNum' => '0']]);
  20. echo $response;