Class: Io::Flow::V0::Models::OnboardingMerchantTime

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ OnboardingMerchantTime

Returns a new instance of OnboardingMerchantTime.



50841
50842
50843
50844
50845
50846
50847
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50841

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:hour_of_day, :minute_of_hour], 'OnboardingMerchantTime')
  @hour_of_day = HttpClient::Preconditions.assert_class('hour_of_day', opts.delete(:hour_of_day), String)
  @minute_of_hour = HttpClient::Preconditions.assert_class('minute_of_hour', opts.delete(:minute_of_hour), String)
  @timezone = (x = opts.delete(:timezone); x.nil? ? nil : HttpClient::Preconditions.assert_class('timezone', x, String))
end

Instance Attribute Details

#hour_of_dayObject (readonly)

Returns the value of attribute hour_of_day.



50839
50840
50841
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50839

def hour_of_day
  @hour_of_day
end

#minute_of_hourObject (readonly)

Returns the value of attribute minute_of_hour.



50839
50840
50841
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50839

def minute_of_hour
  @minute_of_hour
end

#timezoneObject (readonly)

Returns the value of attribute timezone.



50839
50840
50841
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50839

def timezone
  @timezone
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



50853
50854
50855
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50853

def copy(incoming={})
  OnboardingMerchantTime.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



50857
50858
50859
50860
50861
50862
50863
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50857

def to_hash
  {
    :hour_of_day => hour_of_day,
    :minute_of_hour => minute_of_hour,
    :timezone => timezone
  }
end

#to_jsonObject



50849
50850
50851
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50849

def to_json
  JSON.dump(to_hash)
end