Class: Io::Flow::V0::Models::PayoutAttachment
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PayoutAttachment
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PayoutAttachment
constructor
A new instance of PayoutAttachment.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PayoutAttachment
Returns a new instance of PayoutAttachment.
59190 59191 59192 59193 59194 59195 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59190 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:type, :url], 'PayoutAttachment') @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::PayoutAttachmentType) ? x : ::Io::Flow::V0::Models::PayoutAttachmentType.apply(x)) @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String) end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
59188 59189 59190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59188 def type @type end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
59188 59189 59190 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59188 def url @url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
59201 59202 59203 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59201 def copy(incoming={}) PayoutAttachment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
59205 59206 59207 59208 59209 59210 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59205 def to_hash { :type => type.value, :url => url } end |
#to_json ⇒ Object
59197 59198 59199 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59197 def to_json JSON.dump(to_hash) end |