/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.168.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// WhatsAppMessagePricing : WhatsApp only. Meta's `pricing` object from the status webhook, camelCased. Present (possibly null) on every WhatsApp `message.sent`, `message.delivered`, `message.read` and `message.failed`; absent on other platforms. Meta includes it on `sent` and on one of `delivered` or `read`, so it is null on the others and usually on `failed`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WhatsAppMessagePricing {
/// Whether Meta bills this message. Meta has announced it will deprecate this field.
#[serde(rename = "billable", deserialize_with = "Option::deserialize")]
pub billable: Option<bool>,
/// `PMP` (per-message pricing) or `CBP` (conversation-based, messages before 2025-07-01).
#[serde(rename = "pricingModel", deserialize_with = "Option::deserialize")]
pub pricing_model: Option<String>,
/// Pricing category as Meta sends it, for example `marketing`, `marketing_lite`, `utility`, `authentication`, `authentication-international`, `service`, `referral_conversion`.
#[serde(rename = "category", deserialize_with = "Option::deserialize")]
pub category: Option<String>,
/// `regular` (billable), `free_customer_service` or `free_entry_point`.
#[serde(rename = "type", deserialize_with = "Option::deserialize")]
pub r#type: Option<String>,
}
impl WhatsAppMessagePricing {
/// WhatsApp only. Meta's `pricing` object from the status webhook, camelCased. Present (possibly null) on every WhatsApp `message.sent`, `message.delivered`, `message.read` and `message.failed`; absent on other platforms. Meta includes it on `sent` and on one of `delivered` or `read`, so it is null on the others and usually on `failed`.
pub fn new(
billable: Option<bool>,
pricing_model: Option<String>,
category: Option<String>,
r#type: Option<String>,
) -> WhatsAppMessagePricing {
WhatsAppMessagePricing {
billable,
pricing_model,
category,
r#type,
}
}
}