Sha256: b1fba9c170e29b207c38047475f8d5f5c62d31062d7619c7313c5f97103c6e2b
Contents?: true
Size: 1.2 KB
Versions: 15
Compression:
Stored size: 1.2 KB
Contents
# frozen_string_literal: true module Mock module Twilio module Decorators module Api2010 class ConferencesParticipantsUpdate class << self def decorate(body, request) body["date_updated"] = Time.current.rfc2822 if body["date_updated"] body["date_created"] = Time.current.rfc2822 if body["date_created"] body["account_sid"] = ::Twilio.account_sid if body["account_sid"] body["label"] = "Mock Customer" if body["label"] body["status"] = "complete" if body["status"] parse_call_sid(body, request) if body["call_sid"] parse_conference_sid(body, request) if body["conference_sid"] body end def parse_call_sid(body, request) uri = URI(request.url) call_sid = uri.path.split('/')[7].split('.').first body["call_sid"] = call_sid end def parse_conference_sid(body, request) uri = URI(request.url) conference_sid = uri.path.split('/')[5] body["conference_sid"] = conference_sid end end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems