class Shokkenki::Provider::Model::Ticket
Attributes
consumer[R]
interactions[R]
provider[R]
Public Class Methods
from_hash(hash)
click to toggle source
# File lib/shokkenki/provider/model/ticket.rb, line 22 def self.from_hash hash new( Role.from_hash(hash[:provider].symbolize_keys), Role.from_hash(hash[:consumer].symbolize_keys), hash[:interactions].map{ |h| Interaction.from_hash h.symbolize_keys } ) end
from_json(json)
click to toggle source
# File lib/shokkenki/provider/model/ticket.rb, line 18 def self.from_json json from_hash(JSON.parse(json, :symbolize_names => true)) end
new(provider, consumer, interactions)
click to toggle source
# File lib/shokkenki/provider/model/ticket.rb, line 12 def initialize provider, consumer, interactions @provider = provider @consumer = consumer @interactions = interactions end