Class: Io::Flow::V0::Models::TransactionSource
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TransactionSource
- 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
- .adjustment ⇒ Object
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of TransactionSource for this value, creating a new instance for an unknown value.
- .capture ⇒ Object
- .channel ⇒ Object
- .channel_billed ⇒ Object
- .dispute ⇒ Object
- .duty ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of TransactionSource for this value, or nil if not found.
- .order_service ⇒ Object
- .other_adjustment ⇒ Object
- .platform_fee ⇒ Object
- .refund ⇒ Object
- .reversal ⇒ Object
- .shipping_label ⇒ Object
- .shipping_label_revenue_share ⇒ Object
- .shipping_label_service ⇒ Object
- .tax ⇒ Object
- .tax_adjustment ⇒ Object
- .virtual_card_capture ⇒ Object
- .virtual_card_refund ⇒ Object
- .withholding ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ TransactionSource
constructor
A new instance of TransactionSource.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ TransactionSource
Returns a new instance of TransactionSource.
27980 27981 27982 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27980 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
27978 27979 27980 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27978 def value @value end |
Class Method Details
.adjustment ⇒ Object
28016 28017 28018 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28016 def TransactionSource.adjustment @@_adjustment ||= TransactionSource.new('adjustment') end |
.ALL ⇒ Object
28000 28001 28002 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28000 def TransactionSource.ALL @@all ||= [TransactionSource.capture, TransactionSource.refund, TransactionSource.dispute, TransactionSource.adjustment, TransactionSource.reversal, TransactionSource.shipping_label, TransactionSource.shipping_label_service, TransactionSource.shipping_label_revenue_share, TransactionSource.platform_fee, TransactionSource.tax, TransactionSource.duty, TransactionSource.withholding, TransactionSource.other_adjustment, TransactionSource.tax_adjustment, TransactionSource.channel, TransactionSource.channel_billed, TransactionSource.order_service, TransactionSource.virtual_card_capture, TransactionSource.virtual_card_refund] end |
.apply(value) ⇒ Object
Returns the instance of TransactionSource for this value, creating a new instance for an unknown value
27985 27986 27987 27988 27989 27990 27991 27992 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27985 def TransactionSource.apply(value) if value.instance_of?(TransactionSource) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || TransactionSource.new(value)) end end |
.capture ⇒ Object
28004 28005 28006 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28004 def TransactionSource.capture @@_capture ||= TransactionSource.new('capture') end |
.channel ⇒ Object
28060 28061 28062 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28060 def TransactionSource.channel @@_channel ||= TransactionSource.new('channel') end |
.channel_billed ⇒ Object
28064 28065 28066 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28064 def TransactionSource.channel_billed @@_channel_billed ||= TransactionSource.new('channel_billed') end |
.dispute ⇒ Object
28012 28013 28014 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28012 def TransactionSource.dispute @@_dispute ||= TransactionSource.new('dispute') end |
.duty ⇒ Object
28044 28045 28046 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28044 def TransactionSource.duty @@_duty ||= TransactionSource.new('duty') end |
.from_string(value) ⇒ Object
Returns the instance of TransactionSource for this value, or nil if not found
27995 27996 27997 27998 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 27995 def TransactionSource.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) TransactionSource.ALL.find { |v| v.value == value } end |
.order_service ⇒ Object
28068 28069 28070 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28068 def TransactionSource.order_service @@_order_service ||= TransactionSource.new('order_service') end |
.other_adjustment ⇒ Object
28052 28053 28054 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28052 def TransactionSource.other_adjustment @@_other_adjustment ||= TransactionSource.new('other_adjustment') end |
.platform_fee ⇒ Object
28036 28037 28038 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28036 def TransactionSource.platform_fee @@_platform_fee ||= TransactionSource.new('platform_fee') end |
.refund ⇒ Object
28008 28009 28010 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28008 def TransactionSource.refund @@_refund ||= TransactionSource.new('refund') end |
.reversal ⇒ Object
28020 28021 28022 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28020 def TransactionSource.reversal @@_reversal ||= TransactionSource.new('reversal') end |
.shipping_label ⇒ Object
28024 28025 28026 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28024 def TransactionSource.shipping_label @@_shipping_label ||= TransactionSource.new('shipping_label') end |
.shipping_label_revenue_share ⇒ Object
28032 28033 28034 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28032 def TransactionSource.shipping_label_revenue_share @@_shipping_label_revenue_share ||= TransactionSource.new('shipping_label_revenue_share') end |
.shipping_label_service ⇒ Object
28028 28029 28030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28028 def TransactionSource.shipping_label_service @@_shipping_label_service ||= TransactionSource.new('shipping_label_service') end |
.tax ⇒ Object
28040 28041 28042 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28040 def TransactionSource.tax @@_tax ||= TransactionSource.new('tax') end |
.tax_adjustment ⇒ Object
28056 28057 28058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28056 def TransactionSource.tax_adjustment @@_tax_adjustment ||= TransactionSource.new('tax_adjustment') end |
.virtual_card_capture ⇒ Object
28072 28073 28074 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28072 def TransactionSource.virtual_card_capture @@_virtual_card_capture ||= TransactionSource.new('virtual_card_capture') end |
.virtual_card_refund ⇒ Object
28076 28077 28078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28076 def TransactionSource.virtual_card_refund @@_virtual_card_refund ||= TransactionSource.new('virtual_card_refund') end |
.withholding ⇒ Object
28048 28049 28050 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28048 def TransactionSource.withholding @@_withholding ||= TransactionSource.new('withholding') end |
Instance Method Details
#to_hash ⇒ Object
28080 28081 28082 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28080 def to_hash value end |