https://github.com/mhndev/asmari
Asmari Insurance Company API php client
https://github.com/mhndev/asmari
client-side insurance php php-client
Last synced: 3 months ago
JSON representation
Asmari Insurance Company API php client
- Host: GitHub
- URL: https://github.com/mhndev/asmari
- Owner: mhndev
- Created: 2019-08-31T10:54:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-16T08:19:26.000Z (almost 6 years ago)
- Last Synced: 2025-02-23T07:31:48.210Z (8 months ago)
- Topics: client-side, insurance, php, php-client
- Language: PHP
- Homepage:
- Size: 676 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Asmari Company PHP API Client
you can find usage of this library down here,
```php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);require "vendor/autoload.php";
$wsdl = "http://example.com/wrapper/travel/soap/?wsdl";
$session_id = "xyz";$asmari_client = new \mhndev\asmari\AsmariSoapClient($wsdl, $session_id);
#### 1) method get_zone_by_country
for($i=1; $i<=113; $i++) {
$res = $asmari_client->getZoneByCountry($i);
$returned_zones[] = $res;
$zone_countries[$res][] = $i;
}#### 2) method get_price
$get_price_data_object = (new \mhndev\asmari\GetPriceDataObject())
->setBirthDate(DateTime::createFromFormat('Y-m-d', '2011-05-01'))
->setZoneId(1)
->setDurationId(2);$res = $asmari_client->getPrice($get_price_data_object);
var_dump($res);
die();#### 3) method issue
$issue_data_object = (new \mhndev\asmari\IssueDataObject())
->setBirthDate(DateTime::createFromFormat('Y-m-d', '2011-05-01'))
->setZoneId(1)
->setDurationId(2)
->setFirstName('Majid')
->setLastName('Abdolhosseini')
->setPassportNumber('J97634522')
->setNationalCode('0014297884');
$res = $asmari_client->issue($issue_data_object);var_dump($res);
die();```