Sha256: cce4701f8cf41acd51a3372e81fa2d962850193efd1655d2d2c03dd0a5e0dd3b
Contents?: true
Size: 1.74 KB
Versions: 4
Compression:
Stored size: 1.74 KB
Contents
require 'rakuten_web_service/resource' module RakutenWebService module Gora class Plan < Resource endpoint 'https://app.rakuten.co.jp/services/api/Gora/GoraPlanSearch/20150706' set_parser do |response| response['Items'].map { |item| self.new(item) } end attribute :golfCourseId, :golfCourseName, :golfCourseAbbr, :golfCourseNameKana, :golfCourseCaption, :address, :latitude, :longitude, :highway, :golfCourseDetailUrl, :reserveCalUrl, :ratingUrl, :golfCourseImageUrl, :evaluation def plan_info get_attribute('planInfo').map {|plan| PlanInfo.new(plan['plan'])} end class PlanInfo < Resource class << self def search(_options) raise 'There is no API endpoint for this resource.' end end attribute :planId, :planName, :planType, :limitedTimeFlag, :price, :basePrice, :salesTax, :courseUseTax, :otherTax, :playerNumMin, :playerNumMax, :startTimeZone, :round, :caddie, :cart, :assu2sum,:addFee2bFlag, :addFee2b, :assortment2bFlag, :addFee3bFlag, :addFee3b, :assortment3bFlag, :discount4sumFlag, :lunch, :drink, :stay, :lesson, :planOpenCompe, :compePlayGroupMin, :compePlayMemberMin, :compePrivilegeFree, :compeOption, :other, :pointFlag, :point def call_info CallInfo.new(get_attribute('callInfo')) end class CallInfo < Resource class << self def search(_options) raise 'There is no API endpoint for this resource.' end end attribute :playDate, :stockStatus, :stockCount, :reservePageUrlPC, :reservePageUrlMobile end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems