Class: Latitude::API::Resources::Traffic
- Inherits:
-
SingletonAPIResource
- Object
- APIResource
- SingletonAPIResource
- Latitude::API::Resources::Traffic
- Defined in:
- lib/latitude/api/resources/traffic.rb
Defined Under Namespace
Constant Summary
Constants inherited from APIResource
APIResource::READ_ONLY_ATTRIBUTES
Instance Attribute Summary collapse
- #from_date ⇒ Integer
- #quota_per_project ⇒ Object
- #regions ⇒ Array<Region>
- #to_date ⇒ Integer
- #total_inbound_95th_percentile_mbps ⇒ Float
- #total_inbound_gb ⇒ Integer
- #total_outbound_95th_percentile_mbps ⇒ Float
- #total_outbound_gb ⇒ Integer
Attributes inherited from APIResource
#id, #meta, #path_params, #raw_data, #type
Class Method Summary collapse
Methods inherited from SingletonAPIResource
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
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
#from_date ⇒ Integer
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/latitude/api/resources/traffic.rb', line 20 class Traffic < SingletonAPIResource # @!attribute [r] date # @return [Time] # @!attribute [r] inbound_gb # @return [Integer] # @!attribute [r] outbound_gb # @return [Integer] # @!attribute [r] avg_outbound_speed_mbps # @return [Float] # @!attribute [r] avg_inbound_speed_mbps # @return [Float] class Data < APIObject attribute :date, :time, read_only: true attribute :inbound_gb, :integer, read_only: true attribute :outbound_gb, :integer, read_only: true attribute :avg_outbound_speed_mbps, :float, read_only: true attribute :avg_inbound_speed_mbps, :float, read_only: true end # @!attribute [r] region_slug # @return [String] # @!attribute [r] total_inbound_gb # @return [Integer] # @!attribute [r] total_outbound_gb # @return [Integer] # @!attribute [r] total_inbound_95th_percentile_mbps # @return [Float] # @!attribute [r] total_outbound_95th_percentile_mbps # @return [Float] # @!attribute [r] data # @return [Array<Data>] class Region < APIObject attribute :region_slug, :string, read_only: true attribute :total_inbound_gb, :integer, read_only: true attribute :total_outbound_gb, :integer, read_only: true attribute :total_inbound_95th_percentile_mbps, :float, read_only: true attribute :total_outbound_95th_percentile_mbps, :float, read_only: true attribute :data, [Data], read_only: true end attribute :from_date, :integer attribute :to_date, :integer attribute :total_inbound_gb, :integer attribute :total_outbound_gb, :integer attribute :total_inbound_95th_percentile_mbps, :float attribute :total_outbound_95th_percentile_mbps, :float attribute :regions, [Region] resource_type "traffic" resource_path "/traffic" class << self def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end end # @!attribute [rw] quota_per_project # @return [Array<QuotaPerProject>] class Quota < SingletonAPIResource # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInTb < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInMbp < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] region_id # @return [String] # @!attribute [r] price # @return [Integer] # @!attribute [r] region_slug # @return [String] # @!attribute [r] quota_in_tb # @return [QuotaInTb] # @!attribute [r] quota_in_mbps # @return [QuotaInMbp] class QuotaPerRegion < APIObject attribute :region_id, :string, read_only: true attribute :price, :integer, read_only: true attribute :region_slug, :string, read_only: true attribute :quota_in_tb, QuotaInTb, read_only: true attribute :quota_in_mbps, QuotaInMbp, read_only: true end # @!attribute [r] project_id # @return [String] # @!attribute [r] project_slug # @return [String] # @!attribute [r] billing_method # @return [String] # @!attribute [r] quota_per_region # @return [Array<QuotaPerRegion>] class QuotaPerProject < APIObject attribute :project_id, :string, read_only: true attribute :project_slug, :string, read_only: true attribute :billing_method, :string, read_only: true attribute :quota_per_region, [QuotaPerRegion], read_only: true end attribute :quota_per_project, [QuotaPerProject] resource_type "traffic_quota" resource_path "/traffic/quota" class << self def retrieve(opts = {}) parsed = execute_request(method: :get, path: resource_path, opts: opts) construct_from(parsed, opts: opts) end end end end |
#quota_per_project ⇒ Object
|
|
# File 'lib/latitude/api/resources/traffic.rb', line 84
|
#regions ⇒ Array<Region>
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/latitude/api/resources/traffic.rb', line 20 class Traffic < SingletonAPIResource # @!attribute [r] date # @return [Time] # @!attribute [r] inbound_gb # @return [Integer] # @!attribute [r] outbound_gb # @return [Integer] # @!attribute [r] avg_outbound_speed_mbps # @return [Float] # @!attribute [r] avg_inbound_speed_mbps # @return [Float] class Data < APIObject attribute :date, :time, read_only: true attribute :inbound_gb, :integer, read_only: true attribute :outbound_gb, :integer, read_only: true attribute :avg_outbound_speed_mbps, :float, read_only: true attribute :avg_inbound_speed_mbps, :float, read_only: true end # @!attribute [r] region_slug # @return [String] # @!attribute [r] total_inbound_gb # @return [Integer] # @!attribute [r] total_outbound_gb # @return [Integer] # @!attribute [r] total_inbound_95th_percentile_mbps # @return [Float] # @!attribute [r] total_outbound_95th_percentile_mbps # @return [Float] # @!attribute [r] data # @return [Array<Data>] class Region < APIObject attribute :region_slug, :string, read_only: true attribute :total_inbound_gb, :integer, read_only: true attribute :total_outbound_gb, :integer, read_only: true attribute :total_inbound_95th_percentile_mbps, :float, read_only: true attribute :total_outbound_95th_percentile_mbps, :float, read_only: true attribute :data, [Data], read_only: true end attribute :from_date, :integer attribute :to_date, :integer attribute :total_inbound_gb, :integer attribute :total_outbound_gb, :integer attribute :total_inbound_95th_percentile_mbps, :float attribute :total_outbound_95th_percentile_mbps, :float attribute :regions, [Region] resource_type "traffic" resource_path "/traffic" class << self def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end end # @!attribute [rw] quota_per_project # @return [Array<QuotaPerProject>] class Quota < SingletonAPIResource # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInTb < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInMbp < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] region_id # @return [String] # @!attribute [r] price # @return [Integer] # @!attribute [r] region_slug # @return [String] # @!attribute [r] quota_in_tb # @return [QuotaInTb] # @!attribute [r] quota_in_mbps # @return [QuotaInMbp] class QuotaPerRegion < APIObject attribute :region_id, :string, read_only: true attribute :price, :integer, read_only: true attribute :region_slug, :string, read_only: true attribute :quota_in_tb, QuotaInTb, read_only: true attribute :quota_in_mbps, QuotaInMbp, read_only: true end # @!attribute [r] project_id # @return [String] # @!attribute [r] project_slug # @return [String] # @!attribute [r] billing_method # @return [String] # @!attribute [r] quota_per_region # @return [Array<QuotaPerRegion>] class QuotaPerProject < APIObject attribute :project_id, :string, read_only: true attribute :project_slug, :string, read_only: true attribute :billing_method, :string, read_only: true attribute :quota_per_region, [QuotaPerRegion], read_only: true end attribute :quota_per_project, [QuotaPerProject] resource_type "traffic_quota" resource_path "/traffic/quota" class << self def retrieve(opts = {}) parsed = execute_request(method: :get, path: resource_path, opts: opts) construct_from(parsed, opts: opts) end end end end |
#to_date ⇒ Integer
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/latitude/api/resources/traffic.rb', line 20 class Traffic < SingletonAPIResource # @!attribute [r] date # @return [Time] # @!attribute [r] inbound_gb # @return [Integer] # @!attribute [r] outbound_gb # @return [Integer] # @!attribute [r] avg_outbound_speed_mbps # @return [Float] # @!attribute [r] avg_inbound_speed_mbps # @return [Float] class Data < APIObject attribute :date, :time, read_only: true attribute :inbound_gb, :integer, read_only: true attribute :outbound_gb, :integer, read_only: true attribute :avg_outbound_speed_mbps, :float, read_only: true attribute :avg_inbound_speed_mbps, :float, read_only: true end # @!attribute [r] region_slug # @return [String] # @!attribute [r] total_inbound_gb # @return [Integer] # @!attribute [r] total_outbound_gb # @return [Integer] # @!attribute [r] total_inbound_95th_percentile_mbps # @return [Float] # @!attribute [r] total_outbound_95th_percentile_mbps # @return [Float] # @!attribute [r] data # @return [Array<Data>] class Region < APIObject attribute :region_slug, :string, read_only: true attribute :total_inbound_gb, :integer, read_only: true attribute :total_outbound_gb, :integer, read_only: true attribute :total_inbound_95th_percentile_mbps, :float, read_only: true attribute :total_outbound_95th_percentile_mbps, :float, read_only: true attribute :data, [Data], read_only: true end attribute :from_date, :integer attribute :to_date, :integer attribute :total_inbound_gb, :integer attribute :total_outbound_gb, :integer attribute :total_inbound_95th_percentile_mbps, :float attribute :total_outbound_95th_percentile_mbps, :float attribute :regions, [Region] resource_type "traffic" resource_path "/traffic" class << self def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end end # @!attribute [rw] quota_per_project # @return [Array<QuotaPerProject>] class Quota < SingletonAPIResource # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInTb < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInMbp < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] region_id # @return [String] # @!attribute [r] price # @return [Integer] # @!attribute [r] region_slug # @return [String] # @!attribute [r] quota_in_tb # @return [QuotaInTb] # @!attribute [r] quota_in_mbps # @return [QuotaInMbp] class QuotaPerRegion < APIObject attribute :region_id, :string, read_only: true attribute :price, :integer, read_only: true attribute :region_slug, :string, read_only: true attribute :quota_in_tb, QuotaInTb, read_only: true attribute :quota_in_mbps, QuotaInMbp, read_only: true end # @!attribute [r] project_id # @return [String] # @!attribute [r] project_slug # @return [String] # @!attribute [r] billing_method # @return [String] # @!attribute [r] quota_per_region # @return [Array<QuotaPerRegion>] class QuotaPerProject < APIObject attribute :project_id, :string, read_only: true attribute :project_slug, :string, read_only: true attribute :billing_method, :string, read_only: true attribute :quota_per_region, [QuotaPerRegion], read_only: true end attribute :quota_per_project, [QuotaPerProject] resource_type "traffic_quota" resource_path "/traffic/quota" class << self def retrieve(opts = {}) parsed = execute_request(method: :get, path: resource_path, opts: opts) construct_from(parsed, opts: opts) end end end end |
#total_inbound_95th_percentile_mbps ⇒ Float
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/latitude/api/resources/traffic.rb', line 20 class Traffic < SingletonAPIResource # @!attribute [r] date # @return [Time] # @!attribute [r] inbound_gb # @return [Integer] # @!attribute [r] outbound_gb # @return [Integer] # @!attribute [r] avg_outbound_speed_mbps # @return [Float] # @!attribute [r] avg_inbound_speed_mbps # @return [Float] class Data < APIObject attribute :date, :time, read_only: true attribute :inbound_gb, :integer, read_only: true attribute :outbound_gb, :integer, read_only: true attribute :avg_outbound_speed_mbps, :float, read_only: true attribute :avg_inbound_speed_mbps, :float, read_only: true end # @!attribute [r] region_slug # @return [String] # @!attribute [r] total_inbound_gb # @return [Integer] # @!attribute [r] total_outbound_gb # @return [Integer] # @!attribute [r] total_inbound_95th_percentile_mbps # @return [Float] # @!attribute [r] total_outbound_95th_percentile_mbps # @return [Float] # @!attribute [r] data # @return [Array<Data>] class Region < APIObject attribute :region_slug, :string, read_only: true attribute :total_inbound_gb, :integer, read_only: true attribute :total_outbound_gb, :integer, read_only: true attribute :total_inbound_95th_percentile_mbps, :float, read_only: true attribute :total_outbound_95th_percentile_mbps, :float, read_only: true attribute :data, [Data], read_only: true end attribute :from_date, :integer attribute :to_date, :integer attribute :total_inbound_gb, :integer attribute :total_outbound_gb, :integer attribute :total_inbound_95th_percentile_mbps, :float attribute :total_outbound_95th_percentile_mbps, :float attribute :regions, [Region] resource_type "traffic" resource_path "/traffic" class << self def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end end # @!attribute [rw] quota_per_project # @return [Array<QuotaPerProject>] class Quota < SingletonAPIResource # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInTb < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInMbp < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] region_id # @return [String] # @!attribute [r] price # @return [Integer] # @!attribute [r] region_slug # @return [String] # @!attribute [r] quota_in_tb # @return [QuotaInTb] # @!attribute [r] quota_in_mbps # @return [QuotaInMbp] class QuotaPerRegion < APIObject attribute :region_id, :string, read_only: true attribute :price, :integer, read_only: true attribute :region_slug, :string, read_only: true attribute :quota_in_tb, QuotaInTb, read_only: true attribute :quota_in_mbps, QuotaInMbp, read_only: true end # @!attribute [r] project_id # @return [String] # @!attribute [r] project_slug # @return [String] # @!attribute [r] billing_method # @return [String] # @!attribute [r] quota_per_region # @return [Array<QuotaPerRegion>] class QuotaPerProject < APIObject attribute :project_id, :string, read_only: true attribute :project_slug, :string, read_only: true attribute :billing_method, :string, read_only: true attribute :quota_per_region, [QuotaPerRegion], read_only: true end attribute :quota_per_project, [QuotaPerProject] resource_type "traffic_quota" resource_path "/traffic/quota" class << self def retrieve(opts = {}) parsed = execute_request(method: :get, path: resource_path, opts: opts) construct_from(parsed, opts: opts) end end end end |
#total_inbound_gb ⇒ Integer
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/latitude/api/resources/traffic.rb', line 20 class Traffic < SingletonAPIResource # @!attribute [r] date # @return [Time] # @!attribute [r] inbound_gb # @return [Integer] # @!attribute [r] outbound_gb # @return [Integer] # @!attribute [r] avg_outbound_speed_mbps # @return [Float] # @!attribute [r] avg_inbound_speed_mbps # @return [Float] class Data < APIObject attribute :date, :time, read_only: true attribute :inbound_gb, :integer, read_only: true attribute :outbound_gb, :integer, read_only: true attribute :avg_outbound_speed_mbps, :float, read_only: true attribute :avg_inbound_speed_mbps, :float, read_only: true end # @!attribute [r] region_slug # @return [String] # @!attribute [r] total_inbound_gb # @return [Integer] # @!attribute [r] total_outbound_gb # @return [Integer] # @!attribute [r] total_inbound_95th_percentile_mbps # @return [Float] # @!attribute [r] total_outbound_95th_percentile_mbps # @return [Float] # @!attribute [r] data # @return [Array<Data>] class Region < APIObject attribute :region_slug, :string, read_only: true attribute :total_inbound_gb, :integer, read_only: true attribute :total_outbound_gb, :integer, read_only: true attribute :total_inbound_95th_percentile_mbps, :float, read_only: true attribute :total_outbound_95th_percentile_mbps, :float, read_only: true attribute :data, [Data], read_only: true end attribute :from_date, :integer attribute :to_date, :integer attribute :total_inbound_gb, :integer attribute :total_outbound_gb, :integer attribute :total_inbound_95th_percentile_mbps, :float attribute :total_outbound_95th_percentile_mbps, :float attribute :regions, [Region] resource_type "traffic" resource_path "/traffic" class << self def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end end # @!attribute [rw] quota_per_project # @return [Array<QuotaPerProject>] class Quota < SingletonAPIResource # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInTb < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInMbp < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] region_id # @return [String] # @!attribute [r] price # @return [Integer] # @!attribute [r] region_slug # @return [String] # @!attribute [r] quota_in_tb # @return [QuotaInTb] # @!attribute [r] quota_in_mbps # @return [QuotaInMbp] class QuotaPerRegion < APIObject attribute :region_id, :string, read_only: true attribute :price, :integer, read_only: true attribute :region_slug, :string, read_only: true attribute :quota_in_tb, QuotaInTb, read_only: true attribute :quota_in_mbps, QuotaInMbp, read_only: true end # @!attribute [r] project_id # @return [String] # @!attribute [r] project_slug # @return [String] # @!attribute [r] billing_method # @return [String] # @!attribute [r] quota_per_region # @return [Array<QuotaPerRegion>] class QuotaPerProject < APIObject attribute :project_id, :string, read_only: true attribute :project_slug, :string, read_only: true attribute :billing_method, :string, read_only: true attribute :quota_per_region, [QuotaPerRegion], read_only: true end attribute :quota_per_project, [QuotaPerProject] resource_type "traffic_quota" resource_path "/traffic/quota" class << self def retrieve(opts = {}) parsed = execute_request(method: :get, path: resource_path, opts: opts) construct_from(parsed, opts: opts) end end end end |
#total_outbound_95th_percentile_mbps ⇒ Float
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/latitude/api/resources/traffic.rb', line 20 class Traffic < SingletonAPIResource # @!attribute [r] date # @return [Time] # @!attribute [r] inbound_gb # @return [Integer] # @!attribute [r] outbound_gb # @return [Integer] # @!attribute [r] avg_outbound_speed_mbps # @return [Float] # @!attribute [r] avg_inbound_speed_mbps # @return [Float] class Data < APIObject attribute :date, :time, read_only: true attribute :inbound_gb, :integer, read_only: true attribute :outbound_gb, :integer, read_only: true attribute :avg_outbound_speed_mbps, :float, read_only: true attribute :avg_inbound_speed_mbps, :float, read_only: true end # @!attribute [r] region_slug # @return [String] # @!attribute [r] total_inbound_gb # @return [Integer] # @!attribute [r] total_outbound_gb # @return [Integer] # @!attribute [r] total_inbound_95th_percentile_mbps # @return [Float] # @!attribute [r] total_outbound_95th_percentile_mbps # @return [Float] # @!attribute [r] data # @return [Array<Data>] class Region < APIObject attribute :region_slug, :string, read_only: true attribute :total_inbound_gb, :integer, read_only: true attribute :total_outbound_gb, :integer, read_only: true attribute :total_inbound_95th_percentile_mbps, :float, read_only: true attribute :total_outbound_95th_percentile_mbps, :float, read_only: true attribute :data, [Data], read_only: true end attribute :from_date, :integer attribute :to_date, :integer attribute :total_inbound_gb, :integer attribute :total_outbound_gb, :integer attribute :total_inbound_95th_percentile_mbps, :float attribute :total_outbound_95th_percentile_mbps, :float attribute :regions, [Region] resource_type "traffic" resource_path "/traffic" class << self def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end end # @!attribute [rw] quota_per_project # @return [Array<QuotaPerProject>] class Quota < SingletonAPIResource # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInTb < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInMbp < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] region_id # @return [String] # @!attribute [r] price # @return [Integer] # @!attribute [r] region_slug # @return [String] # @!attribute [r] quota_in_tb # @return [QuotaInTb] # @!attribute [r] quota_in_mbps # @return [QuotaInMbp] class QuotaPerRegion < APIObject attribute :region_id, :string, read_only: true attribute :price, :integer, read_only: true attribute :region_slug, :string, read_only: true attribute :quota_in_tb, QuotaInTb, read_only: true attribute :quota_in_mbps, QuotaInMbp, read_only: true end # @!attribute [r] project_id # @return [String] # @!attribute [r] project_slug # @return [String] # @!attribute [r] billing_method # @return [String] # @!attribute [r] quota_per_region # @return [Array<QuotaPerRegion>] class QuotaPerProject < APIObject attribute :project_id, :string, read_only: true attribute :project_slug, :string, read_only: true attribute :billing_method, :string, read_only: true attribute :quota_per_region, [QuotaPerRegion], read_only: true end attribute :quota_per_project, [QuotaPerProject] resource_type "traffic_quota" resource_path "/traffic/quota" class << self def retrieve(opts = {}) parsed = execute_request(method: :get, path: resource_path, opts: opts) construct_from(parsed, opts: opts) end end end end |
#total_outbound_gb ⇒ Integer
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/latitude/api/resources/traffic.rb', line 20 class Traffic < SingletonAPIResource # @!attribute [r] date # @return [Time] # @!attribute [r] inbound_gb # @return [Integer] # @!attribute [r] outbound_gb # @return [Integer] # @!attribute [r] avg_outbound_speed_mbps # @return [Float] # @!attribute [r] avg_inbound_speed_mbps # @return [Float] class Data < APIObject attribute :date, :time, read_only: true attribute :inbound_gb, :integer, read_only: true attribute :outbound_gb, :integer, read_only: true attribute :avg_outbound_speed_mbps, :float, read_only: true attribute :avg_inbound_speed_mbps, :float, read_only: true end # @!attribute [r] region_slug # @return [String] # @!attribute [r] total_inbound_gb # @return [Integer] # @!attribute [r] total_outbound_gb # @return [Integer] # @!attribute [r] total_inbound_95th_percentile_mbps # @return [Float] # @!attribute [r] total_outbound_95th_percentile_mbps # @return [Float] # @!attribute [r] data # @return [Array<Data>] class Region < APIObject attribute :region_slug, :string, read_only: true attribute :total_inbound_gb, :integer, read_only: true attribute :total_outbound_gb, :integer, read_only: true attribute :total_inbound_95th_percentile_mbps, :float, read_only: true attribute :total_outbound_95th_percentile_mbps, :float, read_only: true attribute :data, [Data], read_only: true end attribute :from_date, :integer attribute :to_date, :integer attribute :total_inbound_gb, :integer attribute :total_outbound_gb, :integer attribute :total_inbound_95th_percentile_mbps, :float attribute :total_outbound_95th_percentile_mbps, :float attribute :regions, [Region] resource_type "traffic" resource_path "/traffic" class << self def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end end # @!attribute [rw] quota_per_project # @return [Array<QuotaPerProject>] class Quota < SingletonAPIResource # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInTb < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] granted # @return [Integer] # @!attribute [r] additional # @return [Integer] # @!attribute [r] total # @return [Integer] class QuotaInMbp < APIObject attribute :granted, :integer, read_only: true attribute :additional, :integer, read_only: true attribute :total, :integer, read_only: true end # @!attribute [r] region_id # @return [String] # @!attribute [r] price # @return [Integer] # @!attribute [r] region_slug # @return [String] # @!attribute [r] quota_in_tb # @return [QuotaInTb] # @!attribute [r] quota_in_mbps # @return [QuotaInMbp] class QuotaPerRegion < APIObject attribute :region_id, :string, read_only: true attribute :price, :integer, read_only: true attribute :region_slug, :string, read_only: true attribute :quota_in_tb, QuotaInTb, read_only: true attribute :quota_in_mbps, QuotaInMbp, read_only: true end # @!attribute [r] project_id # @return [String] # @!attribute [r] project_slug # @return [String] # @!attribute [r] billing_method # @return [String] # @!attribute [r] quota_per_region # @return [Array<QuotaPerRegion>] class QuotaPerProject < APIObject attribute :project_id, :string, read_only: true attribute :project_slug, :string, read_only: true attribute :billing_method, :string, read_only: true attribute :quota_per_region, [QuotaPerRegion], read_only: true end attribute :quota_per_project, [QuotaPerProject] resource_type "traffic_quota" resource_path "/traffic/quota" class << self def retrieve(opts = {}) parsed = execute_request(method: :get, path: resource_path, opts: opts) construct_from(parsed, opts: opts) end end end end |
Class Method Details
.quota(opts = {}) ⇒ Object
78 79 80 81 |
# File 'lib/latitude/api/resources/traffic.rb', line 78 def quota(opts = {}) parsed = execute_request(method: :get, path: "#{resource_path}/quota", opts: opts) Quota.construct_from(parsed, opts: opts) end |
.retrieve(params = {}, opts = {}) ⇒ Object
72 73 74 75 76 |
# File 'lib/latitude/api/resources/traffic.rb', line 72 def retrieve(params = {}, opts = {}) query = RequestParams.encode(params) parsed = execute_request(method: :get, path: resource_path, query: query, opts: opts) construct_from(parsed, opts: opts) end |