Class: OpenPayU::Models::Refund

Inherits:
Model
  • Object
show all
Defined in:
lib/openpayu/models/refund.rb

Instance Attribute Summary collapse

Attributes inherited from Model

#all_errors

Instance Method Summary collapse

Methods inherited from Model

#after_initialize, #all_objects_valid?, #attributes, define_reader, define_writer, #get_instance_values, has_many_objects, has_one_object, #initialize, #prepare_keys, #to_flatten_hash, #to_json, #validate_all_objects

Constructor Details

This class inherits a constructor from OpenPayU::Models::Model

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def amount
  @amount
end

#bank_descriptionObject

Returns the value of attribute bank_description.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def bank_description
  @bank_description
end

#commission_amountObject

Returns the value of attribute commission_amount.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def commission_amount
  @commission_amount
end

#currency_codeObject

Returns the value of attribute currency_code.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def currency_code
  @currency_code
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def description
  @description
end

#ext_refund_idObject

Returns the value of attribute ext_refund_id.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def ext_refund_id
  @ext_refund_id
end

#order_idObject

Returns the value of attribute order_id.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def order_id
  @order_id
end

#proxy_commision_amountObject

Returns the value of attribute proxy_commision_amount.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def proxy_commision_amount
  @proxy_commision_amount
end

#source_account_numberObject

Returns the value of attribute source_account_number.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def 
  @source_account_number
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/openpayu/models/refund.rb', line 5

def type
  @type
end

Instance Method Details

#prepare_dataObject



10
11
12
13
14
15
# File 'lib/openpayu/models/refund.rb', line 10

def prepare_data
  {
    'orderId' => @order_id,
    'refund' => prepare_keys({} , instance_values.except('order_id'))
  }.to_json
end