Class: Io::Flow::V0::Models::PromotionUndefinedType

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

Instance Attribute Summary collapse

Attributes inherited from Promotion

#discriminator

Instance Method Summary collapse

Methods inherited from Promotion

from_json

Constructor Details

#initialize(incoming = {}) ⇒ PromotionUndefinedType

Returns a new instance of PromotionUndefinedType.



8983
8984
8985
8986
8987
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8983

def initialize(incoming={})
  super(:discriminator => 'undefined_type')
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8981
8982
8983
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8981

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



8993
8994
8995
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8993

def copy(incoming={})
  raise 'Operation not supported for undefined type'
end

#subtype_to_hashObject



8989
8990
8991
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8989

def subtype_to_hash
  raise 'Unable to serialize undefined type to json'
end

#to_hashObject



8997
8998
8999
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 8997

def to_hash
  raise 'Operation not supported for undefined type'
end