Class: TencentCloud::Billing::V20180709::AllocationRulesSummary

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180709/models.rb

Overview

公摊规则列表

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, type = nil, ruledetail = nil, ratiodetail = nil) ⇒ AllocationRulesSummary

Returns a new instance of AllocationRulesSummary.



907
908
909
910
911
912
# File 'lib/v20180709/models.rb', line 907

def initialize(name=nil, type=nil, ruledetail=nil, ratiodetail=nil)
  @Name = name
  @Type = type
  @RuleDetail = ruledetail
  @RatioDetail = ratiodetail
end

Instance Attribute Details

#NameObject

1 - 自定义分摊占比2 - 等比分摊3 - 按占比分摊

Parameters:

  • Name:

    新增公摊规则名称

  • Type:

    公摊策略类型,枚举值如下:

  • RuleDetail:

    公摊规则表达式

  • RatioDetail:

    公摊比例表达式,按占比分摊不传



905
906
907
# File 'lib/v20180709/models.rb', line 905

def Name
  @Name
end

#RatioDetailObject

1 - 自定义分摊占比2 - 等比分摊3 - 按占比分摊

Parameters:

  • Name:

    新增公摊规则名称

  • Type:

    公摊策略类型,枚举值如下:

  • RuleDetail:

    公摊规则表达式

  • RatioDetail:

    公摊比例表达式,按占比分摊不传



905
906
907
# File 'lib/v20180709/models.rb', line 905

def RatioDetail
  @RatioDetail
end

#RuleDetailObject

1 - 自定义分摊占比2 - 等比分摊3 - 按占比分摊

Parameters:

  • Name:

    新增公摊规则名称

  • Type:

    公摊策略类型,枚举值如下:

  • RuleDetail:

    公摊规则表达式

  • RatioDetail:

    公摊比例表达式,按占比分摊不传



905
906
907
# File 'lib/v20180709/models.rb', line 905

def RuleDetail
  @RuleDetail
end

#TypeObject

1 - 自定义分摊占比2 - 等比分摊3 - 按占比分摊

Parameters:

  • Name:

    新增公摊规则名称

  • Type:

    公摊策略类型,枚举值如下:

  • RuleDetail:

    公摊规则表达式

  • RatioDetail:

    公摊比例表达式,按占比分摊不传



905
906
907
# File 'lib/v20180709/models.rb', line 905

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/v20180709/models.rb', line 914

def deserialize(params)
  @Name = params['Name']
  @Type = params['Type']
  unless params['RuleDetail'].nil?
    @RuleDetail = AllocationRuleExpression.new
    @RuleDetail.deserialize(params['RuleDetail'])
  end
  unless params['RatioDetail'].nil?
    @RatioDetail = []
    params['RatioDetail'].each do |i|
      allocationrationexpression_tmp = AllocationRationExpression.new
      allocationrationexpression_tmp.deserialize(i)
      @RatioDetail << allocationrationexpression_tmp
    end
  end
end