Class: Io::Flow::V0::Models::FraudFlowOrderReference
- Inherits:
-
FraudOrderReference
- Object
- FraudOrderReference
- Io::Flow::V0::Models::FraudFlowOrderReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
Attributes inherited from FraudOrderReference
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ FraudFlowOrderReference
constructor
A new instance of FraudFlowOrderReference.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from FraudOrderReference
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
#reference ⇒ Object (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_hash ⇒ Object
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_json ⇒ Object
43411 43412 43413 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43411 def to_json JSON.dump(to_hash) end |