Class: Io::Flow::V0::Models::SettlementNoPayout

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

Overview

This model indicates that a statement is generated with no funds due to the merchant

Instance Attribute Summary collapse

Attributes inherited from Settlement

#discriminator

Instance Method Summary collapse

Methods inherited from Settlement

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ SettlementNoPayout

Returns a new instance of SettlementNoPayout.



65705
65706
65707
65708
65709
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65705

def initialize(incoming={})
  super(:discriminator => Settlement::Types::SETTLEMENT_NO_PAYOUT)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
end

Instance Attribute Details

#placeholderObject (readonly)

Returns the value of attribute placeholder.



65703
65704
65705
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65703

def placeholder
  @placeholder
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



65715
65716
65717
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65715

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

#subtype_to_hashObject



65719
65720
65721
65722
65723
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65719

def subtype_to_hash
  {
    :placeholder => placeholder
  }
end

#to_jsonObject



65711
65712
65713
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65711

def to_json
  JSON.dump(to_hash)
end