Class: Allorails::Market

Inherits:
Base show all
Defined in:
lib/allorails/response/model.rb

Overview

Class providing object mapping of a market item

Instance Attribute Summary

Attributes inherited from Response::ApiMappingResponse

#xml

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods inherited from Response::ApiMappingResponse

#_verify, attribute_reader, #initialize, node_reader

Methods inherited from Response::ApiResponse

#_verify, #initialize

Constructor Details

This class inherits a constructor from Allorails::Base

Instance Method Details

#countryObject

Provides the country name

@return (string) country name


82
# File 'lib/allorails/response/model.rb', line 82

attribute_reader :country

#country_codeObject

Provides the country code

@return (string) country code (two characters)


78
# File 'lib/allorails/response/model.rb', line 78

attribute_reader :country_code

#pricepointsObject

Provides the pricepoints available in this market

@return (Array) available pricepoints (list of Pricepoint objects)


86
87
88
# File 'lib/allorails/response/model.rb', line 86

def pricepoints
  xml.css('pricepoint').map{|c| Allorails::Pricepoint.new(c)}
end