diff --git a/mockhttp.go b/mockhttp.go index 6ac132b..86a3dc8 100644 --- a/mockhttp.go +++ b/mockhttp.go @@ -15,7 +15,7 @@ var endpointResponseExamples = map[string]map[string]mockResponse{ Code: 200, }, "POST": mockResponse{ - Content: `{"created_at":"2022-11-15T20:13:35Z","created_by":"629982cc-de05-43db-ae16-28f2399c4910","id":165434,"key":"9v1faketcjbl4sn1013keyd43n2a8qlfakeog8yvp40hx16keyjo1bpds4y2dfms3","name":"mykey_1"}`, + Content: `{"created_at":"2022-11-15T20:13:35Z","created_by":"629982cc-de05-43db-ae16-28f2399c4910","id":165434,"key":"9v1faketcjbl4sn1013keyd43n2a8qlfakeog8yvp40hx16keyjo1bpds4y2dfms3","name":"mykey"}`, Code: 200, }, }, diff --git a/openAPIDefinition.json b/openAPIDefinition.json index 981b772..4628253 100644 --- a/openAPIDefinition.json +++ b/openAPIDefinition.json @@ -138,7 +138,7 @@ "example": { "id": 165434, "key": "9v1faketcjbl4sn1013keyd43n2a8qlfakeog8yvp40hx16keyjo1bpds4y2dfms3", - "name": "mykey_1", + "name": "mykey", "created_at": "2022-11-15T20:13:35Z", "created_by": "629982cc-de05-43db-ae16-28f2399c4910" } @@ -5813,6 +5813,7 @@ "BillingAccount": { "type": "object", "required": [ + "state", "payment_source", "subscription_type", "payment_method", @@ -5827,6 +5828,9 @@ "address_state" ], "properties": { + "state": { + "$ref": "#/components/schemas/BillingAccountState" + }, "payment_source": { "$ref": "#/components/schemas/PaymentSource" }, @@ -5891,6 +5895,17 @@ } } }, + "BillingAccountState": { + "type": "string", + "description": "State of the billing account.\n", + "enum": [ + "UNKNOWN", + "active", + "suspended", + "deactivated", + "deleted" + ] + }, "BillingSubscriptionType": { "type": "string", "description": "Type of subscription to Neon Cloud.\nNotice that for users without billing account this will be \"UNKNOWN\"\n", @@ -6589,6 +6604,17 @@ } } }, + "ConvertUserToOrgRequest": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, "CurrentUserInfoAuthResponse": { "type": "object", "required": [ diff --git a/sdk.go b/sdk.go index d83fb2d..78ee5ee 100644 --- a/sdk.go +++ b/sdk.go @@ -976,6 +976,7 @@ type BillingAccount struct { PaymentSource PaymentSource `json:"payment_source"` // QuotaResetAtLast The last time the quota was reset. Defaults to the date-time the account is created. QuotaResetAtLast time.Time `json:"quota_reset_at_last"` + State BillingAccountState `json:"state"` SubscriptionType BillingSubscriptionType `json:"subscription_type"` // TaxID The tax identification number for the billing account, displayed on invoices. TaxID *string `json:"tax_id,omitempty"` @@ -983,6 +984,17 @@ type BillingAccount struct { TaxIDType *string `json:"tax_id_type,omitempty"` } +// BillingAccountState State of the billing account. +type BillingAccountState string + +const ( + BillingAccountStateUNKNOWN BillingAccountState = "UNKNOWN" + BillingAccountStateActive BillingAccountState = "active" + BillingAccountStateDeactivated BillingAccountState = "deactivated" + BillingAccountStateDeleted BillingAccountState = "deleted" + BillingAccountStateSuspended BillingAccountState = "suspended" +) + // BillingPaymentMethod Indicates whether and how an account makes payments. type BillingPaymentMethod string