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

- (Object) amount

Returns the value of attribute amount



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

def amount
  @amount
end

- (Object) bank_description

Returns the value of attribute bank_description



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

def bank_description
  @bank_description
end

- (Object) commission_amount

Returns the value of attribute commission_amount



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

def commission_amount
  @commission_amount
end

- (Object) currency_code

Returns the value of attribute currency_code



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

def currency_code
  @currency_code
end

- (Object) description

Returns the value of attribute description



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

def description
  @description
end

- (Object) ext_refund_id

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

- (Object) order_id

Returns the value of attribute order_id



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

def order_id
  @order_id
end

- (Object) proxy_commision_amount

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

- (Object) source_account_number

Returns the value of attribute source_account_number



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

def 
  @source_account_number
end

- (Object) type

Returns the value of attribute type



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

def type
  @type
end

Instance Method Details

- (Object) prepare_data



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