本文整理汇总了PHP中Address::buildFromJSON方法的典型用法代码示例。如果您正苦于以下问题:PHP Address::buildFromJSON方法的具体用法?PHP Address::buildFromJSON怎么用?PHP Address::buildFromJSON使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Address
的用法示例。
在下文中一共展示了Address::buildFromJSON方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildFromJSON
/**
* Creates a BankCard PHP object from the passed in JSON Object
*
* @param type $o_data The json representation of the object to be built.
* @return A BankCard object with fields based on the input json object.
* @author Ryan Murphy <ryan.murphy@basecommerce.com>
* @author Steven Wright <steven.wright@basecommerce.com>
*/
static function buildFromJSON($o_data)
{
$o_instance = new BankCard();
if (array_key_exists('bank_card_name', $o_data)) {
$o_instance->setName($o_data['bank_card_name']);
}
if (array_key_exists('bank_card_number', $o_data)) {
$o_instance->setNumber($o_data['bank_card_number']);
}
if (array_key_exists('bank_card_token', $o_data)) {
$o_instance->setToken($o_data['bank_card_token']);
}
if (array_key_exists('bank_card_expiration_month', $o_data)) {
$o_instance->setExpirationMonth($o_data['bank_card_expiration_month']);
}
if (array_key_exists('bank_card_expiration_year', $o_data)) {
$o_instance->setExpirationYear($o_data['bank_card_expiration_year']);
}
if (array_key_exists('bank_card_billing_address', $o_data)) {
$o_instance->setBillingAddress(Address::buildFromJSON($o_data['bank_card_billing_address']));
}
if (array_key_exists('bank_card_creation_date', $o_data)) {
$o_instance->setCreationDate(date("m/d/Y H:i:s", strtotime($o_data["bank_card_creation_date"])));
}
if (array_key_exists('bank_card_last_used_date', $o_data)) {
$o_instance->setLastUsedDate(date("m/d/Y H:i:s", strtotime($o_data["bank_card_last_used_date"])));
}
if (array_key_exists('bank_card_status', $o_data)) {
if (gettype($o_data['bank_card_status']) === "array") {
$o_status = (array) $o_data['bank_card_status'];
if (array_key_exists('bank_card_status_name', $o_status)) {
$o_instance->setStatus($o_status['bank_card_status_name']);
}
} else {
$o_instance->setStatus($o_data['bank_card_status']);
}
}
if (array_key_exists('bank_card_alias', $o_data)) {
$o_instance->setAlias($o_data['bank_card_alias']);
}
return $o_instance;
}
示例2: buildFromJSON
/**
* Constructs and returns a BankCardTransaction object from a given JSONObject.
*
* @param o_json json containing the BankCardTransaction type
* @return the newly created bank card transaction
* @author Ryan Murphy <steven.wright@basecommerce.com>
* @author Steven Wright <steven.wright@basecommerce.com>
* @author Rob Kurst <rob.kurst@basecommerce.com>
*/
static function buildFromJSON($vo_json)
{
$o_bct = new BankCardTransaction();
if (array_key_exists('bank_card_transaction_billing_address', $vo_json)) {
$o_bct->setBillingAddress(Address::buildFromJSON($vo_json['bank_card_transaction_billing_address']));
}
if (array_key_exists('bank_card_transaction_name', $vo_json)) {
$o_bct->setCardName($vo_json['bank_card_transaction_name']);
}
if (array_key_exists('token', $vo_json)) {
$o_bct->setToken($vo_json['token']);
}
if (array_key_exists('bank_card_transaction_card_number', $vo_json)) {
$o_bct->setCardNumber($vo_json['bank_card_transaction_card_number']);
}
if (array_key_exists('bank_card_transaction_expiration_month', $vo_json)) {
$o_bct->setCardExpirationMonth($vo_json['bank_card_transaction_expiration_month']);
}
if (array_key_exists('bank_card_transaction_expiration_year', $vo_json)) {
$o_bct->setCardExpirationYear($vo_json['bank_card_transaction_expiration_year']);
}
if (array_key_exists('bank_card_transaction_billing_address', $vo_json)) {
$o_bct->setBillingAddress(Address::buildFromJSON($vo_json['bank_card_transaction_billing_address']));
}
if (array_key_exists('bank_card_transaction_type', $vo_json)) {
if (gettype($vo_json['bank_card_transaction_type']) === "array") {
$o_type = (array) $vo_json['bank_card_transaction_type'];
if (array_key_exists('bank_card_transaction_type_name', $o_type)) {
$o_bct->setType($o_type['bank_card_transaction_type_name']);
}
} else {
$o_bct->setType($vo_json['bank_card_transaction_type']);
}
}
if (array_key_exists('bank_card_transaction_po_number', $vo_json)) {
$o_bct->setPONumber($vo_json['bank_card_transaction_po_number']);
}
if (array_key_exists('bank_card_transaction_amount', $vo_json)) {
$o_bct->setAmount($vo_json['bank_card_transaction_amount']);
}
if (array_key_exists('bank_card_transaction_tax_amount', $vo_json)) {
$o_bct->setTaxAmount($vo_json['bank_card_transaction_tax_amount']);
}
if (array_key_exists('bank_card_transaction_tip_amount', $vo_json)) {
$o_bct->setTipAmount($vo_json['bank_card_transaction_tip_amount']);
}
if (array_key_exists('bank_card_transaction_ip_address', $vo_json)) {
$o_bct->setIPAddress($vo_json['bank_card_transaction_ip_address']);
}
if (array_key_exists('bank_card_transaction_merchant_transaction_id', $vo_json)) {
$o_bct->setMerchantTransactionID($vo_json['bank_card_transaction_merchant_transaction_id']);
}
if (array_key_exists('bank_card_transaction_status', $vo_json)) {
if (gettype($vo_json['bank_card_transaction_status']) === "array") {
$o_status = (array) $vo_json['bank_card_transaction_status'];
if (array_key_exists('bank_card_transaction_status_name', $o_status)) {
$o_bct->setStatus($o_status['bank_card_transaction_status_name']);
}
} else {
$o_bct->setStatus($vo_json['bank_card_transaction_status']);
}
}
if (array_key_exists('bank_card_transction_check_secure_code', $vo_json)) {
$o_bct->setCheckSecureCode($vo_json['bank_card_transction_check_secure_code']);
}
if (array_key_exists('bank_card_transaction_response_message', $vo_json)) {
$o_bct->setResponseMessage($vo_json['bank_card_transaction_response_message']);
}
if (array_key_exists('bank_card_transaction_response_code', $vo_json)) {
$o_bct->setResponseCode($vo_json['bank_card_transaction_response_code']);
}
if (array_key_exists('bank_card_transaction_avs_response_code', $vo_json)) {
$o_bct->setAVSResponseCode($vo_json['bank_card_transaction_avs_response_code']);
}
if (array_key_exists('bank_card_transaction_cvv_response_code', $vo_json)) {
$o_bct->setCVVResponseCode($vo_json['bank_card_transaction_cvv_response_code']);
}
if (array_key_exists('bank_card_transaction_card_cvv2', $vo_json)) {
$o_bct->setCardCVV2($vo_json['bank_card_transaction_card_cvv2']);
}
if (array_key_exists('bank_card_transaction_authorization_code', $vo_json)) {
$o_bct->setAuthorizationCode($vo_json['bank_card_transaction_authorization_code']);
}
if (array_key_exists('bank_card_transaction_id', $vo_json)) {
$o_bct->setTransactionID($vo_json['bank_card_transaction_id']);
}
if (array_key_exists('bank_card_transaction_verify_complete_url', $vo_json)) {
$o_bct->setVerifyCompleteURL($vo_json['bank_card_transaction_verify_complete_url']);
}
if (array_key_exists('bank_card_transaction_verify_url', $vo_json)) {
$o_bct->setVerifyURL($vo_json['bank_card_transaction_verify_url']);
//.........这里部分代码省略.........
示例3: buildFromJSON
/**
* Builds a BankAccount PHP object from the passed in json object.
*
* @param $vo_json - The json representation of the object to be built.
* @return A BankAccount object with fields based on the input json object.
* @author Ryan Murphy <ryan.murphy@basecommerce.com>
* @author Steven Wright <steven.wright@basecommerce.com>
*/
static function buildFromJSON($vo_json)
{
$o_bank_account = new BankAccount();
if (array_key_exists("bank_account_name", $vo_json)) {
$o_bank_account->setName($vo_json["bank_account_name"]);
}
if (array_key_exists("bank_account_alias", $vo_json)) {
$o_bank_account->setAlias($vo_json["bank_account_alias"]);
}
if (array_key_exists("bank_account_account_number", $vo_json)) {
$o_bank_account->setAccountNumber($vo_json["bank_account_account_number"]);
}
if (array_key_exists("bank_account_routing_number", $vo_json)) {
$o_bank_account->setRoutingNumber($vo_json["bank_account_routing_number"]);
}
if (array_key_exists("bank_account_token", $vo_json)) {
$o_bank_account->setToken($vo_json["bank_account_token"]);
}
if (array_key_exists("bank_account_billing_address", $vo_json)) {
$o_bank_account->setBillingAddress(Address::buildFromJSON($vo_json["bank_account_billing_address"]));
}
if (array_key_exists('bank_account_status', $vo_json)) {
if (gettype($vo_json['bank_account_status']) === "array ") {
$o_status = (array) $vo_json['bank_account_status'];
if (array_key_exists('bank_account_status_name', $o_status)) {
$o_bank_account->setStatus($o_status['bank_account_status_name']);
}
} else {
$o_bank_account->setStatus($vo_json['bank_account_status']);
}
}
if (array_key_exists('bank_account_type', $vo_json)) {
if (gettype($vo_json['bank_account_type']) === "array") {
$o_type = (array) $vo_json['bank_account_type'];
if (array_key_exists('bank_account_type_name', $o_type)) {
$o_bank_account->setAccountType($o_type['bank_account_type_name']);
}
} else {
$o_bank_account->setAccountType($vo_json['bank_account_type']);
}
}
return $o_bank_account;
}
示例4: buildFromJSON
static function buildFromJSON($vo_json)
{
$o_account = new Account();
if (array_key_exists("account_name", $vo_json)) {
$o_account->setAccountName($vo_json["account_name"]);
}
if (array_key_exists("account_legal_address", $vo_json)) {
$o_legal_address = Address::buildFromJSON($vo_json["account_legal_address"]);
$o_account->setLegalAddress($o_legal_address);
}
if (array_key_exists("account_phone_number", $vo_json)) {
$o_account->setAccountPhoneNumber($vo_json["account_phone_number"]);
}
if (array_key_exists("account_referral_partner_id", $vo_json)) {
$o_account->setReferralPartnerID($vo_json["account_referral_partner_id"]);
}
if (array_key_exists("account_customer_service_phone_number", $vo_json)) {
$o_account->setCustomerServicePhoneNumber($vo_json["account_customer_service_phone_number"]);
}
if (array_key_exists("account_dba", $vo_json)) {
$o_account->setDBA($vo_json["account_dba"]);
}
if (array_key_exists("account_dda_account_name", $vo_json)) {
$o_account->setDdaAccountName($vo_json["account_dda_account_name"]);
}
if (array_key_exists("account_dda_account_number", $vo_json)) {
$o_account->setDdaAccountNumber($vo_json["account_dda_account_number"]);
}
if (array_key_exists("account_dda_bank_name", $vo_json)) {
$o_account->setDdaBankName($vo_json["account_dda_bank_name"]);
}
if (array_key_exists("account_dda_routing_number", $vo_json)) {
$o_account->setDdaRoutingName($vo_json["account_dda_routing_number"]);
}
if (array_key_exists("account_entity_type", $vo_json)) {
$o_account->setEntityType($vo_json["account_entity_type"]);
}
if (array_key_exists("account_association_number", $vo_json)) {
$o_account->setAssociationNumber($vo_json["account_association_number"]);
}
if (array_key_exists("account_conga_template_id", $vo_json)) {
$o_account->setCongaTemplateId($vo_json["account_conga_template_id"]);
}
if (array_key_exists("account_ein", $vo_json)) {
$o_account->setEIN($vo_json["account_ein"]);
}
if (array_key_exists("account_ip_address", $vo_json)) {
$o_account->setIpAddressOfAppSubmission($vo_json["account_ip_address"]);
}
if (array_key_exists("account_website", $vo_json)) {
$o_account->setWebsite($vo_json["account_website"]);
}
if (array_key_exists("account_test_account", $vo_json)) {
$o_account->setTestAccount($vo_json["account_test_account"]);
}
if (array_key_exists("account_accept_ach", $vo_json)) {
$o_account->setAcceptACH($vo_json["account_accept_ach"]);
}
if (array_key_exists("account_accept_bc", $vo_json)) {
$o_account->setAcceptBC($vo_json["account_accept_bc"]);
}
if (array_key_exists("account_settlement_account_bank_name", $vo_json)) {
$o_account->setSettlementAccountBankName($vo_json["account_settlement_account_bank_name"]);
}
if (array_key_exists("account_settlement_account_name", $vo_json)) {
$o_account->setSettlementAccountName($vo_json["account_settlement_account_name"]);
}
if (array_key_exists("account_settlement_account_number", $vo_json)) {
$o_account->setSettlementAccountNumber($vo_json["account_settlement_account_number"]);
}
if (array_key_exists("account_settlement_account_bank_phone", $vo_json)) {
$o_account->setSettlementAccountBankPhone($vo_json["account_settlement_account_bank_phone"]);
}
if (array_key_exists("account_settlement_account_routing_number", $vo_json)) {
$o_account->setSettlementAccountRoutingNumber($vo_json["account_settlement_account_routing_number"]);
}
if (array_key_exists("account_settlement_same_as_fee_account", $vo_json)) {
$o_account->setSettlementSameAsFeeAccount($vo_json["account_settlement_same_as_fee_account"]);
}
if (array_key_exists("account_fee_account_bank_name", $vo_json)) {
$o_account->setFeeAccountBankName($vo_json["account_fee_account_bank_name"]);
}
if (array_key_exists("account_fee_account_name", $vo_json)) {
$o_account->setFeeAccountName($vo_json["account_fee_account_name"]);
}
if (array_key_exists("account_fee_account_number", $vo_json)) {
$o_account->setFeeAccountNumber($vo_json["account_fee_account_number"]);
}
if (array_key_exists("account_fee_account_routing_number", $vo_json)) {
$o_account->setFeeAccountRoutingNumber($vo_json["account_fee_account_routing_number"]);
}
if (array_key_exists("account_fee_account_bank_phone", $vo_json)) {
$o_account->setFeeAccountBankPhone($vo_json["account_fee_account_bank_phone"]);
}
return $o_account;
}
示例5: buildFromJSON
/**
* builds a location object from JSON object
* @param type $vo_json JSON representation of the location object
* @return Location the location object
* @author Rob Kurst <rob.kurst@basecommerce.com>
*/
static function buildFromJSON($vo_json)
{
$o_location = new Location();
if (array_key_exists("location_annual_revenue", $vo_json)) {
$o_location->setAnnualRevenue($vo_json["location_annual_revenue"]);
}
if (array_key_exists("location_contact_name", $vo_json)) {
$o_location->setContactName($vo_json["location_contact_name"]);
}
if (array_key_exists("location_contact_email", $vo_json)) {
$o_location->setContactEmail($vo_json["location_contact_email"]);
}
if (array_key_exists("location_efax", $vo_json)) {
$o_location->setEFax($vo_json["location_efax"]);
}
if (array_key_exists("location_contact_mobile", $vo_json)) {
$o_location->setContactMobile($vo_json["location_contact_mobile"]);
}
if (array_key_exists("location_contact_title", $vo_json)) {
$o_location->setContactTitle($vo_json["location_contact_title"]);
}
if (array_key_exists("location_contact_same_as_owner", $vo_json)) {
$o_location->setContactSameAsOwner($vo_json["location_contact_same_as_owner"]);
}
if (array_key_exists("location_fax", $vo_json)) {
$o_location->setFax($vo_json["location_fax"]);
}
if (array_key_exists("location_industry", $vo_json)) {
$o_location->setIndustry($vo_json["location_industry"]);
}
if (array_key_exists("location_ownership", $vo_json)) {
$o_location->setOwnership($vo_json["location_ownership"]);
}
if (array_key_exists("location_years_in_business", $vo_json)) {
$o_location->setYearsInBusiness($vo_json["location_years_in_business"]);
}
if (array_key_exists("location_organization_mission", $vo_json)) {
$o_location->setOrganizationMission($vo_json["location_organization_mission"]);
}
if (array_key_exists("location_entity_start_date", $vo_json)) {
$o_location->setEntityStartDate(date("m/d/Y H:i:s", strtotime($vo_json["location_entity_start_date"])));
}
if (array_key_exists("location_entity_state", $vo_json)) {
$o_location->setEntityState($vo_json["location_entity_state"]);
}
if (array_key_exists("location_alternative_fax", $vo_json)) {
$o_location->setAlternativeFax($vo_json["location_alternative_fax"]);
}
if (array_key_exists("location_year_incorporated", $vo_json)) {
$o_location->setYearIncorporated($vo_json["location_year_incorporated"]);
}
if (array_key_exists("location_description_of_products_and_services", $vo_json)) {
$o_location->setDescriptionOfProductsAndServices($vo_json["location_description_of_products_and_services"]);
}
if (array_key_exists("location_length_of_current_ownership", $vo_json)) {
$o_location->setLengthOfCurrentOwnership($vo_json["location_length_of_current_ownership"]);
}
if (array_key_exists("location_quantity_of_locations", $vo_json)) {
$o_location->setQuantityOfLocation($vo_json["location_quantity_of_locations"]);
}
if (array_key_exists("location_waive_pg", $vo_json)) {
$o_location->setWaivePg($vo_json["location_waive_pg"]);
}
if (array_key_exists("location_partner_biller_id", $vo_json)) {
$o_location->setPartnerBillerId($vo_json["location_partner_biller_id"]);
}
if (array_key_exists("location_partner_reseller_id", $vo_json)) {
$o_location->setPartnerResellerId($vo_json["location_partner_reseller_id"]);
}
if (array_key_exists("location_partner_sub_account_id", $vo_json)) {
$o_location->setPartnerSubAccountId($vo_json["location_partner_sub_account_id"]);
}
if (array_key_exists("location_program_pricing", $vo_json)) {
$o_location->setProgramPricing($vo_json["location_program_pricing"]);
}
if (array_key_exists("location_program_details", $vo_json)) {
$o_location->setProgramDetails($vo_json["location_program_details"]);
}
if (array_key_exists("location_lead_sources", $vo_json)) {
$o_lead_sources = $vo_json["location_lead_sources"];
for ($n_index = 0, $n_size = count($o_lead_sources); $n_index < $n_size; $n_index++) {
$o_location->addLeadSource($o_lead_sources[$n_index]);
}
}
if (array_key_exists("location_sales_agent_name", $vo_json)) {
$o_location->setSalesAgentName($vo_json["location_sales_agent_name"]);
}
if (array_key_exists("location_parent_id", $vo_json)) {
$o_location->setParentId($vo_json["location_parent_id"]);
}
if (array_key_exists("location_additional_description", $vo_json)) {
$o_location->setAdditionalDescription($vo_json["location_additional_description"]);
}
if (array_key_exists("location_description", $vo_json)) {
//.........这里部分代码省略.........
示例6: buildFromJSON
static function buildFromJSON($vo_json)
{
$o_bat = new BankAccountTransaction();
if (array_key_exists("bank_account_transaction_id", $vo_json)) {
$o_bat->setBankAccountTransactionId($vo_json["bank_account_transaction_id"]);
}
if (array_key_exists('bank_account_transaction_type', $vo_json)) {
if (gettype($vo_json['bank_account_transaction_type']) === "array") {
$o_type = (array) $vo_json['bank_account_transaction_type'];
if (array_key_exists('bank_account_transaction_type_name', $o_type)) {
$o_bat->setType($o_type['bank_account_transaction_type_name']);
}
} else {
$o_bat->setType($vo_json['bank_account_transaction_type']);
}
}
if (array_key_exists('bank_account_transaction_method', $vo_json)) {
if (gettype($vo_json['bank_account_transaction_method']) === "array") {
$o_method = (array) $vo_json['bank_account_transaction_method'];
if (array_key_exists('bank_account_transaction_method_name', $o_method)) {
$o_bat->setMethod($o_method['bank_account_transaction_method_name']);
}
} else {
$o_bat->setMethod($vo_json['bank_account_transaction_method']);
}
}
if (array_key_exists('bank_account_transaction_recurring_indicator', $vo_json)) {
$o_bat->setRecurringIndicator($vo_json["bank_account_transaction_recurring_indicator"]);
}
if (array_key_exists('bank_account_transaction_routing_number', $vo_json)) {
$o_bat->setRoutingNumber($vo_json["bank_account_transaction_routing_number"]);
}
if (array_key_exists('bank_account_transaction_account_number', $vo_json)) {
$o_bat->setAccountNumber($vo_json["bank_account_transaction_account_number"]);
}
if (array_key_exists('bank_account_transaction_effective_date', $vo_json)) {
$o_bat->setEffectiveDate(date("m/d/Y H:i:s", strtotime($vo_json["bank_account_transaction_effective_date"])));
}
if (array_key_exists('bank_account_transaction_settlement_date', $vo_json)) {
$o_bat->setSettlementDate(date("m/d/Y H:i:s", strtotime($vo_json["bank_account_transaction_settlement_date"])));
}
if (array_key_exists('bank_account_transaction_return_date', $vo_json)) {
$o_bat->setReturnDate(date("m/d/Y H:i:s", strtotime($vo_json["bank_account_transaction_return_date"])));
}
if (array_key_exists('bank_account_transaction_account_name', $vo_json)) {
$o_bat->setAccountName($vo_json["bank_account_transaction_account_name"]);
}
if (array_key_exists('bank_account_transaction_status', $vo_json)) {
if (gettype($vo_json['bank_account_transaction_status']) === "array") {
$o_status = (array) $vo_json['bank_account_transaction_status'];
if (array_key_exists('bank_account_transaction_status_name', $o_status)) {
$o_bat->setStatus($o_status['bank_account_transaction_status_name']);
}
} else {
$o_bat->setStatus($vo_json['bank_account_transaction_status']);
}
}
if (array_key_exists('bank_account_transaction_return_code', $vo_json)) {
$o_bat->setReturnCode($vo_json["bank_account_transaction_return_code"]);
}
if (array_key_exists('bank_account_transaction_merchant_transaction_id', $vo_json)) {
$o_bat->setMerchantTransactionID($vo_json["bank_account_transaction_merchant_transaction_id"]);
}
if (array_key_exists('bank_account_transaction_trace', $vo_json)) {
$o_bat->setTrace($vo_json["bank_account_transaction_trace"]);
}
if (array_key_exists('bank_account_transaction_account_type', $vo_json)) {
if (gettype($vo_json['bank_account_transaction_account_type']) === "array") {
$o_account_type = (array) $vo_json['bank_account_transaction_account_type'];
if (array_key_exists('bank_account_transaction_account_type_name', $o_account_type)) {
$o_bat->setAccountType($o_account_type['bank_account_transaction_account_type_name']);
}
} else {
$o_bat->setAccountType($vo_json['bank_account_transaction_account_type']);
}
}
// Added to allow intercommunication between CLIENT objects during unit testing//
if (array_key_exists('messages', $vo_json) && !is_null($vo_json['messages'])) {
foreach ($vo_json['messages'] as $s_key => $s_msg) {
$o_bat->addMessage($s_msg);
}
}
if (array_key_exists('bank_account_transaction_amount', $vo_json)) {
$o_bat->setAmount($vo_json["bank_account_transaction_amount"]);
}
if (array_key_exists("bank_account_token", $vo_json)) {
$o_bat->setToken($vo_json["bank_account_token"]);
}
if (array_key_exists("bank_account_transaction_micr_data", $vo_json)) {
$o_bat->setMICRData($vo_json["bank_account_transaction_micr_data"]);
}
if (array_key_exists("bank_account_transaction_custom_field1", $vo_json)) {
$o_bat->setCustomField1($vo_json["bank_account_transaction_custom_field1"]);
}
if (array_key_exists("bank_account_transaction_custom_field2", $vo_json)) {
$o_bat->setCustomField2($vo_json["bank_account_transaction_custom_field2"]);
}
if (array_key_exists("bank_account_transaction_custom_field3", $vo_json)) {
$o_bat->setCustomField3($vo_json["bank_account_transaction_custom_field3"]);
}
//.........这里部分代码省略.........
示例7: buildFromJSON
public static function buildFromJSON($vo_json)
{
$o_principal_contact = new PrincipalContact();
if (array_key_exists("principal_contact_id", $vo_json)) {
$o_principal_contact->setContactId($vo_json["principal_contact_id"]);
}
if (array_key_exists("principal_contact_account_id", $vo_json)) {
$o_principal_contact->setAccountId($vo_json["principal_contact_account_id"]);
}
if (array_key_exists("principal_contact_last_name", $vo_json)) {
$o_principal_contact->setLastName($vo_json["principal_contact_last_name"]);
}
if (array_key_exists("principal_contact_first_name", $vo_json)) {
$o_principal_contact->setFirstName($vo_json["principal_contact_first_name"]);
}
if (array_key_exists("principal_contact_mailing_address", $vo_json)) {
$o_principal_contact->setMailingAddress(Address::buildFromJSON($vo_json["principal_contact_mailing_address"]));
}
if (array_key_exists("principal_contact_phone_number", $vo_json)) {
$o_principal_contact->setPhoneNumber($vo_json["principal_contact_phone_number"]);
}
if (array_key_exists("principal_contact_fax", $vo_json)) {
$o_principal_contact->setFax($vo_json["principal_contact_fax"]);
}
if (array_key_exists("principal_contact_mobile_phone_number", $vo_json)) {
$o_principal_contact->setMobilePhoneNumber($vo_json["principal_contact_mobile_phone_number"]);
}
if (array_key_exists("principal_contact_email", $vo_json)) {
$o_principal_contact->setEmail($vo_json["principal_contact_email"]);
}
if (array_key_exists("principal_contact_title", $vo_json)) {
$o_principal_contact->setTitle($vo_json["principal_contact_title"]);
}
if (array_key_exists("principal_contact_birthdate", $vo_json)) {
$o_principal_contact->setBirthdate(date("m/d/Y H:i:s", strtotime($vo_json["principal_contact_birthdate"])));
}
if (array_key_exists("principal_contact_authorized_user", $vo_json)) {
$o_principal_contact->setAuthorizedUser($vo_json["principal_contact_authorized_user"]);
}
if (array_key_exists("principal_contact_account_signer", $vo_json)) {
$o_principal_contact->setAccountSigner($vo_json["principal_contact_account_signer"]);
}
if (array_key_exists("principal_contact_ownership_percentage", $vo_json)) {
$o_principal_contact->setOwnershipPercentage($vo_json["principal_contact_ownership_percentage"]);
}
if (array_key_exists("principal_contact_contact_type", $vo_json)) {
$o_principal_contact->setContactType($vo_json["principal_contact_contact_type"]);
}
if (array_key_exists("principal_contact_driver_license", $vo_json)) {
$o_principal_contact->setDriverLicenseId($vo_json["principal_contact_driver_license"]);
}
if (array_key_exists("principal_contact_license_state", $vo_json)) {
$o_principal_contact->setLicenseState($vo_json["principal_contact_license_state"]);
}
if (array_key_exists("principal_contact_ssn", $vo_json)) {
$o_principal_contact->setSSN($vo_json["principal_contact_ssn"]);
}
if (array_key_exists("principal_contact_is_primary", $vo_json)) {
$o_principal_contact->setIsPrimary($vo_json["principal_contact_is_primary"]);
}
return $o_principal_contact;
}
示例8: buildFromJSON
public static function buildFromJSON($vo_json)
{
$o_terminal = new Terminal();
if (array_key_exists("terminal_tip_line", $vo_json)) {
$o_terminal->setTipLine($vo_json["terminal_tip_line"]);
}
if (array_key_exists("terminal_signature_floor_limit", $vo_json)) {
$o_terminal->setSignatureFloorLimit($vo_json["terminal_signature_floor_limit"]);
}
if (array_key_exists("terminal_model_type", $vo_json)) {
$o_terminal->setModelType($vo_json["terminal_model_type"]);
}
if (array_key_exists("terminal_quantity", $vo_json)) {
$o_terminal->setQuantity($vo_json["terminal_quantity"]);
}
if (array_key_exists("terminal_connection_type", $vo_json)) {
$o_terminal->setConnectionType($vo_json["terminal_connection_type"]);
}
if (array_key_exists("terminal_implementation", $vo_json)) {
$o_terminal->setImplementation($vo_json["terminal_implementation"]);
}
if (array_key_exists("temrinal_billing", $vo_json)) {
$o_terminal->setBilling($vo_json["temrinal_billing"]);
}
if (array_key_exists("terminal_shipping_address", $vo_json)) {
$o_terminal->setShippingAddress(Address::buildFromJSON($vo_json["terminal_shipping_address"]));
}
if (array_key_exists("terminal_auto_batch_terminal", $vo_json)) {
$o_terminal->setAutoBatchTerminal($vo_json["terminal_auto_batch_terminal"]);
}
if (array_key_exists("terminal_auto_batch_time", $vo_json)) {
$o_terminal->setAutoBatchTime($vo_json["terminal_auto_batch_time"]);
}
if (array_key_exists("terminal_auto_batch_time_zone", $vo_json)) {
$o_terminal->setAutoBatchTimeZone($vo_json["terminal_auto_batch_time_zone"]);
}
if (array_key_exists("terminal_descriptor", $vo_json)) {
$o_terminal->setDescriptor($vo_json["terminal_descriptor"]);
}
if (array_key_exists("terminal_manufacturer", $vo_json)) {
$o_terminal->setManufacturer($vo_json["terminal_manufacturer"]);
}
if (array_key_exists("terminal_software", $vo_json)) {
$o_terminal->setSoftware($vo_json["terminal_software"]);
}
if (array_key_exists("terminal_ach_processor_id", $vo_json)) {
$o_terminal->setAchProcessorId($vo_json["terminal_ach_processor_id"]);
}
if (array_key_exists("terminal_bc_processor_id", $vo_json)) {
$o_terminal->setBankCardProcessorId($vo_json["terminal_bc_processor_id"]);
}
if (array_key_exists("terminal_company_name_descriptor", $vo_json)) {
$o_terminal->setCompanyNameDescriptor($vo_json["terminal_company_name_descriptor"]);
}
if (array_key_exists("terminal_number_of_units", $vo_json)) {
$o_terminal->setNumberOfUnits($vo_json["terminal_number_of_units"]);
}
return $o_terminal;
}