Class: Einvoice::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/einvoice/result.rb

Direct Known Subclasses

Tradevan::Result

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response = nil) ⇒ Result

Returns a new instance of Result.



5
6
7
# File 'lib/einvoice/result.rb', line 5

def initialize(response = nil)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/einvoice/result.rb', line 3

def response
  @response
end

Instance Method Details

#dataObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/einvoice/result.rb', line 17

def data
  raise NotImplementedError, 'You must initialize one of Einvoice::Response subclasses then use it.'
end

#errorsObject

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/einvoice/result.rb', line 9

def errors
  raise NotImplementedError, 'You must initialize one of Einvoice::Response subclasses then use it.'
end

#successful?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/einvoice/result.rb', line 13

def successful?
  raise NotImplementedError, 'You must initialize one of Einvoice::Response subclasses then use it.'
end