Class: Io::Flow::V0::Models::ExpandableUser
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExpandableUser
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Direct Known Subclasses
Defined Under Namespace
Modules: Types
Instance Attribute Summary collapse
-
#discriminator ⇒ Object
readonly
Returns the value of attribute discriminator.
Instance Method Summary collapse
-
#initialize(incoming = {}) ⇒ ExpandableUser
constructor
A new instance of ExpandableUser.
- #subtype_to_hash ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExpandableUser
Returns a new instance of ExpandableUser.
4807 4808 4809 4810 4811 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4807 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ExpandableUser') @discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String) end |
Instance Attribute Details
#discriminator ⇒ Object (readonly)
Returns the value of attribute discriminator.
4805 4806 4807 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4805 def discriminator @discriminator end |
Instance Method Details
#subtype_to_hash ⇒ Object
4813 4814 4815 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4813 def subtype_to_hash raise 'Cannot serialize an instance of expandable_user directly - must use one of the specific types: user, user_reference' end |
#to_hash ⇒ Object
4817 4818 4819 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 4817 def to_hash subtype_to_hash.merge(:discriminator => @discriminator) end |