class Maxipago::XmlBuilder::Builder
Constants
- MAXIPAGO_COMMANDS
Attributes
apiKey[R]
apiVersion[R]
command[R]
maxipagoId[R]
options[R]
Public Class Methods
new(maxipagoId, apiKey, apiVersion, opts)
click to toggle source
# File lib/maxipago/xml_builder/builder.rb, line 10 def initialize(maxipagoId, apiKey, apiVersion, opts) @maxipagoId = maxipagoId @apiKey = apiKey @apiVersion = apiVersion @command = opts[:command].downcase @options = opts end
Public Instance Methods
get_xml_data()
click to toggle source
# File lib/maxipago/xml_builder/builder.rb, line 18 def get_xml_data if command_defined? build_xml_data else raise "Command not defined!" end end
Private Instance Methods
build_xml_data()
click to toggle source
# File lib/maxipago/xml_builder/builder.rb, line 32 def build_xml_data method(self.command).call end
command_defined?()
click to toggle source
# File lib/maxipago/xml_builder/builder.rb, line 28 def command_defined? MAXIPAGO_COMMANDS.include?(self.command) end