コード例 #1
0
 /**
  * Builds a PushNotification object from the given JSON object
  * @param type $vo_json the JSON representation of the PushNotification
  * @return PushNotification a push notification object
  * @author Rob Kurst <*****@*****.**>
  */
 public static function buildFromJSON($vo_json)
 {
     $o_return = new PushNotification();
     if (array_key_exists("push_notification_type", $vo_json) && $vo_json["push_notification_type"] == "PING") {
         $o_return->setPING();
     }
     if (array_key_exists("push_notification_settlement_batch", $vo_json)) {
         $o_return->setSettlementBatch(SettlementBatch::buildFromJSON($vo_json["push_notification_settlement_batch"]));
     }
     if (array_key_exists("push_notification_bank_account_transaction", $vo_json)) {
         $o_return->setBankAccountTransaction(BankAccountTransaction::buildFromJSON($vo_json["push_notification_bank_account_transaction"]));
     }
     return $o_return;
 }
コード例 #2
0
 /**
  * Builds a PushNotification object from the given JSON object
  * @param type $vo_json the JSON representation of the PushNotification
  * @return PushNotification a push notification object
  * @author Rob Kurst <*****@*****.**>
  */
 public static function buildFromJSON($vo_json)
 {
     $o_return = new PushNotification();
     if (array_key_exists("push_notification_type", $vo_json) && $vo_json["push_notification_type"] == "PING") {
         $o_return->setPING();
     }
     if (array_key_exists("push_notification_type", $vo_json) && $vo_json["push_notification_type"] == "INCOMING CHARGEBACK") {
         if (array_key_exists("push_notification_chargeback", $vo_json)) {
             $o_return->setIncomingChargeback(Chargeback::buildFromJSON($vo_json["push_notification_chargeback"]));
         }
     }
     if (array_key_exists("push_notification_settlement_batch", $vo_json)) {
         $o_return->setSettlementBatch(SettlementBatch::buildFromJSON($vo_json["push_notification_settlement_batch"]));
     }
     if (array_key_exists("push_notification_bank_account_transaction", $vo_json)) {
         $o_return->setBankAccountTransaction(BankAccountTransaction::buildFromJSON($vo_json["push_notification_bank_account_transaction"]));
     }
     if (array_key_exists("push_notification_id", $vo_json)) {
         $o_return->setID($vo_json["push_notification_id"]);
     }
     return $o_return;
 }
コード例 #3
0
 public static function buildFromJSON($vo_json)
 {
     $o_settlement_batch = new SettlementBatch();
     if (array_key_exists("settlement_batch_bank_account_transaction_credit_amount", $vo_json)) {
         $o_settlement_batch->setBATCreditAmount($vo_json["settlement_batch_bank_account_transaction_credit_amount"]);
     }
     if (array_key_exists("settlement_batch_bank_account_transaction_credit_count", $vo_json)) {
         $o_settlement_batch->setBATCreditCount($vo_json["settlement_batch_bank_account_transaction_credit_count"]);
     }
     if (array_key_exists("settlement_batch_bank_account_transaction_debit_amount", $vo_json)) {
         $o_settlement_batch->setBATDebitAmount($vo_json["settlement_batch_bank_account_transaction_debit_amount"]);
     }
     if (array_key_exists("settlement_batch_bank_account_transaction_debit_count", $vo_json)) {
         $o_settlement_batch->setBATDebitCount($vo_json["settlement_batch_bank_account_transaction_debit_count"]);
     }
     if (array_key_exists("settlement_batch_bank_card_transaction_sale_amount", $vo_json)) {
         $o_settlement_batch->setBCTSaleAmount($vo_json["settlement_batch_bank_card_transaction_sale_amount"]);
     }
     if (array_key_exists("settlement_batch_bank_card_transaction_sale_count", $vo_json)) {
         $o_settlement_batch->setBCTSaleCount($vo_json["settlement_batch_bank_card_transaction_sale_count"]);
     }
     if (array_key_exists("settlement_batch_bank_card_transaction_credit_amount", $vo_json)) {
         $o_settlement_batch->setBCTCreditAmount($vo_json["settlement_batch_bank_card_transaction_credit_amount"]);
     }
     if (array_key_exists("settlement_batch_bank_card_transaction_credit_count", $vo_json)) {
         $o_settlement_batch->setBCTCreditCount($vo_json["settlement_batch_bank_card_transaction_credit_count"]);
     }
     if (array_key_exists("settlement_batch_bank_account_transaction_ids", $vo_json)) {
         $o_temp_bat_array = array($vo_json["settlement_batch_bank_account_transaction_ids"]);
         foreach ($o_temp_bat_array as $vn_bat_id) {
             $o_settlement_batch->addBankAccountTransactionID($vn_bat_id);
         }
     }
     if (array_key_exists("settlement_batch_bank_card_transaction_ids", $vo_json)) {
         $o_temp_bct_array = array($vo_json["settlement_batch_bank_card_transaction_ids"]);
         foreach ($o_temp_bct_array as $vn_bct_id) {
             $o_settlement_batch->addBankCardTransactionID($vn_bct_id);
         }
     }
     return $o_settlement_batch;
 }