Class: Io::Flow::V0::Models::AbandonedOrderSettingStatus

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

Returns a new instance of AbandonedOrderSettingStatus.



16359
16360
16361
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16359

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



16357
16358
16359
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16357

def value
  @value
end

Class Method Details

.activeObject



16383
16384
16385
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16383

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

.ALLObject



16379
16380
16381
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16379

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

.apply(value) ⇒ Object

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



16364
16365
16366
16367
16368
16369
16370
16371
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16364

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

.from_string(value) ⇒ Object

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



16374
16375
16376
16377
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16374

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

.inactiveObject



16387
16388
16389
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16387

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

Instance Method Details

#to_hashObject



16391
16392
16393
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16391

def to_hash
  value
end