Пример #1
0
 public function testGetRatesByService()
 {
     $rate1 = ShippingRate::getNewInstance($this->shippingService, 1.1, 1.2);
     $rate1->save();
     $rate2 = ShippingRate::getNewInstance($this->shippingService, 1.3, 1.4);
     $rate2->save();
     $rates = ShippingRate::getRecordSetByService($this->shippingService);
     $this->assertTrue($rate1 === $rates->get(0));
     $this->assertTrue($rate2 === $rates->get(1));
 }
Пример #2
0
 /**
  * Get active record set from current service
  *
  * @param boolean $loadReferencedRecords
  * @return ARSet
  */
 public function getRates($loadReferencedRecords = false)
 {
     return ShippingRate::getRecordSetByService($this, $loadReferencedRecords);
 }