Module: Airbnb::Service::Hongbao::Api::HongbaoCouponStateResponseSmartclientModule::GenerateClassMethods

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#non_null_checking_offObject

Returns the value of attribute non_null_checking_off.



722
723
724
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 722

def non_null_checking_off
  @non_null_checking_off
end

#type_checking_offObject

Class level accessors to turn on/off specific checking



721
722
723
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 721

def type_checking_off
  @type_checking_off
end

Instance Method Details

#build(params = {}) ⇒ Object

Raises:

  • (TypeError)


724
725
726
727
728
729
730
731
732
733
734
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 724

def build(params = {})
  _internal_object = ::Airbnb::Service::Hongbao::Api::HongbaoCouponStateResponse.send(:new)
  return _internal_object if params.nil?
  raise TypeError.new("Expect a Hash for params in initialize, while it is #{params.class}") unless params.is_a?(Hash)
  return _internal_object if params.empty?

  state = get_field_data(params, :state, :state, _internal_object.state)
  _internal_object.state = state
  _internal_object.validate(Sparsam::STRICT) unless ::Airbnb::Service::Hongbao::Api::HongbaoCouponStateResponse.type_checking_off
  return _internal_object
end