Class: PromisePay::Fee
- Inherits:
-
Object
- Object
- PromisePay::Fee
- Includes:
- Lib::DynamicAccessors
- Defined in:
- lib/promise_pay/fee.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#cap ⇒ Object
readonly
Returns the value of attribute cap.
-
#fee_type_id ⇒ Object
readonly
Returns the value of attribute fee_type_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#min ⇒ Object
readonly
Returns the value of attribute min.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(options = {}) ⇒ Fee
constructor
A new instance of Fee.
Methods included from Lib::DynamicAccessors
#accessor_defined?, #assign_instance_variables, #define_accessor, #initialize_property, #set_property
Constructor Details
#initialize(options = {}) ⇒ Fee
Returns a new instance of Fee.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/promise_pay/fee.rb', line 21 def initialize( = {}) @name = .fetch(:name) @fee_type_id = .fetch(:fee_type_id) @amount = .fetch(:amount) @cap = .fetch(:cap) @min = .fetch(:min) @max = .fetch(:max) @to = .fetch(:to) assign_instance_variables({'fees' => }) end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
11 12 13 |
# File 'lib/promise_pay/fee.rb', line 11 def amount @amount end |
#cap ⇒ Object (readonly)
Returns the value of attribute cap.
12 13 14 |
# File 'lib/promise_pay/fee.rb', line 12 def cap @cap end |
#fee_type_id ⇒ Object (readonly)
Returns the value of attribute fee_type_id.
10 11 12 |
# File 'lib/promise_pay/fee.rb', line 10 def fee_type_id @fee_type_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/promise_pay/fee.rb', line 8 def id @id end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
14 15 16 |
# File 'lib/promise_pay/fee.rb', line 14 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
13 14 15 |
# File 'lib/promise_pay/fee.rb', line 13 def min @min end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/promise_pay/fee.rb', line 9 def name @name end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
15 16 17 |
# File 'lib/promise_pay/fee.rb', line 15 def to @to end |
Class Method Details
.create(options = {}) ⇒ Object
17 18 19 |
# File 'lib/promise_pay/fee.rb', line 17 def self.create( = {}) new().create end |
Instance Method Details
#create ⇒ Object
33 34 35 36 |
# File 'lib/promise_pay/fee.rb', line 33 def create assign_instance_variables(resource_result) self end |