Skip to content

Commit

Permalink
feat: auto-updated SDK (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 23, 2024
1 parent baff725 commit 2ad6227
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mockhttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Expand Down
28 changes: 27 additions & 1 deletion openAPIDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -5813,6 +5813,7 @@
"BillingAccount": {
"type": "object",
"required": [
"state",
"payment_source",
"subscription_type",
"payment_method",
Expand All @@ -5827,6 +5828,9 @@
"address_state"
],
"properties": {
"state": {
"$ref": "#/components/schemas/BillingAccountState"
},
"payment_source": {
"$ref": "#/components/schemas/PaymentSource"
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -6589,6 +6604,17 @@
}
}
},
"ConvertUserToOrgRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"CurrentUserInfoAuthResponse": {
"type": "object",
"required": [
Expand Down
12 changes: 12 additions & 0 deletions sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,13 +976,25 @@ 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"`
// TaxIDType The type of the tax identification number based on the country.
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

Expand Down

0 comments on commit 2ad6227

Please sign in to comment.