Class: Io::Flow::V0::Models::PayoutStatusCode

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ PayoutStatusCode

Returns a new instance of PayoutStatusCode.



22865
22866
22867
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22865

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



22863
22864
22865
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22863

def value
  @value
end

Class Method Details

.ALLObject



22885
22886
22887
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22885

def PayoutStatusCode.ALL
  @@all ||= [PayoutStatusCode.scheduled, PayoutStatusCode.sent, PayoutStatusCode.cancelled, PayoutStatusCode.failed, PayoutStatusCode.succeeded]
end

.apply(value) ⇒ Object

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



22870
22871
22872
22873
22874
22875
22876
22877
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22870

def PayoutStatusCode.apply(value)
  if value.instance_of?(PayoutStatusCode)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PayoutStatusCode.new(value))
  end
end

.cancelledObject



22897
22898
22899
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22897

def PayoutStatusCode.cancelled
  @@_cancelled ||= PayoutStatusCode.new('cancelled')
end

.failedObject



22901
22902
22903
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22901

def PayoutStatusCode.failed
  @@_failed ||= PayoutStatusCode.new('failed')
end

.from_string(value) ⇒ Object

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



22880
22881
22882
22883
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22880

def PayoutStatusCode.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PayoutStatusCode.ALL.find { |v| v.value == value }
end

.scheduledObject



22889
22890
22891
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22889

def PayoutStatusCode.scheduled
  @@_scheduled ||= PayoutStatusCode.new('scheduled')
end

.sentObject



22893
22894
22895
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22893

def PayoutStatusCode.sent
  @@_sent ||= PayoutStatusCode.new('sent')
end

.succeededObject



22905
22906
22907
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22905

def PayoutStatusCode.succeeded
  @@_succeeded ||= PayoutStatusCode.new('succeeded')
end

Instance Method Details

#to_hashObject



22909
22910
22911
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22909

def to_hash
  value
end