Class: Whitehouse::Order::OrderItem

Inherits:
Struct
  • Object
show all
Defined in:
lib/whitehouse/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes

Returns:

  • (Object)

    the current value of attributes



15
16
17
# File 'lib/whitehouse/order.rb', line 15

def attributes
  @attributes
end

#md5Object

Returns the value of attribute md5

Returns:

  • (Object)

    the current value of md5



15
16
17
# File 'lib/whitehouse/order.rb', line 15

def md5
  @md5
end

#rotationObject

Returns the value of attribute rotation

Returns:

  • (Object)

    the current value of rotation



15
16
17
# File 'lib/whitehouse/order.rb', line 15

def rotation
  @rotation
end

#uidObject

Returns the value of attribute uid

Returns:

  • (Object)

    the current value of uid



15
16
17
# File 'lib/whitehouse/order.rb', line 15

def uid
  @uid
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



15
16
17
# File 'lib/whitehouse/order.rb', line 15

def url
  @url
end

Instance Method Details

#assetsObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/whitehouse/order.rb', line 16

def assets
  [{"AssetPath" => url,
    "PrintedFileName" => "",
    "ImageHash" => md5,
    "DP2NodeID" => 10000,
    "OffsetX" => 50,
    "OffsetY" => 50,
    "X" => 50,
    "Y" => 50,
    "ZoomX" => 100,
    "ZoomY" => 100,
    "ImageRotation" => 0,
    "isCoverAsset" => false,
    "isJacketAsset" => false,
    "ColorCorrect" => false}]
end

#item_attributesObject



33
34
35
36
# File 'lib/whitehouse/order.rb', line 33

def item_attributes
  return [] unless attributes
  attributes.map{|attr| {"AttributeUID" => attr}}
end