that you do not use this call to check if a Wallet Name already exists. Either attempt to fetch a Wallet Name specifically by passing the appropriate externalId or simply try to create the Wallet Name. The server will provide the appropriate messaging if the Wallet Name already exists. */ $walletNames = $client->get_wallet_names(); /* Retrieve a specific Netki Wallet Name based on the unique externalId that you provided during creation. This is the preferred method of retrieving a Wallet Name for the purposes of updating it or if necessary to check if the Wallet Name has already been created. */ $walletNames = $client->get_wallet_names(null, "externalId"); /* Retrieve all Netki Wallet Names associated with a specific domainName. If you have multiple domain names with which you use to create Wallet Names this call is useful if you need to preform a mass update of all Wallet Names specifically associated with a domain name. */ $filteredWalletNames = $client->get_wallet_names("testdomain.com", null); // Create a new Netki Wallet Name by first creating the Wallet Name object $walletName = $client->create_wallet_name("yourwalletnamedomain.com", "username", "externalId"); /* The above example will yield a walletName object with a Wallet Name of username.yourwalletnamedomain.com A real example is batman.tip.me Substitute: yourwalletnamedomain.com == tip.me username == batman */ // Next set the desired currency and wallet address on the yielded walletName object. $walletName->set_currency_address("btc", "1CpLXM15vjULK3ZPGUTDMUcGATGR9xGitv"); $walletName->set_currency_address("ltc", "LQVeWKif6kR1Z5KemVcijyNTL2dE3SfYQM"); // Add additional addresses if desired // Finally call save() to commit the Wallet Name to the Netki API. $walletName->save(); // Get a Single Wallet Name by External ID. Add or Update a Wallet Name's BTC Wallet Address $walletNames = $client->get_wallet_names(null, "externalId"); $walletName = $walletNames[0]; // Select Desired Wallet Name to Update
public function testCreateWalletName() { // Setup object in test $client = new Netki\NetkiClient('partnerId', 'apiKey', 'apiUrl'); $response = $client->create_wallet_name('domain_name', 'name', 'extId'); $this->assertEquals('domain_name', $response->domainName); $this->assertEquals('name', $response->name); $this->assertEquals('extId', $response->externalId); $this->assertNull($response->id); $this->assertEquals('apiKey', $response->get_apiKey()); $this->assertEquals('apiUrl', $response->get_apiUrl()); $this->assertEquals('partnerId', $response->get_partnerId()); }