Coder Social home page Coder Social logo

bigcommerce-api-php-v3's Introduction

BigCommerce API V3 Client Library

PHP client for connecting to the Bigcommerce V3 REST API.

System Requirements

PHP 5.4.0 and later

Documentation

bigcommerce-api-php-v3's People

Contributors

alexpott avatar jbrinley avatar mlkilderkin avatar vladanost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bigcommerce-api-php-v3's Issues

Create Proxy Class

Create a Proxy class and hook it into the Pimple framework.

Proxy needs to:

  • Register wildcard WP_REST_API endpoint that will proxy all requests to the BigCommerce API.

ObjectSerializer::sanitizeForSerialization() stripping null values

For some reason the method \BigCommerce\Api\v3\ObjectSerializer::sanitizeForSerialization() strips all null values from the payload which makes it impossible to set a product variant price to null (i.e inherit from product base price). I can only presume that this also affects a number of other features of the API.

For the moment I've had to fork this repo to implement this necessary change. Might be worth updating it so others can benefit from this too?

edit: I can presume why this was done (to prevent null values being sent to the API that aren't supposed to) however I feel null values could still be supported by tracking those intentionally-set null values and allowing them through.

customersPost does not contain a field for channel_ids

The file:
https://github.com/moderntribe/bigcommerce-api-php-v3/blob/master/src/Model/CustomerPost.php

Does not have a field for channel_ids which is supported according to these docs:
https://developer.bigcommerce.com/api-reference/1cea64e1d698e-create-customers

Each returned customer has a channel_ids property with either an array of channels to which the customer has login access or a null value. If this is your first time setting up channel-specific customer access, the channel_ids value will be null, meaning that a customer only has access to channels with "allow_global_logins": true.

CustomersAPI.php / customersGet() with include=attributes returns NULL CustomerAttributeValue in "value" field

Expected behavior (I added line feeds to make it easier to read.)

["attributes"]=> array(2) {
[0]=> object(BigCommerce\Api\v3\Model\CustomerAttributeValue)#24 (1) {
["container":protected]=> array(6) {
["attribute_id"]=> int(2)
["value"]=> 999998

Actual behavior

["attributes"]=> array(2) {
[0]=> object(BigCommerce\Api\v3\Model\CustomerAttributeValue)#24 (1) {
["container":protected]=> array(6) {
["attribute_id"]=> int(2)
["value"]=> NULL

Steps to reproduce behavior

  1. $customer = $cust_api->customersGet([
    'id:in' => '3',
    'include' => 'attributes'
    ]);

var_dump($customer); exit;

###workaround

not sure, but maybe change ["value"] to ["attribute_value"]
??

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.