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.



18399
18400
18401
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18399

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18397
18398
18399
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18397

def value
  @value
end

Class Method Details

.activeObject



18423
18424
18425
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18423

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

.ALLObject



18419
18420
18421
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18419

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



18404
18405
18406
18407
18408
18409
18410
18411
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18404

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



18434
18435
18436
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18434

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



18414
18415
18416
18417
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18414

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…



18429
18430
18431
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18429

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

Instance Method Details

#to_hashObject



18438
18439
18440
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 18438

def to_hash
  value
end