Class: Io::Flow::V0::Models::OnboardingStateTransition
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OnboardingStateTransition
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OnboardingStateTransition
constructor
A new instance of OnboardingStateTransition.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OnboardingStateTransition
Returns a new instance of OnboardingStateTransition.
50899 50900 50901 50902 50903 50904 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50899 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:state, :started_at], 'OnboardingStateTransition') @state = (x = opts.delete(:state); x.is_a?(::Io::Flow::V0::Models::OnboardingState) ? x : ::Io::Flow::V0::Models::OnboardingState.from_json(x)) @started_at = HttpClient::Preconditions.assert_class('started_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:started_at)), DateTime) end |
Instance Attribute Details
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at.
50897 50898 50899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50897 def started_at @started_at end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
50897 50898 50899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50897 def state @state end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50910 50911 50912 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50910 def copy(incoming={}) OnboardingStateTransition.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50914 50915 50916 50917 50918 50919 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50914 def to_hash { :state => state.to_hash, :started_at => started_at } end |
#to_json ⇒ Object
50906 50907 50908 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50906 def to_json JSON.dump(to_hash) end |