CreateProductRequest

data class CreateProductRequest(val name: String, val description: String, val defaultPrice: Int, val purchaseType: ProductPurchaseType, val recurringInterval: ProductRecurringInterval?, val shippable: Boolean?, val url: String?, val metadata: Map<String, String>?)

Request body for creating a new product.

Constructors

Link copied to clipboard
constructor(name: String, description: String, defaultPrice: Int, purchaseType: ProductPurchaseType, recurringInterval: ProductRecurringInterval?, shippable: Boolean?, url: String?, metadata: Map<String, String>?)

Properties

Link copied to clipboard
@SerializedName(value = "default_price")
val defaultPrice: Int

Default price for the product, in the smallest currency unit (e.g. cents).

Link copied to clipboard

Human-readable description of the product.

Link copied to clipboard

Merchant-defined key-value pairs to attach to the product. Omitted when null.

Link copied to clipboard

Display name of the product.

Link copied to clipboard
@SerializedName(value = "purchase_type")
val purchaseType: ProductPurchaseType

Whether the product is purchased once or on a recurring basis.

Link copied to clipboard
@SerializedName(value = "recurring_interval")
val recurringInterval: ProductRecurringInterval?

The billing cadence for the product. Required when purchaseType is ProductPurchaseType.RECURRING.

Link copied to clipboard

Whether the product requires physical shipment to the customer. Omitted when null.

Link copied to clipboard
val url: String?

URL for the product's external page or listing. Omitted when null.