Class: Crefo::Service::Response
- Inherits:
-
Object
- Object
- Crefo::Service::Response
show all
- Defined in:
- lib/crefo/service/response.rb
Defined Under Namespace
Classes: ParsingError, ResponseError
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(response) ⇒ Response
9
10
11
12
13
14
15
|
# File 'lib/crefo/service/response.rb', line 9
def initialize(response)
@response = response
@body = ''
@attachments = []
parse_body
parse_document
end
|
Instance Attribute Details
#attachments ⇒ Object
Returns the value of attribute attachments.
7
8
9
|
# File 'lib/crefo/service/response.rb', line 7
def attachments
@attachments
end
|
#body ⇒ Object
Returns the value of attribute body.
7
8
9
|
# File 'lib/crefo/service/response.rb', line 7
def body
@body
end
|
#document_hash ⇒ Object
Returns the value of attribute document_hash.
7
8
9
|
# File 'lib/crefo/service/response.rb', line 7
def document_hash
@document_hash
end
|
Class Method Details
.response_name ⇒ Object
78
79
80
|
# File 'lib/crefo/service/response.rb', line 78
def response_name
@response_name
end
|
.response_name=(response_name) ⇒ Object
82
83
84
|
# File 'lib/crefo/service/response.rb', line 82
def response_name=(response_name)
@response_name = response_name
end
|
Instance Method Details
#document_body_hash ⇒ Object
17
18
19
|
# File 'lib/crefo/service/response.rb', line 17
def document_body_hash
document_reponse_hash[:body]
end
|
#document_fault_hash ⇒ Object
25
26
27
|
# File 'lib/crefo/service/response.rb', line 25
def document_fault_hash
document_hash.dig(:Envelope, :Body, :Fault)
end
|
#document_reponse_hash ⇒ Object
21
22
23
|
# File 'lib/crefo/service/response.rb', line 21
def document_reponse_hash
document_hash[:Envelope][:Body][:"#{self.class.response_name}Response"]
end
|
#response_id ⇒ Object
29
30
31
|
# File 'lib/crefo/service/response.rb', line 29
def response_id
document_reponse_hash[:header][:responseid]
end
|