Class: KlaviyoAPI::ProductBlockStyles
- Inherits:
-
Object
- Object
- KlaviyoAPI::ProductBlockStyles
- Defined in:
- lib/klaviyo-api-sdk/models/product_block_styles.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#block_background_color ⇒ Object
Returns the value of attribute block_background_color.
-
#block_padding_bottom ⇒ Object
Returns the value of attribute block_padding_bottom.
-
#block_padding_left ⇒ Object
Returns the value of attribute block_padding_left.
-
#block_padding_right ⇒ Object
Returns the value of attribute block_padding_right.
-
#block_padding_top ⇒ Object
Returns the value of attribute block_padding_top.
-
#button_alignment ⇒ Object
Text Alignment.
-
#button_background_color ⇒ Object
Returns the value of attribute button_background_color.
-
#button_border_color ⇒ Object
Returns the value of attribute button_border_color.
-
#button_border_radius ⇒ Object
Returns the value of attribute button_border_radius.
-
#button_border_style ⇒ Object
Border style.
-
#button_border_width ⇒ Object
Returns the value of attribute button_border_width.
-
#button_drop_shadow_color ⇒ Object
Returns the value of attribute button_drop_shadow_color.
-
#button_font_color ⇒ Object
Returns the value of attribute button_font_color.
-
#button_font_family ⇒ Object
Returns the value of attribute button_font_family.
-
#button_font_size ⇒ Object
Returns the value of attribute button_font_size.
-
#button_font_style ⇒ Object
Font style.
-
#button_font_weight ⇒ Object
Returns the value of attribute button_font_weight.
-
#button_letter_spacing ⇒ Object
Returns the value of attribute button_letter_spacing.
-
#button_padding_bottom ⇒ Object
Returns the value of attribute button_padding_bottom.
-
#button_padding_left ⇒ Object
Returns the value of attribute button_padding_left.
-
#button_padding_right ⇒ Object
Returns the value of attribute button_padding_right.
-
#button_padding_top ⇒ Object
Returns the value of attribute button_padding_top.
-
#button_text_decoration ⇒ Object
Returns the value of attribute button_text_decoration.
-
#description_font_color ⇒ Object
Returns the value of attribute description_font_color.
-
#description_font_family ⇒ Object
Returns the value of attribute description_font_family.
-
#description_font_size ⇒ Object
Returns the value of attribute description_font_size.
-
#description_font_style ⇒ Object
Font style.
-
#description_font_weight ⇒ Object
Returns the value of attribute description_font_weight.
-
#description_letter_spacing ⇒ Object
Returns the value of attribute description_letter_spacing.
-
#description_padding_bottom ⇒ Object
Returns the value of attribute description_padding_bottom.
-
#description_padding_top ⇒ Object
Returns the value of attribute description_padding_top.
-
#description_text_decoration ⇒ Object
Returns the value of attribute description_text_decoration.
-
#item_border_color ⇒ Object
Returns the value of attribute item_border_color.
-
#item_border_style ⇒ Object
Border style.
-
#item_border_width ⇒ Object
Returns the value of attribute item_border_width.
-
#item_max_height ⇒ Object
Returns the value of attribute item_max_height.
-
#item_padding_bottom ⇒ Object
Returns the value of attribute item_padding_bottom.
-
#item_padding_left ⇒ Object
Returns the value of attribute item_padding_left.
-
#item_padding_right ⇒ Object
Returns the value of attribute item_padding_right.
-
#item_padding_top ⇒ Object
Returns the value of attribute item_padding_top.
-
#item_text_alignment ⇒ Object
Text Alignment.
-
#layout ⇒ Object
Product layout options.
-
#num_columns ⇒ Object
Returns the value of attribute num_columns.
-
#num_rows ⇒ Object
Returns the value of attribute num_rows.
-
#original_price_font_color ⇒ Object
Returns the value of attribute original_price_font_color.
-
#original_price_font_family ⇒ Object
Returns the value of attribute original_price_font_family.
-
#original_price_font_size ⇒ Object
Returns the value of attribute original_price_font_size.
-
#original_price_font_style ⇒ Object
Font style.
-
#original_price_font_weight ⇒ Object
Returns the value of attribute original_price_font_weight.
-
#original_price_text_decoration ⇒ Object
Returns the value of attribute original_price_text_decoration.
-
#price_font_color ⇒ Object
Returns the value of attribute price_font_color.
-
#price_font_family ⇒ Object
Returns the value of attribute price_font_family.
-
#price_font_size ⇒ Object
Returns the value of attribute price_font_size.
-
#price_font_style ⇒ Object
Font style.
-
#price_font_weight ⇒ Object
Returns the value of attribute price_font_weight.
-
#price_letter_spacing ⇒ Object
Returns the value of attribute price_letter_spacing.
-
#price_padding_bottom ⇒ Object
Returns the value of attribute price_padding_bottom.
-
#price_padding_top ⇒ Object
Returns the value of attribute price_padding_top.
-
#price_text_decoration ⇒ Object
Returns the value of attribute price_text_decoration.
-
#rating_font_color ⇒ Object
Returns the value of attribute rating_font_color.
-
#rating_font_family ⇒ Object
Returns the value of attribute rating_font_family.
-
#rating_font_size ⇒ Object
Returns the value of attribute rating_font_size.
-
#rating_font_style ⇒ Object
Font style.
-
#rating_font_weight ⇒ Object
Returns the value of attribute rating_font_weight.
-
#rating_letter_spacing ⇒ Object
Returns the value of attribute rating_letter_spacing.
-
#rating_padding_bottom ⇒ Object
Returns the value of attribute rating_padding_bottom.
-
#rating_padding_top ⇒ Object
Returns the value of attribute rating_padding_top.
-
#rating_text_decoration ⇒ Object
Returns the value of attribute rating_text_decoration.
-
#stack_on_mobile ⇒ Object
Returns the value of attribute stack_on_mobile.
-
#title_font_color ⇒ Object
Returns the value of attribute title_font_color.
-
#title_font_family ⇒ Object
Returns the value of attribute title_font_family.
-
#title_font_size ⇒ Object
Returns the value of attribute title_font_size.
-
#title_font_style ⇒ Object
Font style.
-
#title_font_weight ⇒ Object
Returns the value of attribute title_font_weight.
-
#title_letter_spacing ⇒ Object
Returns the value of attribute title_letter_spacing.
-
#title_padding_bottom ⇒ Object
Returns the value of attribute title_padding_bottom.
-
#title_padding_top ⇒ Object
Returns the value of attribute title_padding_top.
-
#title_text_decoration ⇒ Object
Returns the value of attribute title_text_decoration.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ProductBlockStyles
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ProductBlockStyles
Initializes the object
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 526 527 528 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 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 465 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::ProductBlockStyles` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::ProductBlockStyles`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'block_background_color') self.block_background_color = attributes[:'block_background_color'] end if attributes.key?(:'block_padding_bottom') self.block_padding_bottom = attributes[:'block_padding_bottom'] end if attributes.key?(:'block_padding_left') self.block_padding_left = attributes[:'block_padding_left'] end if attributes.key?(:'block_padding_right') self.block_padding_right = attributes[:'block_padding_right'] end if attributes.key?(:'block_padding_top') self.block_padding_top = attributes[:'block_padding_top'] end if attributes.key?(:'button_alignment') self. = attributes[:'button_alignment'] end if attributes.key?(:'button_background_color') self. = attributes[:'button_background_color'] end if attributes.key?(:'button_border_color') self. = attributes[:'button_border_color'] end if attributes.key?(:'button_border_radius') self. = attributes[:'button_border_radius'] end if attributes.key?(:'button_border_style') self. = attributes[:'button_border_style'] end if attributes.key?(:'button_border_width') self. = attributes[:'button_border_width'] end if attributes.key?(:'button_drop_shadow_color') self. = attributes[:'button_drop_shadow_color'] end if attributes.key?(:'button_font_color') self. = attributes[:'button_font_color'] end if attributes.key?(:'button_font_family') self. = attributes[:'button_font_family'] end if attributes.key?(:'button_font_size') self. = attributes[:'button_font_size'] end if attributes.key?(:'button_font_style') self. = attributes[:'button_font_style'] end if attributes.key?(:'button_font_weight') self. = attributes[:'button_font_weight'] end if attributes.key?(:'button_letter_spacing') self. = attributes[:'button_letter_spacing'] end if attributes.key?(:'button_padding_bottom') self. = attributes[:'button_padding_bottom'] end if attributes.key?(:'button_padding_left') self. = attributes[:'button_padding_left'] end if attributes.key?(:'button_padding_right') self. = attributes[:'button_padding_right'] end if attributes.key?(:'button_padding_top') self. = attributes[:'button_padding_top'] end if attributes.key?(:'button_text_decoration') self. = attributes[:'button_text_decoration'] end if attributes.key?(:'description_font_color') self.description_font_color = attributes[:'description_font_color'] end if attributes.key?(:'description_font_family') self.description_font_family = attributes[:'description_font_family'] end if attributes.key?(:'description_font_size') self.description_font_size = attributes[:'description_font_size'] end if attributes.key?(:'description_font_style') self.description_font_style = attributes[:'description_font_style'] end if attributes.key?(:'description_font_weight') self.description_font_weight = attributes[:'description_font_weight'] end if attributes.key?(:'description_letter_spacing') self.description_letter_spacing = attributes[:'description_letter_spacing'] end if attributes.key?(:'description_padding_bottom') self.description_padding_bottom = attributes[:'description_padding_bottom'] end if attributes.key?(:'description_padding_top') self.description_padding_top = attributes[:'description_padding_top'] end if attributes.key?(:'description_text_decoration') self.description_text_decoration = attributes[:'description_text_decoration'] end if attributes.key?(:'item_border_color') self.item_border_color = attributes[:'item_border_color'] end if attributes.key?(:'item_border_style') self.item_border_style = attributes[:'item_border_style'] end if attributes.key?(:'item_border_width') self.item_border_width = attributes[:'item_border_width'] end if attributes.key?(:'item_max_height') self.item_max_height = attributes[:'item_max_height'] end if attributes.key?(:'item_padding_bottom') self.item_padding_bottom = attributes[:'item_padding_bottom'] end if attributes.key?(:'item_padding_left') self.item_padding_left = attributes[:'item_padding_left'] end if attributes.key?(:'item_padding_right') self.item_padding_right = attributes[:'item_padding_right'] end if attributes.key?(:'item_padding_top') self.item_padding_top = attributes[:'item_padding_top'] end if attributes.key?(:'item_text_alignment') self.item_text_alignment = attributes[:'item_text_alignment'] end if attributes.key?(:'layout') self.layout = attributes[:'layout'] end if attributes.key?(:'num_columns') self.num_columns = attributes[:'num_columns'] end if attributes.key?(:'num_rows') self.num_rows = attributes[:'num_rows'] end if attributes.key?(:'original_price_font_color') self.original_price_font_color = attributes[:'original_price_font_color'] end if attributes.key?(:'original_price_font_family') self.original_price_font_family = attributes[:'original_price_font_family'] end if attributes.key?(:'original_price_font_size') self.original_price_font_size = attributes[:'original_price_font_size'] end if attributes.key?(:'original_price_font_style') self.original_price_font_style = attributes[:'original_price_font_style'] end if attributes.key?(:'original_price_font_weight') self.original_price_font_weight = attributes[:'original_price_font_weight'] end if attributes.key?(:'original_price_text_decoration') self.original_price_text_decoration = attributes[:'original_price_text_decoration'] end if attributes.key?(:'price_font_color') self.price_font_color = attributes[:'price_font_color'] end if attributes.key?(:'price_font_family') self.price_font_family = attributes[:'price_font_family'] end if attributes.key?(:'price_font_size') self.price_font_size = attributes[:'price_font_size'] end if attributes.key?(:'price_font_style') self.price_font_style = attributes[:'price_font_style'] end if attributes.key?(:'price_font_weight') self.price_font_weight = attributes[:'price_font_weight'] end if attributes.key?(:'price_letter_spacing') self.price_letter_spacing = attributes[:'price_letter_spacing'] end if attributes.key?(:'price_padding_bottom') self.price_padding_bottom = attributes[:'price_padding_bottom'] end if attributes.key?(:'price_padding_top') self.price_padding_top = attributes[:'price_padding_top'] end if attributes.key?(:'price_text_decoration') self.price_text_decoration = attributes[:'price_text_decoration'] end if attributes.key?(:'rating_font_color') self. = attributes[:'rating_font_color'] end if attributes.key?(:'rating_font_family') self. = attributes[:'rating_font_family'] end if attributes.key?(:'rating_font_size') self. = attributes[:'rating_font_size'] end if attributes.key?(:'rating_font_style') self. = attributes[:'rating_font_style'] end if attributes.key?(:'rating_font_weight') self. = attributes[:'rating_font_weight'] end if attributes.key?(:'rating_letter_spacing') self. = attributes[:'rating_letter_spacing'] end if attributes.key?(:'rating_padding_bottom') self. = attributes[:'rating_padding_bottom'] end if attributes.key?(:'rating_padding_top') self. = attributes[:'rating_padding_top'] end if attributes.key?(:'rating_text_decoration') self. = attributes[:'rating_text_decoration'] end if attributes.key?(:'stack_on_mobile') self.stack_on_mobile = attributes[:'stack_on_mobile'] end if attributes.key?(:'title_font_color') self.title_font_color = attributes[:'title_font_color'] end if attributes.key?(:'title_font_family') self.title_font_family = attributes[:'title_font_family'] end if attributes.key?(:'title_font_size') self.title_font_size = attributes[:'title_font_size'] end if attributes.key?(:'title_font_style') self.title_font_style = attributes[:'title_font_style'] end if attributes.key?(:'title_font_weight') self.title_font_weight = attributes[:'title_font_weight'] end if attributes.key?(:'title_letter_spacing') self.title_letter_spacing = attributes[:'title_letter_spacing'] end if attributes.key?(:'title_padding_bottom') self.title_padding_bottom = attributes[:'title_padding_bottom'] end if attributes.key?(:'title_padding_top') self.title_padding_top = attributes[:'title_padding_top'] end if attributes.key?(:'title_text_decoration') self.title_text_decoration = attributes[:'title_text_decoration'] end end |
Instance Attribute Details
#block_background_color ⇒ Object
Returns the value of attribute block_background_color.
17 18 19 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 17 def block_background_color @block_background_color end |
#block_padding_bottom ⇒ Object
Returns the value of attribute block_padding_bottom.
19 20 21 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 19 def block_padding_bottom @block_padding_bottom end |
#block_padding_left ⇒ Object
Returns the value of attribute block_padding_left.
21 22 23 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 21 def block_padding_left @block_padding_left end |
#block_padding_right ⇒ Object
Returns the value of attribute block_padding_right.
23 24 25 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 23 def block_padding_right @block_padding_right end |
#block_padding_top ⇒ Object
Returns the value of attribute block_padding_top.
25 26 27 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 25 def block_padding_top @block_padding_top end |
#button_alignment ⇒ Object
Text Alignment.
28 29 30 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 28 def @button_alignment end |
#button_background_color ⇒ Object
Returns the value of attribute button_background_color.
30 31 32 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 30 def @button_background_color end |
#button_border_color ⇒ Object
Returns the value of attribute button_border_color.
32 33 34 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 32 def @button_border_color end |
#button_border_radius ⇒ Object
Returns the value of attribute button_border_radius.
34 35 36 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 34 def @button_border_radius end |
#button_border_style ⇒ Object
Border style.
37 38 39 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 37 def @button_border_style end |
#button_border_width ⇒ Object
Returns the value of attribute button_border_width.
39 40 41 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 39 def @button_border_width end |
#button_drop_shadow_color ⇒ Object
Returns the value of attribute button_drop_shadow_color.
41 42 43 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 41 def @button_drop_shadow_color end |
#button_font_color ⇒ Object
Returns the value of attribute button_font_color.
43 44 45 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 43 def @button_font_color end |
#button_font_family ⇒ Object
Returns the value of attribute button_font_family.
45 46 47 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 45 def @button_font_family end |
#button_font_size ⇒ Object
Returns the value of attribute button_font_size.
47 48 49 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 47 def @button_font_size end |
#button_font_style ⇒ Object
Font style.
50 51 52 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 50 def @button_font_style end |
#button_font_weight ⇒ Object
Returns the value of attribute button_font_weight.
52 53 54 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 52 def @button_font_weight end |
#button_letter_spacing ⇒ Object
Returns the value of attribute button_letter_spacing.
54 55 56 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 54 def @button_letter_spacing end |
#button_padding_bottom ⇒ Object
Returns the value of attribute button_padding_bottom.
56 57 58 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 56 def @button_padding_bottom end |
#button_padding_left ⇒ Object
Returns the value of attribute button_padding_left.
58 59 60 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 58 def @button_padding_left end |
#button_padding_right ⇒ Object
Returns the value of attribute button_padding_right.
60 61 62 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 60 def @button_padding_right end |
#button_padding_top ⇒ Object
Returns the value of attribute button_padding_top.
62 63 64 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 62 def @button_padding_top end |
#button_text_decoration ⇒ Object
Returns the value of attribute button_text_decoration.
64 65 66 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 64 def @button_text_decoration end |
#description_font_color ⇒ Object
Returns the value of attribute description_font_color.
66 67 68 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 66 def description_font_color @description_font_color end |
#description_font_family ⇒ Object
Returns the value of attribute description_font_family.
68 69 70 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 68 def description_font_family @description_font_family end |
#description_font_size ⇒ Object
Returns the value of attribute description_font_size.
70 71 72 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 70 def description_font_size @description_font_size end |
#description_font_style ⇒ Object
Font style.
73 74 75 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 73 def description_font_style @description_font_style end |
#description_font_weight ⇒ Object
Returns the value of attribute description_font_weight.
75 76 77 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 75 def description_font_weight @description_font_weight end |
#description_letter_spacing ⇒ Object
Returns the value of attribute description_letter_spacing.
77 78 79 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 77 def description_letter_spacing @description_letter_spacing end |
#description_padding_bottom ⇒ Object
Returns the value of attribute description_padding_bottom.
79 80 81 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 79 def description_padding_bottom @description_padding_bottom end |
#description_padding_top ⇒ Object
Returns the value of attribute description_padding_top.
81 82 83 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 81 def description_padding_top @description_padding_top end |
#description_text_decoration ⇒ Object
Returns the value of attribute description_text_decoration.
83 84 85 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 83 def description_text_decoration @description_text_decoration end |
#item_border_color ⇒ Object
Returns the value of attribute item_border_color.
85 86 87 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 85 def item_border_color @item_border_color end |
#item_border_style ⇒ Object
Border style.
88 89 90 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 88 def item_border_style @item_border_style end |
#item_border_width ⇒ Object
Returns the value of attribute item_border_width.
90 91 92 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 90 def item_border_width @item_border_width end |
#item_max_height ⇒ Object
Returns the value of attribute item_max_height.
92 93 94 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 92 def item_max_height @item_max_height end |
#item_padding_bottom ⇒ Object
Returns the value of attribute item_padding_bottom.
94 95 96 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 94 def item_padding_bottom @item_padding_bottom end |
#item_padding_left ⇒ Object
Returns the value of attribute item_padding_left.
96 97 98 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 96 def item_padding_left @item_padding_left end |
#item_padding_right ⇒ Object
Returns the value of attribute item_padding_right.
98 99 100 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 98 def item_padding_right @item_padding_right end |
#item_padding_top ⇒ Object
Returns the value of attribute item_padding_top.
100 101 102 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 100 def item_padding_top @item_padding_top end |
#item_text_alignment ⇒ Object
Text Alignment.
103 104 105 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 103 def item_text_alignment @item_text_alignment end |
#layout ⇒ Object
Product layout options.
106 107 108 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 106 def layout @layout end |
#num_columns ⇒ Object
Returns the value of attribute num_columns.
108 109 110 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 108 def num_columns @num_columns end |
#num_rows ⇒ Object
Returns the value of attribute num_rows.
110 111 112 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 110 def num_rows @num_rows end |
#original_price_font_color ⇒ Object
Returns the value of attribute original_price_font_color.
112 113 114 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 112 def original_price_font_color @original_price_font_color end |
#original_price_font_family ⇒ Object
Returns the value of attribute original_price_font_family.
114 115 116 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 114 def original_price_font_family @original_price_font_family end |
#original_price_font_size ⇒ Object
Returns the value of attribute original_price_font_size.
116 117 118 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 116 def original_price_font_size @original_price_font_size end |
#original_price_font_style ⇒ Object
Font style.
119 120 121 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 119 def original_price_font_style @original_price_font_style end |
#original_price_font_weight ⇒ Object
Returns the value of attribute original_price_font_weight.
121 122 123 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 121 def original_price_font_weight @original_price_font_weight end |
#original_price_text_decoration ⇒ Object
Returns the value of attribute original_price_text_decoration.
123 124 125 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 123 def original_price_text_decoration @original_price_text_decoration end |
#price_font_color ⇒ Object
Returns the value of attribute price_font_color.
125 126 127 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 125 def price_font_color @price_font_color end |
#price_font_family ⇒ Object
Returns the value of attribute price_font_family.
127 128 129 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 127 def price_font_family @price_font_family end |
#price_font_size ⇒ Object
Returns the value of attribute price_font_size.
129 130 131 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 129 def price_font_size @price_font_size end |
#price_font_style ⇒ Object
Font style.
132 133 134 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 132 def price_font_style @price_font_style end |
#price_font_weight ⇒ Object
Returns the value of attribute price_font_weight.
134 135 136 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 134 def price_font_weight @price_font_weight end |
#price_letter_spacing ⇒ Object
Returns the value of attribute price_letter_spacing.
136 137 138 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 136 def price_letter_spacing @price_letter_spacing end |
#price_padding_bottom ⇒ Object
Returns the value of attribute price_padding_bottom.
138 139 140 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 138 def price_padding_bottom @price_padding_bottom end |
#price_padding_top ⇒ Object
Returns the value of attribute price_padding_top.
140 141 142 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 140 def price_padding_top @price_padding_top end |
#price_text_decoration ⇒ Object
Returns the value of attribute price_text_decoration.
142 143 144 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 142 def price_text_decoration @price_text_decoration end |
#rating_font_color ⇒ Object
Returns the value of attribute rating_font_color.
144 145 146 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 144 def @rating_font_color end |
#rating_font_family ⇒ Object
Returns the value of attribute rating_font_family.
146 147 148 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 146 def @rating_font_family end |
#rating_font_size ⇒ Object
Returns the value of attribute rating_font_size.
148 149 150 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 148 def @rating_font_size end |
#rating_font_style ⇒ Object
Font style.
151 152 153 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 151 def @rating_font_style end |
#rating_font_weight ⇒ Object
Returns the value of attribute rating_font_weight.
153 154 155 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 153 def @rating_font_weight end |
#rating_letter_spacing ⇒ Object
Returns the value of attribute rating_letter_spacing.
155 156 157 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 155 def @rating_letter_spacing end |
#rating_padding_bottom ⇒ Object
Returns the value of attribute rating_padding_bottom.
157 158 159 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 157 def @rating_padding_bottom end |
#rating_padding_top ⇒ Object
Returns the value of attribute rating_padding_top.
159 160 161 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 159 def @rating_padding_top end |
#rating_text_decoration ⇒ Object
Returns the value of attribute rating_text_decoration.
161 162 163 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 161 def @rating_text_decoration end |
#stack_on_mobile ⇒ Object
Returns the value of attribute stack_on_mobile.
163 164 165 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 163 def stack_on_mobile @stack_on_mobile end |
#title_font_color ⇒ Object
Returns the value of attribute title_font_color.
165 166 167 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 165 def title_font_color @title_font_color end |
#title_font_family ⇒ Object
Returns the value of attribute title_font_family.
167 168 169 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 167 def title_font_family @title_font_family end |
#title_font_size ⇒ Object
Returns the value of attribute title_font_size.
169 170 171 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 169 def title_font_size @title_font_size end |
#title_font_style ⇒ Object
Font style.
172 173 174 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 172 def title_font_style @title_font_style end |
#title_font_weight ⇒ Object
Returns the value of attribute title_font_weight.
174 175 176 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 174 def title_font_weight @title_font_weight end |
#title_letter_spacing ⇒ Object
Returns the value of attribute title_letter_spacing.
176 177 178 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 176 def title_letter_spacing @title_letter_spacing end |
#title_padding_bottom ⇒ Object
Returns the value of attribute title_padding_bottom.
178 179 180 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 178 def title_padding_bottom @title_padding_bottom end |
#title_padding_top ⇒ Object
Returns the value of attribute title_padding_top.
180 181 182 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 180 def title_padding_top @title_padding_top end |
#title_text_decoration ⇒ Object
Returns the value of attribute title_text_decoration.
182 183 184 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 182 def title_text_decoration @title_text_decoration end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
291 292 293 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 291 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 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 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 207 def self.attribute_map { :'block_background_color' => :'block_background_color', :'block_padding_bottom' => :'block_padding_bottom', :'block_padding_left' => :'block_padding_left', :'block_padding_right' => :'block_padding_right', :'block_padding_top' => :'block_padding_top', :'button_alignment' => :'button_alignment', :'button_background_color' => :'button_background_color', :'button_border_color' => :'button_border_color', :'button_border_radius' => :'button_border_radius', :'button_border_style' => :'button_border_style', :'button_border_width' => :'button_border_width', :'button_drop_shadow_color' => :'button_drop_shadow_color', :'button_font_color' => :'button_font_color', :'button_font_family' => :'button_font_family', :'button_font_size' => :'button_font_size', :'button_font_style' => :'button_font_style', :'button_font_weight' => :'button_font_weight', :'button_letter_spacing' => :'button_letter_spacing', :'button_padding_bottom' => :'button_padding_bottom', :'button_padding_left' => :'button_padding_left', :'button_padding_right' => :'button_padding_right', :'button_padding_top' => :'button_padding_top', :'button_text_decoration' => :'button_text_decoration', :'description_font_color' => :'description_font_color', :'description_font_family' => :'description_font_family', :'description_font_size' => :'description_font_size', :'description_font_style' => :'description_font_style', :'description_font_weight' => :'description_font_weight', :'description_letter_spacing' => :'description_letter_spacing', :'description_padding_bottom' => :'description_padding_bottom', :'description_padding_top' => :'description_padding_top', :'description_text_decoration' => :'description_text_decoration', :'item_border_color' => :'item_border_color', :'item_border_style' => :'item_border_style', :'item_border_width' => :'item_border_width', :'item_max_height' => :'item_max_height', :'item_padding_bottom' => :'item_padding_bottom', :'item_padding_left' => :'item_padding_left', :'item_padding_right' => :'item_padding_right', :'item_padding_top' => :'item_padding_top', :'item_text_alignment' => :'item_text_alignment', :'layout' => :'layout', :'num_columns' => :'num_columns', :'num_rows' => :'num_rows', :'original_price_font_color' => :'original_price_font_color', :'original_price_font_family' => :'original_price_font_family', :'original_price_font_size' => :'original_price_font_size', :'original_price_font_style' => :'original_price_font_style', :'original_price_font_weight' => :'original_price_font_weight', :'original_price_text_decoration' => :'original_price_text_decoration', :'price_font_color' => :'price_font_color', :'price_font_family' => :'price_font_family', :'price_font_size' => :'price_font_size', :'price_font_style' => :'price_font_style', :'price_font_weight' => :'price_font_weight', :'price_letter_spacing' => :'price_letter_spacing', :'price_padding_bottom' => :'price_padding_bottom', :'price_padding_top' => :'price_padding_top', :'price_text_decoration' => :'price_text_decoration', :'rating_font_color' => :'rating_font_color', :'rating_font_family' => :'rating_font_family', :'rating_font_size' => :'rating_font_size', :'rating_font_style' => :'rating_font_style', :'rating_font_weight' => :'rating_font_weight', :'rating_letter_spacing' => :'rating_letter_spacing', :'rating_padding_bottom' => :'rating_padding_bottom', :'rating_padding_top' => :'rating_padding_top', :'rating_text_decoration' => :'rating_text_decoration', :'stack_on_mobile' => :'stack_on_mobile', :'title_font_color' => :'title_font_color', :'title_font_family' => :'title_font_family', :'title_font_size' => :'title_font_size', :'title_font_style' => :'title_font_style', :'title_font_weight' => :'title_font_weight', :'title_letter_spacing' => :'title_letter_spacing', :'title_padding_bottom' => :'title_padding_bottom', :'title_padding_top' => :'title_padding_top', :'title_text_decoration' => :'title_text_decoration' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
1036 1037 1038 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1036 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
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 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 380 def self.openapi_nullable Set.new([ :'block_background_color', :'block_padding_bottom', :'block_padding_left', :'block_padding_right', :'block_padding_top', :'button_alignment', :'button_background_color', :'button_border_color', :'button_border_radius', :'button_border_style', :'button_border_width', :'button_drop_shadow_color', :'button_font_color', :'button_font_family', :'button_font_size', :'button_font_style', :'button_font_weight', :'button_letter_spacing', :'button_padding_bottom', :'button_padding_left', :'button_padding_right', :'button_padding_top', :'button_text_decoration', :'description_font_color', :'description_font_family', :'description_font_size', :'description_font_style', :'description_font_weight', :'description_letter_spacing', :'description_padding_bottom', :'description_padding_top', :'description_text_decoration', :'item_border_color', :'item_border_style', :'item_border_width', :'item_max_height', :'item_padding_bottom', :'item_padding_left', :'item_padding_right', :'item_padding_top', :'item_text_alignment', :'layout', :'num_columns', :'num_rows', :'original_price_font_color', :'original_price_font_family', :'original_price_font_size', :'original_price_font_style', :'original_price_font_weight', :'original_price_text_decoration', :'price_font_color', :'price_font_family', :'price_font_size', :'price_font_style', :'price_font_weight', :'price_letter_spacing', :'price_padding_bottom', :'price_padding_top', :'price_text_decoration', :'rating_font_color', :'rating_font_family', :'rating_font_size', :'rating_font_style', :'rating_font_weight', :'rating_letter_spacing', :'rating_padding_bottom', :'rating_padding_top', :'rating_text_decoration', :'stack_on_mobile', :'title_font_color', :'title_font_family', :'title_font_size', :'title_font_style', :'title_font_weight', :'title_letter_spacing', :'title_padding_bottom', :'title_padding_top', :'title_text_decoration' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 350 351 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 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 296 def self.openapi_types { :'block_background_color' => :'String', :'block_padding_bottom' => :'Integer', :'block_padding_left' => :'Integer', :'block_padding_right' => :'Integer', :'block_padding_top' => :'Integer', :'button_alignment' => :'String', :'button_background_color' => :'String', :'button_border_color' => :'String', :'button_border_radius' => :'Integer', :'button_border_style' => :'String', :'button_border_width' => :'Integer', :'button_drop_shadow_color' => :'String', :'button_font_color' => :'String', :'button_font_family' => :'String', :'button_font_size' => :'Integer', :'button_font_style' => :'String', :'button_font_weight' => :'String', :'button_letter_spacing' => :'Integer', :'button_padding_bottom' => :'Integer', :'button_padding_left' => :'Integer', :'button_padding_right' => :'Integer', :'button_padding_top' => :'Integer', :'button_text_decoration' => :'String', :'description_font_color' => :'String', :'description_font_family' => :'String', :'description_font_size' => :'Integer', :'description_font_style' => :'String', :'description_font_weight' => :'String', :'description_letter_spacing' => :'Integer', :'description_padding_bottom' => :'Integer', :'description_padding_top' => :'Integer', :'description_text_decoration' => :'String', :'item_border_color' => :'String', :'item_border_style' => :'String', :'item_border_width' => :'Integer', :'item_max_height' => :'Integer', :'item_padding_bottom' => :'Integer', :'item_padding_left' => :'Integer', :'item_padding_right' => :'Integer', :'item_padding_top' => :'Integer', :'item_text_alignment' => :'String', :'layout' => :'String', :'num_columns' => :'Integer', :'num_rows' => :'Integer', :'original_price_font_color' => :'String', :'original_price_font_family' => :'String', :'original_price_font_size' => :'Integer', :'original_price_font_style' => :'String', :'original_price_font_weight' => :'String', :'original_price_text_decoration' => :'String', :'price_font_color' => :'String', :'price_font_family' => :'String', :'price_font_size' => :'Integer', :'price_font_style' => :'String', :'price_font_weight' => :'String', :'price_letter_spacing' => :'Integer', :'price_padding_bottom' => :'Integer', :'price_padding_top' => :'Integer', :'price_text_decoration' => :'String', :'rating_font_color' => :'String', :'rating_font_family' => :'String', :'rating_font_size' => :'Integer', :'rating_font_style' => :'String', :'rating_font_weight' => :'String', :'rating_letter_spacing' => :'Integer', :'rating_padding_bottom' => :'Integer', :'rating_padding_top' => :'Integer', :'rating_text_decoration' => :'String', :'stack_on_mobile' => :'Boolean', :'title_font_color' => :'String', :'title_font_family' => :'String', :'title_font_size' => :'Integer', :'title_font_style' => :'String', :'title_font_weight' => :'String', :'title_letter_spacing' => :'Integer', :'title_padding_bottom' => :'Integer', :'title_padding_top' => :'Integer', :'title_text_decoration' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 938 def ==(o) return true if self.equal?(o) self.class == o.class && block_background_color == o.block_background_color && block_padding_bottom == o.block_padding_bottom && block_padding_left == o.block_padding_left && block_padding_right == o.block_padding_right && block_padding_top == o.block_padding_top && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && description_font_color == o.description_font_color && description_font_family == o.description_font_family && description_font_size == o.description_font_size && description_font_style == o.description_font_style && description_font_weight == o.description_font_weight && description_letter_spacing == o.description_letter_spacing && description_padding_bottom == o.description_padding_bottom && description_padding_top == o.description_padding_top && description_text_decoration == o.description_text_decoration && item_border_color == o.item_border_color && item_border_style == o.item_border_style && item_border_width == o.item_border_width && item_max_height == o.item_max_height && item_padding_bottom == o.item_padding_bottom && item_padding_left == o.item_padding_left && item_padding_right == o.item_padding_right && item_padding_top == o.item_padding_top && item_text_alignment == o.item_text_alignment && layout == o.layout && num_columns == o.num_columns && num_rows == o.num_rows && original_price_font_color == o.original_price_font_color && original_price_font_family == o.original_price_font_family && original_price_font_size == o.original_price_font_size && original_price_font_style == o.original_price_font_style && original_price_font_weight == o.original_price_font_weight && original_price_text_decoration == o.original_price_text_decoration && price_font_color == o.price_font_color && price_font_family == o.price_font_family && price_font_size == o.price_font_size && price_font_style == o.price_font_style && price_font_weight == o.price_font_weight && price_letter_spacing == o.price_letter_spacing && price_padding_bottom == o.price_padding_bottom && price_padding_top == o.price_padding_top && price_text_decoration == o.price_text_decoration && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && == o. && stack_on_mobile == o.stack_on_mobile && title_font_color == o.title_font_color && title_font_family == o.title_font_family && title_font_size == o.title_font_size && title_font_style == o.title_font_style && title_font_weight == o.title_font_weight && title_letter_spacing == o.title_letter_spacing && title_padding_bottom == o.title_padding_bottom && title_padding_top == o.title_padding_top && title_text_decoration == o.title_text_decoration end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1067 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = KlaviyoAPI.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1138 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
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1043 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
1023 1024 1025 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1023 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
1029 1030 1031 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1029 def hash [block_background_color, block_padding_bottom, block_padding_left, block_padding_right, block_padding_top, , , , , , , , , , , , , , , , , , , description_font_color, description_font_family, description_font_size, description_font_style, description_font_weight, description_letter_spacing, description_padding_bottom, description_padding_top, description_text_decoration, item_border_color, item_border_style, item_border_width, item_max_height, item_padding_bottom, item_padding_left, item_padding_right, item_padding_top, item_text_alignment, layout, num_columns, num_rows, original_price_font_color, original_price_font_family, original_price_font_size, original_price_font_style, original_price_font_weight, original_price_text_decoration, price_font_color, price_font_family, price_font_size, price_font_style, price_font_weight, price_letter_spacing, price_padding_bottom, price_padding_top, price_text_decoration, , , , , , , , , , stack_on_mobile, title_font_color, title_font_family, title_font_size, title_font_style, title_font_weight, title_letter_spacing, title_padding_bottom, title_padding_top, title_text_decoration].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
793 794 795 796 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 793 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
1114 1115 1116 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1114 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1120 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
1108 1109 1110 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 1108 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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 |
# File 'lib/klaviyo-api-sdk/models/product_block_styles.rb', line 800 def valid? = EnumAttributeValidator.new('String', ["center", "left", "right"]) return false unless .valid?(@button_alignment) = EnumAttributeValidator.new('String', ["dashed", "dotted", "groove", "inset", "none", "outset", "ridge", "solid"]) return false unless .valid?(@button_border_style) = EnumAttributeValidator.new('String', ["italic", "normal"]) return false unless .valid?(@button_font_style) description_font_style_validator = EnumAttributeValidator.new('String', ["italic", "normal"]) return false unless description_font_style_validator.valid?(@description_font_style) item_border_style_validator = EnumAttributeValidator.new('String', ["dashed", "dotted", "groove", "inset", "none", "outset", "ridge", "solid"]) return false unless item_border_style_validator.valid?(@item_border_style) item_text_alignment_validator = EnumAttributeValidator.new('String', ["center", "left", "right"]) return false unless item_text_alignment_validator.valid?(@item_text_alignment) layout_validator = EnumAttributeValidator.new('String', ["horizontal", "vertical-left-image", "vertical-right-image"]) return false unless layout_validator.valid?(@layout) original_price_font_style_validator = EnumAttributeValidator.new('String', ["italic", "normal"]) return false unless original_price_font_style_validator.valid?(@original_price_font_style) price_font_style_validator = EnumAttributeValidator.new('String', ["italic", "normal"]) return false unless price_font_style_validator.valid?(@price_font_style) = EnumAttributeValidator.new('String', ["italic", "normal"]) return false unless .valid?(@rating_font_style) title_font_style_validator = EnumAttributeValidator.new('String', ["italic", "normal"]) return false unless title_font_style_validator.valid?(@title_font_style) true end |