class Ondotori::WebAPI::Api::LatestDataRTR500Params

Public Class Methods

new(param, base: "", remote: "") click to toggle source
Calls superclass method Ondotori::WebAPI::Api::ParamsBase::new
# File lib/ondotori/webapi/api/params.rb, line 63
def initialize(param, base: "", remote: "")
  super(param)
  if base.empty? || remote.empty?
    raise Ondotori::WebAPI::Api::Errors::InvaildParameter.new(
      "latest-data-rtr500 need both the  baseunit serial and remote unit serial.", 9993
    )
  end
  @base_serial = base
  @remote_serial = remote
end

Public Instance Methods

to_ondotori_param() click to toggle source
# File lib/ondotori/webapi/api/params.rb, line 74
def to_ondotori_param
  params = super
  params["base-serial"] = @base_serial
  params["remote-serial"] = @remote_serial

  params
end