Method: AdvancedBilling::SubscriptionComponentAllocationErrorItem.from_hash
- Defined in:
- lib/advanced_billing/models/subscription_component_allocation_error_item.rb
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/advanced_billing/models/subscription_component_allocation_error_item.rb', line 52 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. kind = hash.key?('kind') ? hash['kind'] : SKIP = hash.key?('message') ? hash['message'] : SKIP # Clean out expected properties from Hash. names.each_value { |k| hash.delete(k) } # Create object from extracted values. SubscriptionComponentAllocationErrorItem.new(kind: kind, message: , additional_properties: hash) end |