Method: WebPay::ShopResponseList#initialize

Defined in:
lib/webpay/data_types.rb

#initialize(hash = {}) ⇒ ShopResponseList

Returns a new instance of ShopResponseList.



1942
1943
1944
1945
1946
# File 'lib/webpay/data_types.rb', line 1942

def initialize(hash = {})
  hash = normalize_hash(hash)
  hash['data'] = hash['data'].is_a?(Array) ? hash['data'].map { |x| WebPay::ShopResponse.new(x) if x.is_a?(Hash) }  : hash['data']
  @attributes = hash
end