Class: Io::Flow::V0::Models::OrderRefundSummaryPartialIncludes

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 = {}) ⇒ OrderRefundSummaryPartialIncludes

Returns a new instance of OrderRefundSummaryPartialIncludes.



53820
53821
53822
53823
53824
53825
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53820

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:key, :charged], 'OrderRefundSummaryPartialIncludes')
  @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryIncludes) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryIncludes.apply(x))
  @charged = (x = opts.delete(:charged); x.is_a?(::Io::Flow::V0::Models::OrderRefundSummaryPartialCharged) ? x : ::Io::Flow::V0::Models::OrderRefundSummaryPartialCharged.apply(x))
end

Instance Attribute Details

#chargedObject (readonly)

Returns the value of attribute charged.



53818
53819
53820
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53818

def charged
  @charged
end

#keyObject (readonly)

Returns the value of attribute key.



53818
53819
53820
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53818

def key
  @key
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53831
53832
53833
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53831

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

#to_hashObject



53835
53836
53837
53838
53839
53840
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53835

def to_hash
  {
    :key => key.value,
    :charged => charged.value
  }
end

#to_jsonObject



53827
53828
53829
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53827

def to_json
  JSON.dump(to_hash)
end