class Io::Flow::V0::Models::EmailNotificationDataRefund

Sends an refund confirmation email to the customer (using the order.customer.email as the recipient).

Attributes

order[R]
payment[R]
return_[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 40844
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

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 40857
def copy(incoming={})
  EmailNotificationDataRefund.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 40861
def subtype_to_hash
  {
    :order => order.to_hash,
    :return => return_.to_hash,
    :payment => payment.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 40853
def to_json
  JSON.dump(to_hash)
end