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.



6110
6111
6112
6113
6114
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6110

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.



6108
6109
6110
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6108

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



6120
6121
6122
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6120

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

#subtype_to_hashObject



6116
6117
6118
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6116

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

#to_hashObject



6124
6125
6126
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6124

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