original_string: public function update($priceRuleId, DiscountCode &$discountCode)
      {
          $data = $discountCode->exportData();
          $endpoint = '/admin/price_rules/'.$priceRuleId.'/discount_codes/'.$discountCode->id.'.json';
          $response = $this->request($endpoint, 'PUT', array(
              'discount_code' => $data
          ));
          $discountCode->setData($response['discount_code']);
      }
code: public function update($priceRuleId, DiscountCode &$discountCode)
      {
          $data = $discountCode->exportData();
          $endpoint = '/admin/price_rules/'.$priceRuleId.'/discount_codes/'.$discountCode->id.'.json';
          $response = $this->request($endpoint, 'PUT', array(
              'discount_code' => $data
          ));
          $discountCode->setData($response['discount_code']);
      }
code_tokens: public function update ( $ priceRuleId , DiscountCode & $ discountCode ) { $ data = $ discountCode -> exportData ( ) ; $ endpoint = '/admin/price_rules/' . $ priceRuleId . '/discount_codes/' . $ discountCode -> id . '.json' ; $ response = $ this -> request ( $ endpoint , 'PUT' , array ( 'discount_code' => $ data ) ) ; $ discountCode -> setData ( $ response [ 'discount_code' ] ) ; }
docstring: Update a Discount Code
  @param  integer       $priceRuleId
  @param  DiscountCode $discountCode
  @return void
docstring_tokens: Update a Discount Code