Class: Io::Flow::V0::Models::ShopifyCustomerMetafieldValue

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

Overview

Model to represent details available in a customer metafield.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ ShopifyCustomerMetafieldValue

Returns a new instance of ShopifyCustomerMetafieldValue.



49263
49264
49265
49266
49267
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49263

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

Instance Attribute Details

#flow_consumer_idObject (readonly)

Returns the value of attribute flow_consumer_id.



49261
49262
49263
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49261

def flow_consumer_id
  @flow_consumer_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



49273
49274
49275
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49273

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

#to_hashObject



49277
49278
49279
49280
49281
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49277

def to_hash
  {
    :flow_consumer_id => flow_consumer_id
  }
end

#to_jsonObject



49269
49270
49271
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49269

def to_json
  JSON.dump(to_hash)
end