azure_mgmt_billing 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,99 @@
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::ARM::Billing
7
+ module Models
8
+ #
9
+ # A billing period resource.
10
+ #
11
+ class BillingPeriod < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Date] The start of the date range covered by the billing
16
+ # period.
17
+ attr_accessor :billing_period_start_date
18
+
19
+ # @return [Date] The end of the date range covered by the billing period.
20
+ attr_accessor :billing_period_end_date
21
+
22
+ # @return [Array<String>] Array of invoice ids that associated with.
23
+ attr_accessor :invoice_ids
24
+
25
+
26
+ #
27
+ # Mapper for BillingPeriod class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ required: false,
33
+ serialized_name: 'BillingPeriod',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'BillingPeriod',
37
+ model_properties: {
38
+ id: {
39
+ required: false,
40
+ read_only: true,
41
+ serialized_name: 'id',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ name: {
47
+ required: false,
48
+ read_only: true,
49
+ serialized_name: 'name',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ type: {
55
+ required: false,
56
+ read_only: true,
57
+ serialized_name: 'type',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ billing_period_start_date: {
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'properties.billingPeriodStartDate',
66
+ type: {
67
+ name: 'Date'
68
+ }
69
+ },
70
+ billing_period_end_date: {
71
+ required: false,
72
+ read_only: true,
73
+ serialized_name: 'properties.billingPeriodEndDate',
74
+ type: {
75
+ name: 'Date'
76
+ }
77
+ },
78
+ invoice_ids: {
79
+ required: false,
80
+ read_only: true,
81
+ serialized_name: 'properties.invoiceIds',
82
+ type: {
83
+ name: 'Sequence',
84
+ element: {
85
+ required: false,
86
+ serialized_name: 'StringElementType',
87
+ type: {
88
+ name: 'String'
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,97 @@
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::ARM::Billing
7
+ module Models
8
+ #
9
+ # Result of listing billing periods. It contains a list of available
10
+ # billing periods in reverse chronological order.
11
+ #
12
+ class BillingPeriodsListResult
13
+
14
+ include MsRestAzure
15
+
16
+ include MsRest::JSONable
17
+ # @return [Array<BillingPeriod>] The list of billing periods.
18
+ attr_accessor :value
19
+
20
+ # @return [String] The link (url) to the next page of results.
21
+ attr_accessor :next_link
22
+
23
+ # return [Proc] with next page method call.
24
+ attr_accessor :next_method
25
+
26
+ #
27
+ # Gets the rest of the items for the request, enabling auto-pagination.
28
+ #
29
+ # @return [Array<BillingPeriod>] operation results.
30
+ #
31
+ def get_all_items
32
+ items = @value
33
+ page = self
34
+ while page.next_link != nil do
35
+ page = page.get_next_page
36
+ items.concat(page.value)
37
+ end
38
+ items
39
+ end
40
+
41
+ #
42
+ # Gets the next page of results.
43
+ #
44
+ # @return [BillingPeriodsListResult] with next page content.
45
+ #
46
+ def get_next_page
47
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
48
+ unless response.nil?
49
+ @next_link = response.body.next_link
50
+ @value = response.body.value
51
+ self
52
+ end
53
+ end
54
+
55
+ #
56
+ # Mapper for BillingPeriodsListResult class as Ruby Hash.
57
+ # This will be used for serialization/deserialization.
58
+ #
59
+ def self.mapper()
60
+ {
61
+ required: false,
62
+ serialized_name: 'BillingPeriodsListResult',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'BillingPeriodsListResult',
66
+ model_properties: {
67
+ value: {
68
+ required: false,
69
+ read_only: true,
70
+ serialized_name: 'value',
71
+ type: {
72
+ name: 'Sequence',
73
+ element: {
74
+ required: false,
75
+ serialized_name: 'BillingPeriodElementType',
76
+ type: {
77
+ name: 'Composite',
78
+ class_name: 'BillingPeriod'
79
+ }
80
+ }
81
+ }
82
+ },
83
+ next_link: {
84
+ required: false,
85
+ read_only: true,
86
+ serialized_name: 'nextLink',
87
+ type: {
88
+ name: 'String'
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ end
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,58 @@
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::ARM::Billing
7
+ module Models
8
+ #
9
+ # A secure URL that can be used to download a PDF invoice until the URL
10
+ # expires.
11
+ #
12
+ class DownloadUrl
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [DateTime] The time in UTC at which this download URL will
17
+ # expire.
18
+ attr_accessor :expiry_time
19
+
20
+ # @return [String] The URL to the PDF file.
21
+ attr_accessor :url
22
+
23
+
24
+ #
25
+ # Mapper for DownloadUrl class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ required: false,
31
+ serialized_name: 'DownloadUrl',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'DownloadUrl',
35
+ model_properties: {
36
+ expiry_time: {
37
+ required: false,
38
+ read_only: true,
39
+ serialized_name: 'expiryTime',
40
+ type: {
41
+ name: 'DateTime'
42
+ }
43
+ },
44
+ url: {
45
+ required: false,
46
+ read_only: true,
47
+ serialized_name: 'url',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,67 @@
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::ARM::Billing
7
+ module Models
8
+ #
9
+ # The details of the error.
10
+ #
11
+ class ErrorDetails
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
+ # @return [String] The target of the particular error.
22
+ attr_accessor :target
23
+
24
+
25
+ #
26
+ # Mapper for ErrorDetails class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ required: false,
32
+ serialized_name: 'ErrorDetails',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'ErrorDetails',
36
+ model_properties: {
37
+ code: {
38
+ required: false,
39
+ read_only: true,
40
+ serialized_name: 'code',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ message: {
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'message',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ target: {
54
+ required: false,
55
+ read_only: true,
56
+ serialized_name: 'target',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,46 @@
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::ARM::Billing
7
+ module Models
8
+ #
9
+ # Error response indicates that the service is not able to process the
10
+ # incoming request. The reason is provided in the error message.
11
+ #
12
+ class ErrorResponse
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [ErrorDetails] The details of the error.
17
+ attr_accessor :error
18
+
19
+
20
+ #
21
+ # Mapper for ErrorResponse class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ required: false,
27
+ serialized_name: 'ErrorResponse',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'ErrorResponse',
31
+ model_properties: {
32
+ error: {
33
+ required: false,
34
+ serialized_name: 'error',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'ErrorDetails'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,111 @@
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::ARM::Billing
7
+ module Models
8
+ #
9
+ # An invoice resource can be used download a PDF version of an invoice.
10
+ #
11
+ class Invoice < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [DownloadUrl] A secure link to download the PDF version of an
16
+ # invoice. The link will cease to work after its expiry time is reached.
17
+ attr_accessor :download_url
18
+
19
+ # @return [Date] The start of the date range covered by the invoice.
20
+ attr_accessor :invoice_period_start_date
21
+
22
+ # @return [Date] The end of the date range covered by the invoice.
23
+ attr_accessor :invoice_period_end_date
24
+
25
+ # @return [Array<String>] Array of billing perdiod ids that the invoice
26
+ # is attributed to.
27
+ attr_accessor :billing_period_ids
28
+
29
+
30
+ #
31
+ # Mapper for Invoice class as Ruby Hash.
32
+ # This will be used for serialization/deserialization.
33
+ #
34
+ def self.mapper()
35
+ {
36
+ required: false,
37
+ serialized_name: 'Invoice',
38
+ type: {
39
+ name: 'Composite',
40
+ class_name: 'Invoice',
41
+ model_properties: {
42
+ id: {
43
+ required: false,
44
+ read_only: true,
45
+ serialized_name: 'id',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ name: {
51
+ required: false,
52
+ read_only: true,
53
+ serialized_name: 'name',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ },
58
+ type: {
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'type',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ },
66
+ download_url: {
67
+ required: false,
68
+ serialized_name: 'properties.downloadUrl',
69
+ type: {
70
+ name: 'Composite',
71
+ class_name: 'DownloadUrl'
72
+ }
73
+ },
74
+ invoice_period_start_date: {
75
+ required: false,
76
+ read_only: true,
77
+ serialized_name: 'properties.invoicePeriodStartDate',
78
+ type: {
79
+ name: 'Date'
80
+ }
81
+ },
82
+ invoice_period_end_date: {
83
+ required: false,
84
+ read_only: true,
85
+ serialized_name: 'properties.invoicePeriodEndDate',
86
+ type: {
87
+ name: 'Date'
88
+ }
89
+ },
90
+ billing_period_ids: {
91
+ required: false,
92
+ read_only: true,
93
+ serialized_name: 'properties.billingPeriodIds',
94
+ type: {
95
+ name: 'Sequence',
96
+ element: {
97
+ required: false,
98
+ serialized_name: 'StringElementType',
99
+ type: {
100
+ name: 'String'
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ end
109
+ end
110
+ end
111
+ end