Class: Allorails::Partner

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

Overview

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

#idObject

Provides the partner id

@return (int) partner id


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

attribute_reader :id, Integer

#mapObject

Provides the associated map id

@return (int) map id


243
244
245
246
247
# File 'lib/allorails/response/model.rb', line 243

def map
  if (map = xml.attribute('map')) && map.text.length > 0
    return map.to_i
  end
end

#shareObject

Provides the parnter’s amount share

@return (float) parnter's amount share


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

attribute_reader :share, Float