Class: Io::Flow::V0::Models::PhraseHintForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#phrase ⇒ Object
readonly
Returns the value of attribute phrase.
Attributes inherited from HintForm
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PhraseHintForm
constructor
A new instance of PhraseHintForm.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from HintForm
Constructor Details
#initialize(incoming = {}) ⇒ PhraseHintForm
Returns a new instance of PhraseHintForm.
23770 23771 23772 23773 23774 23775 23776 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23770 def initialize(incoming={}) super(:discriminator => HintForm::Types::PHRASE_HINT_FORM) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:phrase, :destination], 'PhraseHintForm') @phrase = HttpClient::Preconditions.assert_class('phrase', opts.delete(:phrase), String) @destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String) end |
Instance Attribute Details
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
23768 23769 23770 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23768 def destination @destination end |
#phrase ⇒ Object (readonly)
Returns the value of attribute phrase.
23768 23769 23770 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23768 def phrase @phrase end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
23782 23783 23784 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23782 def copy(incoming={}) PhraseHintForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
23786 23787 23788 23789 23790 23791 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23786 def subtype_to_hash { :phrase => phrase, :destination => destination } end |
#to_json ⇒ Object
23778 23779 23780 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23778 def to_json JSON.dump(to_hash) end |