Class: Io::Flow::V0::Models::ReturnSourceExternalVendor

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

Instance Attribute Summary collapse

Attributes inherited from ReturnSource

#discriminator

Instance Method Summary collapse

Methods inherited from ReturnSource

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ReturnSourceExternalVendor

Returns a new instance of ReturnSourceExternalVendor.



49653
49654
49655
49656
49657
49658
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49653

def initialize(incoming={})
  super(:discriminator => ReturnSource::Types::RETURN_SOURCE_EXTERNAL_VENDOR)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:key], 'ReturnSourceExternalVendor')
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



49651
49652
49653
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49651

def key
  @key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



49664
49665
49666
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49664

def copy(incoming={})
  ReturnSourceExternalVendor.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



49668
49669
49670
49671
49672
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49668

def subtype_to_hash
  {
    :key => key
  }
end

#to_jsonObject



49660
49661
49662
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49660

def to_json
  JSON.dump(to_hash)
end