Class: JxClient::GetDocument
Instance Attribute Summary
#response, #sent_options
Class Method Summary
collapse
Instance Method Summary
collapse
#call, #initialize, #merge_options, #new_message_id, #new_timestamp, #options, #sent_locals, #with_generated
Class Method Details
.from_jx_client(jx_client) ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/jx_client/get_document.rb', line 8
def self.from_jx_client(jx_client)
new(
operation_name: :get_document,
client: jx_client.client,
default_options: jx_client.jx_default_options,
operation_default_options: jx_client.jx_default_get_document_options,
message_id_generate: jx_client.jx_message_id_generate,
timestamp_generate: jx_client.jx_timestamp_generate,
)
end
|
Instance Method Details
#locals(options) ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/jx_client/get_document.rb', line 26
def locals(options)
= {
From: options[:from],
To: options[:to],
MessageId: options[:message_id],
Timestamp: options[:timestamp],
}
[:OptionalFormatType] = options[:optional_format_type] if options[:optional_format_type]
[:OptionalDocumentType] = options[:optional_document_type] if options[:optional_document_type]
{
soap_header: ,
message: {
receiverId: options[:receiver_id],
},
}
end
|
#wrap_response(response) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/jx_client/get_document.rb', line 19
def wrap_response(response)
response.define_singleton_method(:result) do
@result ||= GetDocumentResult.new(**body[:get_document_response])
end
response
end
|