Class: Io::Flow::V0::Models::EmailPaymentSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ EmailPaymentSummary

Returns a new instance of EmailPaymentSummary.



40971
40972
40973
40974
40975
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40971

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:refund], 'EmailPaymentSummary')
  @refund = (x = opts.delete(:refund); x.is_a?(::Io::Flow::V0::Models::Refund) ? x : ::Io::Flow::V0::Models::Refund.new(x))
end

Instance Attribute Details

#refundObject (readonly)

Returns the value of attribute refund.



40969
40970
40971
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40969

def refund
  @refund
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



40981
40982
40983
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40981

def copy(incoming={})
  EmailPaymentSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



40985
40986
40987
40988
40989
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40985

def to_hash
  {
    :refund => refund.to_hash
  }
end

#to_jsonObject



40977
40978
40979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 40977

def to_json
  JSON.dump(to_hash)
end