extend_params = new ExtendParams(); } public function toString() { $obj = (array) $this; $result = $obj['extend_params']->toArray(); if (null === $result) { unset($obj['extend_params']); } else { $obj['extend_params'] = $result; } if (null === $obj['logistics_detail']) { unset($obj['logistics_detail']); } else { $obj['logistics_detail'] = json_encode($obj['logistics_detail']); } if (null === $obj['business_params']) { unset($obj['business_params']); } else { $obj['business_params'] = json_encode($obj['business_params']); } if (null === $obj['receiver_address_info']) { unset($obj['receiver_address_info']); } else { $obj['receiver_address_info'] = json_encode($obj['receiver_address_info']); } foreach ($obj as $key => $value) { if (null === $value) { unset($obj[$key]); } } return json_encode($obj); } }