Module: Airbnb::Service::Hongbao::Api::HongbaoCanClaimInAppResponseSmartclientModule::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.



2428
2429
2430
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2428

def non_null_checking_off
  @non_null_checking_off
end

#type_checking_offObject

Class level accessors to turn on/off specific checking



2427
2428
2429
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2427

def type_checking_off
  @type_checking_off
end

Instance Method Details

#build(params = {}) ⇒ Object

Raises:

  • (TypeError)


2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2430

def build(params = {})
  _internal_object = ::Airbnb::Service::Hongbao::Api::HongbaoCanClaimInAppResponse.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?

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