Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
EstimateAddress Class Reference
Inheritance diagram for EstimateAddress:
AbstractExtensibleModel EstimateAddressInterface AbstractModel CustomAttributesDataInterface CustomAttributesDataInterface DataObject ExtensibleDataInterface ExtensibleDataInterface

Public Member Functions

 getRegion ()
 
 setRegion ($region)
 
 getRegionId ()
 
 setRegionId ($regionId)
 
 getCountryId ()
 
 setCountryId ($countryId)
 
 getPostcode ()
 
 setPostcode ($postcode)
 
 getExtensionAttributes ()
 
 setExtensionAttributes (\Magento\Quote\Api\Data\EstimateAddressExtensionInterface $extensionAttributes)
 
- Public Member Functions inherited from AbstractExtensibleModel
 __construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, ExtensionAttributesFactory $extensionFactory, AttributeValueFactory $customAttributeFactory, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])
 
 getCustomAttributes ()
 
 getCustomAttribute ($attributeCode)
 
 setCustomAttributes (array $attributes)
 
 setCustomAttribute ($attributeCode, $attributeValue)
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 getData ($key='', $index=null)
 
 setId ($value)
 
 __sleep ()
 
 __wakeup ()
 
- Public Member Functions inherited from AbstractModel
 __construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])
 
 __sleep ()
 
 __wakeup ()
 
 setIdFieldName ($name)
 
 getIdFieldName ()
 
 getId ()
 
 setId ($value)
 
 isDeleted ($isDeleted=null)
 
 hasDataChanges ()
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 setDataChanges ($value)
 
 getOrigData ($key=null)
 
 setOrigData ($key=null, $data=null)
 
 dataHasChangedFor ($field)
 
 getResourceName ()
 
 getResourceCollection ()
 
 getCollection ()
 
 load ($modelId, $field=null)
 
 beforeLoad ($identifier, $field=null)
 
 afterLoad ()
 
 isSaveAllowed ()
 
 setHasDataChanges ($flag)
 
 save ()
 
 afterCommitCallback ()
 
 isObjectNew ($flag=null)
 
 beforeSave ()
 
 validateBeforeSave ()
 
 getCacheTags ()
 
 cleanModelCache ()
 
 afterSave ()
 
 delete ()
 
 beforeDelete ()
 
 afterDelete ()
 
 afterDeleteCommit ()
 
 getResource ()
 
 getEntityId ()
 
 setEntityId ($entityId)
 
 clearInstance ()
 
 getStoredData ()
 
 getEventPrefix ()
 
- Public Member Functions inherited from DataObject
 __construct (array $data=[])
 
 addData (array $arr)
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 getData ($key='', $index=null)
 
 getDataByPath ($path)
 
 getDataByKey ($key)
 
 setDataUsingMethod ($key, $args=[])
 
 getDataUsingMethod ($key, $args=null)
 
 hasData ($key='')
 
 toArray (array $keys=[])
 
 convertToArray (array $keys=[])
 
 toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 toJson (array $keys=[])
 
 convertToJson (array $keys=[])
 
 toString ($format='')
 
 __call ($method, $args)
 
 isEmpty ()
 
 serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"')
 
 debug ($data=null, &$objects=[])
 
 offsetSet ($offset, $value)
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 offsetGet ($offset)
 
- Public Member Functions inherited from EstimateAddressInterface
 setExtensionAttributes (\Magento\Quote\Api\Data\EstimateAddressExtensionInterface $extensionAttributes)
 

Additional Inherited Members

- Data Fields inherited from CustomAttributesDataInterface
const CUSTOM_ATTRIBUTES = 'custom_attributes'
 
- Data Fields inherited from ExtensibleDataInterface
const EXTENSION_ATTRIBUTES_KEY = 'extension_attributes'
 
- Data Fields inherited from EstimateAddressInterface
const KEY_COUNTRY_ID = 'country_id'
 
const KEY_REGION_ID = 'region_id'
 
const KEY_REGION = 'region'
 
const KEY_POSTCODE = 'postcode'
 
- Protected Member Functions inherited from AbstractExtensibleModel
 filterCustomAttributes ($data)
 
 initializeCustomAttributes ()
 
 convertCustomAttributeValues (array &$customAttributes)
 
 getCustomAttributesCodes ()
 
 _setExtensionAttributes (\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)
 
 _getExtensionAttributes ()
 
- Protected Member Functions inherited from AbstractModel
 _construct ()
 
 _init ($resourceModel)
 
 _setResourceModel ($resourceName, $collectionName=null)
 
 _getResource ()
 
 _getEventData ()
 
 _beforeLoad ($modelId, $field=null)
 
 _afterLoad ()
 
 _hasModelChanged ()
 
 _getValidatorBeforeSave ()
 
 _createValidatorBeforeSave ()
 
 _getValidationRulesBeforeSave ()
 
 _clearReferences ()
 
 _clearData ()
 
- Protected Member Functions inherited from DataObject
 _getData ($key)
 
 _underscore ($name)
 
- Protected Attributes inherited from AbstractExtensibleModel
 $extensionAttributesFactory
 
 $extensionAttributes
 
 $customAttributeFactory
 
 $customAttributesCodes = null
 
 $customAttributesChanged = false
 
- Protected Attributes inherited from AbstractModel
 $_eventPrefix = 'core_abstract'
 
 $_eventObject = 'object'
 
 $_idFieldName = 'id'
 
 $_hasDataChanges = false
 
 $_origData
 
 $_isDeleted = false
 
 $_resource
 
 $_resourceCollection
 
 $_resourceName
 
 $_collectionName
 
 $_cacheTag = false
 
 $_dataSaveAllowed = true
 
 $_isObjectNew = null
 
 $_validatorBeforeSave = null
 
 $_eventManager
 
 $_cacheManager
 
 $_registry
 
 $_logger
 
 $_appState
 
 $_actionValidator
 
 $storedData = []
 
- Protected Attributes inherited from DataObject
 $_data = []
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

Definition at line 12 of file EstimateAddress.php.

Member Function Documentation

◆ getCountryId()

getCountryId ( )

Get country id

Returns
string

Implements EstimateAddressInterface.

Definition at line 61 of file EstimateAddress.php.

62  {
63  return $this->getData(self::KEY_COUNTRY_ID);
64  }

◆ getExtensionAttributes()

getExtensionAttributes ( )

Retrieve existing extension attributes object or create a new one.

Returns
\Magento\Quote\Api\Data\EstimateAddressExtensionInterface|null

Implements EstimateAddressInterface.

Definition at line 103 of file EstimateAddress.php.

◆ getPostcode()

getPostcode ( )

Get postcode

Returns
string

Implements EstimateAddressInterface.

Definition at line 82 of file EstimateAddress.php.

83  {
84  return $this->getData(self::KEY_POSTCODE);
85  }

◆ getRegion()

getRegion ( )

Get region name

Returns
string

Implements EstimateAddressInterface.

Definition at line 19 of file EstimateAddress.php.

20  {
21  return $this->getData(self::KEY_REGION);
22  }

◆ getRegionId()

getRegionId ( )

Get region id

Returns
int

Implements EstimateAddressInterface.

Definition at line 40 of file EstimateAddress.php.

41  {
42  return $this->getData(self::KEY_REGION_ID);
43  }

◆ setCountryId()

setCountryId (   $countryId)

Set country id

Parameters
string$countryId
Returns
$this

Implements EstimateAddressInterface.

Definition at line 72 of file EstimateAddress.php.

73  {
74  return $this->setData(self::KEY_COUNTRY_ID, $countryId);
75  }

◆ setExtensionAttributes()

setExtensionAttributes ( \Magento\Quote\Api\Data\EstimateAddressExtensionInterface  $extensionAttributes)

Set an extension attributes object.

Parameters
\Magento\Quote\Api\Data\EstimateAddressExtensionInterface$extensionAttributes
Returns
$this

Definition at line 114 of file EstimateAddress.php.

116  {
118  }
_setExtensionAttributes(\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)

◆ setPostcode()

setPostcode (   $postcode)

Set postcode

Parameters
string$postcode
Returns
$this

Implements EstimateAddressInterface.

Definition at line 93 of file EstimateAddress.php.

94  {
95  return $this->setData(self::KEY_POSTCODE, $postcode);
96  }

◆ setRegion()

setRegion (   $region)

Set region name

Parameters
string$region
Returns
$this

Implements EstimateAddressInterface.

Definition at line 30 of file EstimateAddress.php.

31  {
32  return $this->setData(self::KEY_REGION, $region);
33  }

◆ setRegionId()

setRegionId (   $regionId)

Set region id

Parameters
int$regionId
Returns
$this

Implements EstimateAddressInterface.

Definition at line 51 of file EstimateAddress.php.

52  {
53  return $this->setData(self::KEY_REGION_ID, $regionId);
54  }

The documentation for this class was generated from the following file: