class Io::Flow::V0::Models::InputSpecification

Attributes

display_text[R]
name[R]
type[R]

Public Class Methods

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

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 45983
def copy(incoming={})
  InputSpecification.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 45987
def to_hash
  {
    :type => type.value,
    :name => name,
    :display_text => display_text
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 45979
def to_json
  JSON.dump(to_hash)
end