Class: Allorails::Response::OnetimePricingResponse

Inherits:
ApiMappingResponse show all
Defined in:
lib/allorails/response/onetime_pricing_response.rb

Instance Attribute Summary

Attributes inherited from ApiMappingResponse

#xml

Instance Method Summary collapse

Methods inherited from ApiMappingResponse

#_verify, attribute_reader, #initialize, node_reader

Methods inherited from ApiResponse

#_verify, #initialize

Constructor Details

This class inherits a constructor from Allorails::Response::ApiMappingResponse

Instance Method Details

#countriesObject

Provides the pricepoints by countries

@return (Array) available countries (list of Country object)


21
22
23
# File 'lib/allorails/response/onetime_pricing_response.rb', line 21

def countries
  xml.css('countries country').map{|c| Allorails::Country.new(c)}
end

#creation_dateObject

Provides the creation date

@return (DateTime) Creation date


5
# File 'lib/allorails/response/onetime_pricing_response.rb', line 5

node_reader :creation_date, DateTime

#customer_countryObject

Provides the customer country

@return (string) customer country


13
# File 'lib/allorails/response/onetime_pricing_response.rb', line 13

node_reader :customer_country

#customer_ipObject

Provides the customer ip

@return (string) customer ip


9
# File 'lib/allorails/response/onetime_pricing_response.rb', line 9

node_reader :customer_ip

#marketsObject

Provides the pricepoints by markets

@return (list) available markets (list of Market object)


33
34
35
# File 'lib/allorails/response/onetime_pricing_response.rb', line 33

def markets
  xml.css('markets market').map{|m| Allorails::Market.new(m)}
end

#regionsObject

Provides the pricepoints by region

@return (Array) available regions (list of Regions object)


27
28
29
# File 'lib/allorails/response/onetime_pricing_response.rb', line 27

def regions
  xml.css('countries region').map{|r| ::Allorails::Region.new(r)}
end

#websiteObject

Provides the website

@return (Website) website


17
# File 'lib/allorails/response/onetime_pricing_response.rb', line 17

node_reader :website, Allorails::Website