Class: Io::Flow::V0::Models::OrganizationStatus

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) ⇒ OrganizationStatus

Returns a new instance of OrganizationStatus.



23932
23933
23934
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23932

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



23930
23931
23932
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23930

def value
  @value
end

Class Method Details

.activeObject



23956
23957
23958
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23956

def OrganizationStatus.active
  @@_active ||= OrganizationStatus.new('active')
end

.ALLObject



23952
23953
23954
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23952

def OrganizationStatus.ALL
  @@all ||= [OrganizationStatus.active, OrganizationStatus.inactive, OrganizationStatus.deactivated, OrganizationStatus.provisioned]
end

.apply(value) ⇒ Object

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



23937
23938
23939
23940
23941
23942
23943
23944
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23937

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

.deactivatedObject

Manually deactivated



23967
23968
23969
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23967

def OrganizationStatus.deactivated
  @@_deactivated ||= OrganizationStatus.new('deactivated')
end

.from_string(value) ⇒ Object

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



23947
23948
23949
23950
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23947

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

.inactiveObject

Determined by usage: ex: orders placed, experience updated, catalog items updated, etc…



23962
23963
23964
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23962

def OrganizationStatus.inactive
  @@_inactive ||= OrganizationStatus.new('inactive')
end

.provisionedObject

Created but not ready for transactions.



23972
23973
23974
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23972

def OrganizationStatus.provisioned
  @@_provisioned ||= OrganizationStatus.new('provisioned')
end

Instance Method Details

#to_hashObject



23976
23977
23978
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23976

def to_hash
  value
end