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.



24676
24677
24678
24679
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24676

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.



24674
24675
24676
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24674

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



24685
24686
24687
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24685

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

#to_hashObject



24689
24690
24691
24692
24693
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24689

def to_hash
  {
    :name => name
  }
end

#to_jsonObject



24681
24682
24683
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24681

def to_json
  JSON.dump(to_hash)
end