Class: Io::Flow::V0::Models::OrderFraudStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderFraudStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderFraudStatus
constructor
A new instance of OrderFraudStatus.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderFraudStatus
Returns a new instance of OrderFraudStatus.
31893 31894 31895 31896 31897 31898 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31893 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:order, :status], 'OrderFraudStatus') @order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::OrderReference) ? x : ::Io::Flow::V0::Models::OrderReference.new(x)) @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::FraudStatus) ? x : ::Io::Flow::V0::Models::FraudStatus.apply(x)) end |
Instance Attribute Details
#order ⇒ Object (readonly)
Returns the value of attribute order.
31891 31892 31893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31891 def order @order end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
31891 31892 31893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31891 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
31904 31905 31906 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31904 def copy(incoming={}) OrderFraudStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
31908 31909 31910 31911 31912 31913 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31908 def to_hash { :order => order.to_hash, :status => status.value } end |
#to_json ⇒ Object
31900 31901 31902 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31900 def to_json JSON.dump(to_hash) end |