Download the PHP package superbrave/partnerize-bundle without Composer
On this page you can find all versions of the php package superbrave/partnerize-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download superbrave/partnerize-bundle
More information about superbrave/partnerize-bundle
Files in superbrave/partnerize-bundle
Package partnerize-bundle
Short Description A Symfony bundle to talk to the Partnerize API.
License MIT
Informations about the package partnerize-bundle
Introduction
A Symfony bundle to talk to the Partnerize API.
Overview
Provides methods (not all) to send, approve and reject conversions in Partnerize.
Setup
Installation
Using this package is similar to all Symfony bundles.
Step 1.
Open a command console, enter your project directory and execute the following command to download the latest version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
Step 3.
You can now add the configuration for the bundle to your application.
If you are using Symfony ^4.0, just add the superbrave_partnerize.yml
to your
packages folder and fill it with the following config values:
Usage
Conversions
Create
You can use this bundle to create conversions in Partnerize through their API.
The createConversion
method takes a Sale
object as its parameter.
This Sale
object takes an array of Item
objects, which are the products being sold.
The createConversion
method returns the conversionId
of the conversion that was created in Partnerize.
Approve
Once a conversion has been approved on your side of the application,
you can use the approveConversion
to approve it in Partnerize.
This method only needs the conversionId
that was returned by the createConversion
method.
The approveConversion
method returns a Job
object.
Reject
If you want to reject a conversion, you can use the rejectConversion
method.
Supply the method with the conversionId
of the conversion and a reason
for rejecting it.
The rejectConversion
method returns a Job
object.
Jobs
A Job
is an object that contains data about the work that is being done on the Partnerize side.
Creating, approving, rejecting a conversion will return you that Job
object.
It will tell you the current status
of whatever you've pushed.
Update
You can get an update for a Job
by calling the getJobUpdate
method,
this method takes a single parameter: the id
found in the Job
you received earlier.
So it is recommended to save this id
somewhere after pushing something to Partnerize.
This method will return the Job
object you called for.
Response
Once an update tells you that the status
of a Job
is completed, you can retrieve the Response
by calling the getJobResponse
method. This method once again, only takes the jobId
as the first parameter.
This method will return a Response
object containing any errors
and/or conversionItems
that are
returned after the Job
has done its work.
Example
The Partnerize Client can be autowired into a class if that is enabled in your application.
API
If you need any more information or want to contribute to this client, you can go to the Partnerize API documentation.
License
This bundle is under the MIT license. See the complete license in the bundle
All versions of partnerize-bundle with dependencies
guzzlehttp/guzzle Version ^6.5
symfony/config Version ^3.4||^4.0||^5.0
symfony/dependency-injection Version ^3.4||^4.0||^5.0
symfony/http-kernel Version ^3.4||^4.0||^5.0
symfony/property-access Version ^3.4||^4.0||^5.0
symfony/property-info Version ^3.4||^4.0||^5.0
symfony/serializer Version ^3.4||^4.0||^5.0