Class: EShipper::OrderInformationRequest
- Defined in:
- lib/eshipper/requests/order_information_request.rb
Instance Attribute Summary collapse
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#referenceCode ⇒ Object
readonly
Returns the value of attribute referenceCode.
Instance Method Summary collapse
-
#initialize(order_id:, referenceCode: nil) ⇒ OrderInformationRequest
constructor
A new instance of OrderInformationRequest.
- #order_properties ⇒ Object
- #request_body ⇒ Object
Methods inherited from Request
Constructor Details
#initialize(order_id:, referenceCode: nil) ⇒ OrderInformationRequest
Returns a new instance of OrderInformationRequest.
7 8 9 10 11 |
# File 'lib/eshipper/requests/order_information_request.rb', line 7 def initialize(order_id:, referenceCode: nil) @order_id = order_id @referenceCode = referenceCode super() end |
Instance Attribute Details
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
5 6 7 |
# File 'lib/eshipper/requests/order_information_request.rb', line 5 def order_id @order_id end |
#referenceCode ⇒ Object (readonly)
Returns the value of attribute referenceCode.
5 6 7 |
# File 'lib/eshipper/requests/order_information_request.rb', line 5 def referenceCode @referenceCode end |
Instance Method Details
#order_properties ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/eshipper/requests/order_information_request.rb', line 13 def order_properties { orderId: @order_id, referenceCode: referenceCode, detailed: "true", }.compact end |
#request_body ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/eshipper/requests/order_information_request.rb', line 21 def request_body builder = build do |xml| xml.OrderInformationRequest do xml.Order(order_properties) end end builder.to_xml end |