Class: ExpoNotifier::Mapper::PushReceipts

Inherits:
Base
  • Object
show all
Defined in:
lib/expo_notifier/mapper/push_receipts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

attribute, orig_attribute

Instance Attribute Details

#dataObject

Hash where keys are receipt IDs and values are push receipts : Hash[String, PushReceipt]



14
15
16
# File 'lib/expo_notifier/mapper/push_receipts.rb', line 14

def data
  @data
end

Instance Method Details

#parse_push_receipts_from_json(model, value) ⇒ Object

: (ExpoNotifier::Mapper::PushReceipts, Hash[String, Object]) -> void



30
31
32
33
34
# File 'lib/expo_notifier/mapper/push_receipts.rb', line 30

def parse_push_receipts_from_json(model, value)
  model.data = value.transform_values do |receipt_hash|
    PushReceipt.from_hash(receipt_hash)
  end
end