Class: Peddler::Refunds::Item
- Inherits:
-
Object
- Object
- Peddler::Refunds::Item
- Defined in:
- lib/peddler/refunds.rb
Overview
This is a refund.
Constant Summary collapse
- REFUND_REASONS =
%w{ GeneralAdjustment CouldNotShip DifferentItem MerchandiseNotReceived MerchandiseNotAsDescribed }
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#order_id ⇒ Object
Returns the value of attribute order_id.
-
#payments_transaction_id ⇒ Object
Returns the value of attribute payments_transaction_id.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#refund_amount ⇒ Object
Returns the value of attribute refund_amount.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Item
constructor
A new instance of Item.
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Item
Returns a new instance of Item.
39 40 41 |
# File 'lib/peddler/refunds.rb', line 39 def initialize(={}) .each_pair{ |key, value| send("#{key.to_s}=", value) } end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
36 37 38 |
# File 'lib/peddler/refunds.rb', line 36 def @message end |
#order_id ⇒ Object
Returns the value of attribute order_id.
36 37 38 |
# File 'lib/peddler/refunds.rb', line 36 def order_id @order_id end |
#payments_transaction_id ⇒ Object
Returns the value of attribute payments_transaction_id.
36 37 38 |
# File 'lib/peddler/refunds.rb', line 36 def payments_transaction_id @payments_transaction_id end |
#reason ⇒ Object
Returns the value of attribute reason.
37 38 39 |
# File 'lib/peddler/refunds.rb', line 37 def reason @reason end |
#refund_amount ⇒ Object
Returns the value of attribute refund_amount.
36 37 38 |
# File 'lib/peddler/refunds.rb', line 36 def refund_amount @refund_amount end |
Instance Method Details
#to_s ⇒ Object
47 48 49 |
# File 'lib/peddler/refunds.rb', line 47 def to_s "#{self.order_id}\t#{self.payments_transaction_id}\t#{self.refund_amount}\t#{self.reason}\t#{self.}\r\n" end |