Class: IletiMerkezi::Cancel

Inherits:
Object
  • Object
show all
Includes:
XmlBuilder
Defined in:
lib/ileti_merkezi/actions/cancel.rb

Overview

Cancel

Constant Summary collapse

PATH =
'/cancel-order'

Constants included from XmlBuilder

XmlBuilder::XML_TAG

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XmlBuilder

#hash_to_xml

Constructor Details

#initialize(order_id) ⇒ Cancel

Returns a new instance of Cancel.



12
13
14
# File 'lib/ileti_merkezi/actions/cancel.rb', line 12

def initialize(order_id)
  @order_id = order_id
end

Instance Attribute Details

#order_idObject (readonly)

Returns the value of attribute order_id.



10
11
12
# File 'lib/ileti_merkezi/actions/cancel.rb', line 10

def order_id
  @order_id
end

Instance Method Details

#confirmObject



16
17
18
19
20
21
22
# File 'lib/ileti_merkezi/actions/cancel.rb', line 16

def confirm
  request = Request.new(
    path: PATH,
    payload: hash_to_xml(id: order_id)
  )
  request.call
end