Class: Io::Flow::V0::Models::FraudFlowOrderReference

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

Instance Attribute Summary collapse

Attributes inherited from FraudOrderReference

#discriminator

Instance Method Summary collapse

Methods inherited from FraudOrderReference

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ FraudFlowOrderReference

Returns a new instance of FraudFlowOrderReference.



43404
43405
43406
43407
43408
43409
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43404

def initialize(incoming={})
  super(:discriminator => FraudOrderReference::Types::FRAUD_FLOW_ORDER_REFERENCE)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:reference], 'FraudFlowOrderReference')
  @reference = (x = opts.delete(:reference); x.is_a?(::Io::Flow::V0::Models::OrderReference) ? x : ::Io::Flow::V0::Models::OrderReference.new(x))
end

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference.



43402
43403
43404
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43402

def reference
  @reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



43415
43416
43417
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43415

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

#subtype_to_hashObject



43419
43420
43421
43422
43423
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43419

def subtype_to_hash
  {
    :reference => reference.to_hash
  }
end

#to_jsonObject



43411
43412
43413
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43411

def to_json
  JSON.dump(to_hash)
end