Module: Airbnb::Service::Hongbao::Api::HongbaoActiveCampaignResponseSmartclientModule::GenerateClassMethods
- Defined in:
- lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb
Instance Attribute Summary collapse
-
#non_null_checking_off ⇒ Object
Returns the value of attribute non_null_checking_off.
-
#type_checking_off ⇒ Object
Class level accessors to turn on/off specific checking.
Instance Method Summary collapse
Instance Attribute Details
#non_null_checking_off ⇒ Object
Returns the value of attribute non_null_checking_off.
1434 1435 1436 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 1434 def non_null_checking_off @non_null_checking_off end |
#type_checking_off ⇒ Object
Class level accessors to turn on/off specific checking
1433 1434 1435 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 1433 def type_checking_off @type_checking_off end |
Instance Method Details
#build(params = {}) ⇒ Object
1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 1436 def build(params = {}) _internal_object = ::Airbnb::Service::Hongbao::Api::HongbaoActiveCampaignResponse.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? campaign_name = get_field_data(params, :campaign_name, :campaignName, _internal_object.campaignName) _internal_object.campaignName = campaign_name campaign_data = get_field_data(params, :campaign_data, :campaignData, _internal_object.campaignData) _internal_object.campaignData = (campaign_data.respond_to?(:struct_fields) || campaign_data.nil?) ? campaign_data : ::Airbnb::Service::Hongbao::Api::CampaignData.build(campaign_data) _internal_object.validate(Sparsam::STRICT) unless ::Airbnb::Service::Hongbao::Api::HongbaoActiveCampaignResponse.type_checking_off return _internal_object end |