Class: Moov::Models::Components::FeeProperties

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/feeproperties.rb

Overview

Defines the specific parameters used for fee calculation.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(fixed_amount: nil, variable_rate: nil, min_per_transaction: nil, max_per_transaction: nil) ⇒ FeeProperties



28
29
30
31
32
33
# File 'lib/moov/models/components/feeproperties.rb', line 28

def initialize(fixed_amount: nil, variable_rate: nil, min_per_transaction: nil, max_per_transaction: nil)
  @fixed_amount = fixed_amount
  @variable_rate = variable_rate
  @min_per_transaction = min_per_transaction
  @max_per_transaction = max_per_transaction
end

Instance Method Details

#==(other) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/moov/models/components/feeproperties.rb', line 36

def ==(other)
  return false unless other.is_a? self.class
  return false unless @fixed_amount == other.fixed_amount
  return false unless @variable_rate == other.variable_rate
  return false unless @min_per_transaction == other.min_per_transaction
  return false unless @max_per_transaction == other.max_per_transaction
  true
end