Sha256: a628cbb378b452f418c96a47d542c44e324c9ebc1d621338626352d1fa6018ee

Contents?: true

Size: 421 Bytes

Versions: 2

Compression:

Stored size: 421 Bytes

Contents

module Payture::Cheques
  module Responses
    class ChequeStatus
      attr_reader :sent, :cheque, :error_code, :status

      def initialize(args)
        @sent = args["Sended"]
        @cheque = args["Cheque"]
        @status = args["Status"]
        @error_code = args["ErrCode"] || Status::ERROR_STATES[@status]
      end

      def success?
        @sent == true && @status == 'Created'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
payture-cheques-0.1.2 lib/payture/cheques/responses/cheque_status.rb
payture-cheques-0.1.0 lib/payture/cheques/responses/cheque_status.rb