All Downloads are FREE. Search and download functionalities are using the official Maven repository.

models.dsl.TaxBlasterWithXmlExamples.rapid Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
/* 
  The TaxBlaster model contains the REST interface for TaxBlaster, and its supporting datatypes.
*/
rapidModel TaxBlasterWithExamples
	resourceAPI TaxBlasterInterface baseURI "http://taxblaster.com/api"
		/** The Index Resource is the entry point to the TaxBlaster API.  
    To minimize coupling, consuming applications should start here, 
    and follow the links to related resources.
*/
		objectResource IndexObject type Index
			URI index
			mediaTypes
				application/xml
			method GET getIndex
				response IndexObject statusCode 200
					example '''

	
		
			
		
		
			
		
    
	
		
			
		
		
			
		
	
 '''

				response statusCode 404


		/** The list of TaxBlaster users.  The results will vary in membership 
    and level of detail, depending on your access privileges.
*/
		collectionResource PersonCollection type Person
			URI /people
			mediaTypes
				application/xml
			method GET getPeople
				request
				response PersonCollection statusCode 200
					example '''

   
      John
      Smith
      
         Jean Poupon
      
      user1
   
   
      Nancy
      Williams
      user2
   
   
      Elizabeth
      Davis
      user3
   
   
      Robert
      Johnson
      user4
   
'''

				response statusCode 404


		/** The list of Tax Filings visible to the authorized user. */
		collectionResource TaxFilingCollection type TaxFiling
			URI taxFilings
			mediaTypes
				application/xml
			method GET getTaxFilings
				request
				response TaxFilingCollection statusCode 200
					example '''

   
	  
      USD
      taxFiling1
      12345.67
      BURLINGAME
      12.34
      2012
      
		
	 
   
   
      
      USD
      taxFiling2
      98765.43
      CORCORAN
      23.45
      2013
      
		
	 
   
   
      
      USD
      taxFiling3
      56789.12
      CLAYTON
      12.34
      2012
      
		
	 
    
'''

				response statusCode 404


		/** An individual Tax Filing record, accessed by its ID */
		objectResource TaxFilingObject type TaxFiling
			URI taxFilings/{filingID}
				required templateParam filingID property filingID

			referenceLink > taxpayer
				targetResource PersonObject
				targetProperties
					taxpayerID
					lastName

				linkRelation about

			mediaTypes
				application/xml
			method GET getTaxFiling
				request
				response TaxFilingObject statusCode 200
					example '''

   USD
   taxFiling1
   12345.67
   
   12.34
   2012
 '''

				response statusCode 404


		/** An individual user by ID. */
		objectResource PersonObject type Person
			URI people/{id}
				required templateParam id property taxpayerID

			mediaTypes
				application/xml
			method GET getPerson
				request
				response PersonObject statusCode 200
					example ''' 

   John
   Smith
   
      Jean Poupon
   
   user1
 '''


			method PUT putPerson
				request PersonObject
					example '''

   Linda
   Lee
 '''

				response statusCode 200
				response statusCode 400



	/** Supporting data types for the TaxBlaster API */
	dataModel TaxBlasterDataModel
		/** A tax filing record for a given user, in a given tax jurisdiction, 
in a specified tax year.
*/
		structure TaxFiling
			/** A unique, system-assigned identifier for the tax filing. */
			filingID : string
			/** Reference to the person who owns this filing. */
			taxpayer : reference Person
			/** Country, province, state or local tax authority 
    where this is being filed.
*/
			jurisdiction : string
			/** Tax year */
			year : gYear
			/** Period within the year, if any */
			period : int
			/** Currency code */
			currency : string
			/** Total income reported on tax filing. */
			grossIncome : decimal
			/** Net tax liability */
			taxLiability : decimal

		/** A TaxBlaster user. */
		structure Person
			/** A unique, system-assigned identifier for the user. */
			taxpayerID : string
			/** Legal family name. */
			lastName : string
			/** Legal first name. */
			firstName : string
			/** Names previously used **/
			otherNames : string*
			/** Residential address for tax purposes. */
			addresses : containing reference Address*

		/** A physical address. */
		structure Address
			/** First address line, required. */
			street1 : string
			/** Second address line, optional */
			street2 : string?
			/** Standardized city name. */
			city : string
			/** State or Province */
			stateOrProvince : string
			/** Zipcode (US) or other postal code. */
			postalCode : string
			/** Standardized country code. */
			country : string

		/** The supporting data type for the Index resource.  Not meaningful
    as a business entity, but required to support a single point of 
    entry.
*/
		structure Index
			people : reference Person*
			taxFilings : reference TaxFiling*






© 2015 - 2024 Weber Informatics LLC | Privacy Policy