Class: Payrex::Entities::Refund

Inherits:
Object
  • Object
show all
Defined in:
lib/entities/refund.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_resource) ⇒ Refund

Returns a new instance of Refund.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/entities/refund.rb', line 17

def initialize(api_resource)
  @id = api_resource.data["id"]
  @amount = api_resource.data["amount"]
  @currency = api_resource.data["currency"]
  @livemode = api_resource.data["livemode"]
  @status = api_resource.data["status"]
  @description = api_resource.data["description"]
  @reason = api_resource.data["reason"]
  @remarks = api_resource.data["remarks"]
  @payment_id = api_resource.data["payment_id"]
  @metadata = api_resource.data["metadata"]
  @created_at = api_resource.data["created_at"]
  @updated_at = api_resource.data["updated_at"]
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/entities/refund.rb', line 4

def amount
  @amount
end

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/entities/refund.rb', line 4

def created_at
  @created_at
end

#currencyObject (readonly)

Returns the value of attribute currency.



4
5
6
# File 'lib/entities/refund.rb', line 4

def currency
  @currency
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/entities/refund.rb', line 4

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/entities/refund.rb', line 4

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



4
5
6
# File 'lib/entities/refund.rb', line 4

def livemode
  @livemode
end

#metadataObject (readonly)

Returns the value of attribute metadata.



4
5
6
# File 'lib/entities/refund.rb', line 4

def 
  @metadata
end

#payment_idObject (readonly)

Returns the value of attribute payment_id.



4
5
6
# File 'lib/entities/refund.rb', line 4

def payment_id
  @payment_id
end

#reasonObject (readonly)

Returns the value of attribute reason.



4
5
6
# File 'lib/entities/refund.rb', line 4

def reason
  @reason
end

#remarksObject (readonly)

Returns the value of attribute remarks.



4
5
6
# File 'lib/entities/refund.rb', line 4

def remarks
  @remarks
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/entities/refund.rb', line 4

def status
  @status
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/entities/refund.rb', line 4

def updated_at
  @updated_at
end