Sha256: 18fa11323913384ea6b2ee367c2e4ae24748c4379ba1434695a770d493c26e97
Contents?: true
Size: 922 Bytes
Versions: 14
Compression:
Stored size: 922 Bytes
Contents
# frozen_string_literal: true module Mock module Twilio module Schemas class SupportingDocumentsV1 class << self def for(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"] support_document_sid(body, request) if body["sid"] body["friendly_name"] = request.data["FriendlyName"] if body["friendly_name"] body["status"] = "approved" if body["status"] body["type"] = request.data["Type"] if body["type"] body end def support_document_sid(body, request) prefix = "RD" sid = prefix + SecureRandom.hex(16) body["sid"] = sid end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems