@@ -196,7 +196,47 @@ static class Origin extends JsonableBaseObject {
196196 @ JsonProperty ("id" ) String id ;
197197 @ JsonProperty ("origin" ) Origin origin ;
198198 }
199+
200+ /**
201+ * Represents WhatsApp pricing information in the status webhook.
202+ *
203+ * @since 9.5.0
204+ */
205+ public static class Pricing extends JsonableBaseObject {
206+ @ JsonProperty ("type" ) String type ;
207+ @ JsonProperty ("pricing_model" ) String pricingModel ;
208+ @ JsonProperty ("category" ) String category ;
209+
210+ /**
211+ * The pricing type.
212+ *
213+ * @return The pricing type as a string. Possible values: {@code regular}, {@code free_customer_service}, {@code free_entry_point}.
214+ */
215+ public String getType () {
216+ return type ;
217+ }
218+
219+ /**
220+ * The pricing model.
221+ *
222+ * @return The pricing model as a string. Possible values: {@code PMP}, {@code CBP}.
223+ */
224+ public String getPricingModel () {
225+ return pricingModel ;
226+ }
227+
228+ /**
229+ * The message category.
230+ *
231+ * @return The category as a string. Possible values: {@code authentication}, {@code authentication_international}, {@code marketing}, {@code utility}, {@code service}, {@code referral_conversion}, {@code marketing_lite}.
232+ */
233+ public String getCategory () {
234+ return category ;
235+ }
236+ }
237+
199238 @ JsonProperty ("conversation" ) Conversation conversation ;
239+ @ JsonProperty ("pricing" ) Pricing pricing ;
200240 }
201241
202242 protected MessageStatus () {
@@ -369,6 +409,19 @@ public String getWhatsappConversationId() {
369409 return whatsapp != null && whatsapp .conversation != null ? whatsapp .conversation .id : null ;
370410 }
371411
412+ /**
413+ * If the {@linkplain #getChannel()} is {@linkplain Channel#WHATSAPP}, returns the pricing information
414+ * for the message.
415+ *
416+ * @return The WhatsApp pricing information, {@code null} if absent or not applicable.
417+ *
418+ * @since 9.5.0
419+ */
420+ @ JsonIgnore
421+ public Whatsapp .Pricing getWhatsappPricing () {
422+ return whatsapp != null ? whatsapp .pricing : null ;
423+ }
424+
372425 /**
373426 * Catch-all for properties which are not mapped by this class during deserialization.
374427 *
0 commit comments