Class: Io::Flow::V0::Models::ExpandableUser

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Direct Known Subclasses

ExpandableUserUndefinedType, User, UserReference

Defined Under Namespace

Modules: Types

Instance Attribute Summary collapse

Instance Method Summary collapse

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