Calculate message
Calculates SMS segments, encoding and estimated net price of the content. Nothing is sent.
Single message
SimPay::sending()->calculator()->single('Message content');Response will be SendingCalculatedMessageResponse.
Multiple messages
use SimPay\Laravel\Dto\Sending\CalculatorMassMessageItemData;
SimPay::sending()->calculator()->mass([
// plain string is treated as content
'Message content',
// or with recipient and override (both optional, returned back in the response)
new CalculatorMassMessageItemData(content: 'Message content', msisdn: '48123456789', override: 'SimPay'),
], detailed: true);When detailed is false, only totals are returned (validMessages and invalidMessages will be null).
Response will be SendingCalculatedMassResponse.
Last updated