Skip to content

Commit 3bea57b

Browse files
author
Mplus Software
committed
Update to v0.9.5
convertRelation no longer always add the fields that may be omitted.
1 parent 7457d55 commit 3bea57b

1 file changed

Lines changed: 1 addition & 49 deletions

File tree

Mplusqapiclient.php

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class MplusQAPIclient
44
{
5-
const CLIENT_VERSION = '0.9.4';
5+
const CLIENT_VERSION = '0.9.5';
66

77
var $MIN_API_VERSION_MAJOR = 0;
88
var $MIN_API_VERSION_MINOR = 9;
@@ -2421,54 +2421,6 @@ public function convertInvoiceId($invoiceId) {
24212421
//----------------------------------------------------------------------------
24222422

24232423
public function convertRelation($relation) {
2424-
if ( ! isset($relation['name'])) {
2425-
$relation['name'] = '';
2426-
}
2427-
if ( ! isset($relation['address'])) {
2428-
$relation['address'] = '';
2429-
}
2430-
if ( ! isset($relation['zipcode'])) {
2431-
$relation['zipcode'] = '';
2432-
}
2433-
if ( ! isset($relation['city'])) {
2434-
$relation['city'] = '';
2435-
}
2436-
if ( ! isset($relation['country'])) {
2437-
$relation['country'] = '';
2438-
}
2439-
if ( ! isset($relation['deliveryAddress'])) {
2440-
$relation['deliveryAddress'] = '';
2441-
}
2442-
if ( ! isset($relation['deliveryZipcode'])) {
2443-
$relation['deliveryZipcode'] = '';
2444-
}
2445-
if ( ! isset($relation['deliveryCity'])) {
2446-
$relation['deliveryCity'] = '';
2447-
}
2448-
if ( ! isset($relation['deliveryCountry'])) {
2449-
$relation['deliveryCountry'] = '';
2450-
}
2451-
if ( ! isset($relation['contact'])) {
2452-
$relation['contact'] = '';
2453-
}
2454-
if ( ! isset($relation['telephone'])) {
2455-
$relation['telephone'] = '';
2456-
}
2457-
if ( ! isset($relation['mobile'])) {
2458-
$relation['mobile'] = '';
2459-
}
2460-
if ( ! isset($relation['email'])) {
2461-
$relation['email'] = '';
2462-
}
2463-
if ( ! isset($relation['website'])) {
2464-
$relation['website'] = '';
2465-
}
2466-
if ( ! isset($relation['points'])) {
2467-
$relation['points'] = 0;
2468-
}
2469-
if ( ! isset($relation['balance'])) {
2470-
$relation['balance'] = 0;
2471-
}
24722424
$object = arrayToObject(array('relation'=>$relation));
24732425
return $object;
24742426
} // END convertRelation()

0 commit comments

Comments
 (0)