Sha256: e36c9c5932d39187020dfcab5ad89faf55a359a904b444e62dd97a3a2b13bc23
Contents?: true
Size: 744 Bytes
Versions: 10
Compression:
Stored size: 744 Bytes
Contents
# typed: strict # frozen_string_literal: true require_relative "data_response" module WhatsappSdk module Api module Responses class SuccessResponse < DataResponse sig { params(response: T::Hash[T.untyped, T.untyped]).void } def initialize(response:) @success = T.let(response["success"], T::Boolean) super(response) end sig { override.params(response: T::Hash[T.untyped, T.untyped]).returns(T.nilable(SuccessResponse)) } def self.build_from_response(response:) return unless response["success"] new(response: response) end sig { returns(T::Boolean) } def success? @success end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems