class Io::Flow::V0::Models::EntityIdentifier

Tax identifier could be associated to a merchant of record entity.

Attributes

issuing_country[R]
name[R]
number[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 41115
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:name, :number], 'EntityIdentifier')
  @name = (x = opts.delete(:name); x.is_a?(::Io::Flow::V0::Models::EntityIdentifierType) ? x : ::Io::Flow::V0::Models::EntityIdentifierType.apply(x))
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
  @issuing_country = (x = opts.delete(:issuing_country); x.nil? ? nil : HttpClient::Preconditions.assert_class('issuing_country', x, String))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 41127
def copy(incoming={})
  EntityIdentifier.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 41131
def to_hash
  {
    :name => name.value,
    :number => number,
    :issuing_country => issuing_country
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 41123
def to_json
  JSON.dump(to_hash)
end