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.



39279
39280
39281
39282
39283
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39279

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

#idObject (readonly)

Returns the value of attribute id.



39277
39278
39279
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39277

def id
  @id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



39289
39290
39291
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39289

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

#to_hashObject



39293
39294
39295
39296
39297
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39293

def to_hash
  {
    :id => id
  }
end

#to_jsonObject



39285
39286
39287
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39285

def to_json
  JSON.dump(to_hash)
end