azure_mgmt_billing 0.15.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing.rb +38 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/billing_client.rb +136 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/invoices.rb +472 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/download_url.rb +61 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/error_details.rb +71 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/error_response.rb +48 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/invoice.rb +99 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb +101 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/operation.rb +59 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/operation_display.rb +72 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/operation_list_result.rb +103 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/models/resource.rb +80 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/module_definition.rb +9 -0
- data/lib/2017-02-27-preview/generated/azure_mgmt_billing/operations.rb +217 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/billing_management_client.rb +10 -6
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/billing_periods.rb +21 -18
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/invoices.rb +27 -23
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/billing_periods_list_result.rb +1 -1
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb +1 -1
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/operation_list_result.rb +1 -1
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/models/resource.rb +9 -0
- data/lib/2017-04-24-preview/generated/azure_mgmt_billing/operations.rb +15 -13
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing.rb +44 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/billing_management_client.rb +144 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/billing_periods.rb +371 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/enrollment_accounts.rb +303 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/invoices.rb +503 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/billing_period.rb +107 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/billing_periods_list_result.rb +101 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/download_url.rb +61 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/enrollment_account.rb +74 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/enrollment_account_list_result.rb +100 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/error_details.rb +71 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/error_response.rb +48 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/invoice.rb +120 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/invoices_list_result.rb +101 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/operation.rb +59 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/operation_display.rb +72 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/operation_list_result.rb +103 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/models/resource.rb +80 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/module_definition.rb +9 -0
- data/lib/2018-03-01-preview/generated/azure_mgmt_billing/operations.rb +216 -0
- data/lib/azure_mgmt_billing.rb +2 -0
- data/lib/profiles/latest/billing_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/billing_module_definition.rb +0 -1
- data/lib/profiles/latest/modules/billing_profile_module.rb +87 -58
- data/lib/version.rb +1 -1
- metadata +39 -5
@@ -0,0 +1,80 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Billing::Mgmt::V2018_03_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Resource model definition.
|
10
|
+
#
|
11
|
+
class Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Resource Id.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Resource name.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Resource type.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
|
25
|
+
# @return [String] the name of the resource group of the resource.
|
26
|
+
def resource_group
|
27
|
+
unless self.id.nil?
|
28
|
+
groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
|
29
|
+
groups.captures[0].strip if groups
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
#
|
35
|
+
# Mapper for Resource class as Ruby Hash.
|
36
|
+
# This will be used for serialization/deserialization.
|
37
|
+
#
|
38
|
+
def self.mapper()
|
39
|
+
{
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'Resource',
|
43
|
+
type: {
|
44
|
+
name: 'Composite',
|
45
|
+
class_name: 'Resource',
|
46
|
+
model_properties: {
|
47
|
+
id: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: false,
|
50
|
+
read_only: true,
|
51
|
+
serialized_name: 'id',
|
52
|
+
type: {
|
53
|
+
name: 'String'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
name: {
|
57
|
+
client_side_validation: true,
|
58
|
+
required: false,
|
59
|
+
read_only: true,
|
60
|
+
serialized_name: 'name',
|
61
|
+
type: {
|
62
|
+
name: 'String'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
type: {
|
66
|
+
client_side_validation: true,
|
67
|
+
required: false,
|
68
|
+
read_only: true,
|
69
|
+
serialized_name: 'type',
|
70
|
+
type: {
|
71
|
+
name: 'String'
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure end
|
7
|
+
module Azure::Billing end
|
8
|
+
module Azure::Billing::Mgmt end
|
9
|
+
module Azure::Billing::Mgmt::V2018_03_01_preview end
|
@@ -0,0 +1,216 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Billing::Mgmt::V2018_03_01_preview
|
7
|
+
#
|
8
|
+
# Billing client provides access to billing resources for Azure
|
9
|
+
# subscriptions.
|
10
|
+
#
|
11
|
+
class Operations
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the Operations class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [BillingManagementClient] reference to the BillingManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Lists all of the available billing REST API operations.
|
27
|
+
#
|
28
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
29
|
+
# will be added to the HTTP request.
|
30
|
+
#
|
31
|
+
# @return [Array<Operation>] operation results.
|
32
|
+
#
|
33
|
+
def list(custom_headers:nil)
|
34
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
35
|
+
first_page.get_all_items
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Lists all of the available billing REST API operations.
|
40
|
+
#
|
41
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
42
|
+
# will be added to the HTTP request.
|
43
|
+
#
|
44
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
45
|
+
#
|
46
|
+
def list_with_http_info(custom_headers:nil)
|
47
|
+
list_async(custom_headers:custom_headers).value!
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# Lists all of the available billing REST API operations.
|
52
|
+
#
|
53
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
54
|
+
# to the HTTP request.
|
55
|
+
#
|
56
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
57
|
+
#
|
58
|
+
def list_async(custom_headers:nil)
|
59
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
60
|
+
|
61
|
+
|
62
|
+
request_headers = {}
|
63
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
64
|
+
|
65
|
+
# Set Headers
|
66
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
67
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
68
|
+
path_template = 'providers/Microsoft.Billing/operations'
|
69
|
+
|
70
|
+
request_url = @base_url || @client.base_url
|
71
|
+
|
72
|
+
options = {
|
73
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
74
|
+
query_params: {'api-version' => @client.api_version},
|
75
|
+
headers: request_headers.merge(custom_headers || {}),
|
76
|
+
base_url: request_url
|
77
|
+
}
|
78
|
+
promise = @client.make_request_async(:get, path_template, options)
|
79
|
+
|
80
|
+
promise = promise.then do |result|
|
81
|
+
http_response = result.response
|
82
|
+
status_code = http_response.status
|
83
|
+
response_content = http_response.body
|
84
|
+
unless status_code == 200
|
85
|
+
error_model = JSON.load(response_content)
|
86
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
87
|
+
end
|
88
|
+
|
89
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
90
|
+
# Deserialize Response
|
91
|
+
if status_code == 200
|
92
|
+
begin
|
93
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
94
|
+
result_mapper = Azure::Billing::Mgmt::V2018_03_01_preview::Models::OperationListResult.mapper()
|
95
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
96
|
+
rescue Exception => e
|
97
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
result
|
102
|
+
end
|
103
|
+
|
104
|
+
promise.execute
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
# Lists all of the available billing REST API operations.
|
109
|
+
#
|
110
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
111
|
+
# to List operation.
|
112
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
113
|
+
# will be added to the HTTP request.
|
114
|
+
#
|
115
|
+
# @return [OperationListResult] operation results.
|
116
|
+
#
|
117
|
+
def list_next(next_page_link, custom_headers:nil)
|
118
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
119
|
+
response.body unless response.nil?
|
120
|
+
end
|
121
|
+
|
122
|
+
#
|
123
|
+
# Lists all of the available billing REST API operations.
|
124
|
+
#
|
125
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
126
|
+
# to List operation.
|
127
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
128
|
+
# will be added to the HTTP request.
|
129
|
+
#
|
130
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
131
|
+
#
|
132
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
133
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Lists all of the available billing REST API operations.
|
138
|
+
#
|
139
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
140
|
+
# to List operation.
|
141
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
142
|
+
# to the HTTP request.
|
143
|
+
#
|
144
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
145
|
+
#
|
146
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
147
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
148
|
+
|
149
|
+
|
150
|
+
request_headers = {}
|
151
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
152
|
+
|
153
|
+
# Set Headers
|
154
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
155
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
156
|
+
path_template = '{nextLink}'
|
157
|
+
|
158
|
+
request_url = @base_url || @client.base_url
|
159
|
+
|
160
|
+
options = {
|
161
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
162
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
163
|
+
headers: request_headers.merge(custom_headers || {}),
|
164
|
+
base_url: request_url
|
165
|
+
}
|
166
|
+
promise = @client.make_request_async(:get, path_template, options)
|
167
|
+
|
168
|
+
promise = promise.then do |result|
|
169
|
+
http_response = result.response
|
170
|
+
status_code = http_response.status
|
171
|
+
response_content = http_response.body
|
172
|
+
unless status_code == 200
|
173
|
+
error_model = JSON.load(response_content)
|
174
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
175
|
+
end
|
176
|
+
|
177
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
178
|
+
# Deserialize Response
|
179
|
+
if status_code == 200
|
180
|
+
begin
|
181
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
182
|
+
result_mapper = Azure::Billing::Mgmt::V2018_03_01_preview::Models::OperationListResult.mapper()
|
183
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
184
|
+
rescue Exception => e
|
185
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
result
|
190
|
+
end
|
191
|
+
|
192
|
+
promise.execute
|
193
|
+
end
|
194
|
+
|
195
|
+
#
|
196
|
+
# Lists all of the available billing REST API operations.
|
197
|
+
#
|
198
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
199
|
+
# will be added to the HTTP request.
|
200
|
+
#
|
201
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
202
|
+
# response.
|
203
|
+
#
|
204
|
+
def list_as_lazy(custom_headers:nil)
|
205
|
+
response = list_async(custom_headers:custom_headers).value!
|
206
|
+
unless response.nil?
|
207
|
+
page = response.body
|
208
|
+
page.next_method = Proc.new do |next_page_link|
|
209
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
210
|
+
end
|
211
|
+
page
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
end
|
data/lib/azure_mgmt_billing.rb
CHANGED
@@ -2,5 +2,7 @@
|
|
2
2
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
4
|
|
5
|
+
require '2018-03-01-preview/generated/azure_mgmt_billing'
|
6
|
+
require '2017-02-27-preview/generated/azure_mgmt_billing'
|
5
7
|
require '2017-04-24-preview/generated/azure_mgmt_billing'
|
6
8
|
require 'profiles/latest/billing_latest_profile_client'
|
@@ -5,17 +5,36 @@
|
|
5
5
|
require 'profiles/latest/billing_module_definition'
|
6
6
|
require 'profiles/latest/modules/billing_profile_module'
|
7
7
|
|
8
|
-
module Azure::Billing::Profiles::Latest
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
module Azure::Billing::Profiles::Latest
|
9
|
+
module Mgmt
|
10
|
+
#
|
11
|
+
# Client class for the Latest profile SDK.
|
12
|
+
#
|
13
|
+
class Client < BillingManagementClass
|
14
|
+
include MsRestAzure::Common::Configurable
|
14
15
|
|
16
|
+
#
|
17
|
+
# Initializes a new instance of the Client class.
|
18
|
+
# @param options [Hash] hash of client options.
|
19
|
+
# options = {
|
20
|
+
# tenant_id: 'YOUR TENANT ID',
|
21
|
+
# client_id: 'YOUR CLIENT ID',
|
22
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
23
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
24
|
+
# credentials: credentials,
|
25
|
+
# active_directory_settings: active_directory_settings,
|
26
|
+
# base_url: 'YOUR BASE URL',
|
27
|
+
# options: options
|
28
|
+
# }
|
29
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
30
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
31
|
+
#
|
32
|
+
# Also, base_url, active_directory_settings & options are optional.
|
33
|
+
#
|
34
|
+
def initialize(options = {})
|
35
|
+
super(options)
|
36
|
+
end
|
15
37
|
|
16
|
-
def initialize(options = {})
|
17
|
-
super(options)
|
18
38
|
end
|
19
|
-
|
20
39
|
end
|
21
40
|
end
|
@@ -4,30 +4,34 @@
|
|
4
4
|
|
5
5
|
require 'azure_mgmt_billing'
|
6
6
|
|
7
|
-
module Azure::Billing::Profiles::Latest
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
module Azure::Billing::Profiles::Latest
|
8
|
+
module Mgmt
|
9
|
+
EnrollmentAccounts = Azure::Billing::Mgmt::V2018_03_01_preview::EnrollmentAccounts
|
10
|
+
BillingPeriods = Azure::Billing::Mgmt::V2018_03_01_preview::BillingPeriods
|
11
|
+
Invoices = Azure::Billing::Mgmt::V2018_03_01_preview::Invoices
|
12
|
+
Operations = Azure::Billing::Mgmt::V2018_03_01_preview::Operations
|
11
13
|
|
12
14
|
module Models
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
ErrorResponse = Azure::Billing::Mgmt::V2018_03_01_preview::Models::ErrorResponse
|
16
|
+
ErrorDetails = Azure::Billing::Mgmt::V2018_03_01_preview::Models::ErrorDetails
|
17
|
+
OperationListResult = Azure::Billing::Mgmt::V2018_03_01_preview::Models::OperationListResult
|
18
|
+
Resource = Azure::Billing::Mgmt::V2018_03_01_preview::Models::Resource
|
19
|
+
DownloadUrl = Azure::Billing::Mgmt::V2018_03_01_preview::Models::DownloadUrl
|
20
|
+
InvoicesListResult = Azure::Billing::Mgmt::V2018_03_01_preview::Models::InvoicesListResult
|
21
|
+
BillingPeriodsListResult = Azure::Billing::Mgmt::V2018_03_01_preview::Models::BillingPeriodsListResult
|
22
|
+
OperationDisplay = Azure::Billing::Mgmt::V2018_03_01_preview::Models::OperationDisplay
|
23
|
+
EnrollmentAccountListResult = Azure::Billing::Mgmt::V2018_03_01_preview::Models::EnrollmentAccountListResult
|
24
|
+
Operation = Azure::Billing::Mgmt::V2018_03_01_preview::Models::Operation
|
25
|
+
EnrollmentAccount = Azure::Billing::Mgmt::V2018_03_01_preview::Models::EnrollmentAccount
|
26
|
+
BillingPeriod = Azure::Billing::Mgmt::V2018_03_01_preview::Models::BillingPeriod
|
27
|
+
Invoice = Azure::Billing::Mgmt::V2018_03_01_preview::Models::Invoice
|
24
28
|
end
|
25
29
|
|
26
30
|
#
|
27
|
-
#
|
31
|
+
# BillingManagementClass
|
28
32
|
#
|
29
|
-
class
|
30
|
-
attr_reader :billing_periods, :invoices, :operations, :configurable, :base_url, :options, :model_classes
|
33
|
+
class BillingManagementClass
|
34
|
+
attr_reader :enrollment_accounts, :billing_periods, :invoices, :operations, :configurable, :base_url, :options, :model_classes
|
31
35
|
|
32
36
|
def initialize(options = {})
|
33
37
|
if options.is_a?(Hash) && options.length == 0
|
@@ -38,53 +42,78 @@ module Azure::Billing::Profiles::Latest::Mgmt
|
|
38
42
|
|
39
43
|
reset!(options)
|
40
44
|
|
41
|
-
@configurable
|
45
|
+
@configurable = self
|
46
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
47
|
+
@options = options[:options].nil? ? nil:options[:options]
|
42
48
|
|
43
|
-
client_0 = Azure::Billing::Mgmt::
|
44
|
-
if(client_0.respond_to?(:subscription_id))
|
45
|
-
client_0.subscription_id = configurable.subscription_id
|
49
|
+
@client_0 = Azure::Billing::Mgmt::V2018_03_01_preview::BillingManagementClient.new(configurable.credentials, base_url, options)
|
50
|
+
if(@client_0.respond_to?(:subscription_id))
|
51
|
+
@client_0.subscription_id = configurable.subscription_id
|
46
52
|
end
|
47
|
-
@
|
48
|
-
@
|
49
|
-
@
|
53
|
+
add_telemetry(@client_0)
|
54
|
+
@enrollment_accounts = @client_0.enrollment_accounts
|
55
|
+
@billing_periods = @client_0.billing_periods
|
56
|
+
@invoices = @client_0.invoices
|
57
|
+
@operations = @client_0.operations
|
50
58
|
|
51
59
|
@model_classes = ModelClasses.new
|
52
60
|
end
|
53
61
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
def error_details
|
65
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::ErrorDetails
|
66
|
-
end
|
67
|
-
def operation_display
|
68
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationDisplay
|
69
|
-
end
|
70
|
-
def download_url
|
71
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::DownloadUrl
|
72
|
-
end
|
73
|
-
def operation
|
74
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::Operation
|
75
|
-
end
|
76
|
-
def error_response
|
77
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::ErrorResponse
|
78
|
-
end
|
79
|
-
def operation_list_result
|
80
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::OperationListResult
|
81
|
-
end
|
82
|
-
def billing_period
|
83
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::BillingPeriod
|
84
|
-
end
|
85
|
-
def invoice
|
86
|
-
Azure::Billing::Mgmt::V2017_04_24_preview::Models::Invoice
|
62
|
+
def add_telemetry(client)
|
63
|
+
profile_information = 'Profiles/Latest/Billing/Mgmt'
|
64
|
+
client.add_user_agent_information(profile_information)
|
65
|
+
end
|
66
|
+
|
67
|
+
def method_missing(method, *args)
|
68
|
+
if @client_0.respond_to?method
|
69
|
+
@client_0.send(method, *args)
|
70
|
+
else
|
71
|
+
super
|
87
72
|
end
|
88
73
|
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
class ModelClasses
|
78
|
+
def error_response
|
79
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::ErrorResponse
|
80
|
+
end
|
81
|
+
def error_details
|
82
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::ErrorDetails
|
83
|
+
end
|
84
|
+
def operation_list_result
|
85
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::OperationListResult
|
86
|
+
end
|
87
|
+
def resource
|
88
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::Resource
|
89
|
+
end
|
90
|
+
def download_url
|
91
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::DownloadUrl
|
92
|
+
end
|
93
|
+
def invoices_list_result
|
94
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::InvoicesListResult
|
95
|
+
end
|
96
|
+
def billing_periods_list_result
|
97
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::BillingPeriodsListResult
|
98
|
+
end
|
99
|
+
def operation_display
|
100
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::OperationDisplay
|
101
|
+
end
|
102
|
+
def enrollment_account_list_result
|
103
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::EnrollmentAccountListResult
|
104
|
+
end
|
105
|
+
def operation
|
106
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::Operation
|
107
|
+
end
|
108
|
+
def enrollment_account
|
109
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::EnrollmentAccount
|
110
|
+
end
|
111
|
+
def billing_period
|
112
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::BillingPeriod
|
113
|
+
end
|
114
|
+
def invoice
|
115
|
+
Azure::Billing::Mgmt::V2018_03_01_preview::Models::Invoice
|
116
|
+
end
|
89
117
|
end
|
118
|
+
end
|
90
119
|
end
|