Class: Paymill::Fee

Inherits:
Object
  • Object
show all
Defined in:
lib/paymill/models/fee.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Fee

Returns a new instance of Fee.



6
7
8
9
10
11
# File 'lib/paymill/models/fee.rb', line 6

def initialize( json )
  json.each_pair do |key, value|
    instance_variable_set( "@#{key}", ( Integer( value ) rescue value ) )
  end
  @billed_at &&= Time.at( @billed_at )
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/paymill/models/fee.rb', line 4

def amount
  @amount
end

#applicationObject

Returns the value of attribute application.



4
5
6
# File 'lib/paymill/models/fee.rb', line 4

def application
  @application
end

#billed_atObject

Returns the value of attribute billed_at.



4
5
6
# File 'lib/paymill/models/fee.rb', line 4

def billed_at
  @billed_at
end

#currencyObject

Returns the value of attribute currency.



4
5
6
# File 'lib/paymill/models/fee.rb', line 4

def currency
  @currency
end

#paymentObject

Returns the value of attribute payment.



4
5
6
# File 'lib/paymill/models/fee.rb', line 4

def payment
  @payment
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/paymill/models/fee.rb', line 4

def type
  @type
end