@@ -61,6 +61,7 @@ class CardUpdatePayload
6161 * Postal/Zip Code of the card
6262 */
6363 protected $ _addressPostal ;
64+ protected $ _asDefault ;
6465
6566 public function hydrate ($ data )
6667 {
@@ -121,6 +122,10 @@ public function hydrate($data)
121122 {
122123 $ this ->_addressPostal = $ data ["addressPostal " ];
123124 }
125+ if (isset ($ data ["asDefault " ]))
126+ {
127+ $ this ->_asDefault = $ data ["asDefault " ];
128+ }
124129 return $ this ;
125130 }
126131
@@ -141,6 +146,7 @@ public function jsonSerialize()
141146 "addressState " => $ this ->_addressState ,
142147 "addressCountry " => $ this ->_addressCountry ,
143148 "addressPostal " => $ this ->_addressPostal ,
149+ "asDefault " => $ this ->_asDefault ,
144150 ];
145151 }
146152
@@ -483,4 +489,25 @@ public function getAddressPostal($default = null, $trim = true)
483489 $ value = $ this ->_addressPostal ?: $ default ;
484490 return $ trim ? Strings::ntrim ($ value ) : $ value ;
485491 }
492+
493+ /**
494+ * @param boolean $value
495+ *
496+ * @return $this
497+ */
498+ public function setAsDefault ($ value )
499+ {
500+ $ this ->_asDefault = $ value ;
501+ return $ this ;
502+ }
503+
504+ /**
505+ * @param bool $default
506+ *
507+ * @return boolean
508+ */
509+ public function isAsDefault ($ default = false )
510+ {
511+ return (bool )$ this ->_asDefault ?: $ default ;
512+ }
486513}
0 commit comments