class Io::Flow::V0::Models::CaptureIdentifier
Attributes
capture[R]
id[R]
identifier[R]
name[R]
primary[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32857 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :capture, :name, :identifier, :primary], 'CaptureIdentifier') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @capture = (x = opts.delete(:capture); x.is_a?(::Io::Flow::V0::Models::CaptureReference) ? x : ::Io::Flow::V0::Models::CaptureReference.new(x)) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String) @primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32871 def copy(incoming={}) CaptureIdentifier.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32875 def to_hash { :id => id, :capture => capture.to_hash, :name => name, :identifier => identifier, :primary => primary } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 32867 def to_json JSON.dump(to_hash) end