Class: Io::Flow::V0::Models::InstallmentPlanPaymentError
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::InstallmentPlanPaymentError
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#codes ⇒ Object
readonly
Returns the value of attribute codes.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ InstallmentPlanPaymentError
constructor
A new instance of InstallmentPlanPaymentError.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ InstallmentPlanPaymentError
Returns a new instance of InstallmentPlanPaymentError.
24151 24152 24153 24154 24155 24156 24157 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24151 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:code, :messages, :codes], 'InstallmentPlanPaymentError') @code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode.apply(x)) @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) } @codes = HttpClient::Preconditions.assert_class('codes', opts.delete(:codes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode.apply(x)) } end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
24149 24150 24151 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24149 def code @code end |
#codes ⇒ Object (readonly)
Returns the value of attribute codes.
24149 24150 24151 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24149 def codes @codes end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
24149 24150 24151 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24149 def @messages end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
24163 24164 24165 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24163 def copy(incoming={}) InstallmentPlanPaymentError.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
24167 24168 24169 24170 24171 24172 24173 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24167 def to_hash { :code => code.value, :messages => , :codes => codes.map { |o| o.value } } end |
#to_json ⇒ Object
24159 24160 24161 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24159 def to_json JSON.dump(to_hash) end |