Class: Io::Flow::V0::Models::EmailNotificationDataRefund
- Inherits:
-
EmailNotificationData
- Object
- EmailNotificationData
- Io::Flow::V0::Models::EmailNotificationDataRefund
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Sends an refund confirmation email to the customer (using the order.customer.email as the recipient).
Instance Attribute Summary collapse
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#payment ⇒ Object
readonly
Returns the value of attribute payment.
-
#return_ ⇒ Object
readonly
Returns the value of attribute return_.
Attributes inherited from EmailNotificationData
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ EmailNotificationDataRefund
constructor
A new instance of EmailNotificationDataRefund.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from EmailNotificationData
Constructor Details
#initialize(incoming = {}) ⇒ EmailNotificationDataRefund
Returns a new instance of EmailNotificationDataRefund.
29888 29889 29890 29891 29892 29893 29894 29895 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29888 def initialize(incoming={}) super(:discriminator => EmailNotificationData::Types::EMAIL_NOTIFICATION_DATA_REFUND) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:order, :return_, :payment], 'EmailNotificationDataRefund') @order = (x = opts.delete(:order); x.is_a?(::Io::Flow::V0::Models::OrderSummary) ? x : ::Io::Flow::V0::Models::OrderSummary.new(x)) @return_ = (x = opts.delete(:return); x.is_a?(::Io::Flow::V0::Models::OrderSummary) ? x : ::Io::Flow::V0::Models::OrderSummary.new(x)) @payment = (x = opts.delete(:payment); x.is_a?(::Io::Flow::V0::Models::EmailPaymentSummary) ? x : ::Io::Flow::V0::Models::EmailPaymentSummary.new(x)) end |
Instance Attribute Details
#order ⇒ Object (readonly)
Returns the value of attribute order.
29886 29887 29888 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29886 def order @order end |
#payment ⇒ Object (readonly)
Returns the value of attribute payment.
29886 29887 29888 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29886 def payment @payment end |
#return_ ⇒ Object (readonly)
Returns the value of attribute return_.
29886 29887 29888 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29886 def return_ @return_ end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29901 29902 29903 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29901 def copy(incoming={}) EmailNotificationDataRefund.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
29905 29906 29907 29908 29909 29910 29911 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29905 def subtype_to_hash { :order => order.to_hash, :return => return_.to_hash, :payment => payment.to_hash } end |
#to_json ⇒ Object
29897 29898 29899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29897 def to_json JSON.dump(to_hash) end |