Class: TencentCloud::Trp::V20210515::PackSpec

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

Overview

层级码配置

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(level = nil, rate = nil, amount = nil, customid = nil, codeparts = nil, unit = nil, scenecode = nil) ⇒ PackSpec

Returns a new instance of PackSpec.



3770
3771
3772
3773
3774
3775
3776
3777
3778
# File 'lib/v20210515/models.rb', line 3770

def initialize(level=nil, rate=nil, amount=nil, customid=nil, codeparts=nil, unit=nil, scenecode=nil)
  @Level = level
  @Rate = rate
  @Amount = amount
  @CustomId = customid
  @CodeParts = codeparts
  @Unit = unit
  @SceneCode = scenecode
end

Instance Attribute Details

#AmountObject

Parameters:

  • Level:

    层级

  • Rate:

    比例

  • Amount:

    数量

  • CustomId:

    码规则ID

  • CodeParts:

    码段配置

  • Unit:

    包装单位

  • SceneCode:

    场景值



3768
3769
3770
# File 'lib/v20210515/models.rb', line 3768

def Amount
  @Amount
end

#CodePartsObject

Parameters:

  • Level:

    层级

  • Rate:

    比例

  • Amount:

    数量

  • CustomId:

    码规则ID

  • CodeParts:

    码段配置

  • Unit:

    包装单位

  • SceneCode:

    场景值



3768
3769
3770
# File 'lib/v20210515/models.rb', line 3768

def CodeParts
  @CodeParts
end

#CustomIdObject

Parameters:

  • Level:

    层级

  • Rate:

    比例

  • Amount:

    数量

  • CustomId:

    码规则ID

  • CodeParts:

    码段配置

  • Unit:

    包装单位

  • SceneCode:

    场景值



3768
3769
3770
# File 'lib/v20210515/models.rb', line 3768

def CustomId
  @CustomId
end

#LevelObject

Parameters:

  • Level:

    层级

  • Rate:

    比例

  • Amount:

    数量

  • CustomId:

    码规则ID

  • CodeParts:

    码段配置

  • Unit:

    包装单位

  • SceneCode:

    场景值



3768
3769
3770
# File 'lib/v20210515/models.rb', line 3768

def Level
  @Level
end

#RateObject

Parameters:

  • Level:

    层级

  • Rate:

    比例

  • Amount:

    数量

  • CustomId:

    码规则ID

  • CodeParts:

    码段配置

  • Unit:

    包装单位

  • SceneCode:

    场景值



3768
3769
3770
# File 'lib/v20210515/models.rb', line 3768

def Rate
  @Rate
end

#SceneCodeObject

Parameters:

  • Level:

    层级

  • Rate:

    比例

  • Amount:

    数量

  • CustomId:

    码规则ID

  • CodeParts:

    码段配置

  • Unit:

    包装单位

  • SceneCode:

    场景值



3768
3769
3770
# File 'lib/v20210515/models.rb', line 3768

def SceneCode
  @SceneCode
end

#UnitObject

Parameters:

  • Level:

    层级

  • Rate:

    比例

  • Amount:

    数量

  • CustomId:

    码规则ID

  • CodeParts:

    码段配置

  • Unit:

    包装单位

  • SceneCode:

    场景值



3768
3769
3770
# File 'lib/v20210515/models.rb', line 3768

def Unit
  @Unit
end

Instance Method Details

#deserialize(params) ⇒ Object



3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
# File 'lib/v20210515/models.rb', line 3780

def deserialize(params)
  @Level = params['Level']
  @Rate = params['Rate']
  @Amount = params['Amount']
  @CustomId = params['CustomId']
  unless params['CodeParts'].nil?
    @CodeParts = []
    params['CodeParts'].each do |i|
      codepart_tmp = CodePart.new
      codepart_tmp.deserialize(i)
      @CodeParts << codepart_tmp
    end
  end
  @Unit = params['Unit']
  @SceneCode = params['SceneCode']
end