Class: Io::Flow::V0::Models::FeeDeductionType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::FeeDeductionType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of FeeDeductionType for this value, creating a new instance for an unknown value.
- .duty_guarantee ⇒ Object
- .fraud ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of FeeDeductionType for this value, or nil if not found.
- .fx ⇒ Object
- .mor ⇒ Object
- .processing ⇒ Object
- .rate_lock ⇒ Object
- .transfer ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ FeeDeductionType
constructor
A new instance of FeeDeductionType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ FeeDeductionType
Returns a new instance of FeeDeductionType.
20486 20487 20488 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20486 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
20484 20485 20486 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20484 def value @value end |
Class Method Details
.ALL ⇒ Object
20506 20507 20508 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20506 def FeeDeductionType.ALL @@all ||= [FeeDeductionType.duty_guarantee, FeeDeductionType.mor, FeeDeductionType.fraud, FeeDeductionType.fx, FeeDeductionType.processing, FeeDeductionType.rate_lock, FeeDeductionType.transfer] end |
.apply(value) ⇒ Object
Returns the instance of FeeDeductionType for this value, creating a new instance for an unknown value
20491 20492 20493 20494 20495 20496 20497 20498 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20491 def FeeDeductionType.apply(value) if value.instance_of?(FeeDeductionType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || FeeDeductionType.new(value)) end end |
.duty_guarantee ⇒ Object
20510 20511 20512 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20510 def FeeDeductionType.duty_guarantee @@_duty_guarantee ||= FeeDeductionType.new('duty_guarantee') end |
.fraud ⇒ Object
20518 20519 20520 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20518 def FeeDeductionType.fraud @@_fraud ||= FeeDeductionType.new('fraud') end |
.from_string(value) ⇒ Object
Returns the instance of FeeDeductionType for this value, or nil if not found
20501 20502 20503 20504 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20501 def FeeDeductionType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) FeeDeductionType.ALL.find { |v| v.value == value } end |
.fx ⇒ Object
20522 20523 20524 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20522 def FeeDeductionType.fx @@_fx ||= FeeDeductionType.new('fx') end |
.mor ⇒ Object
20514 20515 20516 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20514 def FeeDeductionType.mor @@_mor ||= FeeDeductionType.new('mor') end |
.processing ⇒ Object
20526 20527 20528 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20526 def FeeDeductionType.processing @@_processing ||= FeeDeductionType.new('processing') end |
.rate_lock ⇒ Object
20530 20531 20532 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20530 def FeeDeductionType.rate_lock @@_rate_lock ||= FeeDeductionType.new('rate_lock') end |
.transfer ⇒ Object
20534 20535 20536 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20534 def FeeDeductionType.transfer @@_transfer ||= FeeDeductionType.new('transfer') end |
Instance Method Details
#to_hash ⇒ Object
20538 20539 20540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20538 def to_hash value end |