Class: Io::Flow::V0::Models::RefundDeclineCode
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RefundDeclineCode
- 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 RefundDeclineCode for this value, creating a new instance for an unknown value.
-
.expired ⇒ Object
All associated payment captures have expired; refunds can no longer be issued.
-
.from_string(value) ⇒ Object
Returns the instance of RefundDeclineCode for this value, or nil if not found.
-
.insufficient_funds ⇒ Object
The requested refund amount exceeded the amount of remaining unrefunded funds.
-
.unknown ⇒ Object
Failed due to another reason (details not known).
Instance Method Summary collapse
-
#initialize(value) ⇒ RefundDeclineCode
constructor
A new instance of RefundDeclineCode.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ RefundDeclineCode
Returns a new instance of RefundDeclineCode.
6285 6286 6287 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6285 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
6283 6284 6285 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6283 def value @value end |
Class Method Details
.ALL ⇒ Object
6305 6306 6307 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6305 def RefundDeclineCode.ALL @@all ||= [RefundDeclineCode.expired, RefundDeclineCode.insufficient_funds, RefundDeclineCode.unknown] end |
.apply(value) ⇒ Object
Returns the instance of RefundDeclineCode for this value, creating a new instance for an unknown value
6290 6291 6292 6293 6294 6295 6296 6297 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6290 def RefundDeclineCode.apply(value) if value.instance_of?(RefundDeclineCode) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || RefundDeclineCode.new(value)) end end |
.expired ⇒ Object
All associated payment captures have expired; refunds can no longer be issued
6310 6311 6312 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6310 def RefundDeclineCode.expired @@_expired ||= RefundDeclineCode.new('expired') end |
.from_string(value) ⇒ Object
Returns the instance of RefundDeclineCode for this value, or nil if not found
6300 6301 6302 6303 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6300 def RefundDeclineCode.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) RefundDeclineCode.ALL.find { |v| v.value == value } end |
.insufficient_funds ⇒ Object
The requested refund amount exceeded the amount of remaining unrefunded funds
6315 6316 6317 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6315 def RefundDeclineCode.insufficient_funds @@_insufficient_funds ||= RefundDeclineCode.new('insufficient_funds') end |
.unknown ⇒ Object
Failed due to another reason (details not known)
6320 6321 6322 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6320 def RefundDeclineCode.unknown @@_unknown ||= RefundDeclineCode.new('unknown') end |
Instance Method Details
#to_hash ⇒ Object
6324 6325 6326 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6324 def to_hash value end |