Sha256: 99b469725fcf2a964cc8cbf85b22f69b0f4ab11eeab14a85345e65e5f5a5c120
Contents?: true
Size: 1.74 KB
Versions: 1
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/20170623' 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rakuten_web_service-1.9.0 | lib/rakuten_web_service/gora/plan.rb |