Module: Airbnb::Service::Hongbao::Api::HongbaoGetUserChinaCouponsResponseSmartclientModule::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.
1833 1834 1835 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 1833 def non_null_checking_off @non_null_checking_off end |
#type_checking_off ⇒ Object
Class level accessors to turn on/off specific checking
1832 1833 1834 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 1832 def type_checking_off @type_checking_off end |
Instance Method Details
#build(params = {}) ⇒ Object
1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 |
# File 'lib/airbnb/service/hongbao/api/hongbao_data_smartclient_modules.rb', line 1835 def build(params = {}) _internal_object = ::Airbnb::Service::Hongbao::Api::HongbaoGetUserChinaCouponsResponse.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? coupon_codes = get_field_data(params, :coupon_codes, :couponCodes, _internal_object.couponCodes) _internal_object.couponCodes = if !coupon_codes.nil? raise "coupon_codes should be an Array, while it is #{coupon_codes.class}" unless coupon_codes.is_a?(Array) coupon_codes.map do |coupon_codes_item| coupon_codes_item end end _internal_object.validate(Sparsam::STRICT) unless ::Airbnb::Service::Hongbao::Api::HongbaoGetUserChinaCouponsResponse.type_checking_off return _internal_object end |