Class: Io::Flow::V0::Models::ImportTemplate
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ImportTemplate
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
An import template provides an organization specific example CSV file of a particular import type.
Instance Attribute Summary collapse
-
#documentation_url ⇒ Object
readonly
Returns the value of attribute documentation_url.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ImportTemplate
constructor
A new instance of ImportTemplate.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ImportTemplate
Returns a new instance of ImportTemplate.
26610 26611 26612 26613 26614 26615 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26610 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:type, :documentation_url], 'ImportTemplate') @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ImportType) ? x : ::Io::Flow::V0::Models::ImportType.apply(x)) @documentation_url = HttpClient::Preconditions.assert_class('documentation_url', opts.delete(:documentation_url), String) end |
Instance Attribute Details
#documentation_url ⇒ Object (readonly)
Returns the value of attribute documentation_url.
26608 26609 26610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26608 def documentation_url @documentation_url end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
26608 26609 26610 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26608 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
26621 26622 26623 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26621 def copy(incoming={}) ImportTemplate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
26625 26626 26627 26628 26629 26630 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26625 def to_hash { :type => type.value, :documentation_url => documentation_url } end |
#to_json ⇒ Object
26617 26618 26619 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26617 def to_json JSON.dump(to_hash) end |