Skip to content

Commit

Permalink
[DE-759] Release 2.0.0 (#17)
Browse files Browse the repository at this point in the history
DE-766 Bug fix: listEvents endpoint deserialisation problem
  • Loading branch information
michalpierog authored Mar 19, 2024
1 parent bee57ed commit 57dd846
Show file tree
Hide file tree
Showing 121 changed files with 350 additions and 94 deletions.
114 changes: 57 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

## Introduction

Maxio Advanced Billing (formerly Chargify) provides an HTTP-based API that conforms to the principles of REST.
One of the many reasons to use Advanced Billing is the immense feature set and surrounding community [client libraries](page:development-tools/client-libraries).
Maxio Advanced Billing (formerly Chargify) provides an HTTP-based API that conforms to the principles of REST.
One of the many reasons to use Advanced Billing is the immense feature set and surrounding community [client libraries](page:development-tools/client-libraries).
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.

### Steps to make your first Maxio Advanced Billing API call

1. [Sign-up](https://app.chargify.com/signup/maxio-billing-sandbox) or [log-in](https://app.chargify.com/login.html) to your [test site](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405553861773-Testing-Intro) account.
2. [Setup and configure authentication](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405281550477-API-Keys#api) credentials.
3. Submit your API request and try it out.
4. Verify results through response.
1. [Sign-up](https://app.chargify.com/signup/maxio-billing-sandbox) or [log-in](https://app.chargify.com/login.html) to your [test site](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405553861773-Testing-Intro) account.
2. [Setup and configure authentication](https://maxio-chargify.zendesk.com/hc/en-us/articles/5405281550477-API-Keys#api) credentials.
3. Submit your API request and try it out.
4. Verify results through response.
5. Test our integrations.

We strongly suggest exploring the developer portal, our [integrations](https://www.maxio.com/integrations) and the API guide, as well as the entire set of application-based documentation to aid in your discovery of the product.
Expand All @@ -37,11 +37,11 @@ The following section explains how to use the advancedbilling library in a new p

To use the package in your application, you can install the package from [pkg.go.dev](https://pkg.go.dev/) using the following command:

```bash
$ go get github.com/maxio-com/ab-golang-sdk@v1.0.0-alpha.1
```bash
$ go get github.com/maxio-com/ab-golang-sdk@v2.0.0
```

You can also view the package at: https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk@v1.0.0-alpha.1
You can also view the package at: https://pkg.go.dev/github.com/maxio-com/ab-golang-sdk@v2.0.0

## Initialize the API Client

Expand All @@ -60,21 +60,21 @@ The following parameters are configurable for the API Client:
The API client can be initialized as follows:

```go
client := advancedbilling.NewClient(
advancedbilling.CreateConfiguration(
advancedbilling.WithHttpConfiguration(
advancedbilling.CreateHttpConfiguration(
advancedbilling.WithTimeout(30),
),
),
advancedbilling.WithEnvironment(advancedbilling.PRODUCTION),
advancedbilling.WithBasicAuthCredentials(
advancedbilling.NewBasicAuthCredentials(
"BasicAuthUserName",
"BasicAuthPassword",
),
),
),
client := advancedbilling.NewClient(
advancedbilling.CreateConfiguration(
advancedbilling.WithHttpConfiguration(
advancedbilling.CreateHttpConfiguration(
advancedbilling.WithTimeout(30),
),
),
advancedbilling.WithEnvironment(advancedbilling.PRODUCTION),
advancedbilling.WithBasicAuthCredentials(
advancedbilling.NewBasicAuthCredentials(
"BasicAuthUserName",
"BasicAuthPassword",
),
),
),
)
```

Expand All @@ -91,46 +91,46 @@ The SDK can be configured to use a different environment for making API calls. A

## Authorization

This API uses the following authentication schemes.

This API uses the following authentication schemes.

* [`BasicAuth (Basic Authentication)`](doc/auth/basic-authentication.md)

## List of APIs

* [API Exports](doc/controllers/api-exports.md)
* [Advance Invoice](doc/controllers/advance-invoice.md)
* [Billing Portal](doc/controllers/billing-portal.md)
* [Custom Fields](doc/controllers/custom-fields.md)
* [Events-Based Billing Segments](doc/controllers/events-based-billing-segments.md)
* [Payment Profiles](doc/controllers/payment-profiles.md)
* [Product Families](doc/controllers/product-families.md)
* [Product Price Points](doc/controllers/product-price-points.md)
* [Proforma Invoices](doc/controllers/proforma-invoices.md)
* [Reason Codes](doc/controllers/reason-codes.md)
* [Referral Codes](doc/controllers/referral-codes.md)
* [Sales Commissions](doc/controllers/sales-commissions.md)
* [Subscription Components](doc/controllers/subscription-components.md)
* [Subscription Groups](doc/controllers/subscription-groups.md)
* [Subscription Group Invoice Account](doc/controllers/subscription-group-invoice-account.md)
* [Subscription Group Status](doc/controllers/subscription-group-status.md)
* [Subscription Invoice Account](doc/controllers/subscription-invoice-account.md)
* [Subscription Notes](doc/controllers/subscription-notes.md)
* [Subscription Products](doc/controllers/subscription-products.md)
* [Subscription Status](doc/controllers/subscription-status.md)
* [Coupons](doc/controllers/coupons.md)
* [Components](doc/controllers/components.md)
* [Customers](doc/controllers/customers.md)
* [Events](doc/controllers/events.md)
* [Insights](doc/controllers/insights.md)
* [Invoices](doc/controllers/invoices.md)
* [Offers](doc/controllers/offers.md)
* [Products](doc/controllers/products.md)
* [Sites](doc/controllers/sites.md)
* [Subscriptions](doc/controllers/subscriptions.md)
* [API Exports](doc/controllers/api-exports.md)
* [Advance Invoice](doc/controllers/advance-invoice.md)
* [Billing Portal](doc/controllers/billing-portal.md)
* [Custom Fields](doc/controllers/custom-fields.md)
* [Events-Based Billing Segments](doc/controllers/events-based-billing-segments.md)
* [Payment Profiles](doc/controllers/payment-profiles.md)
* [Product Families](doc/controllers/product-families.md)
* [Product Price Points](doc/controllers/product-price-points.md)
* [Proforma Invoices](doc/controllers/proforma-invoices.md)
* [Reason Codes](doc/controllers/reason-codes.md)
* [Referral Codes](doc/controllers/referral-codes.md)
* [Sales Commissions](doc/controllers/sales-commissions.md)
* [Subscription Components](doc/controllers/subscription-components.md)
* [Subscription Groups](doc/controllers/subscription-groups.md)
* [Subscription Group Invoice Account](doc/controllers/subscription-group-invoice-account.md)
* [Subscription Group Status](doc/controllers/subscription-group-status.md)
* [Subscription Invoice Account](doc/controllers/subscription-invoice-account.md)
* [Subscription Notes](doc/controllers/subscription-notes.md)
* [Subscription Products](doc/controllers/subscription-products.md)
* [Subscription Status](doc/controllers/subscription-status.md)
* [Coupons](doc/controllers/coupons.md)
* [Components](doc/controllers/components.md)
* [Customers](doc/controllers/customers.md)
* [Events](doc/controllers/events.md)
* [Insights](doc/controllers/insights.md)
* [Invoices](doc/controllers/invoices.md)
* [Offers](doc/controllers/offers.md)
* [Products](doc/controllers/products.md)
* [Sites](doc/controllers/sites.md)
* [Subscriptions](doc/controllers/subscriptions.md)
* [Webhooks](doc/controllers/webhooks.md)

## Classes Documentation

* [HttpConfiguration](doc/http-configuration.md)
* [HttpConfiguration](doc/http-configuration.md)
* [RetryConfiguration](doc/retry-configuration.md)

2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func NewClient(configuration Configuration) ClientInterface {
configuration: configuration,
}

client.userAgent = utilities.UpdateUserAgent("AB SDK Go:1.0.0-alpha.1 on OS {os-info}")
client.userAgent = utilities.UpdateUserAgent("AB SDK Go:2.0.0 on OS {os-info}")
client.callBuilderFactory = callBuilderHandler(
func(server string) string {
if server == "" {
Expand Down
2 changes: 1 addition & 1 deletion doc/controllers/subscription-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ body0 := models.EBBEvent{
}
body := []models.EBBEvent{body0}

resp, err := subscriptionComponentsController.BulkRecordEvents(ctx, subdomain, apiHandle, nil, &body)
resp, err := subscriptionComponentsController.BulkRecordEvents(ctx, subdomain, apiHandle, nil, body)
if err != nil {
log.Fatalln(err)
} else {
Expand Down
2 changes: 1 addition & 1 deletion doc/models/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `Id` | `int` | Required | - |
| `Id` | `int64` | Required | - |
| `Key` | `string` | Required | **Constraints**: *Minimum Length*: `1` |
| `Message` | `string` | Required | **Constraints**: *Minimum Length*: `1` |
| `SubscriptionId` | `*int` | Required | - |
Expand Down
10 changes: 5 additions & 5 deletions doc/models/invoice-issued.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
| `Uid` | `string` | Required | - |
| `Number` | `string` | Required | - |
| `Role` | `string` | Required | - |
| `DueDate` | `time.Time` | Required | - |
| `IssueDate` | `time.Time` | Required | - |
| `PaidDate` | `time.Time` | Required | - |
| `DueDate` | `*time.Time` | Required | - |
| `IssueDate` | `string` | Required | Invoice issue date. Can be an empty string if value is missing. |
| `PaidDate` | `string` | Required | Paid date. Can be an empty string if value is missing. |
| `DueAmount` | `string` | Required | - |
| `PaidAmount` | `string` | Required | - |
| `TaxAmount` | `string` | Required | - |
Expand All @@ -33,8 +33,8 @@
"number": "number8",
"role": "role2",
"due_date": "2016-03-13T12:52:32.123Z",
"issue_date": "2016-03-13T12:52:32.123Z",
"paid_date": "2016-03-13T12:52:32.123Z",
"issue_date": "issue_date0",
"paid_date": "paid_date6",
"due_amount": "due_amount6",
"paid_amount": "paid_amount4",
"tax_amount": "tax_amount2",
Expand Down
2 changes: 2 additions & 0 deletions models/add_subscription_to_a_group_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalAddSubscriptionToAGroupGroup struct{}

var AddSubscriptionToAGroupGroupContainer internalAddSubscriptionToAGroupGroup

// The internalAddSubscriptionToAGroupGroup instance, wrapping the provided GroupSettings value.
func (a *internalAddSubscriptionToAGroupGroup) FromGroupSettings(val GroupSettings) AddSubscriptionToAGroupGroup {
return AddSubscriptionToAGroupGroup{value: &val}
}

// The internalAddSubscriptionToAGroupGroup instance, wrapping the provided bool value.
func (a *internalAddSubscriptionToAGroupGroup) FromBoolean(val bool) AddSubscriptionToAGroupGroup {
return AddSubscriptionToAGroupGroup{value: &val}
}
1 change: 1 addition & 0 deletions models/allocation_payment.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type internalAllocationPayment struct{}

var AllocationPaymentContainer internalAllocationPayment

// The internalAllocationPayment instance, wrapping the provided PaymentForAllocation value.
func (a *internalAllocationPayment) FromPaymentForAllocation(val PaymentForAllocation) AllocationPayment {
return AllocationPayment{value: &val}
}
2 changes: 2 additions & 0 deletions models/allocation_preview_item_previous_quantity.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalAllocationPreviewItemPreviousQuantity struct{}

var AllocationPreviewItemPreviousQuantityContainer internalAllocationPreviewItemPreviousQuantity

// The internalAllocationPreviewItemPreviousQuantity instance, wrapping the provided int value.
func (a *internalAllocationPreviewItemPreviousQuantity) FromNumber(val int) AllocationPreviewItemPreviousQuantity {
return AllocationPreviewItemPreviousQuantity{value: &val}
}

// The internalAllocationPreviewItemPreviousQuantity instance, wrapping the provided string value.
func (a *internalAllocationPreviewItemPreviousQuantity) FromString(val string) AllocationPreviewItemPreviousQuantity {
return AllocationPreviewItemPreviousQuantity{value: &val}
}
2 changes: 2 additions & 0 deletions models/allocation_preview_item_quantity.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalAllocationPreviewItemQuantity struct{}

var AllocationPreviewItemQuantityContainer internalAllocationPreviewItemQuantity

// The internalAllocationPreviewItemQuantity instance, wrapping the provided int value.
func (a *internalAllocationPreviewItemQuantity) FromNumber(val int) AllocationPreviewItemQuantity {
return AllocationPreviewItemQuantity{value: &val}
}

// The internalAllocationPreviewItemQuantity instance, wrapping the provided string value.
func (a *internalAllocationPreviewItemQuantity) FromString(val string) AllocationPreviewItemQuantity {
return AllocationPreviewItemQuantity{value: &val}
}
2 changes: 2 additions & 0 deletions models/allocation_previous_quantity.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalAllocationPreviousQuantity struct{}

var AllocationPreviousQuantityContainer internalAllocationPreviousQuantity

// The internalAllocationPreviousQuantity instance, wrapping the provided int value.
func (a *internalAllocationPreviousQuantity) FromNumber(val int) AllocationPreviousQuantity {
return AllocationPreviousQuantity{value: &val}
}

// The internalAllocationPreviousQuantity instance, wrapping the provided string value.
func (a *internalAllocationPreviousQuantity) FromString(val string) AllocationPreviousQuantity {
return AllocationPreviousQuantity{value: &val}
}
2 changes: 2 additions & 0 deletions models/allocation_quantity.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalAllocationQuantity struct{}

var AllocationQuantityContainer internalAllocationQuantity

// The internalAllocationQuantity instance, wrapping the provided int value.
func (a *internalAllocationQuantity) FromNumber(val int) AllocationQuantity {
return AllocationQuantity{value: &val}
}

// The internalAllocationQuantity instance, wrapping the provided string value.
func (a *internalAllocationQuantity) FromString(val string) AllocationQuantity {
return AllocationQuantity{value: &val}
}
2 changes: 2 additions & 0 deletions models/archive_product_price_point_price_point_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalArchiveProductPricePointPricePointId struct{}

var ArchiveProductPricePointPricePointIdContainer internalArchiveProductPricePointPricePointId

// The internalArchiveProductPricePointPricePointId instance, wrapping the provided int value.
func (a *internalArchiveProductPricePointPricePointId) FromNumber(val int) ArchiveProductPricePointPricePointId {
return ArchiveProductPricePointPricePointId{value: &val}
}

// The internalArchiveProductPricePointPricePointId instance, wrapping the provided string value.
func (a *internalArchiveProductPricePointPricePointId) FromString(val string) ArchiveProductPricePointPricePointId {
return ArchiveProductPricePointPricePointId{value: &val}
}
2 changes: 2 additions & 0 deletions models/archive_product_price_point_product_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalArchiveProductPricePointProductId struct{}

var ArchiveProductPricePointProductIdContainer internalArchiveProductPricePointProductId

// The internalArchiveProductPricePointProductId instance, wrapping the provided int value.
func (a *internalArchiveProductPricePointProductId) FromNumber(val int) ArchiveProductPricePointProductId {
return ArchiveProductPricePointProductId{value: &val}
}

// The internalArchiveProductPricePointProductId instance, wrapping the provided string value.
func (a *internalArchiveProductPricePointProductId) FromString(val string) ArchiveProductPricePointProductId {
return ArchiveProductPricePointProductId{value: &val}
}
2 changes: 2 additions & 0 deletions models/calendar_billing_snap_day.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalCalendarBillingSnapDay struct{}

var CalendarBillingSnapDayContainer internalCalendarBillingSnapDay

// The internalCalendarBillingSnapDay instance, wrapping the provided int value.
func (c *internalCalendarBillingSnapDay) FromNumber(val int) CalendarBillingSnapDay {
return CalendarBillingSnapDay{value: &val}
}

// The internalCalendarBillingSnapDay instance, wrapping the provided string value.
func (c *internalCalendarBillingSnapDay) FromString(val string) CalendarBillingSnapDay {
return CalendarBillingSnapDay{value: &val}
}
2 changes: 2 additions & 0 deletions models/component_allocation_change_allocated_quantity.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalComponentAllocationChangeAllocatedQuantity struct{}

var ComponentAllocationChangeAllocatedQuantityContainer internalComponentAllocationChangeAllocatedQuantity

// The internalComponentAllocationChangeAllocatedQuantity instance, wrapping the provided int value.
func (c *internalComponentAllocationChangeAllocatedQuantity) FromNumber(val int) ComponentAllocationChangeAllocatedQuantity {
return ComponentAllocationChangeAllocatedQuantity{value: &val}
}

// The internalComponentAllocationChangeAllocatedQuantity instance, wrapping the provided string value.
func (c *internalComponentAllocationChangeAllocatedQuantity) FromString(val string) ComponentAllocationChangeAllocatedQuantity {
return ComponentAllocationChangeAllocatedQuantity{value: &val}
}
2 changes: 2 additions & 0 deletions models/component_price_point_assignment_price_point.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalComponentPricePointAssignmentPricePoint struct{}

var ComponentPricePointAssignmentPricePointContainer internalComponentPricePointAssignmentPricePoint

// The internalComponentPricePointAssignmentPricePoint instance, wrapping the provided string value.
func (c *internalComponentPricePointAssignmentPricePoint) FromString(val string) ComponentPricePointAssignmentPricePoint {
return ComponentPricePointAssignmentPricePoint{value: &val}
}

// The internalComponentPricePointAssignmentPricePoint instance, wrapping the provided int value.
func (c *internalComponentPricePointAssignmentPricePoint) FromNumber(val int) ComponentPricePointAssignmentPricePoint {
return ComponentPricePointAssignmentPricePoint{value: &val}
}
1 change: 1 addition & 0 deletions models/component_price_point_interval_unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type internalComponentPricePointIntervalUnit struct{}

var ComponentPricePointIntervalUnitContainer internalComponentPricePointIntervalUnit

// The internalComponentPricePointIntervalUnit instance, wrapping the provided IntervalUnit value.
func (c *internalComponentPricePointIntervalUnit) FromIntervalUnit(val IntervalUnit) ComponentPricePointIntervalUnit {
return ComponentPricePointIntervalUnit{value: &val}
}
1 change: 1 addition & 0 deletions models/component_pricing_scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type internalComponentPricingScheme struct{}

var ComponentPricingSchemeContainer internalComponentPricingScheme

// The internalComponentPricingScheme instance, wrapping the provided PricingScheme value.
func (c *internalComponentPricingScheme) FromPricingScheme(val PricingScheme) ComponentPricingScheme {
return ComponentPricingScheme{value: &val}
}
1 change: 1 addition & 0 deletions models/coupon_compounding_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type internalCouponCompoundingStrategy struct{}

var CouponCompoundingStrategyContainer internalCouponCompoundingStrategy

// The internalCouponCompoundingStrategy instance, wrapping the provided CompoundingStrategy value.
func (c *internalCouponCompoundingStrategy) FromCompoundingStrategy(val CompoundingStrategy) CouponCompoundingStrategy {
return CouponCompoundingStrategy{value: &val}
}
2 changes: 2 additions & 0 deletions models/create_allocation_price_point_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalCreateAllocationPricePointId struct{}

var CreateAllocationPricePointIdContainer internalCreateAllocationPricePointId

// The internalCreateAllocationPricePointId instance, wrapping the provided string value.
func (c *internalCreateAllocationPricePointId) FromString(val string) CreateAllocationPricePointId {
return CreateAllocationPricePointId{value: &val}
}

// The internalCreateAllocationPricePointId instance, wrapping the provided int value.
func (c *internalCreateAllocationPricePointId) FromNumber(val int) CreateAllocationPricePointId {
return CreateAllocationPricePointId{value: &val}
}
2 changes: 2 additions & 0 deletions models/create_component_price_point_request_price_point.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ type internalCreateComponentPricePointRequestPricePoint struct{}

var CreateComponentPricePointRequestPricePointContainer internalCreateComponentPricePointRequestPricePoint

// The internalCreateComponentPricePointRequestPricePoint instance, wrapping the provided CreateComponentPricePoint value.
func (c *internalCreateComponentPricePointRequestPricePoint) FromCreateComponentPricePoint(val CreateComponentPricePoint) CreateComponentPricePointRequestPricePoint {
return CreateComponentPricePointRequestPricePoint{value: &val}
}

// The internalCreateComponentPricePointRequestPricePoint instance, wrapping the provided CreatePrepaidUsageComponentPricePoint value.
func (c *internalCreateComponentPricePointRequestPricePoint) FromCreatePrepaidUsageComponentPricePoint(val CreatePrepaidUsageComponentPricePoint) CreateComponentPricePointRequestPricePoint {
return CreateComponentPricePointRequestPricePoint{value: &val}
}
Loading

0 comments on commit 57dd846

Please sign in to comment.