Class: CustomGateway::Product
- Inherits:
-
Object
- Object
- CustomGateway::Product
- Defined in:
- lib/custom_gateway/models/product.rb
Instance Attribute Summary collapse
-
#acl_can_write ⇒ Object
Returns the value of attribute acl_can_write.
-
#always_use_px ⇒ Object
Returns the value of attribute always_use_px.
-
#artwork_output_type ⇒ Object
Returns the value of attribute artwork_output_type.
-
#background_image_ref ⇒ Object
Returns the value of attribute background_image_ref.
-
#background_image_url ⇒ Object
Returns the value of attribute background_image_url.
-
#base_product ⇒ Object
Returns the value of attribute base_product.
-
#base_product_id ⇒ Object
Returns the value of attribute base_product_id.
-
#base_stock_product_id ⇒ Object
Returns the value of attribute base_stock_product_id.
-
#bespoke_image_url ⇒ Object
Returns the value of attribute bespoke_image_url.
-
#creator_user_id ⇒ Object
Returns the value of attribute creator_user_id.
-
#creator_user_username ⇒ Object
Returns the value of attribute creator_user_username.
-
#date_created ⇒ Object
Returns the value of attribute date_created.
-
#default_app ⇒ Object
Returns the value of attribute default_app.
-
#default_app_config ⇒ Object
Returns the value of attribute default_app_config.
-
#default_app_dd ⇒ Object
Returns the value of attribute default_app_dd.
-
#default_app_ddp ⇒ Object
Returns the value of attribute default_app_ddp.
-
#default_app_g ⇒ Object
Returns the value of attribute default_app_g.
-
#default_app_locale ⇒ Object
Returns the value of attribute default_app_locale.
-
#default_app_pc ⇒ Object
Returns the value of attribute default_app_pc.
-
#has_model_dae ⇒ Object
Returns the value of attribute has_model_dae.
-
#has_reflection_model_dae ⇒ Object
Returns the value of attribute has_reflection_model_dae.
-
#has_texture_png ⇒ Object
Returns the value of attribute has_texture_png.
-
#has_webgl_model_dae ⇒ Object
Returns the value of attribute has_webgl_model_dae.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_locked ⇒ Object
Returns the value of attribute is_locked.
-
#last_load ⇒ Object
Returns the value of attribute last_load.
-
#last_modified ⇒ Object
Returns the value of attribute last_modified.
-
#legacy_3d ⇒ Object
Returns the value of attribute legacy_3d.
-
#load_count ⇒ Object
Returns the value of attribute load_count.
-
#machine_type ⇒ Object
Returns the value of attribute machine_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#print_job_count ⇒ Object
Returns the value of attribute print_job_count.
-
#product_code ⇒ Object
Returns the value of attribute product_code.
-
#product_image_ref ⇒ Object
Returns the value of attribute product_image_ref.
-
#product_sample_count ⇒ Object
Returns the value of attribute product_sample_count.
-
#product_state_overlay_id ⇒ Object
Returns the value of attribute product_state_overlay_id.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#retail_sku ⇒ Object
Returns the value of attribute retail_sku.
-
#snapshot_large_url ⇒ Object
Returns the value of attribute snapshot_large_url.
-
#snapshot_small_url ⇒ Object
Returns the value of attribute snapshot_small_url.
-
#space ⇒ Object
Returns the value of attribute space.
-
#space_conversion_product ⇒ Object
Returns the value of attribute space_conversion_product.
-
#supplier_company_name ⇒ Object
Returns the value of attribute supplier_company_name.
-
#supplier_company_ref_id ⇒ Object
Returns the value of attribute supplier_company_ref_id.
-
#supplier_customer_ref_id ⇒ Object
Returns the value of attribute supplier_customer_ref_id.
-
#supplier_name ⇒ Object
Returns the value of attribute supplier_name.
-
#supplier_type ⇒ Object
Returns the value of attribute supplier_type.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params) ⇒ Product
constructor
A new instance of Product.
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. = 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_write ⇒ Object
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_px ⇒ Object
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_type ⇒ Object
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_ref ⇒ Object
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_url ⇒ Object
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_product ⇒ Object
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_id ⇒ Object
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_id ⇒ Object
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_url ⇒ Object
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_id ⇒ Object
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_username ⇒ Object
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_created ⇒ Object
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_app ⇒ Object
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_config ⇒ Object
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_dd ⇒ Object
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_ddp ⇒ Object
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_g ⇒ Object
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_locale ⇒ Object
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_pc ⇒ Object
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_dae ⇒ Object
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_dae ⇒ Object
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_png ⇒ Object
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_dae ⇒ Object
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 |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/custom_gateway/models/product.rb', line 3 def id @id end |
#is_locked ⇒ Object
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_load ⇒ Object
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_modified ⇒ Object
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_3d ⇒ Object
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_count ⇒ Object
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_type ⇒ Object
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 |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/custom_gateway/models/product.rb', line 3 def name @name end |
#parent_id ⇒ Object
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 |
#print_job_count ⇒ Object
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_code ⇒ Object
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_ref ⇒ Object
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_count ⇒ Object
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_id ⇒ Object
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 end |
#ref ⇒ Object
Returns the value of attribute ref.
3 4 5 |
# File 'lib/custom_gateway/models/product.rb', line 3 def ref @ref end |
#retail_sku ⇒ Object
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_url ⇒ Object
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_url ⇒ Object
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 |
#space ⇒ Object
Returns the value of attribute space.
3 4 5 |
# File 'lib/custom_gateway/models/product.rb', line 3 def space @space end |
#space_conversion_product ⇒ Object
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_name ⇒ Object
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_id ⇒ Object
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_id ⇒ Object
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_name ⇒ Object
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_type ⇒ Object
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 |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/custom_gateway/models/product.rb', line 3 def type @type end |