configBuilder = $configBuilder; $this->sdkFactory = $sdkFactory; $this->serviceActionPerformerFactory =$serviceActionPerformerFactory; } /** * Create an Invoice Service * * @return Invoice */ public function build() { $config = $this->configBuilder ->setScopeCode($this->scopeCode) ->setScopeType($this->scopeType) ->build(); return $this->sdkFactory->create( [ 'configuration' => $config, 'actionPerformerFactory' => $this->serviceActionPerformerFactory ] ); } /** * Set the Scope Code * * @param string|null $storeCode * @return InvoiceBuilder */ public function setScopeCode($storeCode) { $this->scopeCode = $storeCode; return $this; } /** * Set the Scope Type * * @param string|null $scopeType * @return InvoiceBuilder */ public function setScopeType($scopeType) { $this->scopeType = $scopeType; return $this; } }