Skip to main content
PATCH
/
v1
/
billing-accounts
/
{id}
Update a billing account
curl --request PATCH \
  --url https://rest.compute.cudo.org/v1/billing-accounts/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "billingAccount": {
    "billingAddress": {
      "city": "<string>",
      "country": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "name": "<string>",
      "phone": "<string>",
      "postalCode": "<string>",
      "state": "<string>"
    },
    "billingThreshold": {
      "value": "<string>"
    },
    "creditBalance": {
      "value": "<string>"
    },
    "creditBalanceRecharge": {
      "autoRecharge": true,
      "high": {
        "value": "<string>"
      },
      "low": {
        "value": "<string>"
      },
      "transaction": {
        "amount": {
          "value": "<string>"
        },
        "createTime": "2023-11-07T05:31:56Z",
        "description": "<string>",
        "id": "<string>",
        "lastPaymentError": {
          "code": "<string>",
          "declineCode": "<string>"
        },
        "latestCharge": {
          "amount": {
            "value": "<string>"
          },
          "createTime": "2023-11-07T05:31:56Z",
          "failureCode": "<string>",
          "paid": true,
          "refunded": true,
          "status": "<string>"
        },
        "status": "<string>",
        "succeeded": true
      }
    },
    "displayName": "<string>",
    "hourlySpendLimit": {
      "value": "<string>"
    },
    "hourlySpendRate": {
      "value": "<string>"
    },
    "monthlySpendLimit": {
      "value": "<string>"
    },
    "nextInvoiceTotal": {
      "value": "<string>"
    },
    "paymentTerms": "PAYMENT_TERMS_UNSPECIFIED",
    "state": "STATE_UNSPECIFIED",
    "stripeRef": "<string>",
    "taxId": {
      "type": "<string>",
      "value": "<string>"
    }
  },
  "updateMask": "<string>"
}'
{
  "billingAddress": {
    "city": "<string>",
    "country": "<string>",
    "line1": "<string>",
    "line2": "<string>",
    "name": "<string>",
    "phone": "<string>",
    "postalCode": "<string>",
    "state": "<string>"
  },
  "billingThreshold": {
    "value": "<string>"
  },
  "createBy": "<string>",
  "createTime": "2023-11-07T05:31:56Z",
  "creditBalance": {
    "value": "<string>"
  },
  "creditBalanceRecharge": {
    "autoRecharge": true,
    "high": {
      "value": "<string>"
    },
    "low": {
      "value": "<string>"
    },
    "transaction": {
      "amount": {
        "value": "<string>"
      },
      "createTime": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "id": "<string>",
      "lastPaymentError": {
        "code": "<string>",
        "declineCode": "<string>"
      },
      "latestCharge": {
        "amount": {
          "value": "<string>"
        },
        "createTime": "2023-11-07T05:31:56Z",
        "failureCode": "<string>",
        "paid": true,
        "refunded": true,
        "status": "<string>"
      },
      "status": "<string>",
      "succeeded": true
    }
  },
  "deleteTime": "2023-11-07T05:31:56Z",
  "displayName": "<string>",
  "hourlySpendLimit": {
    "value": "<string>"
  },
  "hourlySpendRate": {
    "value": "<string>"
  },
  "id": "<string>",
  "invoiceTime": "2023-11-07T05:31:56Z",
  "monthlySpend": "<string>",
  "monthlySpendLimit": {
    "value": "<string>"
  },
  "nextInvoiceTotal": {
    "value": "<string>"
  },
  "paymentTerms": "PAYMENT_TERMS_UNSPECIFIED",
  "purgeTime": "2023-11-07T05:31:56Z",
  "state": "STATE_UNSPECIFIED",
  "stripeRef": "<string>",
  "taxId": {
    "id": "<string>",
    "type": "<string>",
    "value": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Path Parameters

id
string
required

Body

application/json
updateMask
string
required
billingAccount
object

Response

A successful response.

billingAddress
object
billingThreshold
object

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.

createBy
string
createTime
string<date-time>
creditBalance
object

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.

creditBalanceRecharge
object
deleteTime
string<date-time>
displayName
string
hourlySpendLimit
object

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.

hourlySpendRate
object

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.

id
string
invoiceTime
string<date-time>
monthlySpend
string
monthlySpendLimit
object

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.

nextInvoiceTotal
object

A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.

paymentTerms
enum<string>
default:PAYMENT_TERMS_UNSPECIFIED
Available options:
PAYMENT_TERMS_UNSPECIFIED,
PAYMENT_TERMS_PREPAID,
PAYMENT_TERMS_INVOICE
purgeTime
string<date-time>
state
enum<string>
default:STATE_UNSPECIFIED
Available options:
STATE_UNSPECIFIED,
STATE_ACTIVE,
STATE_SUSPENDED_ABUSE,
STATE_SUSPENDED_PAYMENT,
STATE_DELETED
stripeRef
string
taxId
object