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



18660
18661
18662
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18660

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18658
18659
18660
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18658

def value
  @value
end

Class Method Details

.activeObject



18684
18685
18686
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18684

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

.ALLObject



18680
18681
18682
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18680

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

.apply(value) ⇒ Object

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



18665
18666
18667
18668
18669
18670
18671
18672
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18665

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



18695
18696
18697
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18695

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



18675
18676
18677
18678
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18675

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…



18690
18691
18692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18690

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

Instance Method Details

#to_hashObject



18699
18700
18701
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18699

def to_hash
  value
end