Class: Io::Flow::V0::Models::ReturnReasonPutForm

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

Returns a new instance of ReturnReasonPutForm.



30611
30612
30613
30614
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30611

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



30609
30610
30611
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30609

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30620
30621
30622
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30620

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

#to_hashObject



30624
30625
30626
30627
30628
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30624

def to_hash
  {
    :name => name
  }
end

#to_jsonObject



30616
30617
30618
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30616

def to_json
  JSON.dump(to_hash)
end