Class: EMIS::Responses::GetDeploymentResponse
- Defined in:
- lib/emis/responses/get_deployment_response.rb
Overview
EMIS get deployments response
Instance Method Summary collapse
-
#item_schema ⇒ Hash
Schema for translating XML data into model data.
-
#item_tag_name ⇒ String
XML Tag that contains response data.
-
#model_class ⇒ Class
Model class to put response data.
Methods inherited from Response
#build_item, #build_item_value, #cache?, #empty?, #error, #error?, #find_all_elements_by_tag_name, #initialize, #items, #locate, #locate_one, #ok?
Constructor Details
This class inherits a constructor from EMIS::Responses::Response
Instance Method Details
#item_schema ⇒ Hash
Returns Schema for translating XML data into model data.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/emis/responses/get_deployment_response.rb', line 19 def item_schema { 'deploymentSegmentIdentifier' => { rename: 'segment_identifier' }, 'deploymentStartDate' => { rename: 'begin_date' }, 'deploymentEndDate' => { rename: 'end_date' }, 'deploymentProjectCode' => { rename: 'project_code' }, 'deploymentTerminationReason' => { rename: 'termination_reason' }, 'deploymentTransactionDate' => { rename: 'transaction_date' }, 'DeploymentLocation' => { rename: 'locations', model_class: EMIS::Models::DeploymentLocation, schema: { 'deploymentLocationSegmentIdentifier' => { rename: 'segment_identifier' }, 'deploymentCountry' => { rename: 'country' }, 'deploymentISOAlpha3Country' => { rename: 'iso_alpha3_country' }, 'deploymentLocationBeginDate' => { rename: 'begin_date' }, 'deploymentLocationEndDate' => { rename: 'end_date' }, 'deploymentLocationTerminationReasonCode' => { rename: 'termination_reason_code' }, 'deploymentLocationTransactionDate' => { rename: 'transaction_date' } } } } end |
#item_tag_name ⇒ String
Returns XML Tag that contains response data.
12 13 14 |
# File 'lib/emis/responses/get_deployment_response.rb', line 12 def item_tag_name 'deployment' end |
#model_class ⇒ Class
Returns Model class to put response data.
45 46 47 |
# File 'lib/emis/responses/get_deployment_response.rb', line 45 def model_class EMIS::Models::Deployment end |