pub struct CreateCustomerCommitV1Body {Show 18 fields
pub access_schedule: CreateCustomerCommitV1BodyAccessSchedule,
pub applicable_contract_ids: Vec<String>,
pub applicable_product_ids: Vec<Uuid>,
pub applicable_product_tags: Vec<String>,
pub custom_fields: HashMap<String, String>,
pub customer_id: Uuid,
pub description: Option<String>,
pub invoice_contract_id: Option<Uuid>,
pub invoice_schedule: Option<CreateCustomerCommitV1BodyInvoiceSchedule>,
pub name: Option<CreateCustomerCommitV1BodyName>,
pub netsuite_sales_order_id: Option<String>,
pub priority: f64,
pub product_id: Uuid,
pub rate_type: Option<String>,
pub salesforce_opportunity_id: Option<String>,
pub specifiers: Vec<CreateCustomerCommitV1BodySpecifiersItem>,
pub type_: String,
pub uniqueness_key: Option<CreateCustomerCommitV1BodyUniquenessKey>,
}Expand description
CreateCustomerCommitV1Body
JSON schema
{
"type": "object",
"required": [
"access_schedule",
"customer_id",
"priority",
"product_id",
"type"
],
"properties": {
"access_schedule": {
"description": "Schedule for distributing the commit to the
customer. For \"POSTPAID\" commits only one schedule item is allowed and
amount must match invoice_schedule total.",
"type": "object",
"required": [
"schedule_items"
],
"properties": {
"credit_type_id": {
"description": "Defaults to USD (cents) if not passed",
"type": "string",
"format": "uuid"
},
"schedule_items": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"ending_before",
"starting_at"
],
"properties": {
"amount": {
"type": "number"
},
"ending_before": {
"description": "RFC 3339 timestamp (exclusive)",
"type": "string",
"format": "date-time"
},
"starting_at": {
"description": "RFC 3339 timestamp (inclusive)",
"type": "string",
"format": "date-time"
}
}
}
}
}
},
"applicable_contract_ids": {
"description": "Which contract the commit applies to. If not
provided, the commit applies to all contracts.",
"type": "array",
"items": {
"type": "string"
}
},
"applicable_product_ids": {
"description": "Which products the commit applies to. If
applicable_product_ids, applicable_product_tags or specifiers are not
provided, the commit applies to all products.",
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"applicable_product_tags": {
"description": "Which tags the commit applies to. If
applicable_product_ids, applicable_product_tags or specifiers are not
provided, the commit applies to all products.",
"type": "array",
"items": {
"type": "string"
}
},
"custom_fields": {
"description": "Custom fields to be added eg. { \"key1\":
\"value1\", \"key2\": \"value2\" }",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-cf-entity": "commit"
},
"customer_id": {
"type": "string",
"format": "uuid"
},
"description": {
"description": "Used only in UI/API. It is not exposed to end
customers.",
"type": "string"
},
"invoice_contract_id": {
"description": "The contract that this commit will be billed on.
This is required for \"POSTPAID\" commits and for \"PREPAID\" commits
unless there is no invoice schedule above (i.e., the commit is 'free'),
or if do_not_invoice is set to true.",
"type": "string",
"format": "uuid"
},
"invoice_schedule": {
"description": "Required for \"POSTPAID\" commits: the true up
invoice will be generated at this time and only one schedule item is
allowed; the total must match accesss_schedule amount. Optional for
\"PREPAID\" commits: if not provided, this will be a \"complimentary\"
commit with no invoice.",
"type": "object",
"properties": {
"credit_type_id": {
"description": "Defaults to USD (cents) if not passed.",
"type": "string",
"format": "uuid"
},
"do_not_invoice": {
"description": "This field is only applicable to commit invoice
schedules. If true, this schedule will not generate an invoice.",
"default": false,
"type": "boolean"
},
"recurring_schedule": {
"description": "Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1.",
"type": "object",
"required": [
"amount_distribution",
"ending_before",
"frequency",
"starting_at"
],
"properties": {
"amount": {
"description": "Amount for the charge. Can be provided
instead of unit_price and quantity. If amount is sent, the unit_price is
assumed to be the amount and quantity is inferred to be 1.",
"type": "number"
},
"amount_distribution": {
"type": "string"
},
"ending_before": {
"description": "RFC 3339 timestamp (exclusive).",
"type": "string",
"format": "date-time"
},
"frequency": {
"type": "string"
},
"quantity": {
"description": "Quantity for the charge. Will be multiplied
by unit_price to determine the amount and must be specified with
unit_price. If specified amount cannot be provided.",
"type": "number"
},
"starting_at": {
"description": "RFC 3339 timestamp (inclusive).",
"type": "string",
"format": "date-time"
},
"unit_price": {
"description": "Unit price for the charge. Will be
multiplied by quantity to determine the amount and must be specified
with quantity. If specified amount cannot be provided.",
"type": "number"
}
}
},
"schedule_items": {
"description": "Either provide amount or provide both
unit_price and quantity.",
"type": "array",
"items": {
"type": "object",
"required": [
"timestamp"
],
"properties": {
"amount": {
"description": "Amount for the charge. Can be provided
instead of unit_price and quantity. If amount is sent, the unit_price is
assumed to be the amount and quantity is inferred to be 1.",
"type": "number"
},
"quantity": {
"description": "Quantity for the charge. Will be
multiplied by unit_price to determine the amount and must be specified
with unit_price. If specified amount cannot be provided.",
"type": "number"
},
"timestamp": {
"description": "timestamp of the scheduled event",
"type": "string",
"format": "date-time"
},
"unit_price": {
"description": "Unit price for the charge. Will be
multiplied by quantity to determine the amount and must be specified
with quantity. If specified amount cannot be provided.",
"type": "number"
}
}
}
}
}
},
"name": {
"description": "displayed on invoices",
"type": "string",
"minLength": 1
},
"netsuite_sales_order_id": {
"description": "This field's availability is dependent on your
client's configuration.",
"type": "string",
"x-mint": {
"groups": [
"client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2"
]
}
},
"priority": {
"description": "If multiple credits or commits are applicable, the
one with the lower priority will apply first.",
"type": "number"
},
"product_id": {
"description": "ID of the fixed product associated with the commit.
This is required because products are used to invoice the commit
amount.",
"type": "string",
"format": "uuid"
},
"rate_type": {
"type": "string"
},
"salesforce_opportunity_id": {
"description": "This field's availability is dependent on your
client's configuration.",
"type": "string",
"x-mint": {
"groups": [
"client_id:e3147d6d-4101-4cd1-9888-ce3afeeac5b2"
]
}
},
"specifiers": {
"description": "List of filters that determine what kind of
customer usage draws down a commit or credit. A customer's usage needs
to meet the condition of at least one of the specifiers to contribute to
a commit's or credit's drawdown. This field cannot be used together with
`applicable_product_ids` or `applicable_product_tags`.",
"type": "array",
"items": {
"type": "object",
"properties": {
"exclude": {
"description": "If provided, the specifier will not apply to
product usage that matches the inclusion criteria and any of the
excluding values.",
"type": "array",
"items": {
"type": "object",
"properties": {
"product_tags": {
"description": "If provided, the specifier will not
apply to products with all the specified tags.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"x-mint": {
"groups": [
"ff:exclude-specifiers-ga"
]
},
"x-stainless-skip": true
},
"presentation_group_values": {
"description": "If provided, the specifier will apply to
product usage with these set of presentation group values.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"pricing_group_values": {
"description": "If provided, the specifier will apply to
product usage with these set of pricing group values.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"product_id": {
"description": "If provided, the specifier will only apply to
the product with the specified ID.",
"type": "string",
"format": "uuid"
},
"product_tags": {
"description": "If provided, the specifier will only apply to
products with all the specified tags.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"type": {
"type": "string"
},
"uniqueness_key": {
"description": "Prevents the creation of duplicates. If a request
to create a commit or credit is made with a uniqueness key that was
previously used to create a commit or credit, a new record will not be
created and the request will fail with a 409 error.",
"type": "string",
"maxLength": 128,
"minLength": 1
}
}
}Fields§
§access_schedule: CreateCustomerCommitV1BodyAccessSchedule§applicable_contract_ids: Vec<String>Which contract the commit applies to. If not provided, the commit applies to all contracts.
applicable_product_ids: Vec<Uuid>Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.
Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.
custom_fields: HashMap<String, String>Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }
customer_id: Uuid§description: Option<String>Used only in UI/API. It is not exposed to end customers.
invoice_contract_id: Option<Uuid>The contract that this commit will be billed on. This is required for “POSTPAID” commits and for “PREPAID” commits unless there is no invoice schedule above (i.e., the commit is ‘free’), or if do_not_invoice is set to true.
invoice_schedule: Option<CreateCustomerCommitV1BodyInvoiceSchedule>§name: Option<CreateCustomerCommitV1BodyName>displayed on invoices
netsuite_sales_order_id: Option<String>This field’s availability is dependent on your client’s configuration.
priority: f64If multiple credits or commits are applicable, the one with the lower priority will apply first.
product_id: UuidID of the fixed product associated with the commit. This is required because products are used to invoice the commit amount.
rate_type: Option<String>§salesforce_opportunity_id: Option<String>This field’s availability is dependent on your client’s configuration.
specifiers: Vec<CreateCustomerCommitV1BodySpecifiersItem>List of filters that determine what kind of customer usage draws
down a commit or credit. A customer’s usage needs to meet the
condition of at least one of the specifiers to contribute to a
commit’s or credit’s drawdown. This field cannot be used together
with applicable_product_ids or applicable_product_tags.
type_: String§uniqueness_key: Option<CreateCustomerCommitV1BodyUniquenessKey>Prevents the creation of duplicates. If a request to create a commit or credit is made with a uniqueness key that was previously used to create a commit or credit, a new record will not be created and the request will fail with a 409 error.
Trait Implementations§
Source§impl Clone for CreateCustomerCommitV1Body
impl Clone for CreateCustomerCommitV1Body
Source§fn clone(&self) -> CreateCustomerCommitV1Body
fn clone(&self) -> CreateCustomerCommitV1Body
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more