Class: Io::Flow::V0::Models::UltimateBeneficiaryOwner

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

Returns a new instance of UltimateBeneficiaryOwner.



72051
72052
72053
72054
72055
72056
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72051

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:name, :dob], 'UltimateBeneficiaryOwner')
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
  @dob = HttpClient::Preconditions.assert_class('dob', HttpClient::Helper.to_date_time_iso8601(opts.delete(:dob)), DateTime)
end

Instance Attribute Details

#dobObject (readonly)

Returns the value of attribute dob.



72049
72050
72051
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72049

def dob
  @dob
end

#nameObject (readonly)

Returns the value of attribute name.



72049
72050
72051
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72049

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



72062
72063
72064
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72062

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

#to_hashObject



72066
72067
72068
72069
72070
72071
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72066

def to_hash
  {
    :name => name,
    :dob => dob
  }
end

#to_jsonObject



72058
72059
72060
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 72058

def to_json
  JSON.dump(to_hash)
end