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.



21128
21129
21130
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21128

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



21126
21127
21128
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21126

def value
  @value
end

Class Method Details

.activeObject



21152
21153
21154
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21152

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

.ALLObject



21148
21149
21150
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21148

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



21133
21134
21135
21136
21137
21138
21139
21140
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21133

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



21163
21164
21165
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21163

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



21143
21144
21145
21146
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21143

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…



21158
21159
21160
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21158

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

Instance Method Details

#to_hashObject



21167
21168
21169
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21167

def to_hash
  value
end