Enabled getting email from customer, added url() for a base url

This commit is contained in:
Deon George 2022-08-19 20:11:46 +10:00
parent 1567806b87
commit 59302bd3e8
2 changed files with 9 additions and 0 deletions

View File

@ -32,6 +32,13 @@ final class API
Log::debug(sprintf('%s:Intuit API for id [%s]',static::LOGKEY,$token->realm_id));
}
/* STATIC */
public static function url(bool $tryprod=FALSE): string
{
return (config('app.env') == 'local' && ! $tryprod) ? 'https://app.sandbox.qbo.intuit.com/app' : 'https://app.qbo.intuit.com/app';
}
/**
* Convert an Array to Curl Headers
*

View File

@ -66,6 +66,8 @@ final class Customer extends Model
return object_get($this->getAttribute('MetaData'),'CreateTime');
case 'updated_at':
return object_get($this->getAttribute('MetaData'),'LastUpdatedTime');
case 'email':
return object_get($this->getAttribute('PrimaryEmailAddr'),'Address');
default:
return parent::__get(Arr::get($keymap,$key,$key));