Class: Io::Flow::V0::Models::PayoutStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PayoutStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PayoutStatus
constructor
A new instance of PayoutStatus.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PayoutStatus
Returns a new instance of PayoutStatus.
54740 54741 54742 54743 54744 54745 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54740 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:code], 'PayoutStatus') @code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::PayoutStatusCode) ? x : ::Io::Flow::V0::Models::PayoutStatusCode.apply(x)) @reason = (x = opts.delete(:reason); x.nil? ? nil : HttpClient::Preconditions.assert_class('reason', x, String)) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
54738 54739 54740 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54738 def code @code end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
54738 54739 54740 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54738 def reason @reason end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
54751 54752 54753 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54751 def copy(incoming={}) PayoutStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
54755 54756 54757 54758 54759 54760 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54755 def to_hash { :code => code.value, :reason => reason } end |
#to_json ⇒ Object
54747 54748 54749 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 54747 def to_json JSON.dump(to_hash) end |