Class: Io::Flow::V0::Models::CaptureIdentifier
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CaptureIdentifier
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#capture ⇒ Object
readonly
Returns the value of attribute capture.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#primary ⇒ Object
readonly
Returns the value of attribute primary.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CaptureIdentifier
constructor
A new instance of CaptureIdentifier.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CaptureIdentifier
Returns a new instance of CaptureIdentifier.
17955 17956 17957 17958 17959 17960 17961 17962 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17955 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :capture, :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)) @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String) @primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary)) end |
Instance Attribute Details
#capture ⇒ Object (readonly)
Returns the value of attribute capture.
17953 17954 17955 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17953 def capture @capture end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
17953 17954 17955 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17953 def id @id end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
17953 17954 17955 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17953 def identifier @identifier end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
17953 17954 17955 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17953 def primary @primary end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
17968 17969 17970 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17968 def copy(incoming={}) CaptureIdentifier.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
17972 17973 17974 17975 17976 17977 17978 17979 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17972 def to_hash { :id => id, :capture => capture.to_hash, :identifier => identifier, :primary => primary } end |
#to_json ⇒ Object
17964 17965 17966 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 17964 def to_json JSON.dump(to_hash) end |