Code Monkey home page Code Monkey logo

didww-api-3-php-sdk's People

Contributors

bopoh avatar fivell avatar gigorok avatar ivanov-anton avatar senid231 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

didww-api-3-php-sdk's Issues

Guzzle 7 is not ok? Php 8.1 is not ok?

  • didww/didww-api-3-php-sdk[v1.0.0, ..., v1.0.2] require guzzlehttp/psr7 ^1.5 -> found guzzlehttp/psr7[1.5.0, ..., 1.x-dev] but the package is fixed to 2.4.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    • didww/didww-api-3-php-sdk[v1.0.3, ..., v1.0.8] require php ^7.1.3 -> your php version (8.1.9) does not satisfy that requirement.
    • Root composer.json requires didww/didww-api-3-php-sdk ^1.0 -> satisfiable by didww/didww-api-3-php-sdk[v1.0.0, ..., v1.0.8].

Get all country list is not working

$parameters = [ 'filter' => [ 'prefix' => '1', ], 'sort' => 'name', // -name for desceding order ]; $countriesDocument = \Didww\Item\Country::all($parameters);
Here I only get countries which prefix started 1.When I pass no parameter in function it raises error.
How can I get all the country lists.

\Didww\Item\Did does not return included CapacityPool()

I'm trying to get the CapacityPool() an active DID is assigned to.

However, when using the SDK, CapacityPool(), despite being included in the request, returns null.

EXPECTED

Using $didlist[0]->capacityPool()->getIncluded() returns a reference to a CapacityPool Item or list.

** ACTUAL **

Using $didlist[0]->capacityPool()->getIncluded() returns null

I'm using psysh to load and run our code like a debugger.

PHP 7.3.5
DIDWW SDK v3.0.1

>>> $res = \Didww\Item\Did::all(['include' => 'did_group.stock_keeping_units,did_group.country,did_group.city,shared_capacity_group,capacity_pool','page'=>['number'=>1,'size'=>100]]);
=> Swis\JsonApi\Client\CollectionDocument {#9236}
>>> $didlist = $res->getData();
=> Swis\JsonApi\Client\Collection {#12337}
>>> $didlist->count()
=> 100
>>> $didlist[0]->getAttributes();
=> [
     "blocked" => false,
     "capacity_limit" => null,
     "description" => null,
     "terminated" => false,
     "awaiting_registration" => false,
     "created_at" => "2019-04-20T01:16:13.655Z",
     "billing_cycles_count" => null,
     "number" => "1201xxxxxxx",
     "expires_at" => "2022-02-20T01:16:13.813Z",
     "channels_included_count" => 0,
     "dedicated_channels_count" => 0,
   ]
>>> $didlist[0]->capacityPool()->getIncluded();
=> null
>>> $didlist[0]->getNumber()
=> "1201xxxxxxx"
>>> $didlist[0]->sharedCapacityGroup()->getIncluded()->getAttributes();
=> [
     "name" => "New Default",
     "shared_channels_count" => 0,
     "created_at" => "2018-08-27T10:12:46.347Z",
     "metered_channels_count" => 50,
   ]

Argument 1 passed to Didww\Item\Did::setPendingRemoval() must be an instance of phpDocumentor\Reflection\Types\Boolean, boolean given

Trying to renew using the following code

       `$did = new Did();
        $did->setId('did_id_string');
        $did->setPendingRemoval(false);
        $did->save();`

got: Argument 1 passed to Didww\Item\Did::setPendingRemoval() must be an instance of phpDocumentor\Reflection\Types\Boolean, boolean given.

Am I doing something wrong or how show I renew DID?

Asked here as well:
https://stackoverflow.com/questions/58703626/argument-1-passed-to-must-be-an-instance-of-boolean-given

Как передать json запрос используя curl в php.

Сори что через таск спрашиваю.
Мы не можем использовать данное сдк так как старая версия пхп у нас. Поэтому пишем собственный коннектор.
Как передать данные для метода Create Order используя родную curl библиотеку для php.
Вот эти данные.
{ "data": { "type": "orders", "attributes": { "allow_back_ordering": false, "items": [ { "type": "did_order_items", "attributes": { "available_did_id": "7f44285d-20ef-4773-953f-ba012adafed3", "sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615" } } ] } } }
Пробовал передавать и json строкой в опцию CURLOPT_POSTFIELDS и массивом туда же. Получаю ошибку
{"errors":[{"title":"Missing Parameter","detail":"The required parameter, items, is missing.","code":"106","status":"400"}]}

\Didww\Item\Did::getDescription() is able to return null

We have encountered an error, where the actual return value of \Didww\Item\Did::getDescription() was null, while it is being declared as non-nullable 'string'.

// ...
Configuration::configure( new Credentials($apiKey, 'production') );
$dids = Did::all();
$didwwDids = $dids->getData();
foreach( $didwwDids as $didwwDid) {
    $description = $didwwDid->getDescription(); // <= ERROR HAPPENS HERE
// ...
}

update swisnl/json-api-client

Can you please update swisnl/json-api-client for support for version 1.0.2

this is the error that I get

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - didww/didww-api-3-php-sdk v1.0.8 requires swisnl/json-api-client 0.17.0 -> satisfiable by swisnl/json-api-client[0.17.0] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.7 requires swisnl/json-api-client 0.17.0 -> satisfiable by swisnl/json-api-client[0.17.0] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.6 requires swisnl/json-api-client ~0.17 -> satisfiable by swisnl/json-api-client[0.17.0, 0.18.0, 0.19.0, 0.20.0] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.5 requires swisnl/json-api-client ~0.12 -> satisfiable by swisnl/json-api-client[0.12.0, 0.12.1, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.20.0] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.4 requires swisnl/json-api-client ^0.12 -> satisfiable by swisnl/json-api-client[0.12.0, 0.12.1] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.3 requires swisnl/json-api-client ^0.12 -> satisfiable by swisnl/json-api-client[0.12.0, 0.12.1] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.2 requires php-http/guzzle6-adapter ^1.1 -> satisfiable by php-http/guzzle6-adapter[v1.1.0, v1.1.1] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.1 requires php-http/guzzle6-adapter ^1.1 -> satisfiable by php-http/guzzle6-adapter[v1.1.0, v1.1.1] but these conflict with your requirements or minimum-stability.
    - didww/didww-api-3-php-sdk v1.0.0 requires php-http/guzzle6-adapter ^1.1 -> satisfiable by php-http/guzzle6-adapter[v1.1.0, v1.1.1] but these conflict with your requirements or minimum-stability.
    - Installation request for didww/didww-api-3-php-sdk ^1.0 -> satisfiable by didww/didww-api-3-php-sdk[v1.0.0, v1.0.1, v1.0.2, v1.0.3, v1.0.4, v1.0.5, v1.0.6, v1.0.7, v1.0.8].

I am trying to install your package with latest version of laravel, but you outdated dependency is not compatible with Laravel 6.17.1

Hydrator construct Error

On my first attempt to use this package I get this error:
using master

Too few arguments to function Swis\JsonApi\Client\JsonApi\Hydrator::__construct(), 1 passed in /vendor/didww/didww-api-3-php-sdk/src/Configuration.php on line 35 and exactly 2 expected

Any idea?

Type mismatch error

The next code results in error Didww\Item\ProofType::getName(): Return value must be of type int, string returned

$requirementId = '2866d0a3-80ad-4ba4-b0c4-109ab2210b5a';
$requirement = \Didww\Item\Requirement::find($requirementId, ['include' => 'personal_proof_types'])->getData();
var_dump([
    $requirement->personalProofTypes()->getIncluded()[0]->getName(),
]);

Reason is: attributes of Proof Types Object are string. But they are marked as int

Workaround:

$requirement->personalProofTypes()->getIncluded()[0]->getAttributes()['name']

LinkParser error

I got this error while trying to use the package with Laravel
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class 'Swis\JsonApi\Client\JsonApi\LinksParser' not found

this my code
$credentials = new Credentials('xxxxxxxxxxxxxxxxx', 'production');

Configuration::configure($credentials);

$parameters = [
    'filter' => [
        'features' => 'sms',
        'available_dids_enabled'    =>  true,
        //  'needs_registration'    =>  false,
        'is_available'  =>  true,

    ],
    'include' => 'stock_keeping_units,country',
    'page'  =>  [
        'size'  =>  1000,
    ]
];
$didGroupsDocument = \Didww\Item\DidGroup::all($parameters);
$didGroups = $didGroupsDocument->getData();
dd($didGroups);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.