Class: Io::Flow::V0::Models::OrderQuoteErrorCode

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

Returns a new instance of OrderQuoteErrorCode.



23496
23497
23498
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23496

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



23494
23495
23496
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23494

def value
  @value
end

Class Method Details

.apply(value) ⇒ Object

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



23501
23502
23503
23504
23505
23506
23507
23508
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23501

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

.contact_email_invalidObject



23520
23521
23522
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23520

def OrderQuoteErrorCode.contact_email_invalid
  @@_contact_email_invalid ||= OrderQuoteErrorCode.new('contact_email_invalid')
end

.contact_email_requiredObject



23524
23525
23526
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23524

def OrderQuoteErrorCode.contact_email_required
  @@_contact_email_required ||= OrderQuoteErrorCode.new('contact_email_required')
end

.contact_phone_invalidObject



23528
23529
23530
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23528

def OrderQuoteErrorCode.contact_phone_invalid
  @@_contact_phone_invalid ||= OrderQuoteErrorCode.new('contact_phone_invalid')
end

.contact_phone_requiredObject



23532
23533
23534
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23532

def OrderQuoteErrorCode.contact_phone_required
  @@_contact_phone_required ||= OrderQuoteErrorCode.new('contact_phone_required')
end

.country_not_supportedObject



23536
23537
23538
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23536

def OrderQuoteErrorCode.country_not_supported
  @@_country_not_supported ||= OrderQuoteErrorCode.new('country_not_supported')
end

.currency_invalidObject



23540
23541
23542
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23540

def OrderQuoteErrorCode.currency_invalid
  @@_currency_invalid ||= OrderQuoteErrorCode.new('currency_invalid')
end

.first_name_invalidObject



23544
23545
23546
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23544

def OrderQuoteErrorCode.first_name_invalid
  @@_first_name_invalid ||= OrderQuoteErrorCode.new('first_name_invalid')
end

.first_name_requiredObject



23548
23549
23550
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23548

def OrderQuoteErrorCode.first_name_required
  @@_first_name_required ||= OrderQuoteErrorCode.new('first_name_required')
end

.from_string(value) ⇒ Object

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



23511
23512
23513
23514
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23511

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

.geo_required_when_no_sessionObject



23552
23553
23554
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23552

def OrderQuoteErrorCode.geo_required_when_no_session
  @@_geo_required_when_no_session ||= OrderQuoteErrorCode.new('geo_required_when_no_session')
end

.language_invalidObject



23556
23557
23558
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23556

def OrderQuoteErrorCode.language_invalid
  @@_language_invalid ||= OrderQuoteErrorCode.new('language_invalid')
end

.last_name_invalidObject



23560
23561
23562
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23560

def OrderQuoteErrorCode.last_name_invalid
  @@_last_name_invalid ||= OrderQuoteErrorCode.new('last_name_invalid')
end

.last_name_requiredObject



23564
23565
23566
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23564

def OrderQuoteErrorCode.last_name_required
  @@_last_name_required ||= OrderQuoteErrorCode.new('last_name_required')
end

.line_item_number_invalidObject



23568
23569
23570
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23568

def OrderQuoteErrorCode.line_item_number_invalid
  @@_line_item_number_invalid ||= OrderQuoteErrorCode.new('line_item_number_invalid')
end

.line_item_number_not_availableObject



23572
23573
23574
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23572

def OrderQuoteErrorCode.line_item_number_not_available
  @@_line_item_number_not_available ||= OrderQuoteErrorCode.new('line_item_number_not_available')
end

.line_not_foundObject



23576
23577
23578
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23576

def OrderQuoteErrorCode.line_not_found
  @@_line_not_found ||= OrderQuoteErrorCode.new('line_not_found')
end

.line_quantity_invalidObject



23580
23581
23582
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23580

def OrderQuoteErrorCode.line_quantity_invalid
  @@_line_quantity_invalid ||= OrderQuoteErrorCode.new('line_quantity_invalid')
end

.line_value_threshold_exceededObject



23584
23585
23586
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23584

def OrderQuoteErrorCode.line_value_threshold_exceeded
  @@_line_value_threshold_exceeded ||= OrderQuoteErrorCode.new('line_value_threshold_exceeded')
end

.name_missing_first_or_lastObject



23588
23589
23590
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23588

def OrderQuoteErrorCode.name_missing_first_or_last
  @@_name_missing_first_or_last ||= OrderQuoteErrorCode.new('name_missing_first_or_last')
end

.name_requiredObject



23592
23593
23594
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23592

def OrderQuoteErrorCode.name_required
  @@_name_required ||= OrderQuoteErrorCode.new('name_required')
end

.order_quote_requires_at_least_one_lineObject



23596
23597
23598
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23596

def OrderQuoteErrorCode.order_quote_requires_at_least_one_line
  @@_order_quote_requires_at_least_one_line ||= OrderQuoteErrorCode.new('order_quote_requires_at_least_one_line')
end

.session_not_foundObject



23600
23601
23602
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23600

def OrderQuoteErrorCode.session_not_found
  @@_session_not_found ||= OrderQuoteErrorCode.new('session_not_found')
end

.session_organization_mismatchObject



23604
23605
23606
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23604

def OrderQuoteErrorCode.session_organization_mismatch
  @@_session_organization_mismatch ||= OrderQuoteErrorCode.new('session_organization_mismatch')
end

Instance Method Details

#to_hashObject



23608
23609
23610
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23608

def to_hash
  value
end