Class: Nfe::Webservices::Sender
- Inherits:
-
Object
- Object
- Nfe::Webservices::Sender
- Extended by:
- ActiveModel::Naming
- Defined in:
- lib/nfe/webservices/sender.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #execute(object) ⇒ Object
-
#initialize(certificate, private_key, ws_info) ⇒ Sender
constructor
A new instance of Sender.
Constructor Details
#initialize(certificate, private_key, ws_info) ⇒ Sender
Returns a new instance of Sender.
8 9 10 11 12 13 |
# File 'lib/nfe/webservices/sender.rb', line 8 def initialize(certificate, private_key, ws_info) @certificate = certificate @private_key = private_key @errors = ActiveModel::Errors.new(self) @ws_info = ws_info end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'lib/nfe/webservices/sender.rb', line 6 def errors @errors end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/nfe/webservices/sender.rb', line 6 def result @result end |
Instance Method Details
#execute(object) ⇒ Object
15 16 17 18 |
# File 'lib/nfe/webservices/sender.rb', line 15 def execute(object) call_client_soap(object) if (object.to_xml) @errors.empty? end |