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.



13111
13112
13113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13111

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

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



13109
13110
13111
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13109

def value
  @value
end

Class Method Details

.ALLObject



13131
13132
13133
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13131

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



13116
13117
13118
13119
13120
13121
13122
13123
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13116

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



13126
13127
13128
13129
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13126

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



13136
13137
13138
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13136

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



13142
13143
13144
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13142

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



13147
13148
13149
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13147

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

Instance Method Details

#to_hashObject



13151
13152
13153
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13151

def to_hash
  value
end