Class: Io::Flow::V0::Models::ShopifyLocationReference

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ ShopifyLocationReference

Returns a new instance of ShopifyLocationReference.



51182
51183
51184
51185
51186
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51182

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id], 'ShopifyLocationReference')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



51180
51181
51182
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51180

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



51192
51193
51194
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51192

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

#to_hashObject



51196
51197
51198
51199
51200
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51196

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



51188
51189
51190
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51188

def to_json
  JSON.dump(to_hash)
end