Download the PHP package emileperron/fastspring-php without Composer

On this page you can find all versions of the php package emileperron/fastspring-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fastspring-php

A PHP API library for FastSpring

FastSpring's own API wrapper library for PHP being deprecated due to it being based on FastSpring Classic, this is an unofficial API wrapper library for the latest version of FastSpring.

The purpose and information available at the different endpoints will not be documented here. Check out FastSpring's API documentation for this type of information.

Getting started

To get started, simply require the package via Composer:

Once that's done, you can start using the library in your project. Here's a very brief overview of the library's usage and functionalities:

Entities

There are two ways to use the library: making requests manually via the FastSpring class, and using the built-in entities.

The entities provide a simple interface through which you can load your desired objects and access their data. For every endpoint that FastSpring's API offers, there is a corresponding entity in the Emileperron\FastSpring\Entity namespace.

Every entity works the same way, as they all extend the same AbstractEntity class. This provides all of the basic functionalities you need to start working with the API.

Fetching objects

To fetch data using entities, simply call the static methods find($ids) or findAll() on your desired entity class. Both methods will return an array of entities. All entities implement ArrayAccess, which means you can access their data just like you would with an array.

The find() method allows to provide either an array of IDs or a single ID. When you provide a single ID, the method will return the resulting entity directly instead of returning an array.

Deleting objects

Once you have loaded an entity, you can call the delete() method on it to delete it.

Creating and updating objects

This functionality has not been implemented yet. Feel free to submit a pull request if you want to implement it.

Manual requests

If the entities don't offer the functionalities you need, you can always make manual requests with the FastSpring class. You can refer to FastSpring's API documentation for the exact data and response formats of the different endpoints, and for the request methods to use.

Each request method has its own static method that accepts two parameters: the endpoint, and the payload you wish to send. The payload is optional, as GET requests without a payload can be used to get a list of all IDs for an endpoint.

Here are a few examples of manual requests:

What's missing

At the moment, this library does not expose every feature of the FastSpring API to its users. Feel free to submit pull requests if you would like to add more functionalities.

Here is a list of things that are not available with the library at the moment:

Contributing

Feel free to submit pull requests on the GitHub repository if you want to add functionalities or suggest improvements to this library. I will look them over and merge them as soon as possible.

You can also submit issues if you run into problems but don't have time to implement a fix.

Supporting

Finally, if you use the library and would like to support me, here are the ways you can do that:


All versions of fastspring-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package emileperron/fastspring-php contains the following files

Loading the files please wait ....