Module: Airbnb::Service::Hongbao::Api::HongbaoCouponStateRequestSmartclientModule::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.
627 628 629 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 627 def non_null_checking_off @non_null_checking_off end |
#type_checking_off ⇒ Object
Class level accessors to turn on/off specific checking
626 627 628 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 626 def type_checking_off @type_checking_off end |
Instance Method Details
#build(params = {}) ⇒ Object
629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 629 def build(params = {}) _internal_object = ::Airbnb::Service::Hongbao::Api::HongbaoCouponStateRequest.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? user_id = get_field_data(params, :user_id, :userId, _internal_object.userId) _internal_object.userId = user_id non_null_validator(:user_id, user_id) unless ::Airbnb::Service::Hongbao::Api::HongbaoCouponStateRequest.non_null_checking_off campaign_name = get_field_data(params, :campaign_name, :campaignName, _internal_object.campaignName) _internal_object.campaignName = campaign_name non_null_validator(:campaign_name, campaign_name) unless ::Airbnb::Service::Hongbao::Api::HongbaoCouponStateRequest.non_null_checking_off _internal_object.validate(Sparsam::STRICT) unless ::Airbnb::Service::Hongbao::Api::HongbaoCouponStateRequest.type_checking_off return _internal_object end |