Method: AdvancedBilling::OfferResponse.from_hash

Defined in:
lib/advanced_billing/models/offer_response.rb

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



40
41
42
43
44
45
46
47
48
# File 'lib/advanced_billing/models/offer_response.rb', line 40

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  offer = Offer.from_hash(hash['offer']) if hash['offer']

  # Create object from extracted values.

  OfferResponse.new(offer)
end