Sha256: 1bccdfa405971c056d41634fe8b692ae81d548f24eb49ae49585fa0734719144
Contents?: true
Size: 972 Bytes
Versions: 31
Compression:
Stored size: 972 Bytes
Contents
require_relative '../resource' module Tickethub class Supplier::Message < Resource path '/supplier/messages' require_relative 'user' require_relative 'message/email' require_relative 'message/sms' require_relative '../contact' association :user, Supplier::User association :contact, Tickethub::Contact association :customer, Supplier::Customer association :context, -> (endpoint, attributes, options = {}, params = {}) { case attributes['object'] when 'Booking' then Supplier::Booking.call(endpoint, attributes, options, params) when 'Customer' then Supplier::Customer.call(endpoint, attributes, options, params) when 'Order' then Supplier::Order.call(endpoint, attributes, options, params) when 'Reseller' then Supplier::Reseller.call(endpoint, attributes, options, params) end } attribute :created_at, type: :datetime collection :replies, Supplier::Message end end
Version data entries
31 entries across 31 versions & 1 rubygems