Create
Create a customer
v1.customers.create(**kwargs) -> dataCustomerCustomerCreateResponse
post/v1/customers
Create a new customer
Parameters
nameString
This will be truncated to 160 characters if the provided name is longer.
billing_configobject
optional
{ billing_provider_customer_id, billing_provider_type, aws_is_subscription_product, 3 more}
custom_fieldshash
optional
Hash[Symbol, String]
customer_billing_provider_configurationsarray
optional
Array[{ billing_provider, configuration, delivery_method, delivery_method_id}]
external_idString
optional
(deprecated, use ingest_aliases instead) an alias that can be used to refer to this customer in usage events
minLength1
maxLength128
ingest_aliasesarray
optional
Array[String]
Aliases that can be used to refer to this customer in usage events
Returns
CustomerCreateResponseclass
require "metronome_sdk"
metronome = MetronomeSDK::Client.new(bearer_token: "My Bearer Token")
customer = metronome.v1.customers.create(name: "Example, Inc.")
puts(customer)
200 Example
{
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"external_id": "external_id",
"ingest_aliases": [
"string"
],
"name": "name",
"custom_fields": {
"foo": "string"
}
}
}