@@ -570,6 +570,8 @@ class AccountSummary:
570
570
A summary of charges and credits for an account.
571
571
572
572
:attr str account_id: The ID of the account.
573
+ :attr List[Resource] account_resources: (optional) The list of account resources
574
+ for the month.
573
575
:attr str month: The month in which usages were incurred. Represented in yyyy-mm
574
576
format.
575
577
:attr str billing_country_code: Country.
@@ -578,6 +580,8 @@ class AccountSummary:
578
580
:attr List[Offer] offers: The list of offers applicable for the account for the
579
581
month.
580
582
:attr List[SupportSummary] support: Support-related charges.
583
+ :attr List[object] support_resources: (optional) The list of support resources
584
+ for the month.
581
585
:attr SubscriptionSummary subscription: A summary of charges and credits related
582
586
to a subscription.
583
587
"""
@@ -592,6 +596,9 @@ def __init__(
592
596
offers : List ['Offer' ],
593
597
support : List ['SupportSummary' ],
594
598
subscription : 'SubscriptionSummary' ,
599
+ * ,
600
+ account_resources : List ['Resource' ] = None ,
601
+ support_resources : List [object ] = None ,
595
602
) -> None :
596
603
"""
597
604
Initialize a AccountSummary object.
@@ -608,14 +615,20 @@ def __init__(
608
615
:param List[SupportSummary] support: Support-related charges.
609
616
:param SubscriptionSummary subscription: A summary of charges and credits
610
617
related to a subscription.
618
+ :param List[Resource] account_resources: (optional) The list of account
619
+ resources for the month.
620
+ :param List[object] support_resources: (optional) The list of support
621
+ resources for the month.
611
622
"""
612
623
self .account_id = account_id
624
+ self .account_resources = account_resources
613
625
self .month = month
614
626
self .billing_country_code = billing_country_code
615
627
self .billing_currency_code = billing_currency_code
616
628
self .resources = resources
617
629
self .offers = offers
618
630
self .support = support
631
+ self .support_resources = support_resources
619
632
self .subscription = subscription
620
633
621
634
@classmethod
@@ -626,6 +639,8 @@ def from_dict(cls, _dict: Dict) -> 'AccountSummary':
626
639
args ['account_id' ] = _dict .get ('account_id' )
627
640
else :
628
641
raise ValueError ('Required property \' account_id\' not present in AccountSummary JSON' )
642
+ if 'account_resources' in _dict :
643
+ args ['account_resources' ] = [Resource .from_dict (v ) for v in _dict .get ('account_resources' )]
629
644
if 'month' in _dict :
630
645
args ['month' ] = _dict .get ('month' )
631
646
else :
@@ -650,6 +665,8 @@ def from_dict(cls, _dict: Dict) -> 'AccountSummary':
650
665
args ['support' ] = [SupportSummary .from_dict (v ) for v in _dict .get ('support' )]
651
666
else :
652
667
raise ValueError ('Required property \' support\' not present in AccountSummary JSON' )
668
+ if 'support_resources' in _dict :
669
+ args ['support_resources' ] = _dict .get ('support_resources' )
653
670
if 'subscription' in _dict :
654
671
args ['subscription' ] = SubscriptionSummary .from_dict (_dict .get ('subscription' ))
655
672
else :
@@ -666,6 +683,14 @@ def to_dict(self) -> Dict:
666
683
_dict = {}
667
684
if hasattr (self , 'account_id' ) and self .account_id is not None :
668
685
_dict ['account_id' ] = self .account_id
686
+ if hasattr (self , 'account_resources' ) and self .account_resources is not None :
687
+ account_resources_list = []
688
+ for v in self .account_resources :
689
+ if isinstance (v , dict ):
690
+ account_resources_list .append (v )
691
+ else :
692
+ account_resources_list .append (v .to_dict ())
693
+ _dict ['account_resources' ] = account_resources_list
669
694
if hasattr (self , 'month' ) and self .month is not None :
670
695
_dict ['month' ] = self .month
671
696
if hasattr (self , 'billing_country_code' ) and self .billing_country_code is not None :
@@ -693,6 +718,8 @@ def to_dict(self) -> Dict:
693
718
else :
694
719
support_list .append (v .to_dict ())
695
720
_dict ['support' ] = support_list
721
+ if hasattr (self , 'support_resources' ) and self .support_resources is not None :
722
+ _dict ['support_resources' ] = self .support_resources
696
723
if hasattr (self , 'subscription' ) and self .subscription is not None :
697
724
if isinstance (self .subscription , dict ):
698
725
_dict ['subscription' ] = self .subscription
@@ -1903,6 +1930,7 @@ class Plan:
1903
1930
:attr str plan_id: The ID of the plan.
1904
1931
:attr str plan_name: (optional) The name of the plan.
1905
1932
:attr str pricing_region: (optional) The pricing region for the plan.
1933
+ :attr str pricing_plan_id: (optional)
1906
1934
:attr bool billable: Indicates if the plan charges are billed to the customer.
1907
1935
:attr float cost: The total cost incurred by the plan.
1908
1936
:attr float rated_cost: Total pre-discounted cost incurred by the plan.
@@ -1922,6 +1950,7 @@ def __init__(
1922
1950
* ,
1923
1951
plan_name : str = None ,
1924
1952
pricing_region : str = None ,
1953
+ pricing_plan_id : str = None ,
1925
1954
pending : bool = None ,
1926
1955
) -> None :
1927
1956
"""
@@ -1936,11 +1965,13 @@ def __init__(
1936
1965
:param List[Discount] discounts: All the discounts applicable to the plan.
1937
1966
:param str plan_name: (optional) The name of the plan.
1938
1967
:param str pricing_region: (optional) The pricing region for the plan.
1968
+ :param str pricing_plan_id: (optional)
1939
1969
:param bool pending: (optional) Pending charge from classic infrastructure.
1940
1970
"""
1941
1971
self .plan_id = plan_id
1942
1972
self .plan_name = plan_name
1943
1973
self .pricing_region = pricing_region
1974
+ self .pricing_plan_id = pricing_plan_id
1944
1975
self .billable = billable
1945
1976
self .cost = cost
1946
1977
self .rated_cost = rated_cost
@@ -1960,6 +1991,8 @@ def from_dict(cls, _dict: Dict) -> 'Plan':
1960
1991
args ['plan_name' ] = _dict .get ('plan_name' )
1961
1992
if 'pricing_region' in _dict :
1962
1993
args ['pricing_region' ] = _dict .get ('pricing_region' )
1994
+ if 'pricing_plan_id' in _dict :
1995
+ args ['pricing_plan_id' ] = _dict .get ('pricing_plan_id' )
1963
1996
if 'billable' in _dict :
1964
1997
args ['billable' ] = _dict .get ('billable' )
1965
1998
else :
@@ -1998,6 +2031,8 @@ def to_dict(self) -> Dict:
1998
2031
_dict ['plan_name' ] = self .plan_name
1999
2032
if hasattr (self , 'pricing_region' ) and self .pricing_region is not None :
2000
2033
_dict ['pricing_region' ] = self .pricing_region
2034
+ if hasattr (self , 'pricing_plan_id' ) and self .pricing_plan_id is not None :
2035
+ _dict ['pricing_plan_id' ] = self .pricing_plan_id
2001
2036
if hasattr (self , 'billable' ) and self .billable is not None :
2002
2037
_dict ['billable' ] = self .billable
2003
2038
if hasattr (self , 'cost' ) and self .cost is not None :
0 commit comments