class Io::Flow::V0::Models::CaptureStatus

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17598
def CaptureStatus.ALL
  @@all ||= [CaptureStatus.initiated, CaptureStatus.pending, CaptureStatus.succeeded, CaptureStatus.failed, CaptureStatus.canceled]
end
apply(value) click to toggle source

Returns the instance of CaptureStatus for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 17583
def CaptureStatus.apply(value)
  if value.instance_of?(CaptureStatus)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || CaptureStatus.new(value))
  end
end
canceled() click to toggle source

The capture was canceled.

# File lib/flow_commerce/flow_api_v0_client.rb, line 17623
def CaptureStatus.canceled
  @@_canceled ||= CaptureStatus.new('canceled')
end
failed() click to toggle source

The capture failed to process.

# File lib/flow_commerce/flow_api_v0_client.rb, line 17618
def CaptureStatus.failed
  @@_failed ||= CaptureStatus.new('failed')
end
from_string(value) click to toggle source

Returns the instance of CaptureStatus for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 17593
def CaptureStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  CaptureStatus.ALL.find { |v| v.value == value }
end
initiated() click to toggle source

The capture has been initiated but the request to the psp has not been sent.

# File lib/flow_commerce/flow_api_v0_client.rb, line 17603
def CaptureStatus.initiated
  @@_initiated ||= CaptureStatus.new('initiated')
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17578
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
pending() click to toggle source

The capture is pending and requires time to complete.

# File lib/flow_commerce/flow_api_v0_client.rb, line 17608
def CaptureStatus.pending
  @@_pending ||= CaptureStatus.new('pending')
end
succeeded() click to toggle source

The capture has been processed successfully.

# File lib/flow_commerce/flow_api_v0_client.rb, line 17613
def CaptureStatus.succeeded
  @@_succeeded ||= CaptureStatus.new('succeeded')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 17627
def to_hash
  value
end