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.



50673
50674
50675
50676
50677
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50673

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.



50671
50672
50673
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50671

def flow_consumer_id
  @flow_consumer_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



50683
50684
50685
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50683

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

#to_hashObject



50687
50688
50689
50690
50691
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50687

def to_hash
  {
    :flow_consumer_id => flow_consumer_id
  }
end

#to_jsonObject



50679
50680
50681
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50679

def to_json
  JSON.dump(to_hash)
end