Inheritance: extends Iyzipay\IyzipayResource
function update_limited_company_sub_merchant()
{
    # create request class
    $request = new \Iyzipay\Request\UpdateSubMerchantRequest();
    $request->setLocale(\Iyzipay\Model\Locale::TR);
    $request->setConversationId("123456789");
    $request->setSubMerchantKey("sub merchant key");
    $request->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
    $request->setTaxOffice("Tax office");
    $request->setTaxNumber("9261877");
    $request->setLegalCompanyTitle("ABC inc");
    $request->setEmail("*****@*****.**");
    $request->setGsmNumber("+905350000000");
    $request->setName("Jane's market");
    $request->setIban("TR180006200119000006672315");
    $request->setCurrency(\Iyzipay\Model\Currency::TL);
    # make request
    $subMerchant = \Iyzipay\Model\SubMerchant::update($request, Config::options());
    # print result
    print_r($subMerchant);
}
function create_limited_company_sub_merchant()
{
    # create request class
    $request = new \Iyzipay\Request\CreateSubMerchantRequest();
    $request->setLocale(\Iyzipay\Model\Locale::TR);
    $request->setConversationId("123456789");
    $request->setSubMerchantExternalId("AS49224");
    $request->setSubMerchantType(\Iyzipay\Model\SubMerchantType::LIMITED_OR_JOINT_STOCK_COMPANY);
    $request->setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
    $request->setTaxOffice("Tax office");
    $request->setTaxNumber("9261877");
    $request->setLegalCompanyTitle("XYZ inc");
    $request->setEmail("*****@*****.**");
    $request->setGsmNumber("+905350000000");
    $request->setName("John's market");
    $request->setIban("TR180006200119000006672315");
    $request->setCurrency(\Iyzipay\Model\Currency::TL);
    # make request
    $subMerchant = \Iyzipay\Model\SubMerchant::create($request, Config::options());
    # print result
    print_r($subMerchant);
}
<?php

require_once 'config.php';
# create request class
$request = new \Iyzipay\Request\RetrieveSubMerchantRequest();
$request->setLocale(\Iyzipay\Model\Locale::TR);
$request->setConversationId("123456789");
$request->setSubMerchantExternalId("AS49224");
# make request
$subMerchant = \Iyzipay\Model\SubMerchant::retrieve($request, Config::options());
# print result
print_r($subMerchant);