Class: HostConnect::SupplierInfoBuilder
- Inherits:
-
AbstractBuilder
- Object
- AbstractBuilder
- HostConnect::SupplierInfoBuilder
- Defined in:
- lib/hostconnect/builders/suppler_info_builder.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SupplierInfoBuilder
constructor
A new instance of SupplierInfoBuilder.
- #to_xml ⇒ Object
Methods inherited from AbstractBuilder
Constructor Details
#initialize(options = {}) ⇒ SupplierInfoBuilder
Returns a new instance of SupplierInfoBuilder.
3 4 5 6 |
# File 'lib/hostconnect/builders/suppler_info_builder.rb', line 3 def initialize( = {}) @valid_options = [ :agent_id, :password, :supplier_code, :supplier_id ].freeze super() end |
Instance Method Details
#to_xml ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/hostconnect/builders/suppler_info_builder.rb', line 8 def to_xml x = x.Request { x.SupplierInfoRequest { x.AgentID @agent_id x.Password @password if @supplier_code @supplier_code.each { |s| x.SupplierCode s } end if @supplier_id @opt.each { |s| s.SupplierId s } end } } x end |