Class: Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode

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

Returns a new instance of InstallmentPlanPaymentErrorCode.



15403
15404
15405
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15403

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



15401
15402
15403
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15401

def value
  @value
end

Class Method Details

.ALLObject



15423
15424
15425
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15423

def InstallmentPlanPaymentErrorCode.ALL
  @@all ||= [InstallmentPlanPaymentErrorCode.invalid_authorization, InstallmentPlanPaymentErrorCode.invalid_authorization_amount, InstallmentPlanPaymentErrorCode.invalid_installment_plan]
end

.apply(value) ⇒ Object

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



15408
15409
15410
15411
15412
15413
15414
15415
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15408

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

.from_string(value) ⇒ Object

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



15418
15419
15420
15421
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15418

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

.invalid_authorizationObject

Indicates the specified authorization key does not exist



15428
15429
15430
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15428

def InstallmentPlanPaymentErrorCode.invalid_authorization
  @@_invalid_authorization ||= InstallmentPlanPaymentErrorCode.new('invalid_authorization')
end

.invalid_authorization_amountObject

Indicates the specified authorization amount does not match the first installment in the plan



15434
15435
15436
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15434

def InstallmentPlanPaymentErrorCode.invalid_authorization_amount
  @@_invalid_authorization_amount ||= InstallmentPlanPaymentErrorCode.new('invalid_authorization_amount')
end

.invalid_installment_planObject

Indicates the specified installment plan does not exist



15439
15440
15441
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15439

def InstallmentPlanPaymentErrorCode.invalid_installment_plan
  @@_invalid_installment_plan ||= InstallmentPlanPaymentErrorCode.new('invalid_installment_plan')
end

Instance Method Details

#to_hashObject



15443
15444
15445
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15443

def to_hash
  value
end