Class: Io::Flow::V0::Models::MerchantRejectedReason

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

Returns a new instance of MerchantRejectedReason.



22512
22513
22514
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22512

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



22510
22511
22512
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22510

def value
  @value
end

Class Method Details

.ALLObject



22532
22533
22534
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22532

def MerchantRejectedReason.ALL
  @@all ||= [MerchantRejectedReason.merchant_ubo_is_pep, MerchantRejectedReason.merchant_catalog_is_unsupportable, MerchantRejectedReason.merchant_failed_kyb_review]
end

.apply(value) ⇒ Object

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



22517
22518
22519
22520
22521
22522
22523
22524
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22517

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

.from_string(value) ⇒ Object

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



22527
22528
22529
22530
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22527

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

.merchant_catalog_is_unsupportableObject



22540
22541
22542
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22540

def MerchantRejectedReason.merchant_catalog_is_unsupportable
  @@_merchant_catalog_is_unsupportable ||= MerchantRejectedReason.new('merchant_catalog_is_unsupportable')
end

.merchant_failed_kyb_reviewObject



22544
22545
22546
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22544

def MerchantRejectedReason.merchant_failed_kyb_review
  @@_merchant_failed_kyb_review ||= MerchantRejectedReason.new('merchant_failed_kyb_review')
end

.merchant_ubo_is_pepObject



22536
22537
22538
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22536

def MerchantRejectedReason.merchant_ubo_is_pep
  @@_merchant_ubo_is_pep ||= MerchantRejectedReason.new('merchant_ubo_is_pep')
end

Instance Method Details

#to_hashObject



22548
22549
22550
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22548

def to_hash
  value
end