public function send()
    {
        $aReminder = $this->json();
        $aReminder = json_decode($aReminder, true);

        $aReminder['sales_invoice_ids'] = array_map(function ($salesInvoice) {
            if (is_object($salesInvoice)) {
                return $salesInvoice->id;
            } else {
                return $salesInvoice;
            }
        }, $this->sales_invoices);
        unset($aReminder['sales_invoices']);

        $this->connection->post($this->endpoint . '/send_reminders', json_encode([
            'sales_invoice_reminders' => [$aReminder],
        ]));
    }
public function send()
    {
        $aReminder = $this->json();
        $aReminder = json_decode($aReminder, true);

        $aReminder['sales_invoice_ids'] = array_map(function ($salesInvoice) {
            if (is_object($salesInvoice)) {
                return $salesInvoice->id;
            } else {
                return $salesInvoice;
            }
        }, $this->sales_invoices);
        unset($aReminder['sales_invoices']);

        $this->connection->post($this->endpoint . '/send_reminders', json_encode([
            'sales_invoice_reminders' => [$aReminder],
        ]));
    }
public function send ( ) { $ aReminder = $ this -> json ( ) ; $ aReminder = json_decode ( $ aReminder , true ) ; $ aReminder [ 'sales_invoice_ids' ] = array_map ( function ( $ salesInvoice ) { if ( is_object ( $ salesInvoice ) ) { return $ salesInvoice -> id ; } else { return $ salesInvoice ; } } , $ this -> sales_invoices ) ; unset ( $ aReminder [ 'sales_invoices' ] ) ; $ this -> connection -> post ( $ this -> endpoint . '/send_reminders' , json_encode ( [ 'sales_invoice_reminders' => [ $ aReminder ] , ] ) ) ; }
Pushes the reminder.

@throws \Picqer\Financials\Moneybird\Exceptions\ApiException
Pushes the reminder .