Class: Io::Flow::V0::Models::WebhookRequestReference

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 = {}) ⇒ WebhookRequestReference

Returns a new instance of WebhookRequestReference.



22826
22827
22828
22829
22830
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22826

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

Instance Attribute Details

#id ⇒ Object (readonly)

Returns the value of attribute id.



22824
22825
22826
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22824

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



22836
22837
22838
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22836

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

#to_hash ⇒ Object



22840
22841
22842
22843
22844
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22840

def to_hash
  {
    :id => id
  }
end

#to_json ⇒ Object



22832
22833
22834
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22832

def to_json
  JSON.dump(to_hash)
end