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.
22563 22564 22565 22566 22567 22568 22569 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22563 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.
22561 22562 22563 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22561 def destination @destination end |
#phrase ⇒ Object (readonly)
Returns the value of attribute phrase.
22561 22562 22563 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22561 def phrase @phrase end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
22575 22576 22577 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22575 def copy(incoming={}) PhraseHintForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
22579 22580 22581 22582 22583 22584 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22579 def subtype_to_hash { :phrase => phrase, :destination => destination } end |
#to_json ⇒ Object
22571 22572 22573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22571 def to_json JSON.dump(to_hash) end |