Code Monkey home page Code Monkey logo

smaug's Introduction

QuickBooks Commerce developer docs


Example attribute.

name: {
  name: "",
  type: "String",
  description: "",
  filterable: "",
  updatable: true,
  creatable: true,
  required: false,
  readonly: false,
  beta: false,
  deprecated: false,
  private: false
},

To Do

  • FulfillmentReturn
  • LedgerAccount
  • Login
  • Payment
  • Procurement
  • Refund
  • StockAdjustment
  • StockTransfer
  • TaxComponent

Add a new resource with

thor generate model ClassName

You will need

OAUTH_SECRET=xxx
OAUTH_ID=xxx
OAUTH_TOKEN=xxx

In your .env.

Add to Changelog

Look in changes.html

Customise content of a resource

Look in the appropriate .yml file.

Setup

  1. Install dependencies
bundle install
yarn install
  1. Run the server
bundle exec middleman server

Learn more about slatedocs setup

Deploy

./deploy.sh

Pre-Built Search Index

To speed up lunr index building, we are using index pre-buidling approach as documented at https://lunrjs.com/guides/index_prebuilding.html

Run the following snippet in browser console after visiting /docs.html

let tokens = []
$('h1, h2').each(function () {
    var title = $(this);
    var body = title.nextUntil('h1, h2');
    tokens.push({
      id: title.prop('id'),
      title: title.text(),
      body: body.text()
    });
  });
JSON.stringify(tokens) // to replace the JSON string in tokenString

Rebase with upstream

git remote set upstream [email protected]:slatedocs/slate.git

git fetch upstream

git merge upstream/master

smaug's People

Contributors

alexsmee avatar anaprimawaty avatar billybonks avatar bootstraponline avatar bradleypriest avatar chrissrogers avatar craigmassingham avatar cvkef avatar daryllxd avatar djpowers avatar dlackty avatar ecaron avatar ejaypcanaria avatar gherry avatar jasonheecs avatar kevin-buttercoin avatar kltan0301 avatar lcpriest avatar limezra avatar lord avatar maks3w avatar marcguyer avatar melissahie avatar mikong avatar mohammadhabbab avatar pmdeazeta avatar realityking avatar renchchua avatar ryancyq avatar xoredg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar

smaug's Issues

Question: Can a custom date be used for Order Flow actions?

There are currently 4 actions you can do on an invoice that all require a post
1 . Invoice the order POST /orders/[:order_id]/actions/invoice
2 . Pay the order POST /orders/[:order_id]/actions/pay
3 . Create a Package for Shipping POST /orders/[:order_id]/actions/pack
4 . Ship the package POST /orders/[:order_id]/actions/fulfil

Pack and fulfill seem to use the issued_at date, but invoice and pay use the date/time of the Post.
Is it possible to include a date for when these should have happened?
I would like to be able to set a property like "date" in a post body for these items.

Question: Not allowing credentials to be created?

Operating system: ✍️ Windows
Last upstream commit (run git log --author="Robert Lord" | head -n 1): ✍️ TODO
Browser version(s): ✍️ Firefox & Edge
Ruby version (run ruby -v): ✍️ TODO


✍️ TODO write your issue here
Hello!

We are attempting to deploy an integration for a customer however we cannot get credentials by following the instructions. We have deployed this integration already for a different client so we have done this before and know how to do it however it's not working in our new clients instance.

Whenever we follow the link (https://go.tradegecko.com/oauth/applications) it just goes to the dashboard.

The only difference between the clients is that the old client is on the standalone version while the new client is on the QBO version. How do we create credentials for the new version?

I'm really hoping the API is still accessible because if it's not our client will have to abandon Quickbooks. Open API is a major requirement and I'd hate to deliver the bad news.

Cannot refresh access_token

Hi,

Somehow I can't get the refresh_token request to work: the response is always an error like

[message:protected] => Client error: POST https://api.tradegecko.com/oauth/token resulted in a 401 Unauthorized response:
{"error":"invalid_request","error_description":"The request is missing a required parameter, includes an unsupported par (truncated...)

My request:

$opts = [
            'json'    => [
                "client_id"      => $tg[ 'api_client_id' ],
                "client_secret"  => $tg[ 'api_secret' ],
                "redirect_uri"   => WEBSITE_URL.'/auth/vendors/connect/trade-gecko',
                "grant_type"     => "refresh_token",
                'refresh_token ' => $this->refreshAccessToken,
            ],
            'headers' => [
                'Content-type' => 'application/json',
            ],
        ];

        $res = $this->client->post('/oauth/token', $opts);
        $tradeGeckoResponse = json_decode($res->getBody()->getContents(), true);

If I try to authorize my app again it will work another 2h.
The interesting thing is if I try to refresh the token just after I receive it.. the same error appears.

I'm missing something here? I tried to send the Authorization header as well but without any success.

Thank you

Feature: Filter products/variants by supplier ID

Currently I can use the 'supplier' attribute to filter a get request to the product endpoint. I understand from the docs that the supplier attribute is deprecated though.

It's something I use regularly, so will it be possible to filter products by 'supplier_id' in future?

Contacts without a company

The method for creating a contact requires a company_id. What is the preferred method for creating customers that are not associated with a company?

Do you just create a company called "Consumer?"

missing some }'s in the JSON on the POST examples

curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <ACCESS_TOKEN>"
https://api.tradegecko.com/orders/ -d '{"order":{"company_id":1,"issued_at":"Time.now","billing_address_id":1,"shipping_address_id":1}'

Missing a } at the very end. It should look like this I think.....

curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <ACCESS_TOKEN>"
https://api.tradegecko.com/orders/ -d '{"order":{"company_id":1,"issued_at":"Time.now","billing_address_id":1,"shipping_address_id":1}}'

Feature Request: No API for Batch Entity

In TradeGecko, Under Inventory Module we have Batches.
We don't see this API mentioned in API Document.
TG Batch

Also we dont see these Batch API on Shipment Line which is visible in UI.
TG ShipmentLine

Please do let us know what are the work around for these values to fetch as we are using these APIs to Integrate with other platforms.

Question: Can I set a purchase order to "Received" using TradeGecko API?

I am having some issues with purchase_order.

I created a purchase_order using the API and save the status as "Received". However, when I go into the TradeGecko.com, the status is "Received" but Tradegecko doesn't recognize the purchase order as being received.

Can you help me out here? What must I do in the API to set a purchase order to "Received"?

Order line item label is null

Hi,
I need to get the name of the product (line item) from the order. I get the price, discount, etc but label field is NULL. Why? or How can I get the name of the product in the line?

I can't find this in the documentation.

Thanks!

Missing Documentation on Composite Variants

For Variants, there is the property that says whether a variant is a composite variant or not, but there is no documentation on actually viewing/adding/editing the variants that make up the composite

Bug: Updating default_discount_rate through API does not work

Hello!

I am trying to update a company with the following payload:

{
  id: 13771713,
  name: 'fjorge',
  phone_number: '+1 612-877-3841',
  website: 'fjorgedigital.com',
  default_discount_rate: 17
}

I'm sending this data to the url https://api.tradegecko.com/companies/13771713 and getting a 204 status back, indicating success.
However, when I look at the company through the web portal, the other attributes have been updated, but the old discount rate of 14% is still present.
I have also tried turning default_discount_rate in the payload into a string, but that did not work either.
Is something incorrect about my syntax, or is this a bug in the API?

fulfillment vs fulfillments

The API documentation references the following URL in several places:
https://api.tradegecko.com/fulfillment/

It looks like the correct URL should be:
https://api.tradegecko.com/fulfillments/

Question: Orders filtered by reference_number

I'm trying to check if an order exists before I would create it. I have the Orders filtered by other criteria (company_id, limit)... but it seems to ignore the "reference_number" parameter.

Can anyone comment?

Posting new 'Pack Size' Variants

I have run a 'get' on the 'composition' endpoint. But can I embed a 'pack size' composite-variant when adding a new product? I don't have any id numbers at this stage of course. A 'post' call with a payload perhaps something like this?

"products": [
    {
        "several_keys": "several_variables",
        "variants": [
            {
                "name": "variant 1 name",
                "more_keys": "more_values"
            },
            {
                "name": "variant 2 name",
                "packsize": true,
                "composite": true,
                "composition": {
                    "quantity": 6,
                    "variant": "variant 1 name"
                },
                "more_keys": "more_values"
            }
        ],
    },
],

Question: Set "created_at" on Order?

We are trying to create some past orders (and need the CreatedAt to be last month for reporting reasons). Is it possible to set the "created_at" variable, or is it ReadOnly?

We are passing it in as "created_at":"2017-11-01T05:00:00Z" but it is being set to the current date/time.

Any way to set it?

Thanks!

Question: Create Invoice API

Operating system: OS X
Last upstream commit (run git log --author="Robert Lord" | head -n 1): NA
Browser version(s): NA
Ruby version (run ruby -v): NA


I have been using the TradeGecko API to automate creation of orders, and as part of our flow I would need to create an order, generate an invoice for it and mark it as paid.

I am stuck at step 2, trying to create an invoice, as the API is throwing this error:

{
    "type": "Bad Request",
    "message": "Required parameter missing: invoice"
}

The endpoint I am calling: https://api.tradegecko.com/invoices

Payload I tried:

{
	"order_id": 84435956
}
{
	"invoice": {
             "order_id": 84435956
          }
}

Any idea what I am doing wrong here?

Cheers

Question: GUI will not display products created via API

Browser version(s): Chrome 71.0.3578.98
Ruby version (run ruby -v): Javascript actually, via Google Apps Script.

I am uploading new products and variants to the inventory with Javascript via the API. I am successful, and can view the new products when I am using TradeGecko and searching for them on the Inventory page.

However, when I click on the new products in the GUI, to see if all the attributes have been uploaded correctly, the browser loads indefinitely. A hard refresh of the page does not changed the behavior.

A sample payload is included here. During testing, I may have uploaded some products with the same SKU code as existing products. Could that be the problem? Am I missing something?

{  
  "product":{  
    "name":"17 Table Saison Mosaic 12% [24x440ml]",
    "product_type":"24x440ml",
    "brand":"Hoppy",
    "description":"This is an IPA which is super hoppy and that.",
    "tags":"bbnos1-17,bbnos2-03,dabv-11.78,gyle-0345",
    "opt1":"Gyle",
    "opt2":"Packaged Date",
    "opt3":"Best Before",
    "variants":[  
      {  
        "name":"17 Table Saison Mosaic 12% [24x440ml]",
        "initial_cost_price":18.56,
        "buy_price":18.56,
        "wholesale_price":36,
        "retail_price":"17.05",
        "description":"This is an IPA which is super hoppy and that.",
        "initial_stock_level":120,
        "manage_stock":true,
        "sellable":true,
        "purchasable":true,
        "taxable":true,
        "weight":14.2,
        "weight_unit":"kg",
        "opt1":"0345",
        "opt2":"30/12/2018",
        "opt3":"30/04/2018",
        "sku":"170344C0345",
        "hs_code":2203000900,
        "country_of_origin":"GB"
      }
    ]
  }
}

Bug? X-Rate-Limit-Reset

The Rate Limited docs at http://developer.tradegecko.com/#rate-limiting define X-Rate-Limit-Reset as:
"The timestamp (as ms since epoch) when the quota will reset."

However, the values I'm showing are only around 17.5 days... not near enough to be since the epoch of 1/1/1970. Can anyone help explain this value?

For instance, they have 150933900 as the example value. That is 17 days, 11 hours, 15 minutes, 39 seconds.

Thank you!

Question: How to publishing to a sales channel

Hello

I'm trying to configure publishing to Shopify by the API but I cant find anything that talks about channels except for a reference in a Change Log that talks about is_online being deprecated due to multiple sales channels such as Amazon and Shopify.

NB. I can create/update products/variants/images by the API - its just setting the variant as published that is causing grief.

Regards

Composition of Composite Variants seems to be unavailable through API

I need to be able to know the Variants and their quantities that make up a Composite Variant. As far as I can tell, the API only has the ability to tell me that the Variant associated with a Order Line Item is a composite through the composite flag, but it tells me nothing about the variants that make up that composite. Is there a way to determine the composition of a Composite Variant that I'm just not seeing the documentation?

Feature: Create a new webhook for B2B_Status

Create a new webhook to post when a customer has accepted a b2b invite email and their b2b_status is changed to 'accepted'.

Currently the contact.update webhook does not fire when the b2b_status changes for a contact. This would help for contacting/calling customers and sending them emails about the b2b right after they are signed up

Getting Sales Order by order_num

Hi.

I don't know where to find information about getting an order by order_num with the API.

Is there a method to do this?

Thanks!

Get the published on Amazon/Shopify status with the list of variants

Hello support team,

we would like to get the published status of variants on Amazon/Shopify through the API but we can not see any sales channel informations when requesting the API for the list of variants. There is a thread indicating how to change the status via /variants/<variant_id>/channels but it seems that we have get the status variant per variant... Do you have any ideas?

Thanks for your help, have a nice day.

Question: File import not found or unreadable: @tradegecko/styles/scss/settings/base-colours

Operating system:Ubuntu 18.04
Last upstream commit (run git log --author="Robert Lord" | head -n 1): 17b259a
Browser version(s): latest chrome version 83.0.4103.106
Ruby version (run ruby -v): 2.6.5

Came here from slate but not sure whether someone from outside of Tradegecko is supposed to run this?

Not sure what I am supposed to fill in ".env file":
OAUTH_SECRET=xxx
OAUTH_ID=xxx
OAUTH_TOKEN=xxx

npm install fails on this dependency: https://github.com/tradegecko/tradegecko-assets.git
This repository seems private, think I just wasted my time trying to run something I wasn't supposed to...

Questions: How to use embedded variant when adding product?

Operating system: Ubuntu LTS 16.04
Last upstream commit (run git log --author="Robert Lord" | head -n 1): NA
Browser version(s): NA
Ruby version (run ruby -v): NA


How can I use "embedded variant" when creating a product? In the create product endpoint API docs it states:
"Creates a new product object. This endpoint also accepts embedded variants."

But there is no example of this. I tried adding a "variants" parameter when I made a POST request but the variant was not added. Thanks.

Custom Order Line Items

In the UI, there is a way to add custom line items to an order.

The api says a variant_id is required.

What is the correct way to enter a custom line item for an order?

Question: Company backref address_ids with API

Hello team,

to create with the API a company and its address, we need first to create the company (the address creation needs a company_id).
Is it possible to embed the address in the company creation API call like in the orders creation?
Or have we to update manually the address_ids array once the address is created?

Thank you for your answer, have a nice day!

New application authorization issue:

I have an issue while authorizing my application, specifically with redirect_URL.

I am getting "The redirect uri included is not valid." error while hitting at "auth/tradegecko" endpoint from local.

Callback_URLs in application information is http://localhost:3000/auth/

When I click on Authorize button manually on tradegecko portal it gets redirected to page http://localhost:3000/auth/?code=sampletoken and works fine But when my application hit to "auth/tradegecko" end point , It gets redirected to:
https://go.tradegecko.com/oauth/authorize?client_id=sampleId&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Ftradegecko%2Fcallback&response_type=code&state=ebae3954f0d0a9e301c8a002b82cbc7540b9249470539f08 and states error:

The redirect uri included is not valid.

My Application name is : Commissions

Please help me with the solution.

Question: How to create fulfillments

I'm following the docs for "Create a new fulfillment" and I'm posting an object something like the following:

{
	"fulfillment" : {
		"order_id": 123456789,
		"status" : "fulfilled"
	}
}

The error in the response that I'm seeing is Cannot create or update a Fulfillment without line items. However, I don't see anything in the docs about how to pass in line items when creating fulfillments.
What do I need to pass in to create a fulfillment?

Question: connection to API fails with message : {u'message': u"Couldn't find Login with 'id'=61965", u'type': u'Not Found'}

Hello @bradleypriest, @lcpriest, and others!

Since yesterday we get this message when trying to connect to the API :
{u'message': u"Couldn't find Login with 'id'=61965", u'type': u'Not Found'}
I checked the accounts again and the API keys are still well visibles through the website oath/application endpoint.

Could you explain us the problem? The problem is kind of urgent...

Best regards

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.