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



2042
2043
2044
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2042

def non_null_checking_off
  @non_null_checking_off
end

#type_checking_offObject

Class level accessors to turn on/off specific checking



2041
2042
2043
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2041

def type_checking_off
  @type_checking_off
end

Instance Method Details

#build(params = {}) ⇒ Object

Raises:

  • (TypeError)


2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 2044

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

  terms_link = get_field_data(params, :terms_link, :termsLink, _internal_object.termsLink)
  _internal_object.termsLink = terms_link
  deeplink = get_field_data(params, :deeplink, :deeplink, _internal_object.deeplink)
  _internal_object.deeplink = deeplink
  _internal_object.validate(Sparsam::STRICT) unless ::Airbnb::Service::Hongbao::Api::HongbaoGetCtaLinkResponse.type_checking_off
  return _internal_object
end