Class: Io::Flow::V0::Models::FraudPaymentRequestReference

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

Returns a new instance of FraudPaymentRequestReference.



43431
43432
43433
43434
43435
43436
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43431

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

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference.



43429
43430
43431
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43429

def reference
  @reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



43442
43443
43444
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43442

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

#subtype_to_hashObject



43446
43447
43448
43449
43450
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43446

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

#to_jsonObject



43438
43439
43440
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43438

def to_json
  JSON.dump(to_hash)
end