Class: Frame::Transfer

Inherits:
APIResource show all
Defined in:
lib/frame/resources/transfer.rb

Constant Summary collapse

OBJECT_NAME =
"transfer"

Instance Attribute Summary

Attributes inherited from FrameObject

#id, #original_values

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from APIResource

class_name, #refresh, resource_url, #resource_url

Methods included from APIOperations::Request

included

Methods inherited from FrameObject

#[], #[]=, construct_from, #each, #initialize, #initialize_from, #inspect, #keys, #serialize_params, #to_hash, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Frame::FrameObject

Class Method Details

.confirm(id, params = {}, opts = {}) ⇒ Object



23
24
25
26
# File 'lib/frame/resources/transfer.rb', line 23

def self.confirm(id, params = {}, opts = {})
  id = Util.normalize_id(id)
  request_object(:post, "/v1/transfers/#{CGI.escape(id)}/confirm", params, opts)
end

.create(params = {}, opts = {}) ⇒ Object



11
12
13
# File 'lib/frame/resources/transfer.rb', line 11

def self.create(params = {}, opts = {})
  request_object(:post, "/v1/transfers", params, opts)
end

.list(params = {}, opts = {}) ⇒ Object



15
16
17
# File 'lib/frame/resources/transfer.rb', line 15

def self.list(params = {}, opts = {})
  request_object(:get, "/v1/transfers", params, opts)
end

.object_nameObject



7
8
9
# File 'lib/frame/resources/transfer.rb', line 7

def self.object_name
  OBJECT_NAME
end

.retrieve(id, opts = {}) ⇒ Object



19
20
21
# File 'lib/frame/resources/transfer.rb', line 19

def self.retrieve(id, opts = {})
  request_object(:get, "/v1/transfers/#{CGI.escape(id)}", {}, opts)
end

Instance Method Details

#confirm(params = {}, opts = {}) ⇒ Object



28
29
30
# File 'lib/frame/resources/transfer.rb', line 28

def confirm(params = {}, opts = {})
  request_object(:post, "/v1/transfers/#{CGI.escape(self["id"])}/confirm", params, opts)
end