Class: Io::Flow::V0::Models::PayoutStatusFailed
- Inherits:
-
PayoutStatus
- Object
- PayoutStatus
- Io::Flow::V0::Models::PayoutStatusFailed
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from PayoutStatus
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PayoutStatusFailed
constructor
A new instance of PayoutStatusFailed.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from PayoutStatus
Constructor Details
#initialize(incoming = {}) ⇒ PayoutStatusFailed
Returns a new instance of PayoutStatusFailed.
59218 59219 59220 59221 59222 59223 59224 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59218 def initialize(incoming={}) super(:code => PayoutStatus::Types::PAYOUT_STATUS_FAILED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:timestamp, :reason], 'PayoutStatusFailed') @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime) @reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::PayoutStatusFailureCode) ? x : ::Io::Flow::V0::Models::PayoutStatusFailureCode.apply(x)) end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
59216 59217 59218 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59216 def reason @reason end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
59216 59217 59218 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59216 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
59230 59231 59232 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59230 def copy(incoming={}) PayoutStatusFailed.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
59234 59235 59236 59237 59238 59239 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59234 def subtype_to_hash { :timestamp => , :reason => reason.value } end |
#to_json ⇒ Object
59226 59227 59228 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59226 def to_json JSON.dump(to_hash) end |