You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
## Introduction
5
5
6
6
Maxio Advanced Billing (formerly Chargify) provides an HTTP-based API that conforms to the principles of REST.
7
-
One of the many reasons to use Advanced Billing is the immense feature set and surrounding community [client libraries](page:development-tools/client-libraries).
7
+
One of the many reasons to use Advanced Billing is the immense feature set and surrounding community [client libraries](http://localhost:8080/go/development-tools/development-tools/client-libraries).
8
8
The Maxio API returns JSON responses as the primary and recommended format, but XML is also provided as a backwards compatible option for Merchants who require it.
9
9
10
10
### Steps to make your first Maxio Advanced Billing API call
@@ -38,10 +38,10 @@ The following section explains how to use the advancedbilling library in a new p
38
38
To use the package in your application, you can install the package from [pkg.go.dev](https://pkg.go.dev/) using the following command:
39
39
40
40
```bash
41
-
$ go get github.com/maxio-com/ab-golang-sdk@v0.4.2
41
+
$ go get github.com/maxio-com/ab-golang-sdk@v5.0.0
42
42
```
43
43
44
-
You can also view the package at: https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk@v0.4.2
44
+
You can also view the package at: https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk@v5.0.0
45
45
46
46
## Initialize the API Client
47
47
@@ -51,9 +51,8 @@ The following parameters are configurable for the API Client:
51
51
52
52
| Parameter | Type | Description |
53
53
| --- | --- | --- |
54
-
|`subdomain`|`string`| The subdomain for your Advanced Billing site.<br>*Default*: `"subdomain"`|
55
-
|`domain`|`string`| The Advanced Billing server domain.<br>*Default*: `"chargify.com"`|
56
-
|`environment`|`Environment`| The API environment. <br> **Default: `Environment.PRODUCTION`**|
54
+
|`site`|`string`| The subdomain for your Advanced Billing site.<br>*Default*: `"subdomain"`|
55
+
|`environment`|`Environment`| The API environment. <br> **Default: `Environment.US`**|
57
56
|`httpConfiguration`|[`HttpConfiguration`](doc/http-configuration.md)| Configurable http client options like timeout and retries. |
58
57
|`basicAuthCredentials`|[`BasicAuthCredentials`](doc/auth/basic-authentication.md)| The Credentials Setter for Basic Authentication |
"422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorArrayMapResponse},
"422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse},
// ReadComponentPricePoint takes context, componentId, pricePointId as parameters and
221
+
// ReadComponentPricePoint takes context, componentId, pricePointId, currencyPrices as parameters and
216
222
// returns an models.ApiResponse with models.ComponentPricePointResponse data and
217
223
// an error if there was an issue with the request or response.
218
224
// Use this endpoint to retrieve details for a specific component price point. You can achieve this by using either the component price point ID or handle.
"422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorArrayMapResponse},
"422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorArrayMapResponse},
// Additionally, for documentation on how to apply a coupon to a subscription within the Advanced Billing UI, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
36
36
// ## Create Coupon
37
37
// This request will create a coupon, based on the provided information.
38
-
// When creating a coupon, you must specify a product family using the `product_family_id`. If no `product_family_id` is passed, the first product family available is used. You will also need to formulate your URL to cite the Product Family ID in your request.
39
-
// You can restrict a coupon to only apply to specific products / components by optionally passing in hashes of `restricted_products` and/or `restricted_components` in the format:
40
-
// `{ "<product/component_id>": boolean_value }`
38
+
// You can create either a flat amount coupon, by specyfing `amount_in_cents`, or percentage coupon by specyfing `percentage`.
39
+
// You can restrict a coupon to only apply to specific products / components by optionally passing in `restricted_products` and/or `restricted_components` objects in the format:
// FindCoupon takes context, productFamilyId, code as parameters and
126
+
// FindCoupon takes context, productFamilyId, code, currencyPrices as parameters and
127
127
// returns an models.ApiResponse with models.CouponResponse data and
128
128
// an error if there was an issue with the request or response.
129
129
// You can search for a coupon via the API with the find method. By passing a code parameter, the find will attempt to locate a coupon that matches that code. If no coupon is found, a 404 is returned.
130
130
// If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, then you will need to specify (either in the url or as a query string param) the product family id.
// ReadCoupon takes context, productFamilyId, couponId as parameters and
159
+
// ReadCoupon takes context, productFamilyId, couponId, currencyPrices as parameters and
156
160
// returns an models.ApiResponse with models.CouponResponse data and
157
161
// an error if there was an issue with the request or response.
158
162
// You can retrieve the Coupon via the API with the Show method. You must identify the Coupon in this call by the ID parameter that Advanced Billing assigns.
"422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorListResponse},
"422": {TemplatedMessage: "HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", Unmarshaller: errors.NewErrorStringMapResponse},
0 commit comments