Class: Io::Flow::V0::Models::PaymentRequestReview
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentRequestReview
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#checks ⇒ Object
readonly
Returns the value of attribute checks.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentRequestReview
constructor
A new instance of PaymentRequestReview.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentRequestReview
Returns a new instance of PaymentRequestReview.
58880 58881 58882 58883 58884 58885 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58880 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:status, :checks], 'PaymentRequestReview') @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::PaymentRequestReviewStatus) ? x : ::Io::Flow::V0::Models::PaymentRequestReviewStatus.apply(x)) @checks = HttpClient::Preconditions.assert_class('checks', opts.delete(:checks), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentRequestReviewCheck) ? x : ::Io::Flow::V0::Models::PaymentRequestReviewCheck.new(x)) } end |
Instance Attribute Details
#checks ⇒ Object (readonly)
Returns the value of attribute checks.
58878 58879 58880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58878 def checks @checks end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
58878 58879 58880 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58878 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
58891 58892 58893 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58891 def copy(incoming={}) PaymentRequestReview.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
58895 58896 58897 58898 58899 58900 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58895 def to_hash { :status => status.value, :checks => checks.map { |o| o.to_hash } } end |
#to_json ⇒ Object
58887 58888 58889 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58887 def to_json JSON.dump(to_hash) end |