Class: CustomGateway::Product

Inherits:
Object
  • Object
show all
Defined in:
lib/custom_gateway/models/product.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Product

Returns a new instance of Product.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/custom_gateway/models/product.rb', line 17

def initialize(params)
  self.id = params['id'] || ''
  self.ref = params['ref'] || ''
  self.name = params['name'] || ''
  self.retail_sku = params['retail_sku'] || ''
  self.product_code = params['productCode'] || ''
  self.machine_type = params['machine_type'] || ''
  self.space = params['space'] || ''
  self.is_locked = params['is_locked'] || ''
  self.load_count = params['load_count'] || ''
  self.last_load = params['last_load'] || ''
  self.last_modified = params['last_modified'] || ''
  self.print_job_count = params['print_job_count'] || ''
  self.product_sample_count = params['product_sample_count'] || ''
  self.date_created = params['date_created'] || ''
  self.type = params['type'] || ''
  self.legacy_3d = params['legacy_3d'] || ''
  self.default_app = params['default_app'] || ''
  self.default_app_config = params['default_app_config'] || ''
  self.default_app_locale = params['default_app_locale'] || ''
  self.default_app_pc = params['default_app_pc'] || ''
  self.default_app_g = params['default_app_g'] || ''
  self.default_app_ddp = params['default_app_ddp'] || ''
  self.default_app_dd = params['default_app_dd'] || ''
  self.always_use_px = params['always_use_px'] || ''
  self.base_product_id = params['base_product_id'] || ''
  self.base_stock_product_id = params['base_stock_product_id'] || ''
  self.product_state_overlay_id = params['product_state_overlay_id'] || ''
  self.artwork_output_type = params['artwork_output_type'] || ''
  self.product_image_ref = params['product_image_ref'] || ''
  self.has_texture_png = params['has_texture_png'] || ''
  self.has_model_dae = params['has_model_dae'] || ''
  self.has_webgl_model_dae = params['has_webgl_model_dae'] || ''
  self.has_reflection_model_dae = params['has_reflection_model_dae'] || ''
  self.background_image_ref = params['background_image_ref'] || ''
  self.creator_user_id = params['creator_user_id'] || ''
  self.parent_id = params['parent_id'] || ''
  self.space_conversion_product = params['space_conversion_product'] || ''
  self.base_product = params['base_product'] || ''
  self.supplier_name = params['supplierName'] || ''
  self.supplier_company_ref_id = params['supplier_company_ref_id'] || ''

  self.snapshot_small_url = ''
  self.snapshot_large_url = ''
  if params.key?('snapshots')
    self.snapshot_small_url = params['snapshots']['small'] || ''
    self.snapshot_large_url = params['snapshots']['large'] || ''
  end

  self.bespoke_image_url = ''
  if params.key?('bespoke_image')
    self.bespoke_image_url = params['bespoke_image']['url'] || ''
  end

  self.background_image_url = ''
  if params.key?('background_image')
    self.background_image_url = params['background_image']['url'] || ''
  end

  self.acl_can_write = ''
  if params.key?('acl')
    self.acl_can_write = params['acl']['can_write'] || ''
  end

  self.supplier_company_name = ''
  self.supplier_customer_ref_id = ''
  self.supplier_type = ''
  if params.key?('supplier')
    self.supplier_company_name = params['supplier']['company_name'] || ''
    self.supplier_customer_ref_id = params['supplier']['customer_ref_id'] || ''
    self.supplier_type = params['supplier']['type'] || ''
  end

  self.creator_user_username = ''
  if params.key?('creator_user')
    self.creator_user_username = params['creator_user']['username'] || ''
  end
end

Instance Attribute Details

#acl_can_writeObject

Returns the value of attribute acl_can_write.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def acl_can_write
  @acl_can_write
end

#always_use_pxObject

Returns the value of attribute always_use_px.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def always_use_px
  @always_use_px
end

#artwork_output_typeObject

Returns the value of attribute artwork_output_type.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def artwork_output_type
  @artwork_output_type
end

#background_image_refObject

Returns the value of attribute background_image_ref.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def background_image_ref
  @background_image_ref
end

#background_image_urlObject

Returns the value of attribute background_image_url.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def background_image_url
  @background_image_url
end

#base_productObject

Returns the value of attribute base_product.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def base_product
  @base_product
end

#base_product_idObject

Returns the value of attribute base_product_id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def base_product_id
  @base_product_id
end

#base_stock_product_idObject

Returns the value of attribute base_stock_product_id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def base_stock_product_id
  @base_stock_product_id
end

#bespoke_image_urlObject

Returns the value of attribute bespoke_image_url.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def bespoke_image_url
  @bespoke_image_url
end

#creator_user_idObject

Returns the value of attribute creator_user_id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def creator_user_id
  @creator_user_id
end

#creator_user_usernameObject

Returns the value of attribute creator_user_username.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def creator_user_username
  @creator_user_username
end

#date_createdObject

Returns the value of attribute date_created.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def date_created
  @date_created
end

#default_appObject

Returns the value of attribute default_app.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def default_app
  @default_app
end

#default_app_configObject

Returns the value of attribute default_app_config.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def default_app_config
  @default_app_config
end

#default_app_ddObject

Returns the value of attribute default_app_dd.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def default_app_dd
  @default_app_dd
end

#default_app_ddpObject

Returns the value of attribute default_app_ddp.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def default_app_ddp
  @default_app_ddp
end

#default_app_gObject

Returns the value of attribute default_app_g.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def default_app_g
  @default_app_g
end

#default_app_localeObject

Returns the value of attribute default_app_locale.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def default_app_locale
  @default_app_locale
end

#default_app_pcObject

Returns the value of attribute default_app_pc.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def default_app_pc
  @default_app_pc
end

#has_model_daeObject

Returns the value of attribute has_model_dae.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def has_model_dae
  @has_model_dae
end

#has_reflection_model_daeObject

Returns the value of attribute has_reflection_model_dae.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def has_reflection_model_dae
  @has_reflection_model_dae
end

#has_texture_pngObject

Returns the value of attribute has_texture_png.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def has_texture_png
  @has_texture_png
end

#has_webgl_model_daeObject

Returns the value of attribute has_webgl_model_dae.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def has_webgl_model_dae
  @has_webgl_model_dae
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def id
  @id
end

#is_lockedObject

Returns the value of attribute is_locked.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def is_locked
  @is_locked
end

#last_loadObject

Returns the value of attribute last_load.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def last_load
  @last_load
end

#last_modifiedObject

Returns the value of attribute last_modified.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def last_modified
  @last_modified
end

#legacy_3dObject

Returns the value of attribute legacy_3d.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def legacy_3d
  @legacy_3d
end

#load_countObject

Returns the value of attribute load_count.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def load_count
  @load_count
end

#machine_typeObject

Returns the value of attribute machine_type.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def machine_type
  @machine_type
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def name
  @name
end

#parent_idObject

Returns the value of attribute parent_id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def parent_id
  @parent_id
end

Returns the value of attribute print_job_count.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def print_job_count
  @print_job_count
end

#product_codeObject

Returns the value of attribute product_code.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def product_code
  @product_code
end

#product_image_refObject

Returns the value of attribute product_image_ref.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def product_image_ref
  @product_image_ref
end

#product_sample_countObject

Returns the value of attribute product_sample_count.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def product_sample_count
  @product_sample_count
end

#product_state_overlay_idObject

Returns the value of attribute product_state_overlay_id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def product_state_overlay_id
  @product_state_overlay_id
end

#refObject

Returns the value of attribute ref.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def ref
  @ref
end

#retail_skuObject

Returns the value of attribute retail_sku.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def retail_sku
  @retail_sku
end

#snapshot_large_urlObject

Returns the value of attribute snapshot_large_url.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def snapshot_large_url
  @snapshot_large_url
end

#snapshot_small_urlObject

Returns the value of attribute snapshot_small_url.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def snapshot_small_url
  @snapshot_small_url
end

#spaceObject

Returns the value of attribute space.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def space
  @space
end

#space_conversion_productObject

Returns the value of attribute space_conversion_product.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def space_conversion_product
  @space_conversion_product
end

#supplier_company_nameObject

Returns the value of attribute supplier_company_name.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def supplier_company_name
  @supplier_company_name
end

#supplier_company_ref_idObject

Returns the value of attribute supplier_company_ref_id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def supplier_company_ref_id
  @supplier_company_ref_id
end

#supplier_customer_ref_idObject

Returns the value of attribute supplier_customer_ref_id.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def supplier_customer_ref_id
  @supplier_customer_ref_id
end

#supplier_nameObject

Returns the value of attribute supplier_name.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def supplier_name
  @supplier_name
end

#supplier_typeObject

Returns the value of attribute supplier_type.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def supplier_type
  @supplier_type
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/custom_gateway/models/product.rb', line 3

def type
  @type
end