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.



35518
35519
35520
35521
35522
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35518

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.



35516
35517
35518
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35516

def flow_consumer_id
  @flow_consumer_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



35528
35529
35530
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35528

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

#to_hashObject



35532
35533
35534
35535
35536
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35532

def to_hash
  {
    :flow_consumer_id => flow_consumer_id
  }
end

#to_jsonObject



35524
35525
35526
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35524

def to_json
  JSON.dump(to_hash)
end