This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch pr90
in repository https://gitbox.apache.org/repos/asf/cloudstack-go.git

commit 544e98c56c06d237cfd921adab883a56ab447c72
Author: tonymmm1 <t...@mail.magnatox.com>
AuthorDate: Mon Jul 22 18:30:32 2024 -0500

    implemented QuotaUpdate
---
 cloudstack/QuotaService.go | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/cloudstack/QuotaService.go b/cloudstack/QuotaService.go
index 526d3e5..bc910a8 100644
--- a/cloudstack/QuotaService.go
+++ b/cloudstack/QuotaService.go
@@ -44,6 +44,7 @@ type QuotaServiceIface interface {
        NewQuotaTariffListParams() *QuotaTariffListParams
        QuotaTariffUpdate(p *QuotaTariffUpdateParams) 
(*QuotaTariffUpdateResponse, error)
        NewQuotaTariffUpdateParams(name string) *QuotaTariffUpdateParams
+       QuotaUpdate() (*QuotaUpdateResponse, error)
 }
 
 type QuotaBalanceParams struct {
@@ -1398,3 +1399,21 @@ type QuotaTariffUpdateResponse struct {
        UsageUnit            string `json:"usageUnit"`
        Uuid                 string `json:"uuid"`
 }
+
+func (s *QuotaService) QuotaUpdate() (*QuotaUpdateResponse, error) {
+       resp, err := s.cs.newRequest("quotaUpdate")
+       if err != nil {
+               return nil, err
+       }
+
+       var r QuotaUpdateResponse
+       if err := json.Unmarshal(resp, &r); err != nil {
+               return nil, err
+       }
+
+       return &r, nil
+}
+
+type QuotaUpdateResponse struct {
+       UpdatedOn string `json:"updated_on"`
+}

Reply via email to