コード例 #1
0
 /**
  * Get details for GetTaxRequest
  *
  * @param \Magento\Store\Api\Data\StoreInterface $store
  * @param $address \Magento\Quote\Api\Data\AddressInterface|\Magento\Sales\Api\Data\OrderAddressInterface
  * @param \Magento\Quote\Api\Data\CartInterface|\Magento\Sales\Api\Data\OrderInterface $object
  * @return array
  * @throws LocalizedException
  */
 protected function retrieveGetTaxRequestFields(StoreInterface $store, $address, $object)
 {
     $customerId = $object->getCustomerId();
     $customer = $this->getCustomerById($customerId);
     $storeId = $store->getId();
     if ($this->config->getLiveMode() == Config::API_PROFILE_NAME_PROD) {
         $companyCode = $this->config->getCompanyCode($storeId);
     } else {
         $companyCode = $this->config->getDevelopmentCompanyCode($storeId);
     }
     $businessIdentificationNumber = $this->getBusinessIdentificationNumber($store, $address, $customer);
     $locationCode = $this->config->getLocationCode($store);
     return ['BusinessIdentificationNo' => $businessIdentificationNumber, 'CompanyCode' => $companyCode, 'LocationCode' => $locationCode, 'OriginAddress' => $this->address->getAddress($this->config->getOriginAddress($storeId))];
 }