xero.appstore
ballerinax/xero.appstore Ballerina library
Overview
This is a generated connector for Xero AppStore API v2.18.0 OpenAPI specification. The Xero AppStore API is a collection of endpoints for Xero Partners to interact with the App Store Billing platform.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a Xero account
- Obtain tokens by following this guide
Clients
xero.appstore: Client
This is a generated connector for Xero AppStore API v2.18.0 OpenAPI specification. The Xero AppStore API is a collection of endpoints for Xero Partners to interact with the App Store Billing platform.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a Xero account and obtain tokens by following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.xero.com/appstore/2.0" - URL of the target service
getSubscription
function getSubscription(string subscriptionId) returns Subscription|error
Retrieves a subscription for a given subscriptionId
Parameters
- subscriptionId string - Unique identifier for Subscription object
Return Type
- Subscription|error - Success - return response of unique Subscription object
Records
xero.appstore: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
xero.appstore: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth OAuth2ClientCredentialsGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
xero.appstore: OAuth2ClientCredentialsGrantConfig
OAuth2 Client Credentials Grant Configs
Fields
- Fields Included from *OAuth2ClientCredentialsGrantConfig
- tokenUrl string(default "https://identity.xero.com/connect/token") - Token URL
xero.appstore: Plan
Fields
- id string - The unique identifier of the plan
- name string - The name of the plan. It is used in the invoice line item description.
- status string - Status of the plan. Available statuses are ACTIVE, CANCELED, and PENDING_ACTIVATION.
- subscriptionItems SubscriptionItem[] - List of the subscription items belonging to the plan. It does not include cancelled subscription items.
xero.appstore: Price
Fields
- amount decimal - The net (before tax) amount.
- currency string - The currency of the price.
- id string - The unique identifier of the price.
xero.appstore: ProblemDetails
Fields
- detail string? -
- extensions record {}? -
- instance string? -
- status int? -
- title string? -
- 'type string? -
xero.appstore: Product
Fields
- id string? - The unique identifier for the product
- name string? - The name of the product
- 'type string? - The pricing model of the product:
- FIXED: Customers are charged a fixed amount for each billing period
- PER_SEAT: Customers are charged based on the number of units they purchase
- seatUnit string? - The unit of the per seat product. e.g. "user", "organisation", "SMS", etc
xero.appstore: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
xero.appstore: Subscription
Fields
- currentPeriodEnd string - End of the current period that the subscription has been invoiced for.
- endDate string? - If the subscription has been canceled, this is the date when the subscription ends. If null, the subscription is active and has not been cancelled
- id string - The unique identifier of the subscription
- organisationId string - The Xero generated unique identifier for the organisation
- plans Plan[] - List of plans for the subscription.
- startDate string - Date when the subscription was first created.
- status string - Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE.
- testMode boolean? - Boolean used to indicate if the subscription is in test mode
xero.appstore: SubscriptionItem
Fields
- endDate string? - Date when the subscription to this product will end
- id string - The unique identifier of the subscription item.
- price Price -
- product Product -
- startDate string - Date the subscription started, or will start. Note: this could be in the future for downgrades or reduced number of seats that haven't taken effect yet.
- status string - Status of the subscription item. Available statuses are ACTIVE, CANCELED, and PENDING_ACTIVATION.
- testMode boolean? - If the subscription is a test subscription
Import
import ballerinax/xero.appstore;
Metadata
Released date: over 1 year ago
Version: 1.4.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Keywords
Support/Customer Support
Cost/Paid
Contributors
Dependencies