Class CustomFieldAddKeyParams
-
- All Implemented Interfaces:
-
com.metronome.api.core.Params
public final class CustomFieldAddKeyParams implements Params
Creates a new custom field key for a given entity (e.g. billable metric, contract, alert).
Custom fields are properties that you can add to Metronome objects to store metadata like foreign keys or other descriptors. This metadata can get transferred to or accessed by other systems to contextualize Metronome data and power business processes. For example, to service workflows like revenue recognition, reconciliation, and invoicing, custom fields help Metronome know the relationship between entities in the platform and third-party systems.
Create a new custom field key for Customer objects in Metronome. You can then use the Set Custom Field Values endpoint to set the value of this key for a specific customer.
Specify whether the key should enforce uniqueness. If the key is set to enforce uniqueness and you attempt to set a custom field value for the key that already exists, it will fail.
Custom fields set on commits, credits, and contracts can be used to scope alert evaluation. For example, you can create a spend threshold alert that only considers spend associated with contracts with custom field key
contract_typeand valuepaygoCustom fields set on products can be used in the Stripe integration to set metadata on invoices.
Custom fields for customers, contracts, invoices, products, commits, scheduled charges, and subscriptions are passed down to the invoice.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCustomFieldAddKeyParams.BuilderA builder for CustomFieldAddKeyParams.
public final classCustomFieldAddKeyParams.Bodypublic final classCustomFieldAddKeyParams.Entity
-
Method Summary
Modifier and Type Method Description final BooleanenforceUniqueness()final CustomFieldAddKeyParams.Entityentity()final Stringkey()final JsonField<Boolean>_enforceUniqueness()Returns the raw JSON value of enforceUniqueness. final JsonField<CustomFieldAddKeyParams.Entity>_entity()Returns the raw JSON value of entity. final JsonField<String>_key()Returns the raw JSON value of key. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final CustomFieldAddKeyParams.BuildertoBuilder()final CustomFieldAddKeyParams.Body_body()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static CustomFieldAddKeyParams.Builderbuilder()Returns a mutable builder for constructing an instance of CustomFieldAddKeyParams. -
-
Method Detail
-
enforceUniqueness
final Boolean enforceUniqueness()
-
entity
final CustomFieldAddKeyParams.Entity entity()
-
_enforceUniqueness
final JsonField<Boolean> _enforceUniqueness()
Returns the raw JSON value of enforceUniqueness.
Unlike enforceUniqueness, this method doesn't throw if the JSON field has an unexpected type.
-
_entity
final JsonField<CustomFieldAddKeyParams.Entity> _entity()
Returns the raw JSON value of entity.
Unlike entity, this method doesn't throw if the JSON field has an unexpected type.
-
_key
final JsonField<String> _key()
Returns the raw JSON value of key.
Unlike key, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final CustomFieldAddKeyParams.Builder toBuilder()
-
_body
final CustomFieldAddKeyParams.Body _body()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static CustomFieldAddKeyParams.Builder builder()
Returns a mutable builder for constructing an instance of CustomFieldAddKeyParams.
The following fields are required:
.enforceUniqueness() .entity() .key()
-
-
-
-