com.highdeal.tax.hci
Class VatRuleModel

java.lang.Object
  extended by com.highdeal.hci.HCIModelAdapter
      extended by com.highdeal.tax.hci.VatRuleModel
All Implemented Interfaces:
ITagNameProvider, IXMLMarshallable, XMLMapping, XMLMarshallable

public class VatRuleModel
extends HCIModelAdapter
implements XMLMapping

This Java class represents the VAT rule configured in the SAP CC system and that can be specified in the tax configuration of a charge condition inserted in an offer.

See Also:
TaxParameterModel, ChargeConditionModel

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="vatRule">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="description" type="DescriptionType" minOccurs="1" maxOccurs="1" />
     </xs:sequence>
     <xs:attribute name="name" type="xs:string" use="required"/>
     <xs:attribute name="supplierZone" type="SupplierZoneType" use="required"/>
     <xs:attribute name="b2bTaxationPlace" type="TaxationPlaceType"/>
     <xs:attribute name="b2cTaxationPlace" type="TaxationPlaceType"/>
     <xs:attribute name="defaultB2bTaxationPlace" type="TaxationPlaceType" use="required"/>
     <xs:attribute name="defaultB2cTaxationPlace" type="TaxationPlaceType" use="required"/>
   </xs:complexType>
 </xs:element>
<xs:simpleType name="SupplierZoneType">
   <xs:restriction base="xs:decimal">
     <xs:enumeration value="0"/>
     <xs:enumeration value="1"/>
     <xs:enumeration value="2"/>
   </xs:restriction>
 </xs:simpleType>
<xs:simpleType name="TaxationPlaceType">
   <xs:restriction base="xs:decimal">
     <xs:enumeration value="0"/>
     <xs:enumeration value="1"/>
     <xs:enumeration value="2"/>
   </xs:restriction>
 </xs:simpleType>


Field Summary
static java.lang.String TAG_NAME
          The XML tag name of this data model: "vatRule"
 
Constructor Summary
VatRuleModel()
          Creates an empty VAT rule.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 com.highdeal.tax.VatRule.TaxationPlace getB2BTaxationPlace()
          Returns the VAT rule b2bTaxationPlace.
 com.highdeal.tax.VatRule.TaxationPlace getB2CTaxationPlace()
          Returns the VAT rule b2cTaxationPlace.
 java.lang.Class<?> getClass(java.lang.String nsUri, java.lang.String tag, XMLAttributes atts)
          Returns the Java class for a specified XML tag and its attributes in a namespace.
 com.highdeal.tax.VatRule.TaxationPlace getDefaultB2BTaxationPlace()
          Returns the VAT rule defaultB2bTaxationPlace.
 com.highdeal.tax.VatRule.TaxationPlace getDefaultB2CTaxationPlace()
          Returns the VAT rule defaultB2cTaxationPlace.
 java.lang.String getDescription()
          Returns the VAT rule description.
 java.lang.String getName()
          Returns the VAT rule name.
 com.highdeal.tax.VatRule.SupplierZone getSupplierZone()
          Returns the VAT rule supplierZone.
 java.lang.String getTagName()
          Gets the XML tag name of the HCI model.
 void marshalAttributes(XMLOutputter output)
          Gives an XML representation of the attributes of an object.
 void marshalChildren(XMLOutputter output)
          Gives an XML representation of the child objects of an object.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setB2BTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace b2bTaxationPlace)
          Sets the VAT rule b2bTaxationPlace.
 void setB2CTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace b2cTaxationPlace)
          Sets the VAT rule b2cTaxationPlace.
 void setDefaultB2BTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace defaultB2bTaxationPlace)
          Sets the VAT rule defaultB2bTaxationPlace.
 void setDefaultB2CTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace defaultB2cTaxationPlace)
          Sets the VAT rule defaultB2cTaxationPlace.
 void setDescription(java.lang.String description)
          Sets the VAT rule description.
 void setName(java.lang.String name)
          Sets the VAT rule name.
 void setSupplierZone(com.highdeal.tax.VatRule.SupplierZone supplierZone)
          Sets the VAT rule supplierZone.
 
Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The XML tag name of this data model: "vatRule"

See Also:
Constant Field Values
Constructor Detail

VatRuleModel

public VatRuleModel()
Creates an empty VAT rule.

Method Detail

getName

public final java.lang.String getName()
Returns the VAT rule name.

Returns:
The VAT rule name

setName

public void setName(java.lang.String name)
Sets the VAT rule name.

Parameters:
name - The VAT rule name

getDescription

public final java.lang.String getDescription()
Returns the VAT rule description.

Returns:
The VAT rule description

setDescription

public void setDescription(java.lang.String description)
Sets the VAT rule description.

Parameters:
description - The VAT rule description

getSupplierZone

public final com.highdeal.tax.VatRule.SupplierZone getSupplierZone()
Returns the VAT rule supplierZone.

Returns:
The VAT rule supplierZone

setSupplierZone

public void setSupplierZone(com.highdeal.tax.VatRule.SupplierZone supplierZone)
Sets the VAT rule supplierZone.

Parameters:
supplierZone - The VAT rule supplierZone

getB2BTaxationPlace

public final com.highdeal.tax.VatRule.TaxationPlace getB2BTaxationPlace()
Returns the VAT rule b2bTaxationPlace.

Returns:
The VAT rule b2bTaxationPlace

setB2BTaxationPlace

public void setB2BTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace b2bTaxationPlace)
Sets the VAT rule b2bTaxationPlace.

Parameters:
b2bTaxationPlace - The VAT rule b2bTaxationPlace

getB2CTaxationPlace

public final com.highdeal.tax.VatRule.TaxationPlace getB2CTaxationPlace()
Returns the VAT rule b2cTaxationPlace.

Returns:
The VAT rule b2cTaxationPlace

setB2CTaxationPlace

public void setB2CTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace b2cTaxationPlace)
Sets the VAT rule b2cTaxationPlace.

Parameters:
b2cTaxationPlace - The VAT rule b2cTaxationPlace

getDefaultB2BTaxationPlace

public final com.highdeal.tax.VatRule.TaxationPlace getDefaultB2BTaxationPlace()
Returns the VAT rule defaultB2bTaxationPlace.

Returns:
The VAT rule defaultB2bTaxationPlace

setDefaultB2BTaxationPlace

public void setDefaultB2BTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace defaultB2bTaxationPlace)
Sets the VAT rule defaultB2bTaxationPlace.

Parameters:
defaultB2bTaxationPlace - The VAT rule defaultB2bTaxationPlace

getDefaultB2CTaxationPlace

public final com.highdeal.tax.VatRule.TaxationPlace getDefaultB2CTaxationPlace()
Returns the VAT rule defaultB2cTaxationPlace.

Returns:
The VAT rule defaultB2cTaxationPlace

setDefaultB2CTaxationPlace

public void setDefaultB2CTaxationPlace(com.highdeal.tax.VatRule.TaxationPlace defaultB2cTaxationPlace)
Sets the VAT rule defaultB2cTaxationPlace.

Parameters:
defaultB2cTaxationPlace - The VAT rule defaultB2cTaxationPlace

marshalAttributes

public void marshalAttributes(XMLOutputter output)
Description copied from interface: IXMLMarshallable
Gives an XML representation of the attributes of an object.

Specified by:
marshalAttributes in interface IXMLMarshallable
Parameters:
output - The XML output to marshal the object attributes into

marshalChildren

public void marshalChildren(XMLOutputter output)
Description copied from interface: IXMLMarshallable
Gives an XML representation of the child objects of an object.

Specified by:
marshalChildren in interface IXMLMarshallable
Parameters:
output - The XML output to marshal the child objects into

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

getClass

public java.lang.Class<?> getClass(java.lang.String nsUri,
                                   java.lang.String tag,
                                   XMLAttributes atts)
Description copied from interface: XMLMapping
Returns the Java class for a specified XML tag and its attributes in a namespace.

Specified by:
getClass in interface XMLMapping
Parameters:
nsUri - The unique resource identifier of the namespace of the XML tag
tag - The local part of the XML tag
atts - The attributes of the XML tag
Returns:
A Java class with a default constructor

getTagName

public java.lang.String getTagName()
Description copied from interface: ITagNameProvider
Gets the XML tag name of the HCI model.

Specified by:
getTagName in interface ITagNameProvider
Returns:
The XML tag name

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)