Class: Oca::Epak::PickupData

Inherits:
Object
  • Object
show all
Defined in:
lib/oca-epak/pickup_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ PickupData

Creates a Pickup Data object for creating a pickup order in OCA.

Parameters:

  • opts (Hash) (defaults to: {})
  • [String] (Hash)

    a customizable set of options

  • [Hash] (Hash)

    a customizable set of options

  • [Array<Hash>] (Hash)

    a customizable set of options



12
13
14
15
16
# File 'lib/oca-epak/pickup_data.rb', line 12

def initialize(opts = {})
  self. = opts[:account_number]
  self.pickup = opts[:pickup]
  self.shipments = opts[:shipments]
end

Instance Attribute Details

#account_numberObject

Returns the value of attribute account_number.



4
5
6
# File 'lib/oca-epak/pickup_data.rb', line 4

def 
  @account_number
end

#pickupObject

Returns the value of attribute pickup.



4
5
6
# File 'lib/oca-epak/pickup_data.rb', line 4

def pickup
  @pickup
end

#shipmentsObject

Returns the value of attribute shipments.



4
5
6
# File 'lib/oca-epak/pickup_data.rb', line 4

def shipments
  @shipments
end

Instance Method Details

#to_xmlObject



18
19
20
# File 'lib/oca-epak/pickup_data.rb', line 18

def to_xml
  or_template.result(binding)
end