/**
  * @param CacheInterface $cache
  * @param AvaTaxLogger $avaTaxLogger
  * @param Tax $taxInteraction
  * @param MetaDataObjectFactory $metaDataObjectFactory
  * @param null $type
  */
 public function __construct(CacheInterface $cache, AvaTaxLogger $avaTaxLogger, Tax $taxInteraction, MetaDataObjectFactory $metaDataObjectFactory, $type = null)
 {
     $this->cache = $cache;
     $this->avaTaxLogger = $avaTaxLogger;
     $this->taxInteraction = $taxInteraction;
     $this->metaDataObject = $metaDataObjectFactory->create(['metaDataProperties' => \ClassyLlama\AvaTax\Framework\Interaction\Tax::$validFields]);
 }
 /**
  * @param CacheInterface $cache
  * @param AvaTaxLogger $avaTaxLogger
  * @param Address $interactionAddress
  * @param MetaDataObjectFactory $metaDataObjectFactory
  * @param null $type
  */
 public function __construct(CacheInterface $cache, AvaTaxLogger $avaTaxLogger, Address $interactionAddress, MetaDataObjectFactory $metaDataObjectFactory, $type = null)
 {
     $this->cache = $cache;
     $this->avaTaxLogger = $avaTaxLogger;
     $this->interactionAddress = $interactionAddress;
     $this->metaDataObject = $metaDataObjectFactory->create(['metaDataProperties' => \ClassyLlama\AvaTax\Framework\Interaction\Address::$validFields]);
     $this->type = $type;
 }
 /**
  * @param MetaDataObjectFactory $metaDataObjectFactory
  * @param ArrayTypeFactory $arrayTypeFactory
  * @param BooleanTypeFactory $booleanTypeFactory
  * @param DoubleTypeFactory $doubleTypeFactory
  * @param IntegerTypeFactory $integerTypeFactory
  * @param ObjectTypeFactory $objectTypeFactory
  * @param StringTypeFactory $stringTypeFactory
  * @param array $metaDataProperties
  */
 public function __construct(MetaDataObjectFactory $metaDataObjectFactory, ArrayTypeFactory $arrayTypeFactory, BooleanTypeFactory $booleanTypeFactory, DoubleTypeFactory $doubleTypeFactory, IntegerTypeFactory $integerTypeFactory, ObjectTypeFactory $objectTypeFactory, StringTypeFactory $stringTypeFactory, array $metaDataProperties)
 {
     $this->metaDataObjectFactory = $metaDataObjectFactory;
     $this->arrayTypeFactory = $arrayTypeFactory;
     $this->booleanTypeFactory = $booleanTypeFactory;
     $this->doubleTypeFactory = $doubleTypeFactory;
     $this->integerTypeFactory = $integerTypeFactory;
     $this->objectTypeFactory = $objectTypeFactory;
     $this->stringTypeFactory = $stringTypeFactory;
     foreach ($metaDataProperties as $name => $metaDataRule) {
         if (in_array($metaDataRule[MetaDataAbstract::ATTR_TYPE], MetaDataAbstract::$types)) {
             $subtype = isset($metaDataRule[MetaDataAbstract::ATTR_SUBTYPE]) ? $metaDataRule[MetaDataAbstract::ATTR_SUBTYPE] : null;
             if (isset($subtype) && !$subtype instanceof $this) {
                 $metaDataRule[MetaDataAbstract::ATTR_SUBTYPE] = $this->metaDataObjectFactory->create(['metaDataProperties' => $subtype]);
             }
             $factoryVariableName = $metaDataRule[MetaDataAbstract::ATTR_TYPE] . 'TypeFactory';
             /** @var $rule MetaDataAbstract */
             $rule = $this->{$factoryVariableName}->create(['name' => $name, 'data' => $metaDataRule]);
             if ($rule instanceof ObjectType && isset($this->classMetaDataMap[$rule->getClass()])) {
                 $className = $this->classMetaDataMap[$rule->getClass()][0];
                 $propertyName = $this->classMetaDataMap[$rule->getClass()][1];
                 $rule->setSubtype($this->metaDataObjectFactory->create(['metaDataProperties' => $className::${$propertyName}]));
             }
             $this->metaDataProperties[$rule->getName()] = $rule;
             if ($rule->getRequired()) {
                 $this->requiredRules[$rule->getName()] = $rule;
             }
         }
     }
 }
Esempio n. 4
0
 /**
  * Address constructor.
  * @param Config $config
  * @param MetaDataObjectFactory $metaDataObjectFactory
  * @param AddressFactory $addressFactory
  * @param AddressServiceSoapFactory $addressServiceSoapFactory
  * @param RegionCollectionFactory $regionCollectionFactory
  * @param CustomerAddressInterfaceFactory $customerAddressFactory
  * @param QuoteAddressInterfaceFactory $quoteAddressFactory
  * @param OrderAddressInterfaceFactory $orderAddressFactory
  * @param DataObjectHelper $dataObjectHelper
  * @param \ClassyLlama\AvaTax\Model\Logger\AvaTaxLogger $avaTaxLogger
  */
 public function __construct(Config $config, MetaDataObjectFactory $metaDataObjectFactory, AddressFactory $addressFactory, AddressServiceSoapFactory $addressServiceSoapFactory, RegionCollectionFactory $regionCollectionFactory, CustomerAddressInterfaceFactory $customerAddressFactory, QuoteAddressInterfaceFactory $quoteAddressFactory, OrderAddressInterfaceFactory $orderAddressFactory, DataObjectHelper $dataObjectHelper, \ClassyLlama\AvaTax\Model\Logger\AvaTaxLogger $avaTaxLogger)
 {
     $this->config = $config;
     $this->metaDataObject = $metaDataObjectFactory->create(['metaDataProperties' => $this::$validFields]);
     $this->addressFactory = $addressFactory;
     $this->addressServiceSoapFactory = $addressServiceSoapFactory;
     $this->regionCollection = $regionCollectionFactory->create();
     $this->customerAddressFactory = $customerAddressFactory;
     $this->quoteAddressFactory = $quoteAddressFactory;
     $this->orderAddressFactory = $orderAddressFactory;
     $this->dataObjectHelper = $dataObjectHelper;
     $this->avaTaxLogger = $avaTaxLogger;
 }
Esempio n. 5
0
 /**
  * Class constructor
  *
  * @param Config $config
  * @param \ClassyLlama\AvaTax\Helper\TaxClass $taxClassHelper
  * @param \ClassyLlama\AvaTax\Model\Logger\AvaTaxLogger $avaTaxLogger
  * @param MetaDataObjectFactory $metaDataObjectFactory
  * @param LineFactory $lineFactory
  * @param ResourceProduct $resourceProduct
  */
 public function __construct(Config $config, \ClassyLlama\AvaTax\Helper\TaxClass $taxClassHelper, \ClassyLlama\AvaTax\Model\Logger\AvaTaxLogger $avaTaxLogger, MetaDataObjectFactory $metaDataObjectFactory, LineFactory $lineFactory, ResourceProduct $resourceProduct)
 {
     $this->config = $config;
     $this->taxClassHelper = $taxClassHelper;
     $this->avaTaxLogger = $avaTaxLogger;
     $this->metaDataObject = $metaDataObjectFactory->create(['metaDataProperties' => $this::$validFields]);
     $this->lineFactory = $lineFactory;
     $this->resourceProduct = $resourceProduct;
 }
Esempio n. 6
0
 /**
  * Class constructor
  *
  * @param Address $address
  * @param Config $config
  * @param \ClassyLlama\AvaTax\Helper\TaxClass $taxClassHelper
  * @param \ClassyLlama\AvaTax\Model\Logger\AvaTaxLogger $avaTaxLogger
  * @param MetaDataObjectFactory $metaDataObjectFactory
  * @param TaxServiceSoapFactory $taxServiceSoapFactory
  * @param GetTaxRequestFactory $getTaxRequestFactory
  * @param TaxOverrideFactory $taxOverrideFactory
  * @param CustomerRepositoryInterface $customerRepository
  * @param GroupRepositoryInterface $groupRepository
  * @param InvoiceRepositoryInterface $invoiceRepository
  * @param OrderRepositoryInterface $orderRepository
  * @param StoreRepositoryInterface $storeRepository
  * @param PriceCurrencyInterface $priceCurrency
  * @param TimezoneInterface $localeDate
  * @param Line $interactionLine
  * @param TaxCalculation $taxCalculation
  * @param QuoteDetailsItemExtensionFactory $extensionFactory
  */
 public function __construct(Address $address, Config $config, \ClassyLlama\AvaTax\Helper\TaxClass $taxClassHelper, \ClassyLlama\AvaTax\Model\Logger\AvaTaxLogger $avaTaxLogger, MetaDataObjectFactory $metaDataObjectFactory, TaxServiceSoapFactory $taxServiceSoapFactory, GetTaxRequestFactory $getTaxRequestFactory, TaxOverrideFactory $taxOverrideFactory, CustomerRepositoryInterface $customerRepository, GroupRepositoryInterface $groupRepository, InvoiceRepositoryInterface $invoiceRepository, OrderRepositoryInterface $orderRepository, StoreRepositoryInterface $storeRepository, PriceCurrencyInterface $priceCurrency, TimezoneInterface $localeDate, Line $interactionLine, TaxCalculation $taxCalculation, QuoteDetailsItemExtensionFactory $extensionFactory)
 {
     $this->address = $address;
     $this->config = $config;
     $this->taxClassHelper = $taxClassHelper;
     $this->avaTaxLogger = $avaTaxLogger;
     $this->metaDataObject = $metaDataObjectFactory->create(['metaDataProperties' => $this::$validFields]);
     $this->taxServiceSoapFactory = $taxServiceSoapFactory;
     $this->getTaxRequestFactory = $getTaxRequestFactory;
     $this->taxOverrideFactory = $taxOverrideFactory;
     $this->customerRepository = $customerRepository;
     $this->groupRepository = $groupRepository;
     $this->invoiceRepository = $invoiceRepository;
     $this->orderRepository = $orderRepository;
     $this->storeRepository = $storeRepository;
     $this->priceCurrency = $priceCurrency;
     $this->localeDate = $localeDate;
     $this->interactionLine = $interactionLine;
     $this->taxCalculation = $taxCalculation;
     $this->extensionFactory = $extensionFactory;
 }