Class: Io::Flow::V0::Models::PaymentRefundStatus
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentRefundStatus
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentRefundStatus
constructor
A new instance of PaymentRefundStatus.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentRefundStatus
Returns a new instance of PaymentRefundStatus.
51809 51810 51811 51812 51813 51814 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51809 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:status], 'PaymentRefundStatus') @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::RefundStatus) ? x : ::Io::Flow::V0::Models::RefundStatus.apply(x)) @reason = (x = opts.delete(:reason); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::RefundDeclineCode) ? x : ::Io::Flow::V0::Models::RefundDeclineCode.apply(x))) end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
51807 51808 51809 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51807 def reason @reason end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
51807 51808 51809 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51807 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
51820 51821 51822 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51820 def copy(incoming={}) PaymentRefundStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
51824 51825 51826 51827 51828 51829 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51824 def to_hash { :status => status.value, :reason => reason.nil? ? nil : reason.value } end |
#to_json ⇒ Object
51816 51817 51818 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51816 def to_json JSON.dump(to_hash) end |