Class: Io::Flow::V0::Models::FtpOrganizationSettingsForm

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

Returns a new instance of FtpOrganizationSettingsForm.



32051
32052
32053
32054
32055
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32051

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @enabled = HttpClient::Preconditions.assert_boolean('enabled', (x = opts.delete(:enabled); x.nil? ? false : x))
  @emails = HttpClient::Preconditions.assert_class('emails', (x = opts.delete(:emails); x.nil? ? [] : x), Array).map { |v| HttpClient::Preconditions.assert_class('emails', v, String) }
end

Instance Attribute Details

#emailsObject (readonly)

Returns the value of attribute emails.



32049
32050
32051
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32049

def emails
  @emails
end

#enabledObject (readonly)

Returns the value of attribute enabled.



32049
32050
32051
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32049

def enabled
  @enabled
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



32061
32062
32063
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32061

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

#to_hashObject



32065
32066
32067
32068
32069
32070
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32065

def to_hash
  {
    :enabled => enabled,
    :emails => emails
  }
end

#to_jsonObject



32057
32058
32059
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32057

def to_json
  JSON.dump(to_hash)
end