Class: Io::Flow::V0::Models::AuthorizationDeleteErrorCode

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

Returns a new instance of AuthorizationDeleteErrorCode.



6367
6368
6369
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6367

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



6365
6366
6367
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6365

def value
  @value
end

Class Method Details

.ALLObject



6387
6388
6389
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6387

def AuthorizationDeleteErrorCode.ALL
  @@all ||= [AuthorizationDeleteErrorCode.expired, AuthorizationDeleteErrorCode.captured, AuthorizationDeleteErrorCode.unknown]
end

.apply(value) ⇒ Object

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



6372
6373
6374
6375
6376
6377
6378
6379
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6372

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

.capturedObject

Payment authorization has already been captured. Please create a refund.



6397
6398
6399
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6397

def AuthorizationDeleteErrorCode.captured
  @@_captured ||= AuthorizationDeleteErrorCode.new('captured')
end

.expiredObject

Payment authorization has expired



6392
6393
6394
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6392

def AuthorizationDeleteErrorCode.expired
  @@_expired ||= AuthorizationDeleteErrorCode.new('expired')
end

.from_string(value) ⇒ Object

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



6382
6383
6384
6385
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6382

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

.unknownObject

Failed due to another reason (details not known)



6402
6403
6404
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6402

def AuthorizationDeleteErrorCode.unknown
  @@_unknown ||= AuthorizationDeleteErrorCode.new('unknown')
end

Instance Method Details

#to_hashObject



6406
6407
6408
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6406

def to_hash
  value
end