Class: CyberSource::Iccv1productsfeedProducts

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/models/iccv1productsfeed_products.rb

Overview

A single product to add to or update in the merchant's ACG catalog.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Iccv1productsfeedProducts

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 529

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'item_id')
    self.item_id = attributes[:'item_id']
  end

  if attributes.has_key?(:'title')
    self.title = attributes[:'title']
  end

  if attributes.has_key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.has_key?(:'url')
    self.url = attributes[:'url']
  end

  if attributes.has_key?(:'image_url')
    self.image_url = attributes[:'image_url']
  end

  if attributes.has_key?(:'additional_image_urls')
    self.additional_image_urls = attributes[:'additional_image_urls']
  end

  if attributes.has_key?(:'video_url')
    self.video_url = attributes[:'video_url']
  end

  if attributes.has_key?(:'model_3d_url')
    self.model_3d_url = attributes[:'model_3d_url']
  end

  if attributes.has_key?(:'availability')
    self.availability = attributes[:'availability']
  end

  if attributes.has_key?(:'availability_date')
    self.availability_date = attributes[:'availability_date']
  end

  if attributes.has_key?(:'expiration_date')
    self.expiration_date = attributes[:'expiration_date']
  end

  if attributes.has_key?(:'price')
    self.price = attributes[:'price']
  end

  if attributes.has_key?(:'currency')
    self.currency = attributes[:'currency']
  end

  if attributes.has_key?(:'sale_price')
    self.sale_price = attributes[:'sale_price']
  end

  if attributes.has_key?(:'sale_price_start_date')
    self.sale_price_start_date = attributes[:'sale_price_start_date']
  end

  if attributes.has_key?(:'sale_price_end_date')
    self.sale_price_end_date = attributes[:'sale_price_end_date']
  end

  if attributes.has_key?(:'unit_pricing_measure')
    self.unit_pricing_measure = attributes[:'unit_pricing_measure']
  end

  if attributes.has_key?(:'base_measure')
    self.base_measure = attributes[:'base_measure']
  end

  if attributes.has_key?(:'pricing_trend')
    self.pricing_trend = attributes[:'pricing_trend']
  end

  if attributes.has_key?(:'geo_price')
    self.geo_price = attributes[:'geo_price']
  end

  if attributes.has_key?(:'geo_availability')
    self.geo_availability = attributes[:'geo_availability']
  end

  if attributes.has_key?(:'brand')
    self.brand = attributes[:'brand']
  end

  if attributes.has_key?(:'gtin')
    self.gtin = attributes[:'gtin']
  end

  if attributes.has_key?(:'mpn')
    self.mpn = attributes[:'mpn']
  end

  if attributes.has_key?(:'product_category')
    self.product_category = attributes[:'product_category']
  end

  if attributes.has_key?(:'condition')
    self.condition = attributes[:'condition']
  end

  if attributes.has_key?(:'material')
    self.material = attributes[:'material']
  end

  if attributes.has_key?(:'weight')
    self.weight = attributes[:'weight']
  end

  if attributes.has_key?(:'dimensions')
    self.dimensions = attributes[:'dimensions']
  end

  if attributes.has_key?(:'length')
    self.length = attributes[:'length']
  end

  if attributes.has_key?(:'width')
    self.width = attributes[:'width']
  end

  if attributes.has_key?(:'height')
    self.height = attributes[:'height']
  end

  if attributes.has_key?(:'dimensions_unit')
    self.dimensions_unit = attributes[:'dimensions_unit']
  end

  if attributes.has_key?(:'item_weight_unit')
    self.item_weight_unit = attributes[:'item_weight_unit']
  end

  if attributes.has_key?(:'age_group')
    self.age_group = attributes[:'age_group']
  end

  if attributes.has_key?(:'color')
    self.color = attributes[:'color']
  end

  if attributes.has_key?(:'size')
    self.size = attributes[:'size']
  end

  if attributes.has_key?(:'size_system')
    self.size_system = attributes[:'size_system']
  end

  if attributes.has_key?(:'gender')
    self.gender = attributes[:'gender']
  end

  if attributes.has_key?(:'group_id')
    self.group_id = attributes[:'group_id']
  end

  if attributes.has_key?(:'listing_has_variations')
    self.listing_has_variations = attributes[:'listing_has_variations']
  end

  if attributes.has_key?(:'item_group_title')
    self.item_group_title = attributes[:'item_group_title']
  end

  if attributes.has_key?(:'offer_id')
    self.offer_id = attributes[:'offer_id']
  end

  if attributes.has_key?(:'variant_dict')
    if (value = attributes[:'variant_dict']).is_a?(Hash)
      self.variant_dict = value
    end
  end

  if attributes.has_key?(:'custom_variant1_category')
    self.custom_variant1_category = attributes[:'custom_variant1_category']
  end

  if attributes.has_key?(:'custom_variant1_option')
    self.custom_variant1_option = attributes[:'custom_variant1_option']
  end

  if attributes.has_key?(:'custom_variant2_category')
    self.custom_variant2_category = attributes[:'custom_variant2_category']
  end

  if attributes.has_key?(:'custom_variant2_option')
    self.custom_variant2_option = attributes[:'custom_variant2_option']
  end

  if attributes.has_key?(:'custom_variant3_category')
    self.custom_variant3_category = attributes[:'custom_variant3_category']
  end

  if attributes.has_key?(:'custom_variant3_option')
    self.custom_variant3_option = attributes[:'custom_variant3_option']
  end

  if attributes.has_key?(:'seller_name')
    self.seller_name = attributes[:'seller_name']
  end

  if attributes.has_key?(:'seller_url')
    self.seller_url = attributes[:'seller_url']
  end

  if attributes.has_key?(:'marketplace_seller')
    self.marketplace_seller = attributes[:'marketplace_seller']
  end

  if attributes.has_key?(:'seller_privacy_policy')
    self.seller_privacy_policy = attributes[:'seller_privacy_policy']
  end

  if attributes.has_key?(:'seller_tos')
    self.seller_tos = attributes[:'seller_tos']
  end

  if attributes.has_key?(:'shipping_price')
    self.shipping_price = attributes[:'shipping_price']
  end

  if attributes.has_key?(:'delivery_estimate')
    self.delivery_estimate = attributes[:'delivery_estimate']
  end

  if attributes.has_key?(:'pickup_method')
    self.pickup_method = attributes[:'pickup_method']
  end

  if attributes.has_key?(:'pickup_sla')
    self.pickup_sla = attributes[:'pickup_sla']
  end

  if attributes.has_key?(:'is_digital')
    self.is_digital = attributes[:'is_digital']
  end

  if attributes.has_key?(:'return_policy')
    self.return_policy = attributes[:'return_policy']
  end

  if attributes.has_key?(:'accepts_returns')
    self.accepts_returns = attributes[:'accepts_returns']
  end

  if attributes.has_key?(:'return_deadline_in_days')
    self.return_deadline_in_days = attributes[:'return_deadline_in_days']
  end

  if attributes.has_key?(:'accepts_exchanges')
    self.accepts_exchanges = attributes[:'accepts_exchanges']
  end

  if attributes.has_key?(:'is_eligible_search')
    self.is_eligible_search = attributes[:'is_eligible_search']
  end

  if attributes.has_key?(:'is_eligible_checkout')
    self.is_eligible_checkout = attributes[:'is_eligible_checkout']
  end

  if attributes.has_key?(:'popularity_score')
    self.popularity_score = attributes[:'popularity_score']
  end

  if attributes.has_key?(:'return_rate')
    self.return_rate = attributes[:'return_rate']
  end

  if attributes.has_key?(:'warning')
    self.warning = attributes[:'warning']
  end

  if attributes.has_key?(:'warning_url')
    self.warning_url = attributes[:'warning_url']
  end

  if attributes.has_key?(:'age_restriction')
    self.age_restriction = attributes[:'age_restriction']
  end

  if attributes.has_key?(:'review_count')
    self.review_count = attributes[:'review_count']
  end

  if attributes.has_key?(:'star_rating')
    self.star_rating = attributes[:'star_rating']
  end

  if attributes.has_key?(:'store_review_count')
    self.store_review_count = attributes[:'store_review_count']
  end

  if attributes.has_key?(:'store_star_rating')
    self.store_star_rating = attributes[:'store_star_rating']
  end

  if attributes.has_key?(:'related_product_id')
    self.related_product_id = attributes[:'related_product_id']
  end

  if attributes.has_key?(:'relationship_type')
    self.relationship_type = attributes[:'relationship_type']
  end

  if attributes.has_key?(:'target_countries')
    if (value = attributes[:'target_countries']).is_a?(Array)
      self.target_countries = value
    end
  end

  if attributes.has_key?(:'store_country')
    self.store_country = attributes[:'store_country']
  end

  if attributes.has_key?(:'q_and_a')
    if (value = attributes[:'q_and_a']).is_a?(Array)
      self.q_and_a = value
    end
  end

  if attributes.has_key?(:'qandA')
    if (value = attributes[:'qandA']).is_a?(Array)
      self.qand_a = value
    end
  end

  if attributes.has_key?(:'reviews')
    if (value = attributes[:'reviews']).is_a?(Array)
      self.reviews = value
    end
  end
end

Instance Attribute Details

#accepts_exchangesObject

Optional. Whether the product is eligible for exchanges.



207
208
209
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 207

def accepts_exchanges
  @accepts_exchanges
end

#accepts_returnsObject

Optional. Whether the product is eligible for returns.



201
202
203
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 201

def accepts_returns
  @accepts_returns
end

#additional_image_urlsObject

Optional. Additional product image URLs (comma-separated or single URL). Must be HTTPS.



33
34
35
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 33

def additional_image_urls
  @additional_image_urls
end

#age_groupObject

Optional. Target age group (e.g. "adult", "kids", "infant", "toddler", "newborn").



120
121
122
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 120

def age_group
  @age_group
end

#age_restrictionObject

Optional. Minimum age required to purchase this product (e.g. 18).



228
229
230
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 228

def age_restriction
  @age_restriction
end

#availabilityObject

Current stock status: - in_stock — available for immediate purchase - out_of_stock — temporarily unavailable - preorder or pre_order — not yet released - backorder — out of stock but accepting orders - unknown — availability status is not determined Possible values: - in_stock - out_of_stock - preorder - pre_order - backorder - unknown



42
43
44
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 42

def availability
  @availability
end

#availability_dateObject

Optional. Date when the product becomes available (for preorder/backorder).



45
46
47
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 45

def availability_date
  @availability_date
end

#base_measureObject

Optional. Base measure used for unit pricing comparison (e.g. "100g", "1L"). Enables price-per-unit comparison.



69
70
71
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 69

def base_measure
  @base_measure
end

#brandObject

Product brand or manufacturer name. Max 70 characters.



81
82
83
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 81

def brand
  @brand
end

#colorObject

Optional. Product color. Max 40 characters.



123
124
125
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 123

def color
  @color
end

#conditionObject

Optional. Product condition. Typical values: new, used, refurbished. Used for UCP syndication and Google Merchant Center feed.



93
94
95
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 93

def condition
  @condition
end

#currencyObject

3-letter ISO 4217 currency code for the product price (e.g. "USD", "EUR", "GBP").



54
55
56
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 54

def currency
  @currency
end

#custom_variant1_categoryObject

Optional. Custom variant 1 category label.



150
151
152
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 150

def custom_variant1_category
  @custom_variant1_category
end

#custom_variant1_optionObject

Optional. Custom variant 1 option value.



153
154
155
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 153

def custom_variant1_option
  @custom_variant1_option
end

#custom_variant2_categoryObject

Optional. Custom variant 2 category label.



156
157
158
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 156

def custom_variant2_category
  @custom_variant2_category
end

#custom_variant2_optionObject

Optional. Custom variant 2 option value.



159
160
161
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 159

def custom_variant2_option
  @custom_variant2_option
end

#custom_variant3_categoryObject

Optional. Custom variant 3 category label.



162
163
164
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 162

def custom_variant3_category
  @custom_variant3_category
end

#custom_variant3_optionObject

Optional. Custom variant 3 option value.



165
166
167
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 165

def custom_variant3_option
  @custom_variant3_option
end

#delivery_estimateObject

Optional. Estimated delivery date.



186
187
188
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 186

def delivery_estimate
  @delivery_estimate
end

#descriptionObject

Detailed product description. Max 5000 characters.



24
25
26
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 24

def description
  @description
end

#dimensionsObject

Optional. Combined dimension string (e.g. "10x5x3 cm"). Max 100 characters.



102
103
104
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 102

def dimensions
  @dimensions
end

#dimensions_unitObject

Optional. Unit for dimension values (e.g. "cm", "in").



114
115
116
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 114

def dimensions_unit
  @dimensions_unit
end

#expiration_dateObject

Optional. Date after which the product listing expires.



48
49
50
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 48

def expiration_date
  @expiration_date
end

#genderObject

Optional. Target gender (e.g. "male", "female", "unisex").



132
133
134
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 132

def gender
  @gender
end

#geo_availabilityObject

Optional. Geography-specific availability overrides (JSON or structured string).



78
79
80
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 78

def geo_availability
  @geo_availability
end

#geo_priceObject

Optional. Geography-specific pricing overrides (JSON or structured string).



75
76
77
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 75

def geo_price
  @geo_price
end

#group_idObject

Product variant group ID — links products that are variations of the same item. Max 70 characters.



135
136
137
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 135

def group_id
  @group_id
end

#gtinObject

Optional. Global Trade Item Number (UPC, EAN, ISBN). Must be 8–14 digits. Required for Google Merchant Center syndication.



84
85
86
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 84

def gtin
  @gtin
end

#heightObject

Optional. Product height.



111
112
113
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 111

def height
  @height
end

#image_urlObject

URL to the primary product image. Must be publicly accessible (HTTPS). Max 1000 characters.



30
31
32
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 30

def image_url
  @image_url
end

#is_digitalObject

Optional. Whether this product is a digital/downloadable item.



195
196
197
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 195

def is_digital
  @is_digital
end

#is_eligible_checkoutObject

Controls whether this product can be added to cart and purchased via AI agents.



213
214
215
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 213

def is_eligible_checkout
  @is_eligible_checkout
end

#is_eligible_searchObject

Controls whether this product appears in AI agent product discovery and search results.



210
211
212
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 210

def is_eligible_search
  @is_eligible_search
end

#item_group_titleObject

Optional. Display title for the variant group. Max 150 characters.



141
142
143
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 141

def item_group_title
  @item_group_title
end

#item_idObject

Your unique product identifier (SKU). Must be unique within your merchant catalog. Max 100 characters.



18
19
20
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 18

def item_id
  @item_id
end

#item_weight_unitObject

Optional. Unit for weight value (e.g. "kg", "lb").



117
118
119
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 117

def item_weight_unit
  @item_weight_unit
end

#lengthObject

Optional. Product length.



105
106
107
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 105

def length
  @length
end

#listing_has_variationsObject

Whether this listing has product variations.



138
139
140
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 138

def listing_has_variations
  @listing_has_variations
end

#marketplace_sellerObject

Optional. Marketplace seller identifier for multi-seller platforms. Max 70 characters.



174
175
176
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 174

def marketplace_seller
  @marketplace_seller
end

#materialObject

Optional. Primary material of the product. Max 100 characters.



96
97
98
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 96

def material
  @material
end

#model_3d_urlObject

Optional. URL to a 3D model asset for the product (GLTF/GLB format preferred).



39
40
41
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 39

def model_3d_url
  @model_3d_url
end

#mpnObject

Optional. Manufacturer Part Number. Max 70 characters.



87
88
89
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 87

def mpn
  @mpn
end

#offer_idObject

Optional. Merchant-assigned offer identifier for marketplace deduplication.



144
145
146
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 144

def offer_id
  @offer_id
end

#pickup_methodObject

Optional. Available pickup method (e.g. "in-store", "curbside", "locker").



189
190
191
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 189

def pickup_method
  @pickup_method
end

#pickup_slaObject

Optional. Pickup SLA commitment (e.g. "same-day", "2 hours", "next-day").



192
193
194
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 192

def pickup_sla
  @pickup_sla
end

#popularity_scoreObject

Optional. Numeric popularity score (higher is more popular).



216
217
218
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 216

def popularity_score
  @popularity_score
end

#priceObject

Product price as a positive decimal number. Pair with currency for full price representation. Must be greater than zero.



51
52
53
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 51

def price
  @price
end

#pricing_trendObject

Optional. Pricing trend indicator (e.g. "dropping", "rising"). Max 80 characters.



72
73
74
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 72

def pricing_trend
  @pricing_trend
end

#product_categoryObject

Optional. Product category hierarchy. Used for UCP validation and Google Merchant Center syndication. Max 255 characters.



90
91
92
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 90

def product_category
  @product_category
end

#q_and_aObject

Optional. List of Q&A entries for this product.



255
256
257
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 255

def q_and_a
  @q_and_a
end

#qand_aObject

Optional. Alias for q_and_a. Included for compatibility with alternate field naming conventions.



258
259
260
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 258

def qand_a
  @qand_a
end

Optional. Item ID of a related product (e.g. accessory, replacement).



243
244
245
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 243

def related_product_id
  @related_product_id
end

#relationship_typeObject

Optional. Type of relationship to related_product_id (e.g. "accessory", "replacement", "bundle").



246
247
248
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 246

def relationship_type
  @relationship_type
end

#return_deadline_in_daysObject

Optional. Number of days within which a return is accepted. Must be a positive integer.



204
205
206
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 204

def return_deadline_in_days
  @return_deadline_in_days
end

#return_policyObject

Human-readable return policy description.



198
199
200
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 198

def return_policy
  @return_policy
end

#return_rateObject

Optional. Product return rate indicator (e.g. "low", "medium", "high", or "5%").



219
220
221
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 219

def return_rate
  @return_rate
end

#review_countObject

Optional. Total number of customer reviews for this product.



231
232
233
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 231

def review_count
  @review_count
end

#reviewsObject

Optional. List of customer review objects for this product.



261
262
263
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 261

def reviews
  @reviews
end

#sale_priceObject

Optional. Discounted sale price. Only shown when lower than price.



57
58
59
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 57

def sale_price
  @sale_price
end

#sale_price_end_dateObject

Optional. End date of the sale price window.



63
64
65
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 63

def sale_price_end_date
  @sale_price_end_date
end

#sale_price_start_dateObject

Optional. Start date of the sale price window.



60
61
62
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 60

def sale_price_start_date
  @sale_price_start_date
end

#seller_nameObject

Merchant or seller display name. Max 70 characters.



168
169
170
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 168

def seller_name
  @seller_name
end

#seller_privacy_policyObject

Optional. URL to the seller's privacy policy page.



177
178
179
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 177

def seller_privacy_policy
  @seller_privacy_policy
end

#seller_tosObject

Optional. URL to the seller's terms of service page.



180
181
182
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 180

def seller_tos
  @seller_tos
end

#seller_urlObject

URL to the seller's storefront. Max 1000 characters.



171
172
173
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 171

def seller_url
  @seller_url
end

#shipping_priceObject

Optional. Shipping price for this product (e.g. "5.99 USD" or "Free").



183
184
185
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 183

def shipping_price
  @shipping_price
end

#sizeObject

Optional. Product size (e.g. "M", "42", "XL"). Max 20 characters. Used for variant filtering.



126
127
128
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 126

def size
  @size
end

#size_systemObject

Optional. Size standard used (e.g. "US", "EU", "UK", "AU").



129
130
131
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 129

def size_system
  @size_system
end

#star_ratingObject

Optional. Average star rating for this product (e.g. "4.5").



234
235
236
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 234

def star_rating
  @star_rating
end

#store_countryObject

ISO 3166-1 alpha-2 country code of the merchant's store. Max 2 characters.



252
253
254
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 252

def store_country
  @store_country
end

#store_review_countObject

Optional. Total number of store-level reviews.



237
238
239
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 237

def store_review_count
  @store_review_count
end

#store_star_ratingObject

Optional. Average star rating for the store (e.g. "4.8").



240
241
242
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 240

def store_star_rating
  @store_star_rating
end

#target_countriesObject

List of ISO 3166-1 alpha-3 country codes where this product is available.



249
250
251
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 249

def target_countries
  @target_countries
end

#titleObject

Product display name. Max 150 characters.



21
22
23
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 21

def title
  @title
end

#unit_pricing_measureObject

Optional. Unit measure for unit-priced items (e.g. "1kg", "750ml"). Used for per-unit price display.



66
67
68
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 66

def unit_pricing_measure
  @unit_pricing_measure
end

#urlObject

Canonical URL to the product page on your storefront. Max 1000 characters.



27
28
29
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 27

def url
  @url
end

#variant_dictObject

Optional. Key-value map of variant attribute names to values (e.g. color, size).



147
148
149
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 147

def variant_dict
  @variant_dict
end

#video_urlObject

Optional. URL to a product video. Must be HTTPS and publicly accessible.



36
37
38
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 36

def video_url
  @video_url
end

#warningObject

Optional. Safety or compliance warning text for the product (e.g. Prop 65, choking hazard).



222
223
224
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 222

def warning
  @warning
end

#warning_urlObject

Optional. URL to a detailed warning or compliance information page.



225
226
227
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 225

def warning_url
  @warning_url
end

#weightObject

Optional. Product weight (e.g. "1.2kg"). Max 100 characters.



99
100
101
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 99

def weight
  @weight
end

#widthObject

Optional. Product width.



108
109
110
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 108

def width
  @width
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 264

def self.attribute_map
  {
    :'item_id' => :'item_id',
    :'title' => :'title',
    :'description' => :'description',
    :'url' => :'url',
    :'image_url' => :'image_url',
    :'additional_image_urls' => :'additional_image_urls',
    :'video_url' => :'video_url',
    :'model_3d_url' => :'model_3d_url',
    :'availability' => :'availability',
    :'availability_date' => :'availability_date',
    :'expiration_date' => :'expiration_date',
    :'price' => :'price',
    :'currency' => :'currency',
    :'sale_price' => :'sale_price',
    :'sale_price_start_date' => :'sale_price_start_date',
    :'sale_price_end_date' => :'sale_price_end_date',
    :'unit_pricing_measure' => :'unit_pricing_measure',
    :'base_measure' => :'base_measure',
    :'pricing_trend' => :'pricing_trend',
    :'geo_price' => :'geo_price',
    :'geo_availability' => :'geo_availability',
    :'brand' => :'brand',
    :'gtin' => :'gtin',
    :'mpn' => :'mpn',
    :'product_category' => :'product_category',
    :'condition' => :'condition',
    :'material' => :'material',
    :'weight' => :'weight',
    :'dimensions' => :'dimensions',
    :'length' => :'length',
    :'width' => :'width',
    :'height' => :'height',
    :'dimensions_unit' => :'dimensions_unit',
    :'item_weight_unit' => :'item_weight_unit',
    :'age_group' => :'age_group',
    :'color' => :'color',
    :'size' => :'size',
    :'size_system' => :'size_system',
    :'gender' => :'gender',
    :'group_id' => :'group_id',
    :'listing_has_variations' => :'listing_has_variations',
    :'item_group_title' => :'item_group_title',
    :'offer_id' => :'offer_id',
    :'variant_dict' => :'variant_dict',
    :'custom_variant1_category' => :'custom_variant1_category',
    :'custom_variant1_option' => :'custom_variant1_option',
    :'custom_variant2_category' => :'custom_variant2_category',
    :'custom_variant2_option' => :'custom_variant2_option',
    :'custom_variant3_category' => :'custom_variant3_category',
    :'custom_variant3_option' => :'custom_variant3_option',
    :'seller_name' => :'seller_name',
    :'seller_url' => :'seller_url',
    :'marketplace_seller' => :'marketplace_seller',
    :'seller_privacy_policy' => :'seller_privacy_policy',
    :'seller_tos' => :'seller_tos',
    :'shipping_price' => :'shipping_price',
    :'delivery_estimate' => :'delivery_estimate',
    :'pickup_method' => :'pickup_method',
    :'pickup_sla' => :'pickup_sla',
    :'is_digital' => :'is_digital',
    :'return_policy' => :'return_policy',
    :'accepts_returns' => :'accepts_returns',
    :'return_deadline_in_days' => :'return_deadline_in_days',
    :'accepts_exchanges' => :'accepts_exchanges',
    :'is_eligible_search' => :'is_eligible_search',
    :'is_eligible_checkout' => :'is_eligible_checkout',
    :'popularity_score' => :'popularity_score',
    :'return_rate' => :'return_rate',
    :'warning' => :'warning',
    :'warning_url' => :'warning_url',
    :'age_restriction' => :'age_restriction',
    :'review_count' => :'review_count',
    :'star_rating' => :'star_rating',
    :'store_review_count' => :'store_review_count',
    :'store_star_rating' => :'store_star_rating',
    :'related_product_id' => :'related_product_id',
    :'relationship_type' => :'relationship_type',
    :'target_countries' => :'target_countries',
    :'store_country' => :'store_country',
    :'q_and_a' => :'q_and_a',
    :'qand_a' => :'qandA',
    :'reviews' => :'reviews'
  }
end

.json_mapObject

Attribute mapping from JSON key to ruby-style variable name.



352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 352

def self.json_map
  {
    :'item_id' => :'item_id',
    :'title' => :'title',
    :'description' => :'description',
    :'url' => :'url',
    :'image_url' => :'image_url',
    :'additional_image_urls' => :'additional_image_urls',
    :'video_url' => :'video_url',
    :'model_3d_url' => :'model_3d_url',
    :'availability' => :'availability',
    :'availability_date' => :'availability_date',
    :'expiration_date' => :'expiration_date',
    :'price' => :'price',
    :'currency' => :'currency',
    :'sale_price' => :'sale_price',
    :'sale_price_start_date' => :'sale_price_start_date',
    :'sale_price_end_date' => :'sale_price_end_date',
    :'unit_pricing_measure' => :'unit_pricing_measure',
    :'base_measure' => :'base_measure',
    :'pricing_trend' => :'pricing_trend',
    :'geo_price' => :'geo_price',
    :'geo_availability' => :'geo_availability',
    :'brand' => :'brand',
    :'gtin' => :'gtin',
    :'mpn' => :'mpn',
    :'product_category' => :'product_category',
    :'condition' => :'condition',
    :'material' => :'material',
    :'weight' => :'weight',
    :'dimensions' => :'dimensions',
    :'length' => :'length',
    :'width' => :'width',
    :'height' => :'height',
    :'dimensions_unit' => :'dimensions_unit',
    :'item_weight_unit' => :'item_weight_unit',
    :'age_group' => :'age_group',
    :'color' => :'color',
    :'size' => :'size',
    :'size_system' => :'size_system',
    :'gender' => :'gender',
    :'group_id' => :'group_id',
    :'listing_has_variations' => :'listing_has_variations',
    :'item_group_title' => :'item_group_title',
    :'offer_id' => :'offer_id',
    :'variant_dict' => :'variant_dict',
    :'custom_variant1_category' => :'custom_variant1_category',
    :'custom_variant1_option' => :'custom_variant1_option',
    :'custom_variant2_category' => :'custom_variant2_category',
    :'custom_variant2_option' => :'custom_variant2_option',
    :'custom_variant3_category' => :'custom_variant3_category',
    :'custom_variant3_option' => :'custom_variant3_option',
    :'seller_name' => :'seller_name',
    :'seller_url' => :'seller_url',
    :'marketplace_seller' => :'marketplace_seller',
    :'seller_privacy_policy' => :'seller_privacy_policy',
    :'seller_tos' => :'seller_tos',
    :'shipping_price' => :'shipping_price',
    :'delivery_estimate' => :'delivery_estimate',
    :'pickup_method' => :'pickup_method',
    :'pickup_sla' => :'pickup_sla',
    :'is_digital' => :'is_digital',
    :'return_policy' => :'return_policy',
    :'accepts_returns' => :'accepts_returns',
    :'return_deadline_in_days' => :'return_deadline_in_days',
    :'accepts_exchanges' => :'accepts_exchanges',
    :'is_eligible_search' => :'is_eligible_search',
    :'is_eligible_checkout' => :'is_eligible_checkout',
    :'popularity_score' => :'popularity_score',
    :'return_rate' => :'return_rate',
    :'warning' => :'warning',
    :'warning_url' => :'warning_url',
    :'age_restriction' => :'age_restriction',
    :'review_count' => :'review_count',
    :'star_rating' => :'star_rating',
    :'store_review_count' => :'store_review_count',
    :'store_star_rating' => :'store_star_rating',
    :'related_product_id' => :'related_product_id',
    :'relationship_type' => :'relationship_type',
    :'target_countries' => :'target_countries',
    :'store_country' => :'store_country',
    :'q_and_a' => :'q_and_a',
    :'qand_a' => :'qand_a',
    :'reviews' => :'reviews'
  }
end

.swagger_typesObject

Attribute type mapping.



440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 440

def self.swagger_types
  {
    :'item_id' => :'String',
    :'title' => :'String',
    :'description' => :'String',
    :'url' => :'String',
    :'image_url' => :'String',
    :'additional_image_urls' => :'String',
    :'video_url' => :'String',
    :'model_3d_url' => :'String',
    :'availability' => :'String',
    :'availability_date' => :'Date',
    :'expiration_date' => :'Date',
    :'price' => :'Float',
    :'currency' => :'String',
    :'sale_price' => :'Float',
    :'sale_price_start_date' => :'Date',
    :'sale_price_end_date' => :'Date',
    :'unit_pricing_measure' => :'String',
    :'base_measure' => :'String',
    :'pricing_trend' => :'String',
    :'geo_price' => :'String',
    :'geo_availability' => :'String',
    :'brand' => :'String',
    :'gtin' => :'String',
    :'mpn' => :'String',
    :'product_category' => :'String',
    :'condition' => :'String',
    :'material' => :'String',
    :'weight' => :'String',
    :'dimensions' => :'String',
    :'length' => :'String',
    :'width' => :'String',
    :'height' => :'String',
    :'dimensions_unit' => :'String',
    :'item_weight_unit' => :'String',
    :'age_group' => :'String',
    :'color' => :'String',
    :'size' => :'String',
    :'size_system' => :'String',
    :'gender' => :'String',
    :'group_id' => :'String',
    :'listing_has_variations' => :'BOOLEAN',
    :'item_group_title' => :'String',
    :'offer_id' => :'String',
    :'variant_dict' => :'Hash<String, String>',
    :'custom_variant1_category' => :'String',
    :'custom_variant1_option' => :'String',
    :'custom_variant2_category' => :'String',
    :'custom_variant2_option' => :'String',
    :'custom_variant3_category' => :'String',
    :'custom_variant3_option' => :'String',
    :'seller_name' => :'String',
    :'seller_url' => :'String',
    :'marketplace_seller' => :'String',
    :'seller_privacy_policy' => :'String',
    :'seller_tos' => :'String',
    :'shipping_price' => :'String',
    :'delivery_estimate' => :'Date',
    :'pickup_method' => :'String',
    :'pickup_sla' => :'String',
    :'is_digital' => :'BOOLEAN',
    :'return_policy' => :'String',
    :'accepts_returns' => :'BOOLEAN',
    :'return_deadline_in_days' => :'Integer',
    :'accepts_exchanges' => :'BOOLEAN',
    :'is_eligible_search' => :'BOOLEAN',
    :'is_eligible_checkout' => :'BOOLEAN',
    :'popularity_score' => :'Float',
    :'return_rate' => :'String',
    :'warning' => :'String',
    :'warning_url' => :'String',
    :'age_restriction' => :'Integer',
    :'review_count' => :'Integer',
    :'star_rating' => :'String',
    :'store_review_count' => :'Integer',
    :'store_star_rating' => :'String',
    :'related_product_id' => :'String',
    :'relationship_type' => :'String',
    :'target_countries' => :'Array<String>',
    :'store_country' => :'String',
    :'q_and_a' => :'Array<Hash<String, Object>>',
    :'qand_a' => :'Array<Hash<String, Object>>',
    :'reviews' => :'Array<Hash<String, Object>>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1165

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      item_id == o.item_id &&
      title == o.title &&
      description == o.description &&
      url == o.url &&
      image_url == o.image_url &&
      additional_image_urls == o.additional_image_urls &&
      video_url == o.video_url &&
      model_3d_url == o.model_3d_url &&
      availability == o.availability &&
      availability_date == o.availability_date &&
      expiration_date == o.expiration_date &&
      price == o.price &&
      currency == o.currency &&
      sale_price == o.sale_price &&
      sale_price_start_date == o.sale_price_start_date &&
      sale_price_end_date == o.sale_price_end_date &&
      unit_pricing_measure == o.unit_pricing_measure &&
      base_measure == o.base_measure &&
      pricing_trend == o.pricing_trend &&
      geo_price == o.geo_price &&
      geo_availability == o.geo_availability &&
      brand == o.brand &&
      gtin == o.gtin &&
      mpn == o.mpn &&
      product_category == o.product_category &&
      condition == o.condition &&
      material == o.material &&
      weight == o.weight &&
      dimensions == o.dimensions &&
      length == o.length &&
      width == o.width &&
      height == o.height &&
      dimensions_unit == o.dimensions_unit &&
      item_weight_unit == o.item_weight_unit &&
      age_group == o.age_group &&
      color == o.color &&
      size == o.size &&
      size_system == o.size_system &&
      gender == o.gender &&
      group_id == o.group_id &&
      listing_has_variations == o.listing_has_variations &&
      item_group_title == o.item_group_title &&
      offer_id == o.offer_id &&
      variant_dict == o.variant_dict &&
      custom_variant1_category == o.custom_variant1_category &&
      custom_variant1_option == o.custom_variant1_option &&
      custom_variant2_category == o.custom_variant2_category &&
      custom_variant2_option == o.custom_variant2_option &&
      custom_variant3_category == o.custom_variant3_category &&
      custom_variant3_option == o.custom_variant3_option &&
      seller_name == o.seller_name &&
      seller_url == o.seller_url &&
      marketplace_seller == o.marketplace_seller &&
      seller_privacy_policy == o.seller_privacy_policy &&
      seller_tos == o.seller_tos &&
      shipping_price == o.shipping_price &&
      delivery_estimate == o.delivery_estimate &&
      pickup_method == o.pickup_method &&
      pickup_sla == o.pickup_sla &&
      is_digital == o.is_digital &&
      return_policy == o.return_policy &&
      accepts_returns == o.accepts_returns &&
      return_deadline_in_days == o.return_deadline_in_days &&
      accepts_exchanges == o.accepts_exchanges &&
      is_eligible_search == o.is_eligible_search &&
      is_eligible_checkout == o.is_eligible_checkout &&
      popularity_score == o.popularity_score &&
      return_rate == o.return_rate &&
      warning == o.warning &&
      warning_url == o.warning_url &&
      age_restriction == o.age_restriction &&
      review_count == o.review_count &&
      star_rating == o.star_rating &&
      store_review_count == o.store_review_count &&
      store_star_rating == o.store_star_rating &&
      related_product_id == o.related_product_id &&
      relationship_type == o.relationship_type &&
      target_countries == o.target_countries &&
      store_country == o.store_country &&
      q_and_a == o.q_and_a &&
      qand_a == o.qand_a &&
      reviews == o.reviews
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1288

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = CyberSource.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1354

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1267

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


1254
1255
1256
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1254

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



1260
1261
1262
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1260

def hash
  [item_id, title, description, url, image_url, additional_image_urls, video_url, model_3d_url, availability, availability_date, expiration_date, price, currency, sale_price, sale_price_start_date, sale_price_end_date, unit_pricing_measure, base_measure, pricing_trend, geo_price, geo_availability, brand, gtin, mpn, product_category, condition, material, weight, dimensions, length, width, height, dimensions_unit, item_weight_unit, age_group, color, size, size_system, gender, group_id, listing_has_variations, item_group_title, offer_id, variant_dict, custom_variant1_category, custom_variant1_option, custom_variant2_category, custom_variant2_option, custom_variant3_category, custom_variant3_option, seller_name, seller_url, marketplace_seller, seller_privacy_policy, seller_tos, shipping_price, delivery_estimate, pickup_method, pickup_sla, is_digital, return_policy, accepts_returns, return_deadline_in_days, accepts_exchanges, is_eligible_search, is_eligible_checkout, popularity_score, return_rate, warning, warning_url, age_restriction, review_count, star_rating, store_review_count, store_star_rating, related_product_id, relationship_type, target_countries, store_country, q_and_a, qand_a, reviews].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 876

def list_invalid_properties
  invalid_properties = Array.new
  if @item_id.nil?
    invalid_properties.push('invalid value for "item_id", item_id cannot be nil.')
  end

  if @title.nil?
    invalid_properties.push('invalid value for "title", title cannot be nil.')
  end

  if @description.nil?
    invalid_properties.push('invalid value for "description", description cannot be nil.')
  end

  if @url.nil?
    invalid_properties.push('invalid value for "url", url cannot be nil.')
  end

  if @image_url.nil?
    invalid_properties.push('invalid value for "image_url", image_url cannot be nil.')
  end

  if @availability.nil?
    invalid_properties.push('invalid value for "availability", availability cannot be nil.')
  end

  if @price.nil?
    invalid_properties.push('invalid value for "price", price cannot be nil.')
  end

  if @currency.nil?
    invalid_properties.push('invalid value for "currency", currency cannot be nil.')
  end

  if @brand.nil?
    invalid_properties.push('invalid value for "brand", brand cannot be nil.')
  end

  if @group_id.nil?
    invalid_properties.push('invalid value for "group_id", group_id cannot be nil.')
  end

  if @listing_has_variations.nil?
    invalid_properties.push('invalid value for "listing_has_variations", listing_has_variations cannot be nil.')
  end

  if @seller_name.nil?
    invalid_properties.push('invalid value for "seller_name", seller_name cannot be nil.')
  end

  if @seller_url.nil?
    invalid_properties.push('invalid value for "seller_url", seller_url cannot be nil.')
  end

  if @return_policy.nil?
    invalid_properties.push('invalid value for "return_policy", return_policy cannot be nil.')
  end

  if @is_eligible_search.nil?
    invalid_properties.push('invalid value for "is_eligible_search", is_eligible_search cannot be nil.')
  end

  if @is_eligible_checkout.nil?
    invalid_properties.push('invalid value for "is_eligible_checkout", is_eligible_checkout cannot be nil.')
  end

  if @target_countries.nil?
    invalid_properties.push('invalid value for "target_countries", target_countries cannot be nil.')
  end

  if @store_country.nil?
    invalid_properties.push('invalid value for "store_country", store_country cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



1334
1335
1336
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1334

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



1340
1341
1342
1343
1344
1345
1346
1347
1348
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1340

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



1328
1329
1330
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 1328

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
# File 'lib/cybersource_rest_client/models/iccv1productsfeed_products.rb', line 955

def valid?
  return false if @item_id.nil?
  return false if @title.nil?
  return false if @description.nil?
  return false if @url.nil?
  return false if @image_url.nil?
  return false if @availability.nil?
  return false if @price.nil?
  return false if @currency.nil?
  return false if @brand.nil?
  return false if @group_id.nil?
  return false if @listing_has_variations.nil?
  return false if @seller_name.nil?
  return false if @seller_url.nil?
  return false if @return_policy.nil?
  return false if @is_eligible_search.nil?
  return false if @is_eligible_checkout.nil?
  return false if @target_countries.nil?
  return false if @store_country.nil?
  true
end