Download the PHP package spaire-tech/spaire-php without Composer

On this page you can find all versions of the php package spaire-tech/spaire-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 spaire-php

spaire-tech/sdk

Developer-friendly & type-safe Php SDK specifically catered to leverage spaire-tech/sdk API.



[!IMPORTANT] This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your workspace. Delete this section before > publishing to a package manager.

Summary

Spaire API: Spaire HTTP and Webhooks API

Read the docs at https://docs.spairehq.com/api-reference

Table of Contents

SDK Installation

The SDK relies on Composer to manage its dependencies.

To install the SDK and add it as a dependency to an existing composer.json file:

SDK Example Usage

Example

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

Name Type Scheme
accessToken http HTTP Bearer

To authenticate with the API the accessToken parameter must be set when initializing the SDK. For example:

Per-Operation Security Schemes

Some operations in this SDK require the security scheme to be specified at the request level. For example:

Available Resources and Operations

Available methods ### [BenefitGrants](docs/sdks/benefitgrants/README.md) * [list](docs/sdks/benefitgrants/README.md#list) - List Benefit Grants ### [Benefits](docs/sdks/benefits/README.md) * [list](docs/sdks/benefits/README.md#list) - List Benefits * [create](docs/sdks/benefits/README.md#create) - Create Benefit * [get](docs/sdks/benefits/README.md#get) - Get Benefit * [delete](docs/sdks/benefits/README.md#delete) - Delete Benefit * [update](docs/sdks/benefits/README.md#update) - Update Benefit * [grants](docs/sdks/benefits/README.md#grants) - List Benefit Grants ### [CheckoutLinks](docs/sdks/checkoutlinks/README.md) * [list](docs/sdks/checkoutlinks/README.md#list) - List Checkout Links * [create](docs/sdks/checkoutlinks/README.md#create) - Create Checkout Link * [get](docs/sdks/checkoutlinks/README.md#get) - Get Checkout Link * [delete](docs/sdks/checkoutlinks/README.md#delete) - Delete Checkout Link * [update](docs/sdks/checkoutlinks/README.md#update) - Update Checkout Link ### [Checkouts](docs/sdks/checkouts/README.md) * [list](docs/sdks/checkouts/README.md#list) - List Checkout Sessions * [create](docs/sdks/checkouts/README.md#create) - Create Checkout Session * [get](docs/sdks/checkouts/README.md#get) - Get Checkout Session * [update](docs/sdks/checkouts/README.md#update) - Update Checkout Session * [clientGet](docs/sdks/checkouts/README.md#clientget) - Get Checkout Session from Client * [clientUpdate](docs/sdks/checkouts/README.md#clientupdate) - Update Checkout Session from Client * [clientConfirm](docs/sdks/checkouts/README.md#clientconfirm) - Confirm Checkout Session from Client ### [ClientInvoices](docs/sdks/clientinvoices/README.md) * [listClientInvoices](docs/sdks/clientinvoices/README.md#listclientinvoices) - List Client Invoices * [createClientInvoice](docs/sdks/clientinvoices/README.md#createclientinvoice) - Create Client Invoice * [previewClientInvoicePdf](docs/sdks/clientinvoices/README.md#previewclientinvoicepdf) - Preview Client Invoice PDF * [getClientInvoice](docs/sdks/clientinvoices/README.md#getclientinvoice) - Get Client Invoice * [downloadClientInvoicePdf](docs/sdks/clientinvoices/README.md#downloadclientinvoicepdf) - Download Client Invoice PDF * [finalizeClientInvoice](docs/sdks/clientinvoices/README.md#finalizeclientinvoice) - Finalize Client Invoice * [sendClientInvoice](docs/sdks/clientinvoices/README.md#sendclientinvoice) - Send Client Invoice * [markClientInvoicePaid](docs/sdks/clientinvoices/README.md#markclientinvoicepaid) - Mark Client Invoice as Paid * [voidClientInvoice](docs/sdks/clientinvoices/README.md#voidclientinvoice) - Void Client Invoice ### [CustomFields](docs/sdks/customfields/README.md) * [list](docs/sdks/customfields/README.md#list) - List Custom Fields * [create](docs/sdks/customfields/README.md#create) - Create Custom Field * [get](docs/sdks/customfields/README.md#get) - Get Custom Field * [delete](docs/sdks/customfields/README.md#delete) - Delete Custom Field * [update](docs/sdks/customfields/README.md#update) - Update Custom Field ### [CustomerMeters](docs/sdks/customermeters/README.md) * [list](docs/sdks/customermeters/README.md#list) - List Customer Meters * [get](docs/sdks/customermeters/README.md#get) - Get Customer Meter ### [CustomerPortal.BenefitGrants](docs/sdks/spairebenefitgrants/README.md) * [list](docs/sdks/spairebenefitgrants/README.md#list) - List Benefit Grants * [get](docs/sdks/spairebenefitgrants/README.md#get) - Get Benefit Grant * [update](docs/sdks/spairebenefitgrants/README.md#update) - Update Benefit Grant ### [CustomerPortal.CustomerMeters](docs/sdks/spairecustomermeters/README.md) * [list](docs/sdks/spairecustomermeters/README.md#list) - List Meters * [get](docs/sdks/spairecustomermeters/README.md#get) - Get Customer Meter ### [CustomerPortal.CustomerSession](docs/sdks/customersession/README.md) * [introspect](docs/sdks/customersession/README.md#introspect) - Introspect Customer Session * [getAuthenticatedUser](docs/sdks/customersession/README.md#getauthenticateduser) - Get Authenticated Portal User ### [CustomerPortal.Customers](docs/sdks/spairecustomers/README.md) * [get](docs/sdks/spairecustomers/README.md#get) - Get Customer * [update](docs/sdks/spairecustomers/README.md#update) - Update Customer * [listPaymentMethods](docs/sdks/spairecustomers/README.md#listpaymentmethods) - List Customer Payment Methods * [addPaymentMethod](docs/sdks/spairecustomers/README.md#addpaymentmethod) - Add Customer Payment Method * [confirmPaymentMethod](docs/sdks/spairecustomers/README.md#confirmpaymentmethod) - Confirm Customer Payment Method * [deletePaymentMethod](docs/sdks/spairecustomers/README.md#deletepaymentmethod) - Delete Customer Payment Method ### [CustomerPortal.Downloadables](docs/sdks/downloadables/README.md) * [list](docs/sdks/downloadables/README.md#list) - List Downloadables ### [CustomerPortal.LicenseKeys](docs/sdks/spairelicensekeys/README.md) * [list](docs/sdks/spairelicensekeys/README.md#list) - List License Keys * [get](docs/sdks/spairelicensekeys/README.md#get) - Get License Key * [validate](docs/sdks/spairelicensekeys/README.md#validate) - Validate License Key * [activate](docs/sdks/spairelicensekeys/README.md#activate) - Activate License Key * [deactivate](docs/sdks/spairelicensekeys/README.md#deactivate) - Deactivate License Key ### [CustomerPortal.Members](docs/sdks/spairemembers/README.md) * [listMembers](docs/sdks/spairemembers/README.md#listmembers) - List Members * [addMember](docs/sdks/spairemembers/README.md#addmember) - Add Member * [removeMember](docs/sdks/spairemembers/README.md#removemember) - Remove Member * [updateMember](docs/sdks/spairemembers/README.md#updatemember) - Update Member ### [CustomerPortal.Orders](docs/sdks/spaireorders/README.md) * [list](docs/sdks/spaireorders/README.md#list) - List Orders * [get](docs/sdks/spaireorders/README.md#get) - Get Order * [update](docs/sdks/spaireorders/README.md#update) - Update Order * [invoice](docs/sdks/spaireorders/README.md#invoice) - Get Order Invoice * [generateInvoice](docs/sdks/spaireorders/README.md#generateinvoice) - Generate Order Invoice * [getPaymentStatus](docs/sdks/spaireorders/README.md#getpaymentstatus) - Get Order Payment Status * [confirmRetryPayment](docs/sdks/spaireorders/README.md#confirmretrypayment) - Confirm Retry Payment ### [CustomerPortal.Organizations](docs/sdks/spaireorganizations/README.md) * [get](docs/sdks/spaireorganizations/README.md#get) - Get Organization ### [CustomerPortal.Seats](docs/sdks/seats/README.md) * [listSeats](docs/sdks/seats/README.md#listseats) - List Seats * [assignSeat](docs/sdks/seats/README.md#assignseat) - Assign Seat * [revokeSeat](docs/sdks/seats/README.md#revokeseat) - Revoke Seat * [resendInvitation](docs/sdks/seats/README.md#resendinvitation) - Resend Invitation * [listClaimedSubscriptions](docs/sdks/seats/README.md#listclaimedsubscriptions) - List Claimed Subscriptions ### [CustomerPortal.Subscriptions](docs/sdks/spairesubscriptions/README.md) * [list](docs/sdks/spairesubscriptions/README.md#list) - List Subscriptions * [get](docs/sdks/spairesubscriptions/README.md#get) - Get Subscription * [cancel](docs/sdks/spairesubscriptions/README.md#cancel) - Cancel Subscription * [update](docs/sdks/spairesubscriptions/README.md#update) - Update Subscription ### [CustomerPortal.Wallets](docs/sdks/wallets/README.md) * [list](docs/sdks/wallets/README.md#list) - List Wallets * [get](docs/sdks/wallets/README.md#get) - Get Wallet ### [CustomerSeats](docs/sdks/customerseats/README.md) * [listSeats](docs/sdks/customerseats/README.md#listseats) - List Seats * [assignSeat](docs/sdks/customerseats/README.md#assignseat) - Assign Seat * [revokeSeat](docs/sdks/customerseats/README.md#revokeseat) - Revoke Seat * [resendInvitation](docs/sdks/customerseats/README.md#resendinvitation) - Resend Invitation * [getClaimInfo](docs/sdks/customerseats/README.md#getclaiminfo) - Get Claim Info * [claimSeat](docs/sdks/customerseats/README.md#claimseat) - Claim Seat ### [CustomerSessions](docs/sdks/customersessions/README.md) * [create](docs/sdks/customersessions/README.md#create) - Create Customer Session ### [Customers](docs/sdks/customers/README.md) * [list](docs/sdks/customers/README.md#list) - List Customers * [create](docs/sdks/customers/README.md#create) - Create Customer * [export](docs/sdks/customers/README.md#export) - Export Customers * [get](docs/sdks/customers/README.md#get) - Get Customer * [delete](docs/sdks/customers/README.md#delete) - Delete Customer * [update](docs/sdks/customers/README.md#update) - Update Customer * [getExternal](docs/sdks/customers/README.md#getexternal) - Get Customer by External ID * [deleteExternal](docs/sdks/customers/README.md#deleteexternal) - Delete Customer by External ID * [updateExternal](docs/sdks/customers/README.md#updateexternal) - Update Customer by External ID * [getState](docs/sdks/customers/README.md#getstate) - Get Customer State * [getStateExternal](docs/sdks/customers/README.md#getstateexternal) - Get Customer State by External ID ### [Discounts](docs/sdks/discounts/README.md) * [list](docs/sdks/discounts/README.md#list) - List Discounts * [create](docs/sdks/discounts/README.md#create) - Create Discount * [get](docs/sdks/discounts/README.md#get) - Get Discount * [delete](docs/sdks/discounts/README.md#delete) - Delete Discount * [update](docs/sdks/discounts/README.md#update) - Update Discount ### [Disputes](docs/sdks/disputes/README.md) * [list](docs/sdks/disputes/README.md#list) - List Disputes * [get](docs/sdks/disputes/README.md#get) - Get Dispute ### [EventTypes](docs/sdks/eventtypes/README.md) * [list](docs/sdks/eventtypes/README.md#list) - List Event Types * [update](docs/sdks/eventtypes/README.md#update) - Update Event Type ### [Events](docs/sdks/events/README.md) * [list](docs/sdks/events/README.md#list) - List Events * [listNames](docs/sdks/events/README.md#listnames) - List Event Names * [get](docs/sdks/events/README.md#get) - Get Event * [ingest](docs/sdks/events/README.md#ingest) - Ingest Events ### [Files](docs/sdks/files/README.md) * [list](docs/sdks/files/README.md#list) - List Files * [create](docs/sdks/files/README.md#create) - Create File * [uploaded](docs/sdks/files/README.md#uploaded) - Complete File Upload * [delete](docs/sdks/files/README.md#delete) - Delete File * [update](docs/sdks/files/README.md#update) - Update File ### [LicenseKeys](docs/sdks/licensekeys/README.md) * [list](docs/sdks/licensekeys/README.md#list) - List License Keys * [get](docs/sdks/licensekeys/README.md#get) - Get License Key * [update](docs/sdks/licensekeys/README.md#update) - Update License Key * [getActivation](docs/sdks/licensekeys/README.md#getactivation) - Get Activation * [validate](docs/sdks/licensekeys/README.md#validate) - Validate License Key * [activate](docs/sdks/licensekeys/README.md#activate) - Activate License Key * [deactivate](docs/sdks/licensekeys/README.md#deactivate) - Deactivate License Key ### [MemberSessions](docs/sdks/membersessions/README.md) * [create](docs/sdks/membersessions/README.md#create) - Create Member Session ### [Members](docs/sdks/members/README.md) * [listMembers](docs/sdks/members/README.md#listmembers) - List Members * [createMember](docs/sdks/members/README.md#createmember) - Create Member * [getMember](docs/sdks/members/README.md#getmember) - Get Member * [deleteMember](docs/sdks/members/README.md#deletemember) - Delete Member * [updateMember](docs/sdks/members/README.md#updatemember) - Update Member ### [Meters](docs/sdks/meters/README.md) * [list](docs/sdks/meters/README.md#list) - List Meters * [create](docs/sdks/meters/README.md#create) - Create Meter * [get](docs/sdks/meters/README.md#get) - Get Meter * [update](docs/sdks/meters/README.md#update) - Update Meter * [quantities](docs/sdks/meters/README.md#quantities) - Get Meter Quantities ### [Metrics](docs/sdks/metrics/README.md) * [get](docs/sdks/metrics/README.md#get) - Get Metrics * [limits](docs/sdks/metrics/README.md#limits) - Get Metrics Limits ### [Oauth2](docs/sdks/oauth2/README.md) * [authorize](docs/sdks/oauth2/README.md#authorize) - Authorize * [token](docs/sdks/oauth2/README.md#token) - Request Token * [revoke](docs/sdks/oauth2/README.md#revoke) - Revoke Token * [introspect](docs/sdks/oauth2/README.md#introspect) - Introspect Token * [userinfo](docs/sdks/oauth2/README.md#userinfo) - Get User Info #### [Oauth2.Clients](docs/sdks/clients/README.md) * [create](docs/sdks/clients/README.md#create) - Create Client * [get](docs/sdks/clients/README.md#get) - Get Client * [update](docs/sdks/clients/README.md#update) - Update Client * [delete](docs/sdks/clients/README.md#delete) - Delete Client ### [Orders](docs/sdks/orders/README.md) * [list](docs/sdks/orders/README.md#list) - List Orders * [export](docs/sdks/orders/README.md#export) - Export Subscriptions * [get](docs/sdks/orders/README.md#get) - Get Order * [update](docs/sdks/orders/README.md#update) - Update Order * [invoice](docs/sdks/orders/README.md#invoice) - Get Order Invoice * [generateInvoice](docs/sdks/orders/README.md#generateinvoice) - Generate Order Invoice ### [OrganizationAccessTokens](docs/sdks/organizationaccesstokens/README.md) * [list](docs/sdks/organizationaccesstokens/README.md#list) - List * [create](docs/sdks/organizationaccesstokens/README.md#create) - Create * [delete](docs/sdks/organizationaccesstokens/README.md#delete) - Delete * [update](docs/sdks/organizationaccesstokens/README.md#update) - Update ### [Organizations](docs/sdks/organizations/README.md) * [list](docs/sdks/organizations/README.md#list) - List Organizations * [create](docs/sdks/organizations/README.md#create) - Create Organization * [get](docs/sdks/organizations/README.md#get) - Get Organization * [update](docs/sdks/organizations/README.md#update) - Update Organization ### [Payments](docs/sdks/payments/README.md) * [list](docs/sdks/payments/README.md#list) - List Payments * [get](docs/sdks/payments/README.md#get) - Get Payment ### [Products](docs/sdks/products/README.md) * [list](docs/sdks/products/README.md#list) - List Products * [create](docs/sdks/products/README.md#create) - Create Product * [get](docs/sdks/products/README.md#get) - Get Product * [update](docs/sdks/products/README.md#update) - Update Product * [updateBenefits](docs/sdks/products/README.md#updatebenefits) - Update Product Benefits #### [Products.Products](docs/sdks/spaireproducts/README.md) * [previewTax](docs/sdks/spaireproducts/README.md#previewtax) - Preview Tax ### [Refunds](docs/sdks/refunds/README.md) * [list](docs/sdks/refunds/README.md#list) - List Refunds * [create](docs/sdks/refunds/README.md#create) - Create Refund ### [Subscriptions](docs/sdks/subscriptions/README.md) * [list](docs/sdks/subscriptions/README.md#list) - List Subscriptions * [create](docs/sdks/subscriptions/README.md#create) - Create Subscription * [export](docs/sdks/subscriptions/README.md#export) - Export Subscriptions * [get](docs/sdks/subscriptions/README.md#get) - Get Subscription * [revoke](docs/sdks/subscriptions/README.md#revoke) - Revoke Subscription * [update](docs/sdks/subscriptions/README.md#update) - Update Subscription ### [Webhooks](docs/sdks/webhooks/README.md) * [listWebhookEndpoints](docs/sdks/webhooks/README.md#listwebhookendpoints) - List Webhook Endpoints * [createWebhookEndpoint](docs/sdks/webhooks/README.md#createwebhookendpoint) - Create Webhook Endpoint * [getWebhookEndpoint](docs/sdks/webhooks/README.md#getwebhookendpoint) - Get Webhook Endpoint * [deleteWebhookEndpoint](docs/sdks/webhooks/README.md#deletewebhookendpoint) - Delete Webhook Endpoint * [updateWebhookEndpoint](docs/sdks/webhooks/README.md#updatewebhookendpoint) - Update Webhook Endpoint * [resetWebhookEndpointSecret](docs/sdks/webhooks/README.md#resetwebhookendpointsecret) - Reset Webhook Endpoint Secret * [listWebhookDeliveries](docs/sdks/webhooks/README.md#listwebhookdeliveries) - List Webhook Deliveries * [redeliverWebhookEvent](docs/sdks/webhooks/README.md#redeliverwebhookevent) - Redeliver Webhook Event

Pagination

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the returned object will be a Generator instead of an individual response.

Working with generators is as simple as iterating over the responses in a foreach loop, and you can see an example below:

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.

By default an API error will raise a Errors\APIException exception, which has the following properties:

Property Type Description
$message string The error message
$statusCode int The HTTP status code
$rawResponse ?\Psr\Http\Message\ResponseInterface The raw HTTP response
$body string The response content

When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the list method throws the following exceptions:

Error Type Status Code Content Type
Errors\HTTPValidationError 422 application/json
Errors\APIException 4XX, 5XX */*

Example

Server Selection

Select Server by Name

You can override the default server globally using the setServer(string $serverName) builder method when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:

Name Server Description
production https://api.spairehq.com Production environment

Example

Override Server URL Per-Client

The default server can also be overridden globally using the setServerUrl(string $serverUrl) builder method when initializing the SDK client instance. For example:

Development

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

SDK Created by Speakeasy


All versions of spaire-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
galbar/jsonpath Version >=3.0
guzzlehttp/guzzle Version ^7.0
speakeasy/serializer Version ^4.0.3
brick/date-time Version >=0.7.0
phpdocumentor/type-resolver Version >=1.8
brick/math Version >=0.12.1
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 spaire-tech/spaire-php contains the following files

Loading the files please wait ...