Class: TencentCloud::Ocr::V20181119::ItemPolygonInfo

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

Overview

发票字段坐标信息。包括字段英文名称、字段值所在位置的四点坐标、字段所属行号,具体内容请点击左侧链接。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key = nil, polygon = nil, row = nil) ⇒ ItemPolygonInfo

Returns a new instance of ItemPolygonInfo.



4817
4818
4819
4820
4821
# File 'lib/v20181119/models.rb', line 4817

def initialize(key=nil, polygon=nil, row=nil)
  @Key = key
  @Polygon = polygon
  @Row = row
end

Instance Attribute Details

#KeyObject

Parameters:

  • Key:

    发票的英文字段名称(如Title)

  • Polygon:

    字段值所在位置的四点坐标

  • Row:

    字段属于第几行,用于相同字段的排版,如发票明细表格项目,普通字段使用默认值为-1,表示无列排版。



4815
4816
4817
# File 'lib/v20181119/models.rb', line 4815

def Key
  @Key
end

#PolygonObject

Parameters:

  • Key:

    发票的英文字段名称(如Title)

  • Polygon:

    字段值所在位置的四点坐标

  • Row:

    字段属于第几行,用于相同字段的排版,如发票明细表格项目,普通字段使用默认值为-1,表示无列排版。



4815
4816
4817
# File 'lib/v20181119/models.rb', line 4815

def Polygon
  @Polygon
end

#RowObject

Parameters:

  • Key:

    发票的英文字段名称(如Title)

  • Polygon:

    字段值所在位置的四点坐标

  • Row:

    字段属于第几行,用于相同字段的排版,如发票明细表格项目,普通字段使用默认值为-1,表示无列排版。



4815
4816
4817
# File 'lib/v20181119/models.rb', line 4815

def Row
  @Row
end

Instance Method Details

#deserialize(params) ⇒ Object



4823
4824
4825
4826
4827
4828
4829
4830
# File 'lib/v20181119/models.rb', line 4823

def deserialize(params)
  @Key = params['Key']
  unless params['Polygon'].nil?
    @Polygon = Polygon.new
    @Polygon.deserialize(params['Polygon'])
  end
  @Row = params['Row']
end