Sha256: 905ab346b183e51ef2291b4799a846ef933a08d4b32d9f309c13918ce15ea404

Contents?: true

Size: 469 Bytes

Versions: 1

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true
require_relative "./unified_message"
require_relative "./response_code"
class ResponseMessage
  include Serdee::Attributes
  set_key_transform :camel_lower

  attr_accessor :request_id

  nested :response, UnifiedMessage

  def parsed_message?
    status_code == "00" if status_code
  end

  def status
    return unless response_code
    @status ||= ResponseCode.find(response_code)
  end

  def approved?
    status&.approved?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
serdee-0.1.0 examples/response_message.rb