Class: Dhl::Intraship::CODService

Inherits:
Service
  • Object
show all
Defined in:
lib/dhl-intraship/service/cod_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Dhl::Intraship::Service

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/dhl-intraship/service/cod_service.rb', line 4

def amount
  @amount
end

#bankdataObject

Returns the value of attribute bankdata.



4
5
6
# File 'lib/dhl-intraship/service/cod_service.rb', line 4

def bankdata
  @bankdata
end

#currencyObject

Returns the value of attribute currency.



4
5
6
# File 'lib/dhl-intraship/service/cod_service.rb', line 4

def currency
  @currency
end

Instance Method Details

#append_to_xml(xml) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/dhl-intraship/service/cod_service.rb', line 6

def append_to_xml(xml)
  xml.Service do |xml|
    xml.ServiceGroupOther do |xml|
      xml.COD do |xml|
        xml.CODAmount(amount)
        xml.CODCurrency(currency)
      end
    end
  end
  bankdata.append_to_xml(xml)
end