Class: Latitude::API::Resources::Storage::Object

Inherits:
APIResource
  • Object
show all
Extended by:
Operations::Delete, Operations::List, Operations::Retrieve
Defined in:
lib/latitude/api/resources/storage_object.rb

Defined Under Namespace

Classes: Region

Constant Summary

Constants inherited from APIResource

APIResource::READ_ONLY_ATTRIBUTES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#id, #meta, #path_params, #raw_data, #type

Class Method Summary collapse

Methods included from Operations::List

all, list

Methods included from Operations::Retrieve

retrieve

Methods included from Operations::Delete

delete

Methods inherited from APIResource

#==, #[], #[]=, #as_json, #attributes, #changed?, class_url, config_source, construct_from, #delete, execute_request, extract_path_params, #hash, id_prefix, #initialize, #inspect, instance_url, #method_missing, path_param_keys, #refresh, resource_path, resource_type, #resource_url, #respond_to_missing?, #save, #to_h, #unsaved_attributes, with_config, #write_attribute

Methods included from Attributes::ClassMethods

#attribute, #attribute_specs

Methods included from Attributes::InstanceMethods

#attribute_spec, #read_attribute, #wrap_attribute

Constructor Details

This class inherits a constructor from Latitude::API::APIResource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Latitude::API::APIResource

Instance Attribute Details

#access_key ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#bucket_name ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#created_at ⇒ Time (readonly)

Returns:

  • (Time)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#endpoint ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#locking ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#name ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#project ⇒ Latitude::API::Objects::Project



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#region ⇒ Region

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#retention_mode ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#retention_period ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#secret_key ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#storage_class ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#storage_type ⇒ String

Returns:

  • (String)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#team ⇒ Latitude::API::Objects::Team



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

#versioning ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/latitude/api/resources/storage_object.rb', line 37

class Object < APIResource
    # @!attribute [r] id
    #   @return [String]
    # @!attribute [r] city
    #   @return [String]
    # @!attribute [r] country
    #   @return [String]
  class Region < APIObject
    attribute :id, :string, read_only: true
    attribute :city, :string, read_only: true
    attribute :country, :string, read_only: true
  end

  attribute :name, :string
  attribute :storage_type, :string
  attribute :storage_class, :string
  attribute :created_at, :time, read_only: true
  attribute :bucket_name, :string
  attribute :endpoint, :string
  attribute :access_key, :string
  attribute :secret_key, :string
  attribute :versioning, :boolean
  attribute :locking, :boolean
  attribute :retention_mode, :string
  attribute :retention_period, :string
  attribute :region, Region
  attribute :project, Objects::Project
  attribute :team, Objects::Team

  resource_type "object_storages"
  resource_path "/storage/objects"
  id_prefix     "objs_"

  extend Operations::List
  extend Operations::Retrieve
  extend Operations::Delete

  class << self
    def create(params = {}, opts = {})
      body = JSONAPI.encode(type: "objects", attributes: params)
      parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
      construct_from(parsed, opts: opts)
    end
  end
end

Class Method Details

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



75
76
77
78
79
# File 'lib/latitude/api/resources/storage_object.rb', line 75

def create(params = {}, opts = {})
  body = JSONAPI.encode(type: "objects", attributes: params)
  parsed = execute_request(method: :post, path: resource_path, body: body, opts: opts)
  construct_from(parsed, opts: opts)
end