Module: Airbnb::Service::Hongbao::Api::HongbaoGetCouponMessagesRequestSmartclientModule::GenerateInstanceMethods

Defined in:
lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb

Constant Summary collapse

JSON_NAME_OVERRIDES =
{
}.freeze

Instance Method Summary collapse

Instance Method Details

#to_hash(options = nil) ⇒ Object Also known as: to_h

options:

case_from_idl: use the exact case from IDL file to when generating the hash key. Default is false.
ignore_nil_field: do not generate key in the hash, if the value is nil. Useful for inspect or data transport. Default is false.


2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2207

def to_hash(options = nil)
  res = {}
  options ||= {}
  case_from_idl = options.nil? ? false : options[:case_from_idl]
  ignore_nil_field = options.nil? ? false : options[:ignore_nil_field]
  if case_from_idl
  else # enforcing to use snake case
  end
  res
end

#to_json(options = nil) ⇒ Object



2200
2201
2202
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2200

def to_json(options = nil)
  JSON.generate(to_hash(options))
end