Class: Allorails::Pricepoint

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

Overview

Class providing object mapping of a pricepoint 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

#buy_urlObject

Provides the buy url

@return (string) buy url


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

node_reader :buy_url

#country_codeObject

Provides the pricepoint’s country code

@return (string) country code (two characters)


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

attribute_reader :country_code

#descriptionObject

Provides the pricepoint’s description

@return (string) pricepoint's description


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

node_reader :description

#idObject

Provides the pricepoint’s id

@return (int) pricepoint id


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

attribute_reader :id, Integer

#keywordsObject

Provides the pricepoint’s keywords

@return (list) pricepoint's keywords (list of Keyword objects)


219
220
221
# File 'lib/allorails/response/model.rb', line 219

def keywords
  xml.css('keyword').map{|c| Allorails::Keyword.new(c)}
end

#payoutObject

Provides the pricepoint’s payout

@return (Payout) pricepoint's payout


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

node_reader :payout, Allorails::Payout

#phone_numbersObject

Provides the pricepoint’s phone numbers

@return (list) pricepoint's phone number (list of PhoneNumber objects)


213
214
215
# File 'lib/allorails/response/model.rb', line 213

def phone_numbers
  xml.css('phone_number').map{|c| Allorails::PhoneNumber.new(c)}
end

#priceObject

Provides price information

@return (Price) price information


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

node_reader :price, Allorails::Price

#typeObject

Provides the pricepoint’s type

@return (string) pricepoint type


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

attribute_reader :type