azure_mgmt_commerce 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 94f6463ef482d9ade5b0664c6b7d3a8595e3d024
4
+ data.tar.gz: 9bee43cee9bb606c0bd16c561e7ee1f4a40ae663
5
+ SHA512:
6
+ metadata.gz: 2b89af52eec7a1505262cae0c157eac079ffba985f92c366c0d55ad01331d435e56e9657858b44c993fa172ec47c91fdd35f3b013910da7c69cfeddda5074b27
7
+ data.tar.gz: 508cd8cb19150d02a58676c56b01d48e1312b5d956ee5dc0f0368851af2ac89a56719fe0d48dd4c0c63a0d85f3f15faf5e81d4b6b6dad4a9c52340337ab9d18b
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --color
3
+ --format documentation
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require "bundler/gem_tasks"
@@ -0,0 +1,34 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ lib = File.expand_path('../lib', __FILE__)
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+
8
+ require 'generated/azure_mgmt_commerce/module_definition'
9
+ require 'generated/azure_mgmt_commerce/version'
10
+
11
+ Gem::Specification.new do |spec|
12
+ spec.name = 'azure_mgmt_commerce'
13
+ spec.version = Azure::ARM::Commerce::VERSION
14
+ spec.authors = 'Microsoft Corporation'
15
+ spec.email = 'azrubyteam@microsoft.com'
16
+ spec.description = 'Microsoft Azure Commerce Management Client Library for Ruby'
17
+ spec.summary = 'Official Ruby client library to consume Microsoft Azure Commerce Management services.'
18
+ spec.homepage = 'https://aka.ms/azure-sdk-for-ruby'
19
+ spec.license = 'MIT'
20
+
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.bindir = 'bin'
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.required_ruby_version = '>= 1.9.3'
27
+
28
+ spec.add_development_dependency 'bundler', '~> 1.9'
29
+ spec.add_development_dependency 'rake', '~> 10'
30
+ spec.add_development_dependency 'rspec', '~> 3'
31
+ spec.add_development_dependency 'dotenv', '~> 2'
32
+
33
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.3.0'
34
+ end
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'generated/azure_mgmt_commerce'
@@ -0,0 +1,41 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require 'generated/azure_mgmt_commerce/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ARM::Commerce
23
+ autoload :UsageAggregates, 'generated/azure_mgmt_commerce/usage_aggregates.rb'
24
+ autoload :RateCard, 'generated/azure_mgmt_commerce/rate_card.rb'
25
+ autoload :UsageManagementClient, 'generated/azure_mgmt_commerce/usage_management_client.rb'
26
+
27
+ module Models
28
+ autoload :InfoField, 'generated/azure_mgmt_commerce/models/info_field.rb'
29
+ autoload :UsageAggregation, 'generated/azure_mgmt_commerce/models/usage_aggregation.rb'
30
+ autoload :UsageAggregationListResult, 'generated/azure_mgmt_commerce/models/usage_aggregation_list_result.rb'
31
+ autoload :RateCardQueryParameters, 'generated/azure_mgmt_commerce/models/rate_card_query_parameters.rb'
32
+ autoload :ResourceRateCardInfo, 'generated/azure_mgmt_commerce/models/resource_rate_card_info.rb'
33
+ autoload :OfferTermInfo, 'generated/azure_mgmt_commerce/models/offer_term_info.rb'
34
+ autoload :MeterInfo, 'generated/azure_mgmt_commerce/models/meter_info.rb'
35
+ autoload :ErrorResponse, 'generated/azure_mgmt_commerce/models/error_response.rb'
36
+ autoload :MonetaryCredit, 'generated/azure_mgmt_commerce/models/monetary_credit.rb'
37
+ autoload :MonetaryCommitment, 'generated/azure_mgmt_commerce/models/monetary_commitment.rb'
38
+ autoload :RecurringCharge, 'generated/azure_mgmt_commerce/models/recurring_charge.rb'
39
+ autoload :AggregationGranularity, 'generated/azure_mgmt_commerce/models/aggregation_granularity.rb'
40
+ end
41
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Commerce
7
+ module Models
8
+ #
9
+ # Defines values for AggregationGranularity
10
+ #
11
+ module AggregationGranularity
12
+ Daily = "Daily"
13
+ Hourly = "Hourly"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,54 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Commerce
7
+ module Models
8
+ #
9
+ # Describes ehe format of Error response.
10
+ #
11
+ class ErrorResponse
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Error code
16
+ attr_accessor :code
17
+
18
+ # @return [String] Error message indicating why the operation failed.
19
+ attr_accessor :message
20
+
21
+
22
+ #
23
+ # Mapper for ErrorResponse class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'ErrorResponse',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'ErrorResponse',
33
+ model_properties: {
34
+ code: {
35
+ required: false,
36
+ serialized_name: 'code',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ },
41
+ message: {
42
+ required: false,
43
+ serialized_name: 'message',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,45 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Commerce
7
+ module Models
8
+ #
9
+ # Key-value pairs of instance details in the legacy format.
10
+ #
11
+ class InfoField
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Identifies the name of the instance provisioned by
16
+ # the user.
17
+ attr_accessor :project
18
+
19
+
20
+ #
21
+ # Mapper for InfoField class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ required: false,
27
+ serialized_name: 'InfoField',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'InfoField',
31
+ model_properties: {
32
+ project: {
33
+ required: false,
34
+ serialized_name: 'project',
35
+ type: {
36
+ name: 'String'
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,128 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Commerce
7
+ module Models
8
+ #
9
+ # Detailed information about the meter.
10
+ #
11
+ class MeterInfo
12
+
13
+ include MsRestAzure
14
+
15
+ # @return The unique identifier of the resource.
16
+ attr_accessor :meter_id
17
+
18
+ # @return [String] The name of the meter, within the given meter category
19
+ attr_accessor :meter_name
20
+
21
+ # @return [String] The category of the meter, e.g., 'Cloud services',
22
+ # 'Networking', etc..
23
+ attr_accessor :meter_category
24
+
25
+ # @return [String] The subcategory of the meter, e.g., 'A6 Cloud
26
+ # services', 'ExpressRoute (IXP)', etc..
27
+ attr_accessor :meter_sub_category
28
+
29
+ # @return [String] The unit in which the meter consumption is charged,
30
+ # e.g., 'Hours', 'GB', etc.
31
+ attr_accessor :unit
32
+
33
+ # @return [Hash{String => Float}] The list of key/value pairs for the
34
+ # meter rates, in the format 'key':'value' where key = the meter
35
+ # quantity, and value = the corresponding price
36
+ attr_accessor :meter_rates
37
+
38
+ # @return [DateTime] Indicates the date from which the meter rate or
39
+ # offer term is effective.
40
+ attr_accessor :effective_date
41
+
42
+ # @return [Float] The resource quantity that is included in the offer at
43
+ # no cost. Consumption beyond this quantity will be charged.
44
+ attr_accessor :included_quantity
45
+
46
+
47
+ #
48
+ # Mapper for MeterInfo class as Ruby Hash.
49
+ # This will be used for serialization/deserialization.
50
+ #
51
+ def self.mapper()
52
+ {
53
+ required: false,
54
+ serialized_name: 'MeterInfo',
55
+ type: {
56
+ name: 'Composite',
57
+ class_name: 'MeterInfo',
58
+ model_properties: {
59
+ meter_id: {
60
+ required: false,
61
+ serialized_name: 'MeterId',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ meter_name: {
67
+ required: false,
68
+ serialized_name: 'MeterName',
69
+ type: {
70
+ name: 'String'
71
+ }
72
+ },
73
+ meter_category: {
74
+ required: false,
75
+ serialized_name: 'MeterCategory',
76
+ type: {
77
+ name: 'String'
78
+ }
79
+ },
80
+ meter_sub_category: {
81
+ required: false,
82
+ serialized_name: 'MeterSubCategory',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ },
87
+ unit: {
88
+ required: false,
89
+ serialized_name: 'Unit',
90
+ type: {
91
+ name: 'String'
92
+ }
93
+ },
94
+ meter_rates: {
95
+ required: false,
96
+ serialized_name: 'MeterRates',
97
+ type: {
98
+ name: 'Dictionary',
99
+ value: {
100
+ required: false,
101
+ serialized_name: 'FloatElementType',
102
+ type: {
103
+ name: 'Double'
104
+ }
105
+ }
106
+ }
107
+ },
108
+ effective_date: {
109
+ required: false,
110
+ serialized_name: 'EffectiveDate',
111
+ type: {
112
+ name: 'DateTime'
113
+ }
114
+ },
115
+ included_quantity: {
116
+ required: false,
117
+ serialized_name: 'IncludedQuantity',
118
+ type: {
119
+ name: 'Double'
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ end
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,89 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Commerce
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ class MonetaryCommitment < OfferTermInfo
12
+
13
+ include MsRestAzure
14
+
15
+
16
+ def initialize
17
+ @Name = "Monetary Commitment"
18
+ end
19
+
20
+ attr_accessor :Name
21
+
22
+ # @return The list of key/value pairs for the tiered meter rates, in the
23
+ # format 'key':'value' where key = price, and value = the corresponding
24
+ # discount percentage. This field is used only by offer terms of type
25
+ # 'Monetary Commitment'.
26
+ attr_accessor :tiered_discount
27
+
28
+
29
+ #
30
+ # Mapper for MonetaryCommitment class as Ruby Hash.
31
+ # This will be used for serialization/deserialization.
32
+ #
33
+ def self.mapper()
34
+ {
35
+ required: false,
36
+ serialized_name: 'Monetary Commitment',
37
+ type: {
38
+ name: 'Composite',
39
+ class_name: 'MonetaryCommitment',
40
+ model_properties: {
41
+ effective_date: {
42
+ required: false,
43
+ serialized_name: 'EffectiveDate',
44
+ type: {
45
+ name: 'DateTime'
46
+ }
47
+ },
48
+ excluded_meter_ids: {
49
+ required: false,
50
+ serialized_name: 'ExcludedMeterIds',
51
+ type: {
52
+ name: 'Sequence',
53
+ element: {
54
+ required: false,
55
+ serialized_name: 'UuidElementType',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ }
60
+ }
61
+ },
62
+ Name: {
63
+ required: true,
64
+ serialized_name: 'Name',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ },
69
+ tiered_discount: {
70
+ required: false,
71
+ serialized_name: 'TieredDiscount',
72
+ type: {
73
+ name: 'Dictionary',
74
+ value: {
75
+ required: false,
76
+ serialized_name: 'FloatElementType',
77
+ type: {
78
+ name: 'Number'
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ end
87
+ end
88
+ end
89
+ end