recurly

package module
v4.0.0-...-0516e88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 22 Imported by: 0

README

Recurly

Contributor Covenant

This repository houses the official Go library for Recurly's V3 API.

Documentation for the HTTP API and example code can be found on our Developer Hub.

Getting Started

Installing

Install using go get:

go get -u github.com/recurly/recurly-client-go/v4

import with:

import (
    "github.com/recurly/recurly-client-go/v4"
)
Creating a client

A client represents a connection to the Recurly API. Every call to the server exists as a method on this struct. To initialize, you only need the private API key which can be obtained on the API Credentials Page.

client, err := recurly.NewClient("<apikey>")
if err != nil {
  // Custom error condition handling
}

To access Recurly API in Europe, you will need to specify the EU Region in the ClientOptions.

client, err := recurly.NewClientWithOptions("<apikey>", recurly.ClientOptions{
    Region: recurly.EU,
})
if err != nil {
  // Custom error condition handling
}
Operations

Every operation that can be performed against the API has a corresponding method in the Client struct. The client_operations.go file implements these operations. This file also provides descriptions for each method and their returns. For example, to use the get_account endpoint, the GetAccount method can be called, as seen below. GetAccount() is used to fetch an account; it returns a pointer to the Account struct.

account, err := client.GetAccount(accountID)
if e, ok := err.(*recurly.Error); ok {
  if e.Type == recurly.ErrorTypeNotFound {
    fmt.Printf("Resource not found: %v", e)
    return nil, err
  }
  fmt.Printf("Unexpected Recurly error: %v", e)
  return nil, err
}
fmt.Printf("Fetched Account: %s", account.Id)
Creating Resources

Every Create method on the client takes a specific Request type to form the request.

accountReq := &recurly.AccountCreate{
  Code:      recurly.String("accountcode123"),
  FirstName: recurly.String("Isaac"),
  LastName:  recurly.String("Du Monde"),
  Email:     recurly.String("isaac@example.com"),
  BillingInfo: &recurly.BillingInfoCreate{
    FirstName: recurly.String("Isaac"),
    LastName:  recurly.String("Du Monde"),
    Address: &recurly.AddressCreate{
      Phone:      recurly.String("415-555-5555"),
      Street1:    recurly.String("400 Alabama St."),
      City:       recurly.String("San Francisco"),
      PostalCode: recurly.String("94110"),
      Country:    recurly.String("US"),
      Region:     recurly.String("CA"),
    },
    Number: recurly.String("4111111111111111"),
    Month:  recurly.String("12"),
    Year:   recurly.String("22"),
    Cvv:    recurly.String("123"),
  },
}

account, err := client.CreateAccount(accountReq)
if e, ok := err.(*recurly.Error); ok {
  if e.Type == recurly.ErrorTypeValidation {
    fmt.Printf("Failed validation: %v", e)
    return nil, err
  }
  fmt.Printf("Unexpected Recurly error: %v", e)
  return nil, err
}
fmt.Printf("Created Account: %s", account.Id)
Pagination

Pagination is accomplished via the *List types defined in [resources.go]. For example, AccountList allows you to paginate Account objects. All List* methods on the Client return pagers (pointers to these list types).

These list operations accept parameters for sorting and filtering the results (e.g. Ids, Limit, Sort, Order). Each list operation accepts its own parameters type. For example, ListAccounts() accepts a ListAccountsParams object. These types can be found in Client operations.

listParams := &recurly.ListAccountsParams{
    Sort:  recurly.String("created_at"),
    Order: recurly.String("desc"),
    Limit: recurly.Int(200),
}

accounts := client.ListAccounts(listParams)

Fetch() fetches the next page of resources and puts them in the Data array. After fetching the last page, HasMore will be false.

for accounts.HasMore {
    err := accounts.Fetch()
    if err != nil {
        fmt.Printf("Failed to retrieve next page: %v", err)
        break
    }
    for i, account := range accounts.Data {
        fmt.Printf("Account %3d: %s, %s\n",
            i,
            account.Id,
            account.Code,
        )
    }
}
Counting Resources

Count() can effeciently fetch the number of records that would be returned by the pager. It does this by calling HEAD on the endpoint and parsing and returning the Recurly-Total-Records header. It will respect any filtering parameters you give it:

listParams := &recurly.ListAccountsParams{
    Subscriber: recurly.Bool(true)
}
accounts := client.ListAccounts(listParams)
count, err := accounts.Count()
if err != nil {
    fmt.Printf("Request failed: %v", err)
    return nil, err
}
fmt.Printf("Number of subscribers: %v", *count)
Error Handling

Errors are configured in error.go. Common scenarios in which errors occur may involve "not found" or "validation" errors, which are included among the examples below. A complete list of error types can be found in error.go. You can use the list to customize your case statements.

account, err := client.CreateAccount(accountReq)
if e, ok := err.(*recurly.Error); ok {
  switch e.Type {
  case recurly.ErrorTypeValidation:
    fmt.Printf("Failed validation: %v", e)
    // You can dig into the individual parameters if needed
    for _, p := range e.Params {
      fmt.Printf("JSON key %v was invalid because %v", p.Property, p.Message)
    }
    return nil, err
  case recurly.ErrorTypeNotFound:
    fmt.Printf("Resource not found: %v", e)
    return nil, err
  case recurly.ErrorTypeTransaction:
    fmt.Printf("Transaction Error: %v", e)
    return nil, err
  case recurly.ErrorTypeInvalidToken:
    fmt.Printf("Invalid Token: %v", e)
    return nil, err
  case recurly.ErrorTypeTimeout:
    fmt.Printf("Timeout: %v", e)
    return nil, err
  // If an error occurs that is not covered by a case statement,
  // we can alert the user to a generic error from the API
  default:
    fmt.Printf("Unexpected Recurly error: %v", e)
    return nil, err
  }
}
fmt.Printf("Created Account: %s", account.Id)
HTTP Metadata

Sometimes you might want additional information about the underlying HTTP request and response. Instead of returning this information directly and forcing the programmer to handle it, we inject this metadata into the top level resource that was returned. You can access the response by calling GetResponse() on anything that implements the Resource interface. This includes the resource objects that are returned from operations, as well as Recurly errors.

Warning: Be careful logging or rendering ResponseMetadata objects as they may contain PII or sensitive data.

On a Resource
account, err := client.GetAccount(accountID)
if err != nil {
  return nil, err
}

// GetResponse() returns a *ResponseMetadata object
resp := account.GetResponse()
fmt.Println(resp.Request.ID)          // "58ac04b9d9218319-ATL"
fmt.Println(resp.StatusCode)          // 201
fmt.Println(resp.Request.Method)      // "POST"
fmt.Println(resp.Request.URL)         // "https://v3.recurly.com/accounts"
fmt.Println(resp.RateLimit.Limit)     // 2000
fmt.Println(resp.RateLimit.Remaining) // 1999
On an Error

It can be helpful to inspect the metadata on errors for logging purposes. Having the Request-Id on hand will help our support staff diagnose potential problems quickly.

account, err := client.CreateAccount(accountReq)
if e, ok := err.(*recurly.Error); ok {
  resp := e.GetResponse()
  fmt.Println("Unexpected Error. Request Id: {}", resp.Request.ID)
  return nil, err
}
On any Resource

Both resources and errors implement the Resource interface. This allows you to extract metadata from either in a generic way:

func LogRateLimit(resource *recurly.Resource) {
  fmt.Println("Requests Remaining: {}", resource.GetResponse().RateLimit.Remaining)
}
account, err := client.CreateAccount(accountReq)
if e, ok := err.(*recurly.Error); ok {
  LogRateLimit(e)
  return nil, err
}

LogRateLimit(account)

Contributing

Please see our Contributing Guide.

Documentation

Overview

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

This file is automatically created by Recurly's OpenAPI generation process and thus any edits you make by hand will be lost. If you wish to make a change to this file, please create a Github issue explaining the changes you need and we will usher them to the appropriate places.

Index

Constants

View Source
const (
	// US Datacenter region
	US = region("us")
	// EU Datacenter region
	EU = region("eu")
)
View Source
const (
	ErrorClassServer = ErrorClass("server")
	ErrorClassClient = ErrorClass("client")

	ErrorTypeUnknown = ErrorType("unknown")

	TransactionErrorCategorySoft          = TransactionErrorCategory("soft")
	TransactionErrorCategoryFraud         = TransactionErrorCategory("fraud")
	TransactionErrorCategoryHard          = TransactionErrorCategory("hard")
	TransactionErrorCategoryCommunication = TransactionErrorCategory("communication")
	TransactionErrorCategoryUnknown       = TransactionErrorCategory("unknown")
)
View Source
const (
	ErrorTypeResponse                = ErrorType("response_error")
	ErrorTypeServer                  = ErrorType("server_error")
	ErrorTypeInternalServer          = ErrorType("internal_server_error")
	ErrorTypeServiceNotAvailable     = ErrorType("service_not_available")
	ErrorTypeTaxService              = ErrorType("tax_service_error")
	ErrorTypeBadGateway              = ErrorType("bad_gateway")
	ErrorTypeServiceUnavailable      = ErrorType("service_unavailable")
	ErrorTypeTimeout                 = ErrorType("timeout")
	ErrorTypeRedirection             = ErrorType("redirection")
	ErrorTypeNotModified             = ErrorType("not_modified")
	ErrorTypeClient                  = ErrorType("client_error")
	ErrorTypeBadRequest              = ErrorType("bad_request")
	ErrorTypeInvalidContentType      = ErrorType("invalid_content_type")
	ErrorTypeUnauthorized            = ErrorType("unauthorized")
	ErrorTypePaymentRequired         = ErrorType("payment_required")
	ErrorTypeForbidden               = ErrorType("forbidden")
	ErrorTypeInvalidApiKey           = ErrorType("invalid_api_key")
	ErrorTypeInvalidPermissions      = ErrorType("invalid_permissions")
	ErrorTypeNotFound                = ErrorType("not_found")
	ErrorTypeNotAcceptable           = ErrorType("not_acceptable")
	ErrorTypeUnknownApiVersion       = ErrorType("unknown_api_version")
	ErrorTypeUnavailableInApiVersion = ErrorType("unavailable_in_api_version")
	ErrorTypeInvalidApiVersion       = ErrorType("invalid_api_version")
	ErrorTypePreconditionFailed      = ErrorType("precondition_failed")
	ErrorTypeUnprocessableEntity     = ErrorType("unprocessable_entity")
	ErrorTypeValidation              = ErrorType("validation")
	ErrorTypeMissingFeature          = ErrorType("missing_feature")
	ErrorTypeTransaction             = ErrorType("transaction")
	ErrorTypeSimultaneousRequest     = ErrorType("simultaneous_request")
	ErrorTypeImmutableSubscription   = ErrorType("immutable_subscription")
	ErrorTypeInvalidToken            = ErrorType("invalid_token")
	ErrorTypeTooManyRequests         = ErrorType("too_many_requests")
	ErrorTypeRateLimited             = ErrorType("rate_limited")
)
View Source
const (
	// ListAscending sorts results in ascending order. When sorting by UpdatedAt, you really only
	// want to return results in ascending order.
	ListAscending ListOrder = "asc"
	// ListDescending sorts results in descending order
	ListDescending ListOrder = "desc"

	// SortDefault sorts results by their default field
	SortDefault SortField = ""
	// SortCreatedAt sorts results by their created_at datetime
	SortCreatedAt SortField = "created_at"
	// SortUpdatedAt sorts results by their updated_at datetime. This should only be used with ListAscending.
	SortUpdatedAt SortField = "updated_at"
)
View Source
const (
	// APIVersion is the current Recurly API Version
	APIVersion = "v2021-02-25"
)
View Source
const DEFAULT_WEBHOOK_TOLERANCE time.Duration = 5 * time.Minute

Variables

View Source
var (
	WebhookErrParsing           = errors.New("webhook signature header parsing failed")
	WebhookErrToleranceExceeded = errors.New("webhook tolerance exceeded")
	WebhookErrSignatureMismatch = errors.New("webhook signatures do not match")
)
View Source
var (
	// APIHost is the base URL for Recurly API v3
	APIHost string
)

Functions

func Bool

func Bool(v bool) *bool

func BuildURL

func BuildURL(requestURL string, queryParams QueryParams) string

BuildURL will append query string parameters

func Float

func Float(v float64) *float64

func Int

func Int(v int) *int

func String

func String(v string) *string

func StringSlice

func StringSlice(v []string) []*string

func Time

func Time(v time.Time) *time.Time

func VerifyWebhookSignature

func VerifyWebhookSignature(header, secret string, body []byte, tolerance time.Duration) error

Types

type Account

type Account struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Accounts can be either active or inactive.
	State string `json:"state,omitempty"`

	// The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: `https://{subdomain}.recurly.com/account/{hosted_login_token}`.
	HostedLoginToken string `json:"hosted_login_token,omitempty"`

	// The shipping addresses on the account.
	ShippingAddresses []ShippingAddress `json:"shipping_addresses,omitempty"`

	// Indicates if the account has a subscription that is either active, canceled, future, or paused.
	HasLiveSubscription bool `json:"has_live_subscription,omitempty"`

	// Indicates if the account has an active subscription.
	HasActiveSubscription bool `json:"has_active_subscription,omitempty"`

	// Indicates if the account has a future subscription.
	HasFutureSubscription bool `json:"has_future_subscription,omitempty"`

	// Indicates if the account has a canceled subscription.
	HasCanceledSubscription bool `json:"has_canceled_subscription,omitempty"`

	// Indicates if the account has a paused subscription.
	HasPausedSubscription bool `json:"has_paused_subscription,omitempty"`

	// Indicates if the account has a past due invoice.
	HasPastDueInvoice bool `json:"has_past_due_invoice,omitempty"`

	// When the account was created.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the account was last changed.
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// If present, when the account was last marked inactive.
	DeletedAt time.Time `json:"deleted_at,omitempty"`

	// The unique identifier of the account. This cannot be changed once the account is created.
	Code string `json:"code,omitempty"`

	// A secondary value for the account.
	Username string `json:"username,omitempty"`

	// The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
	Email string `json:"email,omitempty"`

	// Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
	OverrideBusinessEntityId string `json:"override_business_entity_id,omitempty"`

	// Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
	PreferredLocale string `json:"preferred_locale,omitempty"`

	// The [IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer.
	PreferredTimeZone string `json:"preferred_time_zone,omitempty"`

	// Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.
	CcEmails string `json:"cc_emails,omitempty"`

	FirstName string `json:"first_name,omitempty"`

	LastName string `json:"last_name,omitempty"`

	Company string `json:"company,omitempty"`

	// The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
	VatNumber string `json:"vat_number,omitempty"`

	// The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
	TaxExempt bool `json:"tax_exempt,omitempty"`

	// The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
	ExemptionCertificate string `json:"exemption_certificate,omitempty"`

	// The external accounts belonging to this account
	ExternalAccounts []ExternalAccount `json:"external_accounts,omitempty"`

	// The UUID of the parent account associated with this account.
	ParentAccountId string `json:"parent_account_id,omitempty"`

	// An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
	BillTo string `json:"bill_to,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId string `json:"dunning_campaign_id,omitempty"`

	// Unique ID to identify an invoice template. Available when the site is on a Pro or Elite plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used.
	InvoiceTemplateId string `json:"invoice_template_id,omitempty"`

	Address Address `json:"address,omitempty"`

	BillingInfo BillingInfo `json:"billing_info,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomField `json:"custom_fields,omitempty"`

	// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
	EntityUseCode string `json:"entity_use_code,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) GetResponse

func (resource *Account) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AccountAcquisition

type AccountAcquisition struct {

	// Account balance
	Cost AccountAcquisitionCost `json:"cost,omitempty"`

	// The channel through which the account was acquired.
	Channel string `json:"channel,omitempty"`

	// An arbitrary subchannel string representing a distinction/subcategory within a broader channel.
	Subchannel string `json:"subchannel,omitempty"`

	// An arbitrary identifier for the marketing campaign that led to the acquisition of this account.
	Campaign string `json:"campaign,omitempty"`

	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// When the account acquisition data was created.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the account acquisition data was last changed.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountAcquisition) GetResponse

func (resource *AccountAcquisition) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AccountAcquisitionCost

type AccountAcquisitionCost struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// The amount of the corresponding currency used to acquire the account.
	Amount float64 `json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountAcquisitionCost) GetResponse

func (resource *AccountAcquisitionCost) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AccountAcquisitionCostCreate

type AccountAcquisitionCostCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// The amount of the corresponding currency used to acquire the account.
	Amount *float64 `json:"amount,omitempty"`
}

type AccountAcquisitionCostList

type AccountAcquisitionCostList struct {
	// contains filtered or unexported fields
}

AccountAcquisitionCostList allows you to paginate AccountAcquisitionCost objects

func NewAccountAcquisitionCostList

func NewAccountAcquisitionCostList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AccountAcquisitionCostList

func (*AccountAcquisitionCostList) Count

func (list *AccountAcquisitionCostList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountAcquisitionCostList) CountWithContext

func (list *AccountAcquisitionCostList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountAcquisitionCostList) Data

func (*AccountAcquisitionCostList) Fetch

func (list *AccountAcquisitionCostList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AccountAcquisitionCostList) FetchWithContext

func (list *AccountAcquisitionCostList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AccountAcquisitionCostList) HasMore

func (list *AccountAcquisitionCostList) HasMore() bool

func (*AccountAcquisitionCostList) Next

func (list *AccountAcquisitionCostList) Next() string

type AccountAcquisitionCostLister

type AccountAcquisitionCostLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AccountAcquisitionCost
	HasMore() bool
	Next() string
}

type AccountAcquisitionList

type AccountAcquisitionList struct {
	// contains filtered or unexported fields
}

AccountAcquisitionList allows you to paginate AccountAcquisition objects

func NewAccountAcquisitionList

func NewAccountAcquisitionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AccountAcquisitionList

func (*AccountAcquisitionList) Count

func (list *AccountAcquisitionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountAcquisitionList) CountWithContext

func (list *AccountAcquisitionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountAcquisitionList) Data

func (*AccountAcquisitionList) Fetch

func (list *AccountAcquisitionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AccountAcquisitionList) FetchWithContext

func (list *AccountAcquisitionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AccountAcquisitionList) HasMore

func (list *AccountAcquisitionList) HasMore() bool

func (*AccountAcquisitionList) Next

func (list *AccountAcquisitionList) Next() string

type AccountAcquisitionLister

type AccountAcquisitionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AccountAcquisition
	HasMore() bool
	Next() string
}

type AccountAcquisitionUpdate

type AccountAcquisitionUpdate struct {

	// Account balance
	Cost *AccountAcquisitionCostCreate `json:"cost,omitempty"`

	// The channel through which the account was acquired.
	Channel *string `json:"channel,omitempty"`

	// An arbitrary subchannel string representing a distinction/subcategory within a broader channel.
	Subchannel *string `json:"subchannel,omitempty"`

	// An arbitrary identifier for the marketing campaign that led to the acquisition of this account.
	Campaign *string `json:"campaign,omitempty"`
}

type AccountBalance

type AccountBalance struct {

	// Object type
	Object string `json:"object,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	PastDue bool `json:"past_due,omitempty"`

	Balances []AccountBalanceAmount `json:"balances,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountBalance) GetResponse

func (resource *AccountBalance) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AccountBalanceAmount

type AccountBalanceAmount struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Total amount the account is past due.
	Amount float64 `json:"amount,omitempty"`

	// Total amount for the prepayment credit invoices in a `processing` state on the account.
	ProcessingPrepaymentAmount float64 `json:"processing_prepayment_amount,omitempty"`

	// Total amount of the open balances on credit invoices for the account.
	AvailableCreditAmount float64 `json:"available_credit_amount,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountBalanceAmount) GetResponse

func (resource *AccountBalanceAmount) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AccountBalanceAmountList

type AccountBalanceAmountList struct {
	// contains filtered or unexported fields
}

AccountBalanceAmountList allows you to paginate AccountBalanceAmount objects

func NewAccountBalanceAmountList

func NewAccountBalanceAmountList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AccountBalanceAmountList

func (*AccountBalanceAmountList) Count

func (list *AccountBalanceAmountList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountBalanceAmountList) CountWithContext

func (list *AccountBalanceAmountList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountBalanceAmountList) Data

func (*AccountBalanceAmountList) Fetch

func (list *AccountBalanceAmountList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AccountBalanceAmountList) FetchWithContext

func (list *AccountBalanceAmountList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AccountBalanceAmountList) HasMore

func (list *AccountBalanceAmountList) HasMore() bool

func (*AccountBalanceAmountList) Next

func (list *AccountBalanceAmountList) Next() string

type AccountBalanceAmountLister

type AccountBalanceAmountLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AccountBalanceAmount
	HasMore() bool
	Next() string
}

type AccountBalanceList

type AccountBalanceList struct {
	// contains filtered or unexported fields
}

AccountBalanceList allows you to paginate AccountBalance objects

func NewAccountBalanceList

func NewAccountBalanceList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AccountBalanceList

func (*AccountBalanceList) Count

func (list *AccountBalanceList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountBalanceList) CountWithContext

func (list *AccountBalanceList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountBalanceList) Data

func (list *AccountBalanceList) Data() []AccountBalance

func (*AccountBalanceList) Fetch

func (list *AccountBalanceList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AccountBalanceList) FetchWithContext

func (list *AccountBalanceList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AccountBalanceList) HasMore

func (list *AccountBalanceList) HasMore() bool

func (*AccountBalanceList) Next

func (list *AccountBalanceList) Next() string

type AccountBalanceLister

type AccountBalanceLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AccountBalance
	HasMore() bool
	Next() string
}

type AccountCreate

type AccountCreate struct {

	// The unique identifier of the account. This cannot be changed once the account is created.
	Code *string `json:"code,omitempty"`

	Acquisition *AccountAcquisitionUpdate `json:"acquisition,omitempty"`

	// External Accounts
	ExternalAccounts []ExternalAccountCreate `json:"external_accounts,omitempty"`

	ShippingAddresses []ShippingAddressCreate `json:"shipping_addresses,omitempty"`

	// A secondary value for the account.
	Username *string `json:"username,omitempty"`

	// The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
	Email *string `json:"email,omitempty"`

	// Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
	PreferredLocale *string `json:"preferred_locale,omitempty"`

	// Used to determine the time zone of emails sent on behalf of the merchant to the customer. Must be a [supported IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names)
	PreferredTimeZone *string `json:"preferred_time_zone,omitempty"`

	// Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.
	CcEmails *string `json:"cc_emails,omitempty"`

	FirstName *string `json:"first_name,omitempty"`

	LastName *string `json:"last_name,omitempty"`

	Company *string `json:"company,omitempty"`

	// The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
	VatNumber *string `json:"vat_number,omitempty"`

	// The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
	ExemptionCertificate *string `json:"exemption_certificate,omitempty"`

	// Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
	OverrideBusinessEntityId *string `json:"override_business_entity_id,omitempty"`

	// The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
	ParentAccountCode *string `json:"parent_account_code,omitempty"`

	// The UUID of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
	ParentAccountId *string `json:"parent_account_id,omitempty"`

	// An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
	BillTo *string `json:"bill_to,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId *string `json:"dunning_campaign_id,omitempty"`

	// Unique ID to identify an invoice template.  Available when the site is on a Pro or Elite plan.  Used to specify which invoice template, if any, should be used to generate invoices for the account.
	InvoiceTemplateId *string `json:"invoice_template_id,omitempty"`

	Address *AddressCreate `json:"address,omitempty"`

	BillingInfo *BillingInfoCreate `json:"billing_info,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
	EntityUseCode *string `json:"entity_use_code,omitempty"`
}

type AccountList

type AccountList struct {
	// contains filtered or unexported fields
}

AccountList allows you to paginate Account objects

func NewAccountList

func NewAccountList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AccountList

func (*AccountList) Count

func (list *AccountList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountList) CountWithContext

func (list *AccountList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountList) Data

func (list *AccountList) Data() []Account

func (*AccountList) Fetch

func (list *AccountList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AccountList) FetchWithContext

func (list *AccountList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AccountList) HasMore

func (list *AccountList) HasMore() bool

func (*AccountList) Next

func (list *AccountList) Next() string

type AccountLister

type AccountLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Account
	HasMore() bool
	Next() string
}

type AccountMini

type AccountMini struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The unique identifier of the account.
	Code string `json:"code,omitempty"`

	// The email address used for communicating with this customer.
	Email string `json:"email,omitempty"`

	FirstName string `json:"first_name,omitempty"`

	LastName string `json:"last_name,omitempty"`

	Company string `json:"company,omitempty"`

	ParentAccountId string `json:"parent_account_id,omitempty"`

	BillTo string `json:"bill_to,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId string `json:"dunning_campaign_id,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountMini) GetResponse

func (resource *AccountMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AccountMiniList

type AccountMiniList struct {
	// contains filtered or unexported fields
}

AccountMiniList allows you to paginate AccountMini objects

func NewAccountMiniList

func NewAccountMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AccountMiniList

func (*AccountMiniList) Count

func (list *AccountMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountMiniList) CountWithContext

func (list *AccountMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountMiniList) Data

func (list *AccountMiniList) Data() []AccountMini

func (*AccountMiniList) Fetch

func (list *AccountMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AccountMiniList) FetchWithContext

func (list *AccountMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AccountMiniList) HasMore

func (list *AccountMiniList) HasMore() bool

func (*AccountMiniList) Next

func (list *AccountMiniList) Next() string

type AccountMiniLister

type AccountMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AccountMini
	HasMore() bool
	Next() string
}

type AccountNote

type AccountNote struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	AccountId string `json:"account_id,omitempty"`

	User User `json:"user,omitempty"`

	Message string `json:"message,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountNote) GetResponse

func (resource *AccountNote) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AccountNoteList

type AccountNoteList struct {
	// contains filtered or unexported fields
}

AccountNoteList allows you to paginate AccountNote objects

func NewAccountNoteList

func NewAccountNoteList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AccountNoteList

func (*AccountNoteList) Count

func (list *AccountNoteList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountNoteList) CountWithContext

func (list *AccountNoteList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AccountNoteList) Data

func (list *AccountNoteList) Data() []AccountNote

func (*AccountNoteList) Fetch

func (list *AccountNoteList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AccountNoteList) FetchWithContext

func (list *AccountNoteList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AccountNoteList) HasMore

func (list *AccountNoteList) HasMore() bool

func (*AccountNoteList) Next

func (list *AccountNoteList) Next() string

type AccountNoteLister

type AccountNoteLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AccountNote
	HasMore() bool
	Next() string
}

type AccountPurchase

type AccountPurchase struct {

	// Optional, but if present allows an existing account to be used and updated as part of the purchase.
	Id *string `json:"id,omitempty"`

	// The unique identifier of the account. This cannot be changed once the account is created.
	Code *string `json:"code,omitempty"`

	Acquisition *AccountAcquisitionUpdate `json:"acquisition,omitempty"`

	// A secondary value for the account.
	Username *string `json:"username,omitempty"`

	// The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
	Email *string `json:"email,omitempty"`

	// Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
	PreferredLocale *string `json:"preferred_locale,omitempty"`

	// Used to determine the time zone of emails sent on behalf of the merchant to the customer. Must be a [supported IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names)
	PreferredTimeZone *string `json:"preferred_time_zone,omitempty"`

	// Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.
	CcEmails *string `json:"cc_emails,omitempty"`

	FirstName *string `json:"first_name,omitempty"`

	LastName *string `json:"last_name,omitempty"`

	Company *string `json:"company,omitempty"`

	// The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
	VatNumber *string `json:"vat_number,omitempty"`

	// The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
	ExemptionCertificate *string `json:"exemption_certificate,omitempty"`

	// Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
	OverrideBusinessEntityId *string `json:"override_business_entity_id,omitempty"`

	// The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
	ParentAccountCode *string `json:"parent_account_code,omitempty"`

	// The UUID of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
	ParentAccountId *string `json:"parent_account_id,omitempty"`

	// An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
	BillTo *string `json:"bill_to,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId *string `json:"dunning_campaign_id,omitempty"`

	// Unique ID to identify an invoice template.  Available when the site is on a Pro or Elite plan.  Used to specify which invoice template, if any, should be used to generate invoices for the account.
	InvoiceTemplateId *string `json:"invoice_template_id,omitempty"`

	Address *AddressCreate `json:"address,omitempty"`

	BillingInfo *BillingInfoCreate `json:"billing_info,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
	EntityUseCode *string `json:"entity_use_code,omitempty"`
}

type AccountReference

type AccountReference struct {
	Id *string `json:"id,omitempty"`

	Code *string `json:"code,omitempty"`
}

type AccountUpdate

type AccountUpdate struct {

	// A secondary value for the account.
	Username *string `json:"username,omitempty"`

	// The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
	Email *string `json:"email,omitempty"`

	// Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site.
	PreferredLocale *string `json:"preferred_locale,omitempty"`

	// Used to determine the time zone of emails sent on behalf of the merchant to the customer. Must be a [supported IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names)
	PreferredTimeZone *string `json:"preferred_time_zone,omitempty"`

	// Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.
	CcEmails *string `json:"cc_emails,omitempty"`

	FirstName *string `json:"first_name,omitempty"`

	LastName *string `json:"last_name,omitempty"`

	Company *string `json:"company,omitempty"`

	// The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
	VatNumber *string `json:"vat_number,omitempty"`

	// The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
	ExemptionCertificate *string `json:"exemption_certificate,omitempty"`

	// Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
	OverrideBusinessEntityId *string `json:"override_business_entity_id,omitempty"`

	// The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
	ParentAccountCode *string `json:"parent_account_code,omitempty"`

	// The UUID of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
	ParentAccountId *string `json:"parent_account_id,omitempty"`

	// An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
	BillTo *string `json:"bill_to,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId *string `json:"dunning_campaign_id,omitempty"`

	// Unique ID to identify an invoice template.  Available when the site is on a Pro or Elite plan.  Used to specify which invoice template, if any, should be used to generate invoices for the account.
	InvoiceTemplateId *string `json:"invoice_template_id,omitempty"`

	Address *AddressCreate `json:"address,omitempty"`

	BillingInfo *BillingInfoCreate `json:"billing_info,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive.
	EntityUseCode *string `json:"entity_use_code,omitempty"`
}

type AddOn

type AddOn struct {

	// Add-on ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Plan ID
	PlanId string `json:"plan_id,omitempty"`

	// The unique identifier for the add-on within its plan.
	Code string `json:"code,omitempty"`

	// Add-ons can be either active or inactive.
	State string `json:"state,omitempty"`

	// Describes your add-on and will appear in subscribers' invoices.
	Name string `json:"name,omitempty"`

	// Whether the add-on type is fixed, or usage-based.
	AddOnType string `json:"add_on_type,omitempty"`

	// Type of usage, returns usage type if `add_on_type` is `usage`.
	UsageType string `json:"usage_type,omitempty"`

	// The type of calculation to be employed for an add-on.  Cumulative billing will sum all usage records created in the current billing cycle.  Last-in-period billing will apply only the most recent usage record in the billing period.  If no value is specified, cumulative billing will be used.
	UsageCalculationType string `json:"usage_calculation_type,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
	UsagePercentage float64 `json:"usage_percentage,omitempty"`

	// System-generated unique identifier for an measured unit associated with the add-on.
	MeasuredUnitId string `json:"measured_unit_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId string `json:"performance_obligation_id,omitempty"`

	// Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code.
	AccountingCode string `json:"accounting_code,omitempty"`

	// When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
	RevenueScheduleType string `json:"revenue_schedule_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.
	TaxCode string `json:"tax_code,omitempty"`

	// Determines if the quantity field is displayed on the hosted pages for the add-on.
	DisplayQuantity bool `json:"display_quantity,omitempty"`

	// Default quantity for the hosted pages.
	DefaultQuantity int `json:"default_quantity,omitempty"`

	// Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
	Optional bool `json:"optional,omitempty"`

	// Add-on pricing
	Currencies []AddOnPricing `json:"currencies,omitempty"`

	// Just the important parts.
	Item ItemMini `json:"item,omitempty"`

	// The pricing model for the add-on.  For more information,
	// [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our
	// [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how
	// to configure quantity-based pricing models.
	TierType string `json:"tier_type,omitempty"`

	// The time at which usage totals are reset for billing purposes.
	UsageTimeframe string `json:"usage_timeframe,omitempty"`

	// Tiers
	Tiers []Tier `json:"tiers,omitempty"`

	// This feature is currently in development and requires approval and enablement, please contact support.
	PercentageTiers []PercentageTiersByCurrency `json:"percentage_tiers,omitempty"`

	// Optional, stock keeping unit to link the item to other inventory systems.
	ExternalSku string `json:"external_sku,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Deleted at
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*AddOn) GetResponse

func (resource *AddOn) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AddOnCreate

type AddOnCreate struct {

	// Unique code to identify an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
	ItemCode *string `json:"item_code,omitempty"`

	// System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.
	ItemId *string `json:"item_id,omitempty"`

	// The unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required.
	Code *string `json:"code,omitempty"`

	// Describes your add-on and will appear in subscribers' invoices. If `item_code`/`item_id` is part of the request then `name` must be absent. If `item_code`/`item_id` is not present `name` is required.
	Name *string `json:"name,omitempty"`

	// Whether the add-on type is fixed, or usage-based.
	AddOnType *string `json:"add_on_type,omitempty"`

	// Type of usage, required if `add_on_type` is `usage`. See our
	// [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an
	// overview of how to configure usage add-ons.
	UsageType *string `json:"usage_type,omitempty"`

	// The type of calculation to be employed for an add-on.  Cumulative billing will sum all usage records created in the current billing cycle.  Last-in-period billing will apply only the most recent usage record in the billing period.  If no value is specified, cumulative billing will be used.
	UsageCalculationType *string `json:"usage_calculation_type,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.
	UsagePercentage *float64 `json:"usage_percentage,omitempty"`

	// System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
	MeasuredUnitId *string `json:"measured_unit_id,omitempty"`

	// Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
	MeasuredUnitName *string `json:"measured_unit_name,omitempty"`

	// Plan ID
	PlanId *string `json:"plan_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`

	// Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// Determines if the quantity field is displayed on the hosted pages for the add-on.
	DisplayQuantity *bool `json:"display_quantity,omitempty"`

	// Default quantity for the hosted pages.
	DefaultQuantity *int `json:"default_quantity,omitempty"`

	// Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
	Optional *bool `json:"optional,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent.
	AvalaraTransactionType *int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent.
	AvalaraServiceType *int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.
	TaxCode *string `json:"tax_code,omitempty"`

	// * If `item_code`/`item_id` is part of the request and the item
	// has a default currency, then `currencies` is optional. If the item does
	// not have a default currency, then `currencies` is required. If `item_code`/`item_id`
	// is not present `currencies` is required.
	// * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`,
	// then `currencies` must be absent.
	// * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.
	Currencies []AddOnPricingCreate `json:"currencies,omitempty"`

	// The pricing model for the add-on.  For more information,
	// [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our
	// [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how
	// to configure quantity-based pricing models.
	TierType *string `json:"tier_type,omitempty"`

	// The time at which usage totals are reset for billing purposes.
	// Allows for `tiered` add-ons to accumulate usage over the course of multiple
	// billing periods.
	UsageTimeframe *string `json:"usage_timeframe,omitempty"`

	// If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
	// must include one to many tiers with `ending_quantity` and `unit_amount` for
	// the desired `currencies`. There must be one tier without an `ending_quantity` value
	// which represents the final tier.
	Tiers []TierCreate `json:"tiers,omitempty"`

	// Array of objects which must have at least one set of tiers
	// per currency and the currency code. The tier_type must be `volume` or `tiered`,
	// if not, it must be absent. There must be one tier without an `ending_amount` value
	// which represents the final tier. This feature is currently in development and
	// requires approval and enablement, please contact support.
	PercentageTiers []PercentageTiersByCurrencyCreate `json:"percentage_tiers,omitempty"`
}

type AddOnList

type AddOnList struct {
	// contains filtered or unexported fields
}

AddOnList allows you to paginate AddOn objects

func NewAddOnList

func NewAddOnList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AddOnList

func (*AddOnList) Count

func (list *AddOnList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddOnList) CountWithContext

func (list *AddOnList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddOnList) Data

func (list *AddOnList) Data() []AddOn

func (*AddOnList) Fetch

func (list *AddOnList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AddOnList) FetchWithContext

func (list *AddOnList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AddOnList) HasMore

func (list *AddOnList) HasMore() bool

func (*AddOnList) Next

func (list *AddOnList) Next() string

type AddOnLister

type AddOnLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AddOn
	HasMore() bool
	Next() string
}

type AddOnMini

type AddOnMini struct {

	// Add-on ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The unique identifier for the add-on within its plan.
	Code string `json:"code,omitempty"`

	// Describes your add-on and will appear in subscribers' invoices.
	Name string `json:"name,omitempty"`

	// Whether the add-on type is fixed, or usage-based.
	AddOnType string `json:"add_on_type,omitempty"`

	// Type of usage, returns usage type if `add_on_type` is `usage`.
	UsageType string `json:"usage_type,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
	UsagePercentage float64 `json:"usage_percentage,omitempty"`

	// System-generated unique identifier for an measured unit associated with the add-on.
	MeasuredUnitId string `json:"measured_unit_id,omitempty"`

	// Item ID
	ItemId string `json:"item_id,omitempty"`

	// Optional, stock keeping unit to link the item to other inventory systems.
	ExternalSku string `json:"external_sku,omitempty"`

	// Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code.
	AccountingCode string `json:"accounting_code,omitempty"`
	// contains filtered or unexported fields
}

func (*AddOnMini) GetResponse

func (resource *AddOnMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AddOnMiniList

type AddOnMiniList struct {
	// contains filtered or unexported fields
}

AddOnMiniList allows you to paginate AddOnMini objects

func NewAddOnMiniList

func NewAddOnMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AddOnMiniList

func (*AddOnMiniList) Count

func (list *AddOnMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddOnMiniList) CountWithContext

func (list *AddOnMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddOnMiniList) Data

func (list *AddOnMiniList) Data() []AddOnMini

func (*AddOnMiniList) Fetch

func (list *AddOnMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AddOnMiniList) FetchWithContext

func (list *AddOnMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AddOnMiniList) HasMore

func (list *AddOnMiniList) HasMore() bool

func (*AddOnMiniList) Next

func (list *AddOnMiniList) Next() string

type AddOnMiniLister

type AddOnMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AddOnMini
	HasMore() bool
	Next() string
}

type AddOnPricing

type AddOnPricing struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive bool `json:"tax_inclusive,omitempty"`
	// contains filtered or unexported fields
}

func (*AddOnPricing) GetResponse

func (resource *AddOnPricing) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AddOnPricingCreate

type AddOnPricingCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	UnitAmountDecimal *string `json:"unit_amount_decimal,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`
}

type AddOnPricingList

type AddOnPricingList struct {
	// contains filtered or unexported fields
}

AddOnPricingList allows you to paginate AddOnPricing objects

func NewAddOnPricingList

func NewAddOnPricingList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AddOnPricingList

func (*AddOnPricingList) Count

func (list *AddOnPricingList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddOnPricingList) CountWithContext

func (list *AddOnPricingList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddOnPricingList) Data

func (list *AddOnPricingList) Data() []AddOnPricing

func (*AddOnPricingList) Fetch

func (list *AddOnPricingList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AddOnPricingList) FetchWithContext

func (list *AddOnPricingList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AddOnPricingList) HasMore

func (list *AddOnPricingList) HasMore() bool

func (*AddOnPricingList) Next

func (list *AddOnPricingList) Next() string

type AddOnPricingLister

type AddOnPricingLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AddOnPricing
	HasMore() bool
	Next() string
}

type AddOnUpdate

type AddOnUpdate struct {

	// Add-on ID
	Id *string `json:"id,omitempty"`

	// The unique identifier for the add-on within its plan. If an `Item` is associated to the `AddOn` then `code` must be absent.
	Code *string `json:"code,omitempty"`

	// Describes your add-on and will appear in subscribers' invoices. If an `Item` is associated to the `AddOn` then `name` must be absent.
	Name *string `json:"name,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.
	UsagePercentage *float64 `json:"usage_percentage,omitempty"`

	// The type of calculation to be employed for an add-on.  Cumulative billing will sum all usage records created in the current billing cycle.  Last-in-period billing will apply only the most recent usage record in the billing period.  If no value is specified, cumulative billing will be used.
	UsageCalculationType *string `json:"usage_calculation_type,omitempty"`

	// System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
	MeasuredUnitId *string `json:"measured_unit_id,omitempty"`

	// Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
	MeasuredUnitName *string `json:"measured_unit_name,omitempty"`

	// Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If an `Item` is associated to the `AddOn` then `accounting code` must be absent.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`

	// When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent.
	AvalaraTransactionType *int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent.
	AvalaraServiceType *int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If an `Item` is associated to the `AddOn` then `tax_code` must be absent.
	TaxCode *string `json:"tax_code,omitempty"`

	// Determines if the quantity field is displayed on the hosted pages for the add-on.
	DisplayQuantity *bool `json:"display_quantity,omitempty"`

	// Default quantity for the hosted pages.
	DefaultQuantity *int `json:"default_quantity,omitempty"`

	// Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.
	Optional *bool `json:"optional,omitempty"`

	// If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`,
	// then currencies must be absent. Must also be absent if `add_on_type` is
	// `usage` and `usage_type` is `percentage`.
	Currencies []AddOnPricingCreate `json:"currencies,omitempty"`

	// If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object
	// must include one to many tiers with `ending_quantity` and `unit_amount` for
	// the desired `currencies`. There must be one tier without an `ending_quantity` value
	// which represents the final tier.
	Tiers []TierCreate `json:"tiers,omitempty"`

	// `percentage_tiers` is an array of objects, which must have the set of tiers
	// per currency and the currency code. The tier_type must be `volume` or `tiered`,
	// if not, it must be absent. There must be one tier without an `ending_amount` value
	// which represents the final tier. This feature is currently in development and
	// requires approval and enablement, please contact support.
	PercentageTiers []PercentageTiersByCurrencyCreate `json:"percentage_tiers,omitempty"`
}

type Address

type Address struct {

	// Phone number
	Phone string `json:"phone,omitempty"`

	// Street 1
	Street1 string `json:"street1,omitempty"`

	// Street 2
	Street2 string `json:"street2,omitempty"`

	// City
	City string `json:"city,omitempty"`

	// State or province.
	Region string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode string `json:"postal_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country string `json:"country,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode string `json:"geo_code,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) GetResponse

func (resource *Address) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AddressCreate

type AddressCreate struct {

	// Phone number
	Phone *string `json:"phone,omitempty"`

	// Street 1
	Street1 *string `json:"street1,omitempty"`

	// Street 2
	Street2 *string `json:"street2,omitempty"`

	// City
	City *string `json:"city,omitempty"`

	// State or province.
	Region *string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode *string `json:"postal_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country *string `json:"country,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode *string `json:"geo_code,omitempty"`
}

type AddressList

type AddressList struct {
	// contains filtered or unexported fields
}

AddressList allows you to paginate Address objects

func NewAddressList

func NewAddressList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AddressList

func (*AddressList) Count

func (list *AddressList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddressList) CountWithContext

func (list *AddressList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddressList) Data

func (list *AddressList) Data() []Address

func (*AddressList) Fetch

func (list *AddressList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AddressList) FetchWithContext

func (list *AddressList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AddressList) HasMore

func (list *AddressList) HasMore() bool

func (*AddressList) Next

func (list *AddressList) Next() string

type AddressLister

type AddressLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Address
	HasMore() bool
	Next() string
}

type AddressWithName

type AddressWithName struct {

	// First name
	FirstName string `json:"first_name,omitempty"`

	// Last name
	LastName string `json:"last_name,omitempty"`

	// Phone number
	Phone string `json:"phone,omitempty"`

	// Street 1
	Street1 string `json:"street1,omitempty"`

	// Street 2
	Street2 string `json:"street2,omitempty"`

	// City
	City string `json:"city,omitempty"`

	// State or province.
	Region string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode string `json:"postal_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country string `json:"country,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode string `json:"geo_code,omitempty"`
	// contains filtered or unexported fields
}

func (*AddressWithName) GetResponse

func (resource *AddressWithName) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type AddressWithNameList

type AddressWithNameList struct {
	// contains filtered or unexported fields
}

AddressWithNameList allows you to paginate AddressWithName objects

func NewAddressWithNameList

func NewAddressWithNameList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *AddressWithNameList

func (*AddressWithNameList) Count

func (list *AddressWithNameList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddressWithNameList) CountWithContext

func (list *AddressWithNameList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*AddressWithNameList) Data

func (list *AddressWithNameList) Data() []AddressWithName

func (*AddressWithNameList) Fetch

func (list *AddressWithNameList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*AddressWithNameList) FetchWithContext

func (list *AddressWithNameList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*AddressWithNameList) HasMore

func (list *AddressWithNameList) HasMore() bool

func (*AddressWithNameList) Next

func (list *AddressWithNameList) Next() string

type AddressWithNameLister

type AddressWithNameLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []AddressWithName
	HasMore() bool
	Next() string
}

type BillingInfo

type BillingInfo struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	AccountId string `json:"account_id,omitempty"`

	FirstName string `json:"first_name,omitempty"`

	LastName string `json:"last_name,omitempty"`

	Company string `json:"company,omitempty"`

	Address Address `json:"address,omitempty"`

	// Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices.
	VatNumber string `json:"vat_number,omitempty"`

	Valid bool `json:"valid,omitempty"`

	PaymentMethod PaymentMethod `json:"payment_method,omitempty"`

	// Most recent fraud result.
	Fraud FraudInfo `json:"fraud,omitempty"`

	// The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used
	PrimaryPaymentMethod bool `json:"primary_payment_method,omitempty"`

	// The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined.
	BackupPaymentMethod bool `json:"backup_payment_method,omitempty"`

	// When the billing information was created.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the billing information was last changed.
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	UpdatedBy BillingInfoUpdatedBy `json:"updated_by,omitempty"`
	// contains filtered or unexported fields
}

func (*BillingInfo) GetResponse

func (resource *BillingInfo) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type BillingInfoCreate

type BillingInfoCreate struct {

	// A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
	TokenId *string `json:"token_id,omitempty"`

	// First name
	FirstName *string `json:"first_name,omitempty"`

	// Last name
	LastName *string `json:"last_name,omitempty"`

	// Company name
	Company *string `json:"company,omitempty"`

	Address *AddressCreate `json:"address,omitempty"`

	// Credit card number, spaces and dashes are accepted.
	Number *string `json:"number,omitempty"`

	// Expiration month
	Month *string `json:"month,omitempty"`

	// Expiration year
	Year *string `json:"year,omitempty"`

	// *STRONGLY RECOMMENDED*
	Cvv *string `json:"cvv,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// VAT number
	VatNumber *string `json:"vat_number,omitempty"`

	// *STRONGLY RECOMMENDED* Customer's IP address when updating their billing information.
	IpAddress *string `json:"ip_address,omitempty"`

	// A token used in place of a credit card in order to perform transactions. Must be used in conjunction with `gateway_code`.
	GatewayToken *string `json:"gateway_token,omitempty"`

	// An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`.
	GatewayCode *string `json:"gateway_code,omitempty"`

	// Additional attributes to send to the gateway.
	GatewayAttributes *GatewayAttributesCreate `json:"gateway_attributes,omitempty"`

	// Amazon billing agreement ID
	AmazonBillingAgreementId *string `json:"amazon_billing_agreement_id,omitempty"`

	// PayPal billing agreement ID
	PaypalBillingAgreementId *string `json:"paypal_billing_agreement_id,omitempty"`

	// Roku's CIB if billing through Roku
	RokuBillingAgreementId *string `json:"roku_billing_agreement_id,omitempty"`

	// Fraud Session ID
	FraudSessionId *string `json:"fraud_session_id,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`

	// A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
	ThreeDSecureActionResultTokenId *string `json:"three_d_secure_action_result_token_id,omitempty"`

	// The International Bank Account Number, up to 34 alphanumeric characters comprising a country code; two check digits; and a number that includes the domestic bank account number, branch identifier, and potential routing information
	Iban *string `json:"iban,omitempty"`

	// The name associated with the bank account (ACH, SEPA, Bacs only)
	NameOnAccount *string `json:"name_on_account,omitempty"`

	// The bank account number. (ACH, Bacs only)
	AccountNumber *string `json:"account_number,omitempty"`

	// The bank's rounting number. (ACH only)
	RoutingNumber *string `json:"routing_number,omitempty"`

	// Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only)
	SortCode *string `json:"sort_code,omitempty"`

	// The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values.
	Type *string `json:"type,omitempty"`

	// The bank account type. (ACH only)
	AccountType *string `json:"account_type,omitempty"`

	// Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively.
	TaxIdentifier *string `json:"tax_identifier,omitempty"`

	// This field and a value of `cpf`, `cnpj` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina.
	TaxIdentifierType *string `json:"tax_identifier_type,omitempty"`

	// The `primary_payment_method` field is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` with a value of `true`. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.
	PrimaryPaymentMethod *bool `json:"primary_payment_method,omitempty"`

	// The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such.
	BackupPaymentMethod *bool `json:"backup_payment_method,omitempty"`

	// Use for Adyen HPP billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object.
	ExternalHppType *string `json:"external_hpp_type,omitempty"`

	// Use for Online Banking billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object.
	OnlineBankingPaymentType *string `json:"online_banking_payment_type,omitempty"`

	CardType *string `json:"card_type,omitempty"`

	// Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.
	CardNetworkPreference *string `json:"card_network_preference,omitempty"`
}

type BillingInfoList

type BillingInfoList struct {
	// contains filtered or unexported fields
}

BillingInfoList allows you to paginate BillingInfo objects

func NewBillingInfoList

func NewBillingInfoList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *BillingInfoList

func (*BillingInfoList) Count

func (list *BillingInfoList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*BillingInfoList) CountWithContext

func (list *BillingInfoList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*BillingInfoList) Data

func (list *BillingInfoList) Data() []BillingInfo

func (*BillingInfoList) Fetch

func (list *BillingInfoList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*BillingInfoList) FetchWithContext

func (list *BillingInfoList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*BillingInfoList) HasMore

func (list *BillingInfoList) HasMore() bool

func (*BillingInfoList) Next

func (list *BillingInfoList) Next() string

type BillingInfoLister

type BillingInfoLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []BillingInfo
	HasMore() bool
	Next() string
}

type BillingInfoUpdatedBy

type BillingInfoUpdatedBy struct {

	// Customer's IP address when updating their billing information.
	Ip string `json:"ip,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.
	Country string `json:"country,omitempty"`
	// contains filtered or unexported fields
}

func (*BillingInfoUpdatedBy) GetResponse

func (resource *BillingInfoUpdatedBy) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type BillingInfoUpdatedByList

type BillingInfoUpdatedByList struct {
	// contains filtered or unexported fields
}

BillingInfoUpdatedByList allows you to paginate BillingInfoUpdatedBy objects

func NewBillingInfoUpdatedByList

func NewBillingInfoUpdatedByList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *BillingInfoUpdatedByList

func (*BillingInfoUpdatedByList) Count

func (list *BillingInfoUpdatedByList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*BillingInfoUpdatedByList) CountWithContext

func (list *BillingInfoUpdatedByList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*BillingInfoUpdatedByList) Data

func (*BillingInfoUpdatedByList) Fetch

func (list *BillingInfoUpdatedByList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*BillingInfoUpdatedByList) FetchWithContext

func (list *BillingInfoUpdatedByList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*BillingInfoUpdatedByList) HasMore

func (list *BillingInfoUpdatedByList) HasMore() bool

func (*BillingInfoUpdatedByList) Next

func (list *BillingInfoUpdatedByList) Next() string

type BillingInfoUpdatedByLister

type BillingInfoUpdatedByLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []BillingInfoUpdatedBy
	HasMore() bool
	Next() string
}

type BillingInfoVerify

type BillingInfoVerify struct {

	// An identifier for a specific payment gateway.
	GatewayCode *string `json:"gateway_code,omitempty"`
}

type BillingInfoVerifyCVV

type BillingInfoVerifyCVV struct {

	// Unique security code for a credit card.
	VerificationValue *string `json:"verification_value,omitempty"`
}

type BinaryFile

type BinaryFile struct {
	Data string `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*BinaryFile) GetResponse

func (resource *BinaryFile) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type BinaryFileList

type BinaryFileList struct {
	// contains filtered or unexported fields
}

BinaryFileList allows you to paginate BinaryFile objects

func NewBinaryFileList

func NewBinaryFileList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *BinaryFileList

func (*BinaryFileList) Count

func (list *BinaryFileList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*BinaryFileList) CountWithContext

func (list *BinaryFileList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*BinaryFileList) Data

func (list *BinaryFileList) Data() []BinaryFile

func (*BinaryFileList) Fetch

func (list *BinaryFileList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*BinaryFileList) FetchWithContext

func (list *BinaryFileList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*BinaryFileList) HasMore

func (list *BinaryFileList) HasMore() bool

func (*BinaryFileList) Next

func (list *BinaryFileList) Next() string

type BinaryFileLister

type BinaryFileLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []BinaryFile
	HasMore() bool
	Next() string
}

type BusinessEntity

type BusinessEntity struct {

	// Business entity ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The entity code of the business entity.
	Code string `json:"code,omitempty"`

	// This name describes your business entity and will appear on the invoice.
	Name string `json:"name,omitempty"`

	// Address information for the business entity that will appear on the invoice.
	InvoiceDisplayAddress Address `json:"invoice_display_address,omitempty"`

	// Address information for the business entity that will be used for calculating taxes.
	TaxAddress Address `json:"tax_address,omitempty"`

	// The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address".
	OriginTaxAddressSource string `json:"origin_tax_address_source,omitempty"`

	// The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address".
	DestinationTaxAddressSource string `json:"destination_tax_address_source,omitempty"`

	// VAT number for the customer used on the invoice.
	DefaultVatNumber string `json:"default_vat_number,omitempty"`

	// Registration number for the customer used on the invoice.
	DefaultRegistrationNumber string `json:"default_registration_number,omitempty"`

	// List of countries for which the business entity will be used.
	SubscriberLocationCountries []string `json:"subscriber_location_countries,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	DefaultLiabilityGlAccountId string `json:"default_liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	DefaultRevenueGlAccountId string `json:"default_revenue_gl_account_id,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*BusinessEntity) GetResponse

func (resource *BusinessEntity) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type BusinessEntityList

type BusinessEntityList struct {
	// contains filtered or unexported fields
}

BusinessEntityList allows you to paginate BusinessEntity objects

func NewBusinessEntityList

func NewBusinessEntityList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *BusinessEntityList

func (*BusinessEntityList) Count

func (list *BusinessEntityList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*BusinessEntityList) CountWithContext

func (list *BusinessEntityList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*BusinessEntityList) Data

func (list *BusinessEntityList) Data() []BusinessEntity

func (*BusinessEntityList) Fetch

func (list *BusinessEntityList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*BusinessEntityList) FetchWithContext

func (list *BusinessEntityList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*BusinessEntityList) HasMore

func (list *BusinessEntityList) HasMore() bool

func (*BusinessEntityList) Next

func (list *BusinessEntityList) Next() string

type BusinessEntityLister

type BusinessEntityLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []BusinessEntity
	HasMore() bool
	Next() string
}

type CancelSubscriptionParams

type CancelSubscriptionParams struct {

	// Body - The body of the request.
	Body *SubscriptionCancel
}

func (*CancelSubscriptionParams) URLParams

func (list *CancelSubscriptionParams) URLParams() []KeyValue

type Client

type Client struct {
	Log        *Logger
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Client submits API requests to Recurly

func NewClient

func NewClient(apiKey string) (*Client, error)

NewClient returns a new API Client using the given APIKey

func NewClientWithOptions

func NewClientWithOptions(apiKey string, options ClientOptions) (*Client, error)

NewClientWithOptions returns a new API Client using the given APIKey and options

func (*Client) ApplyCreditBalance

func (c *Client) ApplyCreditBalance(invoiceId string, opts ...Option) (*Invoice, error)

ApplyCreditBalance wraps ApplyCreditBalanceWithContext using the background context

func (*Client) ApplyCreditBalanceWithContext

func (c *Client) ApplyCreditBalanceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

ApplyCreditBalanceWithContext Apply available credit to a pending or past due charge invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance

Returns: The updated invoice.

func (*Client) Call

func (c *Client) Call(ctx context.Context, method string, path string, body interface{}, queryParams QueryParams, requestOptions OptionsApplier, v interface{}) error

Call sends a request to Recurly API and parses the JSON response for the expected response type.

func (*Client) CancelSubscription

func (c *Client) CancelSubscription(subscriptionId string, params *CancelSubscriptionParams, opts ...Option) (*Subscription, error)

CancelSubscription wraps CancelSubscriptionWithContext using the background context

func (*Client) CancelSubscriptionWithContext

func (c *Client) CancelSubscriptionWithContext(ctx context.Context, subscriptionId string, params *CancelSubscriptionParams, opts ...Option) (*Subscription, error)

CancelSubscriptionWithContext Cancel a subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/cancel_subscription

Returns: A canceled or failed subscription.

func (*Client) Cancelpurchase

func (c *Client) Cancelpurchase(transactionId string, opts ...Option) (*InvoiceCollection, error)

Cancelpurchase wraps CancelpurchaseWithContext using the background context

func (*Client) CancelpurchaseWithContext

func (c *Client) CancelpurchaseWithContext(ctx context.Context, transactionId string, opts ...Option) (*InvoiceCollection, error)

CancelpurchaseWithContext Cancel Purchase

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/cancelPurchase

Returns: Returns the cancelled invoice

func (*Client) CollectInvoice

func (c *Client) CollectInvoice(invoiceId string, params *CollectInvoiceParams, opts ...Option) (*Invoice, error)

CollectInvoice wraps CollectInvoiceWithContext using the background context

func (*Client) CollectInvoiceWithContext

func (c *Client) CollectInvoiceWithContext(ctx context.Context, invoiceId string, params *CollectInvoiceParams, opts ...Option) (*Invoice, error)

CollectInvoiceWithContext Collect a pending or past due, automatic invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice

Returns: The updated invoice.

func (*Client) ConvertTrial

func (c *Client) ConvertTrial(subscriptionId string, opts ...Option) (*Subscription, error)

ConvertTrial wraps ConvertTrialWithContext using the background context

func (*Client) ConvertTrialWithContext

func (c *Client) ConvertTrialWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

ConvertTrialWithContext Convert trial subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/convert_trial

Returns: A subscription.

func (*Client) CreateAccount

func (c *Client) CreateAccount(body *AccountCreate, opts ...Option) (*Account, error)

CreateAccount wraps CreateAccountWithContext using the background context

func (*Client) CreateAccountExternalAccount

func (c *Client) CreateAccountExternalAccount(accountId string, body *ExternalAccountCreate, opts ...Option) (*ExternalAccount, error)

CreateAccountExternalAccount wraps CreateAccountExternalAccountWithContext using the background context

func (*Client) CreateAccountExternalAccountWithContext

func (c *Client) CreateAccountExternalAccountWithContext(ctx context.Context, accountId string, body *ExternalAccountCreate, opts ...Option) (*ExternalAccount, error)

CreateAccountExternalAccountWithContext Create an external account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_account_external_account

Returns: A representation of the created external_account.

func (*Client) CreateAccountWithContext

func (c *Client) CreateAccountWithContext(ctx context.Context, body *AccountCreate, opts ...Option) (*Account, error)

CreateAccountWithContext Create an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_account

Returns: An account.

func (*Client) CreateAuthorizePurchase

func (c *Client) CreateAuthorizePurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

CreateAuthorizePurchase wraps CreateAuthorizePurchaseWithContext using the background context

func (*Client) CreateAuthorizePurchaseWithContext

func (c *Client) CreateAuthorizePurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

CreateAuthorizePurchaseWithContext Authorize a purchase

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_authorize_purchase

Returns: Returns the authorize invoice

func (*Client) CreateBillingInfo

func (c *Client) CreateBillingInfo(accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

CreateBillingInfo wraps CreateBillingInfoWithContext using the background context

func (*Client) CreateBillingInfoWithContext

func (c *Client) CreateBillingInfoWithContext(ctx context.Context, accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

CreateBillingInfoWithContext Add new billing information on an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_billing_info

Returns: Updated billing information.

func (*Client) CreateCapturePurchase

func (c *Client) CreateCapturePurchase(transactionId string, opts ...Option) (*InvoiceCollection, error)

CreateCapturePurchase wraps CreateCapturePurchaseWithContext using the background context

func (*Client) CreateCapturePurchaseWithContext

func (c *Client) CreateCapturePurchaseWithContext(ctx context.Context, transactionId string, opts ...Option) (*InvoiceCollection, error)

CreateCapturePurchaseWithContext Capture a purchase

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_capture_purchase

Returns: Returns the captured invoice

func (*Client) CreateCoupon

func (c *Client) CreateCoupon(body *CouponCreate, opts ...Option) (*Coupon, error)

CreateCoupon wraps CreateCouponWithContext using the background context

func (*Client) CreateCouponRedemption

func (c *Client) CreateCouponRedemption(accountId string, body *CouponRedemptionCreate, opts ...Option) (*CouponRedemption, error)

CreateCouponRedemption wraps CreateCouponRedemptionWithContext using the background context

func (*Client) CreateCouponRedemptionWithContext

func (c *Client) CreateCouponRedemptionWithContext(ctx context.Context, accountId string, body *CouponRedemptionCreate, opts ...Option) (*CouponRedemption, error)

CreateCouponRedemptionWithContext Generate an active coupon redemption on an account or subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_coupon_redemption

Returns: Returns the new coupon redemption.

func (*Client) CreateCouponWithContext

func (c *Client) CreateCouponWithContext(ctx context.Context, body *CouponCreate, opts ...Option) (*Coupon, error)

CreateCouponWithContext Create a new coupon

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_coupon

Returns: A new coupon.

func (*Client) CreateExternalProduct

func (c *Client) CreateExternalProduct(body *ExternalProductCreate, opts ...Option) (*ExternalProduct, error)

CreateExternalProduct wraps CreateExternalProductWithContext using the background context

func (*Client) CreateExternalProductExternalProductReference

func (c *Client) CreateExternalProductExternalProductReference(externalProductId string, body *ExternalProductReferenceCreate, opts ...Option) (*ExternalProductReferenceMini, error)

CreateExternalProductExternalProductReference wraps CreateExternalProductExternalProductReferenceWithContext using the background context

func (*Client) CreateExternalProductExternalProductReferenceWithContext

func (c *Client) CreateExternalProductExternalProductReferenceWithContext(ctx context.Context, externalProductId string, body *ExternalProductReferenceCreate, opts ...Option) (*ExternalProductReferenceMini, error)

CreateExternalProductExternalProductReferenceWithContext Create an external product reference on an external product

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_external_product_external_product_reference

Returns: Details for the external product reference.

func (*Client) CreateExternalProductWithContext

func (c *Client) CreateExternalProductWithContext(ctx context.Context, body *ExternalProductCreate, opts ...Option) (*ExternalProduct, error)

CreateExternalProductWithContext Create an external product

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_external_product

Returns: Returns the external product

func (*Client) CreateGeneralLedgerAccount

func (c *Client) CreateGeneralLedgerAccount(body *GeneralLedgerAccountCreate, opts ...Option) (*GeneralLedgerAccount, error)

CreateGeneralLedgerAccount wraps CreateGeneralLedgerAccountWithContext using the background context

func (*Client) CreateGeneralLedgerAccountWithContext

func (c *Client) CreateGeneralLedgerAccountWithContext(ctx context.Context, body *GeneralLedgerAccountCreate, opts ...Option) (*GeneralLedgerAccount, error)

CreateGeneralLedgerAccountWithContext Create a new general ledger account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_general_ledger_account

Returns: A new general ledger account.

func (*Client) CreateGiftCard

func (c *Client) CreateGiftCard(body *GiftCardCreate, opts ...Option) (*GiftCard, error)

CreateGiftCard wraps CreateGiftCardWithContext using the background context

func (*Client) CreateGiftCardWithContext

func (c *Client) CreateGiftCardWithContext(ctx context.Context, body *GiftCardCreate, opts ...Option) (*GiftCard, error)

CreateGiftCardWithContext Create gift card

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_gift_card

Returns: Returns the gift card

func (*Client) CreateInvoice

func (c *Client) CreateInvoice(accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)

CreateInvoice wraps CreateInvoiceWithContext using the background context

func (*Client) CreateInvoiceWithContext

func (c *Client) CreateInvoiceWithContext(ctx context.Context, accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)

CreateInvoiceWithContext Create an invoice for pending line items

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_invoice

Returns: Returns the new invoices.

func (*Client) CreateItem

func (c *Client) CreateItem(body *ItemCreate, opts ...Option) (*Item, error)

CreateItem wraps CreateItemWithContext using the background context

func (*Client) CreateItemWithContext

func (c *Client) CreateItemWithContext(ctx context.Context, body *ItemCreate, opts ...Option) (*Item, error)

CreateItemWithContext Create a new item

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_item

Returns: A new item.

func (*Client) CreateLineItem

func (c *Client) CreateLineItem(accountId string, body *LineItemCreate, opts ...Option) (*LineItem, error)

CreateLineItem wraps CreateLineItemWithContext using the background context

func (*Client) CreateLineItemWithContext

func (c *Client) CreateLineItemWithContext(ctx context.Context, accountId string, body *LineItemCreate, opts ...Option) (*LineItem, error)

CreateLineItemWithContext Create a new line item for the account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_line_item

Returns: Returns the new line item.

func (*Client) CreateMeasuredUnit

func (c *Client) CreateMeasuredUnit(body *MeasuredUnitCreate, opts ...Option) (*MeasuredUnit, error)

CreateMeasuredUnit wraps CreateMeasuredUnitWithContext using the background context

func (*Client) CreateMeasuredUnitWithContext

func (c *Client) CreateMeasuredUnitWithContext(ctx context.Context, body *MeasuredUnitCreate, opts ...Option) (*MeasuredUnit, error)

CreateMeasuredUnitWithContext Create a new measured unit

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_measured_unit

Returns: A new measured unit.

func (*Client) CreatePendingPurchase

func (c *Client) CreatePendingPurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

CreatePendingPurchase wraps CreatePendingPurchaseWithContext using the background context

func (*Client) CreatePendingPurchaseWithContext

func (c *Client) CreatePendingPurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

CreatePendingPurchaseWithContext Create a pending purchase

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_pending_purchase

Returns: Returns the pending invoice

func (*Client) CreatePlan

func (c *Client) CreatePlan(body *PlanCreate, opts ...Option) (*Plan, error)

CreatePlan wraps CreatePlanWithContext using the background context

func (*Client) CreatePlanAddOn

func (c *Client) CreatePlanAddOn(planId string, body *AddOnCreate, opts ...Option) (*AddOn, error)

CreatePlanAddOn wraps CreatePlanAddOnWithContext using the background context

func (*Client) CreatePlanAddOnWithContext

func (c *Client) CreatePlanAddOnWithContext(ctx context.Context, planId string, body *AddOnCreate, opts ...Option) (*AddOn, error)

CreatePlanAddOnWithContext Create an add-on

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_plan_add_on

Returns: An add-on.

func (*Client) CreatePlanWithContext

func (c *Client) CreatePlanWithContext(ctx context.Context, body *PlanCreate, opts ...Option) (*Plan, error)

CreatePlanWithContext Create a plan

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_plan

Returns: A plan.

func (*Client) CreatePurchase

func (c *Client) CreatePurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

CreatePurchase wraps CreatePurchaseWithContext using the background context

func (*Client) CreatePurchaseWithContext

func (c *Client) CreatePurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

CreatePurchaseWithContext Create a new purchase

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_purchase

Returns: Returns the new invoices

func (*Client) CreateShippingAddress

func (c *Client) CreateShippingAddress(accountId string, body *ShippingAddressCreate, opts ...Option) (*ShippingAddress, error)

CreateShippingAddress wraps CreateShippingAddressWithContext using the background context

func (*Client) CreateShippingAddressWithContext

func (c *Client) CreateShippingAddressWithContext(ctx context.Context, accountId string, body *ShippingAddressCreate, opts ...Option) (*ShippingAddress, error)

CreateShippingAddressWithContext Create a new shipping address for the account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_address

Returns: Returns the new shipping address.

func (*Client) CreateShippingMethod

func (c *Client) CreateShippingMethod(body *ShippingMethodCreate, opts ...Option) (*ShippingMethod, error)

CreateShippingMethod wraps CreateShippingMethodWithContext using the background context

func (*Client) CreateShippingMethodWithContext

func (c *Client) CreateShippingMethodWithContext(ctx context.Context, body *ShippingMethodCreate, opts ...Option) (*ShippingMethod, error)

CreateShippingMethodWithContext Create a new shipping method

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_shipping_method

Returns: A new shipping method.

func (*Client) CreateSubscription

func (c *Client) CreateSubscription(body *SubscriptionCreate, opts ...Option) (*Subscription, error)

CreateSubscription wraps CreateSubscriptionWithContext using the background context

func (*Client) CreateSubscriptionChange

func (c *Client) CreateSubscriptionChange(subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)

CreateSubscriptionChange wraps CreateSubscriptionChangeWithContext using the background context

func (*Client) CreateSubscriptionChangeWithContext

func (c *Client) CreateSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)

CreateSubscriptionChangeWithContext Create a new subscription change

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_subscription_change

Returns: A subscription change.

func (*Client) CreateSubscriptionWithContext

func (c *Client) CreateSubscriptionWithContext(ctx context.Context, body *SubscriptionCreate, opts ...Option) (*Subscription, error)

CreateSubscriptionWithContext Create a new subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_subscription

Returns: A subscription.

func (*Client) CreateUsage

func (c *Client) CreateUsage(subscriptionId string, addOnId string, body *UsageCreate, opts ...Option) (*Usage, error)

CreateUsage wraps CreateUsageWithContext using the background context

func (*Client) CreateUsageWithContext

func (c *Client) CreateUsageWithContext(ctx context.Context, subscriptionId string, addOnId string, body *UsageCreate, opts ...Option) (*Usage, error)

CreateUsageWithContext Log a usage record on this subscription add-on

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/create_usage

Returns: The created usage record.

func (*Client) DeactivateAccount

func (c *Client) DeactivateAccount(accountId string, opts ...Option) (*Account, error)

DeactivateAccount wraps DeactivateAccountWithContext using the background context

func (*Client) DeactivateAccountWithContext

func (c *Client) DeactivateAccountWithContext(ctx context.Context, accountId string, opts ...Option) (*Account, error)

DeactivateAccountWithContext Deactivate an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_account

Returns: An account.

func (*Client) DeactivateCoupon

func (c *Client) DeactivateCoupon(couponId string, opts ...Option) (*Coupon, error)

DeactivateCoupon wraps DeactivateCouponWithContext using the background context

func (*Client) DeactivateCouponWithContext

func (c *Client) DeactivateCouponWithContext(ctx context.Context, couponId string, opts ...Option) (*Coupon, error)

DeactivateCouponWithContext Expire a coupon

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_coupon

Returns: The expired Coupon

func (*Client) DeactivateExternalProductExternalProductReference

func (c *Client) DeactivateExternalProductExternalProductReference(externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)

DeactivateExternalProductExternalProductReference wraps DeactivateExternalProductExternalProductReferenceWithContext using the background context

func (*Client) DeactivateExternalProductExternalProductReferenceWithContext

func (c *Client) DeactivateExternalProductExternalProductReferenceWithContext(ctx context.Context, externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)

DeactivateExternalProductExternalProductReferenceWithContext Deactivate an external product reference

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_product_external_product_reference

Returns: Details for an external product reference.

func (*Client) DeactivateExternalProducts

func (c *Client) DeactivateExternalProducts(externalProductId string, opts ...Option) (*ExternalProduct, error)

DeactivateExternalProducts wraps DeactivateExternalProductsWithContext using the background context

func (*Client) DeactivateExternalProductsWithContext

func (c *Client) DeactivateExternalProductsWithContext(ctx context.Context, externalProductId string, opts ...Option) (*ExternalProduct, error)

DeactivateExternalProductsWithContext Deactivate an external product

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_products

Returns: Deactivated external product.

func (*Client) DeactivateItem

func (c *Client) DeactivateItem(itemId string, opts ...Option) (*Item, error)

DeactivateItem wraps DeactivateItemWithContext using the background context

func (*Client) DeactivateItemWithContext

func (c *Client) DeactivateItemWithContext(ctx context.Context, itemId string, opts ...Option) (*Item, error)

DeactivateItemWithContext Deactivate an item

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_item

Returns: An item.

func (*Client) DeactivateShippingMethod

func (c *Client) DeactivateShippingMethod(shippingMethodId string, opts ...Option) (*ShippingMethod, error)

DeactivateShippingMethod wraps DeactivateShippingMethodWithContext using the background context

func (*Client) DeactivateShippingMethodWithContext

func (c *Client) DeactivateShippingMethodWithContext(ctx context.Context, shippingMethodId string, opts ...Option) (*ShippingMethod, error)

DeactivateShippingMethodWithContext Deactivate a shipping method

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_shipping_method

Returns: A shipping method.

func (*Client) DeactivateUniqueCouponCode

func (c *Client) DeactivateUniqueCouponCode(uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

DeactivateUniqueCouponCode wraps DeactivateUniqueCouponCodeWithContext using the background context

func (*Client) DeactivateUniqueCouponCodeWithContext

func (c *Client) DeactivateUniqueCouponCodeWithContext(ctx context.Context, uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

DeactivateUniqueCouponCodeWithContext Deactivate a unique coupon code

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/deactivate_unique_coupon_code

Returns: A unique coupon code.

func (*Client) DeleteAccountExternalAccount

func (c *Client) DeleteAccountExternalAccount(accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)

DeleteAccountExternalAccount wraps DeleteAccountExternalAccountWithContext using the background context

func (*Client) DeleteAccountExternalAccountWithContext

func (c *Client) DeleteAccountExternalAccountWithContext(ctx context.Context, accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)

DeleteAccountExternalAccountWithContext Delete an external account for an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/delete_account_external_account

Returns: Successful Delete

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) error

Do submits the http.Request to Recurly's API and parses the JSON response

func (*Client) GenerateUniqueCouponCodes

func (c *Client) GenerateUniqueCouponCodes(couponId string, body *CouponBulkCreate, opts ...Option) (*UniqueCouponCodeParams, error)

GenerateUniqueCouponCodes wraps GenerateUniqueCouponCodesWithContext using the background context

func (*Client) GenerateUniqueCouponCodesWithContext

func (c *Client) GenerateUniqueCouponCodesWithContext(ctx context.Context, couponId string, body *CouponBulkCreate, opts ...Option) (*UniqueCouponCodeParams, error)

GenerateUniqueCouponCodesWithContext Generate unique coupon codes

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/generate_unique_coupon_codes

Returns: A set of parameters that can be passed to the `list_unique_coupon_codes` endpoint to obtain only the newly generated `UniqueCouponCodes`.

func (*Client) GetABillingInfo

func (c *Client) GetABillingInfo(accountId string, billingInfoId string, opts ...Option) (*BillingInfo, error)

GetABillingInfo wraps GetABillingInfoWithContext using the background context

func (*Client) GetABillingInfoWithContext

func (c *Client) GetABillingInfoWithContext(ctx context.Context, accountId string, billingInfoId string, opts ...Option) (*BillingInfo, error)

GetABillingInfoWithContext Fetch a billing info

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_a_billing_info

Returns: A billing info.

func (*Client) GetAccount

func (c *Client) GetAccount(accountId string, opts ...Option) (*Account, error)

GetAccount wraps GetAccountWithContext using the background context

func (*Client) GetAccountAcquisition

func (c *Client) GetAccountAcquisition(accountId string, opts ...Option) (*AccountAcquisition, error)

GetAccountAcquisition wraps GetAccountAcquisitionWithContext using the background context

func (*Client) GetAccountAcquisitionWithContext

func (c *Client) GetAccountAcquisitionWithContext(ctx context.Context, accountId string, opts ...Option) (*AccountAcquisition, error)

GetAccountAcquisitionWithContext Fetch an account's acquisition data

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_account_acquisition

Returns: An account's acquisition data.

func (*Client) GetAccountBalance

func (c *Client) GetAccountBalance(accountId string, opts ...Option) (*AccountBalance, error)

GetAccountBalance wraps GetAccountBalanceWithContext using the background context

func (*Client) GetAccountBalanceWithContext

func (c *Client) GetAccountBalanceWithContext(ctx context.Context, accountId string, opts ...Option) (*AccountBalance, error)

GetAccountBalanceWithContext Fetch an account's balance and past due status

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_account_balance

Returns: An account's balance.

func (*Client) GetAccountExternalAccount

func (c *Client) GetAccountExternalAccount(accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)

GetAccountExternalAccount wraps GetAccountExternalAccountWithContext using the background context

func (*Client) GetAccountExternalAccountWithContext

func (c *Client) GetAccountExternalAccountWithContext(ctx context.Context, accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)

GetAccountExternalAccountWithContext Get an external account for an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_account_external_account

Returns: A external account on an account.

func (*Client) GetAccountNote

func (c *Client) GetAccountNote(accountId string, accountNoteId string, opts ...Option) (*AccountNote, error)

GetAccountNote wraps GetAccountNoteWithContext using the background context

func (*Client) GetAccountNoteWithContext

func (c *Client) GetAccountNoteWithContext(ctx context.Context, accountId string, accountNoteId string, opts ...Option) (*AccountNote, error)

GetAccountNoteWithContext Fetch an account note

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_account_note

Returns: An account note.

func (*Client) GetAccountWithContext

func (c *Client) GetAccountWithContext(ctx context.Context, accountId string, opts ...Option) (*Account, error)

GetAccountWithContext Fetch an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_account

Returns: An account.

func (*Client) GetAddOn

func (c *Client) GetAddOn(addOnId string, opts ...Option) (*AddOn, error)

GetAddOn wraps GetAddOnWithContext using the background context

func (*Client) GetAddOnWithContext

func (c *Client) GetAddOnWithContext(ctx context.Context, addOnId string, opts ...Option) (*AddOn, error)

GetAddOnWithContext Fetch an add-on

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_add_on

Returns: An add-on.

func (*Client) GetBillingInfo

func (c *Client) GetBillingInfo(accountId string, opts ...Option) (*BillingInfo, error)

GetBillingInfo wraps GetBillingInfoWithContext using the background context

func (*Client) GetBillingInfoWithContext

func (c *Client) GetBillingInfoWithContext(ctx context.Context, accountId string, opts ...Option) (*BillingInfo, error)

GetBillingInfoWithContext Fetch an account's billing information

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_billing_info

Returns: An account's billing information.

func (*Client) GetBusinessEntity

func (c *Client) GetBusinessEntity(businessEntityId string, opts ...Option) (*BusinessEntity, error)

GetBusinessEntity wraps GetBusinessEntityWithContext using the background context

func (*Client) GetBusinessEntityWithContext

func (c *Client) GetBusinessEntityWithContext(ctx context.Context, businessEntityId string, opts ...Option) (*BusinessEntity, error)

GetBusinessEntityWithContext Fetch a business entity

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_business_entity

Returns: Business entity details

func (*Client) GetCoupon

func (c *Client) GetCoupon(couponId string, opts ...Option) (*Coupon, error)

GetCoupon wraps GetCouponWithContext using the background context

func (*Client) GetCouponWithContext

func (c *Client) GetCouponWithContext(ctx context.Context, couponId string, opts ...Option) (*Coupon, error)

GetCouponWithContext Fetch a coupon

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_coupon

Returns: A coupon.

func (*Client) GetCreditPayment

func (c *Client) GetCreditPayment(creditPaymentId string, opts ...Option) (*CreditPayment, error)

GetCreditPayment wraps GetCreditPaymentWithContext using the background context

func (*Client) GetCreditPaymentWithContext

func (c *Client) GetCreditPaymentWithContext(ctx context.Context, creditPaymentId string, opts ...Option) (*CreditPayment, error)

GetCreditPaymentWithContext Fetch a credit payment

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_credit_payment

Returns: A credit payment.

func (*Client) GetCustomFieldDefinition

func (c *Client) GetCustomFieldDefinition(customFieldDefinitionId string, opts ...Option) (*CustomFieldDefinition, error)

GetCustomFieldDefinition wraps GetCustomFieldDefinitionWithContext using the background context

func (*Client) GetCustomFieldDefinitionWithContext

func (c *Client) GetCustomFieldDefinitionWithContext(ctx context.Context, customFieldDefinitionId string, opts ...Option) (*CustomFieldDefinition, error)

GetCustomFieldDefinitionWithContext Fetch an custom field definition

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_custom_field_definition

Returns: A custom field definition.

func (*Client) GetDunningCampaign

func (c *Client) GetDunningCampaign(dunningCampaignId string, opts ...Option) (*DunningCampaign, error)

GetDunningCampaign wraps GetDunningCampaignWithContext using the background context

func (*Client) GetDunningCampaignWithContext

func (c *Client) GetDunningCampaignWithContext(ctx context.Context, dunningCampaignId string, opts ...Option) (*DunningCampaign, error)

GetDunningCampaignWithContext Fetch a dunning campaign

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_dunning_campaign

Returns: Settings for a dunning campaign.

func (*Client) GetExportDates

func (c *Client) GetExportDates(opts ...Option) (*ExportDates, error)

GetExportDates wraps GetExportDatesWithContext using the background context

func (*Client) GetExportDatesWithContext

func (c *Client) GetExportDatesWithContext(ctx context.Context, opts ...Option) (*ExportDates, error)

GetExportDatesWithContext List the dates that have an available export to download.

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates

Returns: Returns a list of dates.

func (*Client) GetExportFiles

func (c *Client) GetExportFiles(exportDate string, opts ...Option) (*ExportFiles, error)

GetExportFiles wraps GetExportFilesWithContext using the background context

func (*Client) GetExportFilesWithContext

func (c *Client) GetExportFilesWithContext(ctx context.Context, exportDate string, opts ...Option) (*ExportFiles, error)

GetExportFilesWithContext List of the export files that are available to download.

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_export_files

Returns: Returns a list of export files to download.

func (*Client) GetExternalProduct

func (c *Client) GetExternalProduct(externalProductId string, opts ...Option) (*ExternalProduct, error)

GetExternalProduct wraps GetExternalProductWithContext using the background context

func (*Client) GetExternalProductExternalProductReference

func (c *Client) GetExternalProductExternalProductReference(externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)

GetExternalProductExternalProductReference wraps GetExternalProductExternalProductReferenceWithContext using the background context

func (*Client) GetExternalProductExternalProductReferenceWithContext

func (c *Client) GetExternalProductExternalProductReferenceWithContext(ctx context.Context, externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)

GetExternalProductExternalProductReferenceWithContext Fetch an external product reference

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_external_product_external_product_reference

Returns: Details for an external product reference.

func (*Client) GetExternalProductWithContext

func (c *Client) GetExternalProductWithContext(ctx context.Context, externalProductId string, opts ...Option) (*ExternalProduct, error)

GetExternalProductWithContext Fetch an external product

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_external_product

Returns: Settings for an external product.

func (*Client) GetExternalSubscription

func (c *Client) GetExternalSubscription(externalSubscriptionId string, opts ...Option) (*ExternalSubscription, error)

GetExternalSubscription wraps GetExternalSubscriptionWithContext using the background context

func (*Client) GetExternalSubscriptionExternalPaymentPhase

func (c *Client) GetExternalSubscriptionExternalPaymentPhase(externalSubscriptionId string, externalPaymentPhaseId string, opts ...Option) (*ExternalPaymentPhase, error)

GetExternalSubscriptionExternalPaymentPhase wraps GetExternalSubscriptionExternalPaymentPhaseWithContext using the background context

func (*Client) GetExternalSubscriptionExternalPaymentPhaseWithContext

func (c *Client) GetExternalSubscriptionExternalPaymentPhaseWithContext(ctx context.Context, externalSubscriptionId string, externalPaymentPhaseId string, opts ...Option) (*ExternalPaymentPhase, error)

GetExternalSubscriptionExternalPaymentPhaseWithContext Fetch an external payment phase

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase

Returns: Details for an external payment phase.

func (*Client) GetExternalSubscriptionWithContext

func (c *Client) GetExternalSubscriptionWithContext(ctx context.Context, externalSubscriptionId string, opts ...Option) (*ExternalSubscription, error)

GetExternalSubscriptionWithContext Fetch an external subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription

Returns: Settings for an external subscription.

func (*Client) GetGeneralLedgerAccount

func (c *Client) GetGeneralLedgerAccount(generalLedgerAccountId string, opts ...Option) (*GeneralLedgerAccount, error)

GetGeneralLedgerAccount wraps GetGeneralLedgerAccountWithContext using the background context

func (*Client) GetGeneralLedgerAccountWithContext

func (c *Client) GetGeneralLedgerAccountWithContext(ctx context.Context, generalLedgerAccountId string, opts ...Option) (*GeneralLedgerAccount, error)

GetGeneralLedgerAccountWithContext Fetch a general ledger account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_general_ledger_account

Returns: A general ledger account.

func (*Client) GetGiftCard

func (c *Client) GetGiftCard(giftCardId string, opts ...Option) (*GiftCard, error)

GetGiftCard wraps GetGiftCardWithContext using the background context

func (*Client) GetGiftCardWithContext

func (c *Client) GetGiftCardWithContext(ctx context.Context, giftCardId string, opts ...Option) (*GiftCard, error)

GetGiftCardWithContext Fetch a gift card

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_gift_card

Returns: Gift card details

func (*Client) GetInvoice

func (c *Client) GetInvoice(invoiceId string, opts ...Option) (*Invoice, error)

GetInvoice wraps GetInvoiceWithContext using the background context

func (*Client) GetInvoiceTemplate

func (c *Client) GetInvoiceTemplate(invoiceTemplateId string, opts ...Option) (*InvoiceTemplate, error)

GetInvoiceTemplate wraps GetInvoiceTemplateWithContext using the background context

func (*Client) GetInvoiceTemplateWithContext

func (c *Client) GetInvoiceTemplateWithContext(ctx context.Context, invoiceTemplateId string, opts ...Option) (*InvoiceTemplate, error)

GetInvoiceTemplateWithContext Fetch an invoice template

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_template

Returns: Settings for an invoice template.

func (*Client) GetInvoiceWithContext

func (c *Client) GetInvoiceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

GetInvoiceWithContext Fetch an invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_invoice

Returns: An invoice.

func (*Client) GetItem

func (c *Client) GetItem(itemId string, opts ...Option) (*Item, error)

GetItem wraps GetItemWithContext using the background context

func (*Client) GetItemWithContext

func (c *Client) GetItemWithContext(ctx context.Context, itemId string, opts ...Option) (*Item, error)

GetItemWithContext Fetch an item

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_item

Returns: An item.

func (*Client) GetLineItem

func (c *Client) GetLineItem(lineItemId string, opts ...Option) (*LineItem, error)

GetLineItem wraps GetLineItemWithContext using the background context

func (*Client) GetLineItemWithContext

func (c *Client) GetLineItemWithContext(ctx context.Context, lineItemId string, opts ...Option) (*LineItem, error)

GetLineItemWithContext Fetch a line item

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_line_item

Returns: A line item.

func (*Client) GetMeasuredUnit

func (c *Client) GetMeasuredUnit(measuredUnitId string, opts ...Option) (*MeasuredUnit, error)

GetMeasuredUnit wraps GetMeasuredUnitWithContext using the background context

func (*Client) GetMeasuredUnitWithContext

func (c *Client) GetMeasuredUnitWithContext(ctx context.Context, measuredUnitId string, opts ...Option) (*MeasuredUnit, error)

GetMeasuredUnitWithContext Fetch a measured unit

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_measured_unit

Returns: An item.

func (*Client) GetPerformanceObligation

func (c *Client) GetPerformanceObligation(performanceObligationId string, opts ...Option) (*PerformanceObligation, error)

GetPerformanceObligation wraps GetPerformanceObligationWithContext using the background context

func (*Client) GetPerformanceObligationWithContext

func (c *Client) GetPerformanceObligationWithContext(ctx context.Context, performanceObligationId string, opts ...Option) (*PerformanceObligation, error)

GetPerformanceObligationWithContext Get a single Performance Obligation.

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligation

Returns: A single Performance Obligation.

func (*Client) GetPerformanceObligations

func (c *Client) GetPerformanceObligations(opts ...Option) (PerformanceObligationLister, error)

GetPerformanceObligations Get a site's Performance Obligations

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligations

Returns: A list of Performance Obligations.

func (*Client) GetPlan

func (c *Client) GetPlan(planId string, opts ...Option) (*Plan, error)

GetPlan wraps GetPlanWithContext using the background context

func (*Client) GetPlanAddOn

func (c *Client) GetPlanAddOn(planId string, addOnId string, opts ...Option) (*AddOn, error)

GetPlanAddOn wraps GetPlanAddOnWithContext using the background context

func (*Client) GetPlanAddOnWithContext

func (c *Client) GetPlanAddOnWithContext(ctx context.Context, planId string, addOnId string, opts ...Option) (*AddOn, error)

GetPlanAddOnWithContext Fetch a plan's add-on

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_plan_add_on

Returns: An add-on.

func (*Client) GetPlanWithContext

func (c *Client) GetPlanWithContext(ctx context.Context, planId string, opts ...Option) (*Plan, error)

GetPlanWithContext Fetch a plan

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_plan

Returns: A plan.

func (*Client) GetPreviewRenewal

func (c *Client) GetPreviewRenewal(subscriptionId string, opts ...Option) (*InvoiceCollection, error)

GetPreviewRenewal wraps GetPreviewRenewalWithContext using the background context

func (*Client) GetPreviewRenewalWithContext

func (c *Client) GetPreviewRenewalWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*InvoiceCollection, error)

GetPreviewRenewalWithContext Fetch a preview of a subscription's renewal invoice(s)

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_preview_renewal

Returns: A preview of the subscription's renewal invoice(s).

func (*Client) GetShippingAddress

func (c *Client) GetShippingAddress(accountId string, shippingAddressId string, opts ...Option) (*ShippingAddress, error)

GetShippingAddress wraps GetShippingAddressWithContext using the background context

func (*Client) GetShippingAddressWithContext

func (c *Client) GetShippingAddressWithContext(ctx context.Context, accountId string, shippingAddressId string, opts ...Option) (*ShippingAddress, error)

GetShippingAddressWithContext Fetch an account's shipping address

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_address

Returns: A shipping address.

func (*Client) GetShippingMethod

func (c *Client) GetShippingMethod(shippingMethodId string, opts ...Option) (*ShippingMethod, error)

GetShippingMethod wraps GetShippingMethodWithContext using the background context

func (*Client) GetShippingMethodWithContext

func (c *Client) GetShippingMethodWithContext(ctx context.Context, shippingMethodId string, opts ...Option) (*ShippingMethod, error)

GetShippingMethodWithContext Fetch a shipping method

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_shipping_method

Returns: A shipping method.

func (*Client) GetSite

func (c *Client) GetSite(siteId string, opts ...Option) (*Site, error)

GetSite wraps GetSiteWithContext using the background context

func (*Client) GetSiteWithContext

func (c *Client) GetSiteWithContext(ctx context.Context, siteId string, opts ...Option) (*Site, error)

GetSiteWithContext Fetch a site

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_site

Returns: A site.

func (*Client) GetSubscription

func (c *Client) GetSubscription(subscriptionId string, opts ...Option) (*Subscription, error)

GetSubscription wraps GetSubscriptionWithContext using the background context

func (*Client) GetSubscriptionChange

func (c *Client) GetSubscriptionChange(subscriptionId string, opts ...Option) (*SubscriptionChange, error)

GetSubscriptionChange wraps GetSubscriptionChangeWithContext using the background context

func (*Client) GetSubscriptionChangeWithContext

func (c *Client) GetSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*SubscriptionChange, error)

GetSubscriptionChangeWithContext Fetch a subscription's pending change

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_subscription_change

Returns: A subscription's pending change.

func (*Client) GetSubscriptionWithContext

func (c *Client) GetSubscriptionWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

GetSubscriptionWithContext Fetch a subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_subscription

Returns: A subscription.

func (*Client) GetTransaction

func (c *Client) GetTransaction(transactionId string, opts ...Option) (*Transaction, error)

GetTransaction wraps GetTransactionWithContext using the background context

func (*Client) GetTransactionWithContext

func (c *Client) GetTransactionWithContext(ctx context.Context, transactionId string, opts ...Option) (*Transaction, error)

GetTransactionWithContext Fetch a transaction

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_transaction

Returns: A transaction.

func (*Client) GetUniqueCouponCode

func (c *Client) GetUniqueCouponCode(uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

GetUniqueCouponCode wraps GetUniqueCouponCodeWithContext using the background context

func (*Client) GetUniqueCouponCodeWithContext

func (c *Client) GetUniqueCouponCodeWithContext(ctx context.Context, uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

GetUniqueCouponCodeWithContext Fetch a unique coupon code

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_unique_coupon_code

Returns: A unique coupon code.

func (*Client) GetUsage

func (c *Client) GetUsage(usageId string, opts ...Option) (*Usage, error)

GetUsage wraps GetUsageWithContext using the background context

func (*Client) GetUsageWithContext

func (c *Client) GetUsageWithContext(ctx context.Context, usageId string, opts ...Option) (*Usage, error)

GetUsageWithContext Get a usage record

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/get_usage

Returns: The usage record.

func (*Client) InterpolatePath

func (c *Client) InterpolatePath(path string, params ...string) (string, error)

InterpolatePath takes an OpenAPI-style path such as "/accounts/{account_id}/shipping_addresses/{shipping_address_id}" and a list of string arguments to fill the template, and it returns the interpolated path

func (*Client) ListAccountAcquisition

func (c *Client) ListAccountAcquisition(params *ListAccountAcquisitionParams, opts ...Option) (AccountAcquisitionLister, error)

ListAccountAcquisition List a site's account acquisition data

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_acquisition

Returns: A list of the site's account acquisition data.

func (*Client) ListAccountCouponRedemptions

func (c *Client) ListAccountCouponRedemptions(accountId string, params *ListAccountCouponRedemptionsParams, opts ...Option) (CouponRedemptionLister, error)

ListAccountCouponRedemptions List the coupon redemptions for an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_coupon_redemptions

Returns: A list of the the coupon redemptions on an account.

func (*Client) ListAccountCreditPayments

func (c *Client) ListAccountCreditPayments(accountId string, params *ListAccountCreditPaymentsParams, opts ...Option) (CreditPaymentLister, error)

ListAccountCreditPayments List an account's credit payments

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_credit_payments

Returns: A list of the account's credit payments.

func (*Client) ListAccountExternalAccount

func (c *Client) ListAccountExternalAccount(accountId string, opts ...Option) (ExternalAccountLister, error)

ListAccountExternalAccount List external accounts for an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_account

Returns: A list of external accounts on an account.

func (*Client) ListAccountExternalInvoices

func (c *Client) ListAccountExternalInvoices(accountId string, params *ListAccountExternalInvoicesParams, opts ...Option) (ExternalInvoiceLister, error)

ListAccountExternalInvoices List the external invoices on an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_invoices

Returns: A list of the the external_invoices on an account.

func (*Client) ListAccountExternalSubscriptions

func (c *Client) ListAccountExternalSubscriptions(accountId string, params *ListAccountExternalSubscriptionsParams, opts ...Option) (ExternalSubscriptionLister, error)

ListAccountExternalSubscriptions List an account's external subscriptions

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_subscriptions

Returns: A list of the the external_subscriptions on an account.

func (*Client) ListAccountInvoices

func (c *Client) ListAccountInvoices(accountId string, params *ListAccountInvoicesParams, opts ...Option) (InvoiceLister, error)

ListAccountInvoices List an account's invoices

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_invoices

Returns: A list of the account's invoices.

func (*Client) ListAccountLineItems

func (c *Client) ListAccountLineItems(accountId string, params *ListAccountLineItemsParams, opts ...Option) (LineItemLister, error)

ListAccountLineItems List an account's line items

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_line_items

Returns: A list of the account's line items.

func (*Client) ListAccountNotes

func (c *Client) ListAccountNotes(accountId string, params *ListAccountNotesParams, opts ...Option) (AccountNoteLister, error)

ListAccountNotes List an account's notes

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_notes

Returns: A list of an account's notes.

func (*Client) ListAccountSubscriptions

func (c *Client) ListAccountSubscriptions(accountId string, params *ListAccountSubscriptionsParams, opts ...Option) (SubscriptionLister, error)

ListAccountSubscriptions List an account's subscriptions

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_subscriptions

Returns: A list of the account's subscriptions.

func (*Client) ListAccountTransactions

func (c *Client) ListAccountTransactions(accountId string, params *ListAccountTransactionsParams, opts ...Option) (TransactionLister, error)

ListAccountTransactions List an account's transactions

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_account_transactions

Returns: A list of the account's transactions.

func (*Client) ListAccounts

func (c *Client) ListAccounts(params *ListAccountsParams, opts ...Option) (AccountLister, error)

ListAccounts List a site's accounts

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_accounts

Returns: A list of the site's accounts.

func (*Client) ListActiveCouponRedemptions

func (c *Client) ListActiveCouponRedemptions(accountId string, opts ...Option) (CouponRedemptionLister, error)

ListActiveCouponRedemptions List the coupon redemptions that are active on an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_active_coupon_redemptions

Returns: Active coupon redemptions on an account.

func (*Client) ListAddOns

func (c *Client) ListAddOns(params *ListAddOnsParams, opts ...Option) (AddOnLister, error)

ListAddOns List a site's add-ons

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_add_ons

Returns: A list of add-ons.

func (*Client) ListBillingInfos

func (c *Client) ListBillingInfos(accountId string, params *ListBillingInfosParams, opts ...Option) (BillingInfoLister, error)

ListBillingInfos Get the list of billing information associated with an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_billing_infos

Returns: A list of the the billing information for an account's

func (*Client) ListBusinessEntities

func (c *Client) ListBusinessEntities(opts ...Option) (BusinessEntityLister, error)

ListBusinessEntities List business entities

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_business_entities

Returns: List of all business entities on your site.

func (*Client) ListBusinessEntityInvoices

func (c *Client) ListBusinessEntityInvoices(businessEntityId string, params *ListBusinessEntityInvoicesParams, opts ...Option) (InvoiceLister, error)

ListBusinessEntityInvoices List a business entity's invoices

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_business_entity_invoices

Returns: A list of the business entity's invoices.

func (*Client) ListChildAccounts

func (c *Client) ListChildAccounts(accountId string, params *ListChildAccountsParams, opts ...Option) (AccountLister, error)

ListChildAccounts List an account's child accounts

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_child_accounts

Returns: A list of an account's child accounts.

func (*Client) ListCoupons

func (c *Client) ListCoupons(params *ListCouponsParams, opts ...Option) (CouponLister, error)

ListCoupons List a site's coupons

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_coupons

Returns: A list of the site's coupons.

func (*Client) ListCreditPayments

func (c *Client) ListCreditPayments(params *ListCreditPaymentsParams, opts ...Option) (CreditPaymentLister, error)

ListCreditPayments List a site's credit payments

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_credit_payments

Returns: A list of the site's credit payments.

func (*Client) ListCustomFieldDefinitions

func (c *Client) ListCustomFieldDefinitions(params *ListCustomFieldDefinitionsParams, opts ...Option) (CustomFieldDefinitionLister, error)

ListCustomFieldDefinitions List a site's custom field definitions

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_custom_field_definitions

Returns: A list of the site's custom field definitions.

func (*Client) ListDunningCampaigns

func (c *Client) ListDunningCampaigns(params *ListDunningCampaignsParams, opts ...Option) (DunningCampaignLister, error)

ListDunningCampaigns List the dunning campaigns for a site

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_dunning_campaigns

Returns: A list of the the dunning_campaigns on an account.

func (*Client) ListEntitlements

func (c *Client) ListEntitlements(accountId string, params *ListEntitlementsParams, opts ...Option) (EntitlementsLister, error)

ListEntitlements List entitlements granted to an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_entitlements

Returns: A list of the entitlements granted to an account.

func (*Client) ListExternalInvoices

func (c *Client) ListExternalInvoices(params *ListExternalInvoicesParams, opts ...Option) (ExternalInvoiceLister, error)

ListExternalInvoices List the external invoices on a site

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_external_invoices

Returns: A list of the the external_invoices on a site.

func (*Client) ListExternalProductExternalProductReferences

func (c *Client) ListExternalProductExternalProductReferences(externalProductId string, params *ListExternalProductExternalProductReferencesParams, opts ...Option) (ExternalProductReferenceCollectionLister, error)

ListExternalProductExternalProductReferences List the external product references for an external product

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_external_product_external_product_references

Returns: A list of the the external product references for an external product.

func (*Client) ListExternalProducts

func (c *Client) ListExternalProducts(params *ListExternalProductsParams, opts ...Option) (ExternalProductLister, error)

ListExternalProducts List a site's external products

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_external_products

Returns: A list of the the external_products on a site.

func (*Client) ListExternalSubscriptionExternalInvoices

func (c *Client) ListExternalSubscriptionExternalInvoices(externalSubscriptionId string, params *ListExternalSubscriptionExternalInvoicesParams, opts ...Option) (ExternalInvoiceLister, error)

ListExternalSubscriptionExternalInvoices List the external invoices on an external subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_invoices

Returns: A list of the the external_invoices on a site.

func (*Client) ListExternalSubscriptionExternalPaymentPhases

func (c *Client) ListExternalSubscriptionExternalPaymentPhases(externalSubscriptionId string, params *ListExternalSubscriptionExternalPaymentPhasesParams, opts ...Option) (ExternalPaymentPhaseLister, error)

ListExternalSubscriptionExternalPaymentPhases List the external payment phases on an external subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_payment_phases

Returns: A list of the the external_payment_phases on a site.

func (*Client) ListExternalSubscriptions

func (c *Client) ListExternalSubscriptions(params *ListExternalSubscriptionsParams, opts ...Option) (ExternalSubscriptionLister, error)

ListExternalSubscriptions List a site's external subscriptions

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscriptions

Returns: A list of the the external_subscriptions on a site.

func (*Client) ListGeneralLedgerAccounts

func (c *Client) ListGeneralLedgerAccounts(params *ListGeneralLedgerAccountsParams, opts ...Option) (GeneralLedgerAccountLister, error)

ListGeneralLedgerAccounts List a site's general ledger accounts

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_general_ledger_accounts

Returns: A list of the site's general ledger accounts.

func (*Client) ListGiftCards

func (c *Client) ListGiftCards(opts ...Option) (GiftCardLister, error)

ListGiftCards List gift cards

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_gift_cards

Returns: List of all created gift cards on your site.

func (*Client) ListInvoiceCouponRedemptions

func (c *Client) ListInvoiceCouponRedemptions(invoiceId string, params *ListInvoiceCouponRedemptionsParams, opts ...Option) (CouponRedemptionLister, error)

ListInvoiceCouponRedemptions List the coupon redemptions applied to an invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_coupon_redemptions

Returns: A list of the the coupon redemptions associated with the invoice.

func (*Client) ListInvoiceLineItems

func (c *Client) ListInvoiceLineItems(invoiceId string, params *ListInvoiceLineItemsParams, opts ...Option) (LineItemLister, error)

ListInvoiceLineItems List an invoice's line items

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_line_items

Returns: A list of the invoice's line items.

func (*Client) ListInvoiceTemplateAccounts

func (c *Client) ListInvoiceTemplateAccounts(invoiceTemplateId string, params *ListInvoiceTemplateAccountsParams, opts ...Option) (AccountLister, error)

ListInvoiceTemplateAccounts List an invoice template's associated accounts

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_template_accounts

Returns: A list of an invoice template's associated accounts.

func (*Client) ListInvoiceTemplates

func (c *Client) ListInvoiceTemplates(params *ListInvoiceTemplatesParams, opts ...Option) (InvoiceTemplateLister, error)

ListInvoiceTemplates Show the invoice templates for a site

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_templates

Returns: A list of the the invoice templates on a site.

func (*Client) ListInvoices

func (c *Client) ListInvoices(params *ListInvoicesParams, opts ...Option) (InvoiceLister, error)

ListInvoices List a site's invoices

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_invoices

Returns: A list of the site's invoices.

func (*Client) ListItems

func (c *Client) ListItems(params *ListItemsParams, opts ...Option) (ItemLister, error)

ListItems List a site's items

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_items

Returns: A list of the site's items.

func (*Client) ListLineItems

func (c *Client) ListLineItems(params *ListLineItemsParams, opts ...Option) (LineItemLister, error)

ListLineItems List a site's line items

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_line_items

Returns: A list of the site's line items.

func (*Client) ListMeasuredUnit

func (c *Client) ListMeasuredUnit(params *ListMeasuredUnitParams, opts ...Option) (MeasuredUnitLister, error)

ListMeasuredUnit List a site's measured units

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_measured_unit

Returns: A list of the site's measured units.

func (*Client) ListPlanAddOns

func (c *Client) ListPlanAddOns(planId string, params *ListPlanAddOnsParams, opts ...Option) (AddOnLister, error)

ListPlanAddOns List a plan's add-ons

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_plan_add_ons

Returns: A list of add-ons.

func (*Client) ListPlans

func (c *Client) ListPlans(params *ListPlansParams, opts ...Option) (PlanLister, error)

ListPlans List a site's plans

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_plans

Returns: A list of plans.

func (*Client) ListRelatedInvoices

func (c *Client) ListRelatedInvoices(invoiceId string, opts ...Option) (InvoiceLister, error)

ListRelatedInvoices List an invoice's related credit or charge invoices

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_related_invoices

Returns: A list of the credit or charge invoices associated with the invoice.

func (*Client) ListShippingAddresses

func (c *Client) ListShippingAddresses(accountId string, params *ListShippingAddressesParams, opts ...Option) (ShippingAddressLister, error)

ListShippingAddresses Fetch a list of an account's shipping addresses

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_addresses

Returns: A list of an account's shipping addresses.

func (*Client) ListShippingMethods

func (c *Client) ListShippingMethods(params *ListShippingMethodsParams, opts ...Option) (ShippingMethodLister, error)

ListShippingMethods List a site's shipping methods

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_shipping_methods

Returns: A list of the site's shipping methods.

func (*Client) ListSites

func (c *Client) ListSites(params *ListSitesParams, opts ...Option) (SiteLister, error)

ListSites List sites

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_sites

Returns: A list of sites.

func (*Client) ListSubscriptionCouponRedemptions

func (c *Client) ListSubscriptionCouponRedemptions(subscriptionId string, params *ListSubscriptionCouponRedemptionsParams, opts ...Option) (CouponRedemptionLister, error)

ListSubscriptionCouponRedemptions List the coupon redemptions for a subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_coupon_redemptions

Returns: A list of the the coupon redemptions on a subscription.

func (*Client) ListSubscriptionInvoices

func (c *Client) ListSubscriptionInvoices(subscriptionId string, params *ListSubscriptionInvoicesParams, opts ...Option) (InvoiceLister, error)

ListSubscriptionInvoices List a subscription's invoices

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_invoices

Returns: A list of the subscription's invoices.

func (*Client) ListSubscriptionLineItems

func (c *Client) ListSubscriptionLineItems(subscriptionId string, params *ListSubscriptionLineItemsParams, opts ...Option) (LineItemLister, error)

ListSubscriptionLineItems List a subscription's line items

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_line_items

Returns: A list of the subscription's line items.

func (*Client) ListSubscriptions

func (c *Client) ListSubscriptions(params *ListSubscriptionsParams, opts ...Option) (SubscriptionLister, error)

ListSubscriptions List a site's subscriptions

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_subscriptions

Returns: A list of the site's subscriptions.

func (*Client) ListTransactions

func (c *Client) ListTransactions(params *ListTransactionsParams, opts ...Option) (TransactionLister, error)

ListTransactions List a site's transactions

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_transactions

Returns: A list of the site's transactions.

func (*Client) ListUniqueCouponCodes

func (c *Client) ListUniqueCouponCodes(couponId string, params *ListUniqueCouponCodesParams, opts ...Option) (UniqueCouponCodeLister, error)

ListUniqueCouponCodes List unique coupon codes associated with a bulk coupon

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_unique_coupon_codes

Returns: A list of unique coupon codes that were generated

func (*Client) ListUsage

func (c *Client) ListUsage(subscriptionId string, addOnId string, params *ListUsageParams, opts ...Option) (UsageLister, error)

ListUsage List a subscription add-on's usage records

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/list_usage

Returns: A list of the subscription add-on's usage records.

func (*Client) MarkInvoiceFailed

func (c *Client) MarkInvoiceFailed(invoiceId string, opts ...Option) (*Invoice, error)

MarkInvoiceFailed wraps MarkInvoiceFailedWithContext using the background context

func (*Client) MarkInvoiceFailedWithContext

func (c *Client) MarkInvoiceFailedWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

MarkInvoiceFailedWithContext Mark an open invoice as failed

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_failed

Returns: The updated invoice.

func (*Client) MarkInvoiceSuccessful

func (c *Client) MarkInvoiceSuccessful(invoiceId string, opts ...Option) (*Invoice, error)

MarkInvoiceSuccessful wraps MarkInvoiceSuccessfulWithContext using the background context

func (*Client) MarkInvoiceSuccessfulWithContext

func (c *Client) MarkInvoiceSuccessfulWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

MarkInvoiceSuccessfulWithContext Mark an open invoice as successful

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_successful

Returns: The updated invoice.

func (*Client) NewHTTPRequest

func (c *Client) NewHTTPRequest(ctx context.Context, method string, requestURL string, body interface{}, requestOptions OptionsApplier) (*http.Request, error)

NewHTTPRequest generates an http.Request for the client to submit to Recurly API.

func (*Client) PauseSubscription

func (c *Client) PauseSubscription(subscriptionId string, body *SubscriptionPause, opts ...Option) (*Subscription, error)

PauseSubscription wraps PauseSubscriptionWithContext using the background context

func (*Client) PauseSubscriptionWithContext

func (c *Client) PauseSubscriptionWithContext(ctx context.Context, subscriptionId string, body *SubscriptionPause, opts ...Option) (*Subscription, error)

PauseSubscriptionWithContext Pause subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/pause_subscription

Returns: A subscription.

func (*Client) PreviewGiftCard

func (c *Client) PreviewGiftCard(body *GiftCardCreate, opts ...Option) (*GiftCard, error)

PreviewGiftCard wraps PreviewGiftCardWithContext using the background context

func (*Client) PreviewGiftCardWithContext

func (c *Client) PreviewGiftCardWithContext(ctx context.Context, body *GiftCardCreate, opts ...Option) (*GiftCard, error)

PreviewGiftCardWithContext Preview gift card

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/preview_gift_card

Returns: Returns the gift card

func (*Client) PreviewInvoice

func (c *Client) PreviewInvoice(accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)

PreviewInvoice wraps PreviewInvoiceWithContext using the background context

func (*Client) PreviewInvoiceWithContext

func (c *Client) PreviewInvoiceWithContext(ctx context.Context, accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)

PreviewInvoiceWithContext Preview new invoice for pending line items

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/preview_invoice

Returns: Returns the invoice previews.

func (*Client) PreviewPurchase

func (c *Client) PreviewPurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

PreviewPurchase wraps PreviewPurchaseWithContext using the background context

func (*Client) PreviewPurchaseWithContext

func (c *Client) PreviewPurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

PreviewPurchaseWithContext Preview a new purchase

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/preview_purchase

Returns: Returns preview of the new invoices

func (*Client) PreviewSubscriptionChange

func (c *Client) PreviewSubscriptionChange(subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)

PreviewSubscriptionChange wraps PreviewSubscriptionChangeWithContext using the background context

func (*Client) PreviewSubscriptionChangeWithContext

func (c *Client) PreviewSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)

PreviewSubscriptionChangeWithContext Preview a new subscription change

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/preview_subscription_change

Returns: A subscription change.

func (*Client) PutDunningCampaignBulkUpdate

func (c *Client) PutDunningCampaignBulkUpdate(dunningCampaignId string, body *DunningCampaignsBulkUpdate, opts ...Option) (*DunningCampaignsBulkUpdateResponse, error)

PutDunningCampaignBulkUpdate wraps PutDunningCampaignBulkUpdateWithContext using the background context

func (*Client) PutDunningCampaignBulkUpdateWithContext

func (c *Client) PutDunningCampaignBulkUpdateWithContext(ctx context.Context, dunningCampaignId string, body *DunningCampaignsBulkUpdate, opts ...Option) (*DunningCampaignsBulkUpdateResponse, error)

PutDunningCampaignBulkUpdateWithContext Assign a dunning campaign to multiple plans

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/put_dunning_campaign_bulk_update

Returns: A list of updated plans.

func (*Client) ReactivateAccount

func (c *Client) ReactivateAccount(accountId string, opts ...Option) (*Account, error)

ReactivateAccount wraps ReactivateAccountWithContext using the background context

func (*Client) ReactivateAccountWithContext

func (c *Client) ReactivateAccountWithContext(ctx context.Context, accountId string, opts ...Option) (*Account, error)

ReactivateAccountWithContext Reactivate an inactive account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_account

Returns: An account.

func (*Client) ReactivateItem

func (c *Client) ReactivateItem(itemId string, opts ...Option) (*Item, error)

ReactivateItem wraps ReactivateItemWithContext using the background context

func (*Client) ReactivateItemWithContext

func (c *Client) ReactivateItemWithContext(ctx context.Context, itemId string, opts ...Option) (*Item, error)

ReactivateItemWithContext Reactivate an inactive item

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_item

Returns: An item.

func (*Client) ReactivateSubscription

func (c *Client) ReactivateSubscription(subscriptionId string, opts ...Option) (*Subscription, error)

ReactivateSubscription wraps ReactivateSubscriptionWithContext using the background context

func (*Client) ReactivateSubscriptionWithContext

func (c *Client) ReactivateSubscriptionWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

ReactivateSubscriptionWithContext Reactivate a canceled subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_subscription

Returns: An active subscription.

func (*Client) ReactivateUniqueCouponCode

func (c *Client) ReactivateUniqueCouponCode(uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

ReactivateUniqueCouponCode wraps ReactivateUniqueCouponCodeWithContext using the background context

func (*Client) ReactivateUniqueCouponCodeWithContext

func (c *Client) ReactivateUniqueCouponCodeWithContext(ctx context.Context, uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

ReactivateUniqueCouponCodeWithContext Restore a unique coupon code

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/reactivate_unique_coupon_code

Returns: A unique coupon code.

func (*Client) RecordExternalTransaction

func (c *Client) RecordExternalTransaction(invoiceId string, body *ExternalTransaction, opts ...Option) (*Transaction, error)

RecordExternalTransaction wraps RecordExternalTransactionWithContext using the background context

func (*Client) RecordExternalTransactionWithContext

func (c *Client) RecordExternalTransactionWithContext(ctx context.Context, invoiceId string, body *ExternalTransaction, opts ...Option) (*Transaction, error)

RecordExternalTransactionWithContext Record an external payment for a manual invoices.

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/record_external_transaction

Returns: The recorded transaction.

func (*Client) RedeemGiftCard

func (c *Client) RedeemGiftCard(redemptionCode string, body *GiftCardRedeem, opts ...Option) (*GiftCard, error)

RedeemGiftCard wraps RedeemGiftCardWithContext using the background context

func (*Client) RedeemGiftCardWithContext

func (c *Client) RedeemGiftCardWithContext(ctx context.Context, redemptionCode string, body *GiftCardRedeem, opts ...Option) (*GiftCard, error)

RedeemGiftCardWithContext Redeem gift card

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/redeem_gift_card

Returns: Redeems and returns the gift card

func (*Client) RefundInvoice

func (c *Client) RefundInvoice(invoiceId string, body *InvoiceRefund, opts ...Option) (*Invoice, error)

RefundInvoice wraps RefundInvoiceWithContext using the background context

func (*Client) RefundInvoiceWithContext

func (c *Client) RefundInvoiceWithContext(ctx context.Context, invoiceId string, body *InvoiceRefund, opts ...Option) (*Invoice, error)

RefundInvoiceWithContext Refund an invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/refund_invoice

Returns: Returns the new credit invoice.

func (*Client) RemoveABillingInfo

func (c *Client) RemoveABillingInfo(accountId string, billingInfoId string, opts ...Option) (*Empty, error)

RemoveABillingInfo wraps RemoveABillingInfoWithContext using the background context

func (*Client) RemoveABillingInfoWithContext

func (c *Client) RemoveABillingInfoWithContext(ctx context.Context, accountId string, billingInfoId string, opts ...Option) (*Empty, error)

RemoveABillingInfoWithContext Remove an account's billing information

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_a_billing_info

Returns: Billing information deleted

func (*Client) RemoveAccountAcquisition

func (c *Client) RemoveAccountAcquisition(accountId string, opts ...Option) (*Empty, error)

RemoveAccountAcquisition wraps RemoveAccountAcquisitionWithContext using the background context

func (*Client) RemoveAccountAcquisitionWithContext

func (c *Client) RemoveAccountAcquisitionWithContext(ctx context.Context, accountId string, opts ...Option) (*Empty, error)

RemoveAccountAcquisitionWithContext Remove an account's acquisition data

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_account_acquisition

Returns: Acquisition data was succesfully deleted.

func (*Client) RemoveBillingInfo

func (c *Client) RemoveBillingInfo(accountId string, opts ...Option) (*Empty, error)

RemoveBillingInfo wraps RemoveBillingInfoWithContext using the background context

func (*Client) RemoveBillingInfoWithContext

func (c *Client) RemoveBillingInfoWithContext(ctx context.Context, accountId string, opts ...Option) (*Empty, error)

RemoveBillingInfoWithContext Remove an account's billing information

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_billing_info

Returns: Billing information deleted

func (*Client) RemoveCouponRedemption

func (c *Client) RemoveCouponRedemption(accountId string, opts ...Option) (*CouponRedemption, error)

RemoveCouponRedemption wraps RemoveCouponRedemptionWithContext using the background context

func (*Client) RemoveCouponRedemptionWithContext

func (c *Client) RemoveCouponRedemptionWithContext(ctx context.Context, accountId string, opts ...Option) (*CouponRedemption, error)

RemoveCouponRedemptionWithContext Delete the active coupon redemption from an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_coupon_redemption

Returns: Coupon redemption deleted.

func (*Client) RemoveLineItem

func (c *Client) RemoveLineItem(lineItemId string, opts ...Option) (*Empty, error)

RemoveLineItem wraps RemoveLineItemWithContext using the background context

func (*Client) RemoveLineItemWithContext

func (c *Client) RemoveLineItemWithContext(ctx context.Context, lineItemId string, opts ...Option) (*Empty, error)

RemoveLineItemWithContext Delete an uninvoiced line item

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_line_item

Returns: Line item deleted.

func (*Client) RemoveMeasuredUnit

func (c *Client) RemoveMeasuredUnit(measuredUnitId string, opts ...Option) (*MeasuredUnit, error)

RemoveMeasuredUnit wraps RemoveMeasuredUnitWithContext using the background context

func (*Client) RemoveMeasuredUnitWithContext

func (c *Client) RemoveMeasuredUnitWithContext(ctx context.Context, measuredUnitId string, opts ...Option) (*MeasuredUnit, error)

RemoveMeasuredUnitWithContext Remove a measured unit

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_measured_unit

Returns: A measured unit.

func (*Client) RemovePlan

func (c *Client) RemovePlan(planId string, opts ...Option) (*Plan, error)

RemovePlan wraps RemovePlanWithContext using the background context

func (*Client) RemovePlanAddOn

func (c *Client) RemovePlanAddOn(planId string, addOnId string, opts ...Option) (*AddOn, error)

RemovePlanAddOn wraps RemovePlanAddOnWithContext using the background context

func (*Client) RemovePlanAddOnWithContext

func (c *Client) RemovePlanAddOnWithContext(ctx context.Context, planId string, addOnId string, opts ...Option) (*AddOn, error)

RemovePlanAddOnWithContext Remove an add-on

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_plan_add_on

Returns: Add-on deleted

func (*Client) RemovePlanWithContext

func (c *Client) RemovePlanWithContext(ctx context.Context, planId string, opts ...Option) (*Plan, error)

RemovePlanWithContext Remove a plan

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_plan

Returns: Plan deleted

func (*Client) RemoveShippingAddress

func (c *Client) RemoveShippingAddress(accountId string, shippingAddressId string, opts ...Option) (*Empty, error)

RemoveShippingAddress wraps RemoveShippingAddressWithContext using the background context

func (*Client) RemoveShippingAddressWithContext

func (c *Client) RemoveShippingAddressWithContext(ctx context.Context, accountId string, shippingAddressId string, opts ...Option) (*Empty, error)

RemoveShippingAddressWithContext Remove an account's shipping address

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_shipping_address

Returns: Shipping address deleted.

func (*Client) RemoveSubscriptionChange

func (c *Client) RemoveSubscriptionChange(subscriptionId string, opts ...Option) (*Empty, error)

RemoveSubscriptionChange wraps RemoveSubscriptionChangeWithContext using the background context

func (*Client) RemoveSubscriptionChangeWithContext

func (c *Client) RemoveSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Empty, error)

RemoveSubscriptionChangeWithContext Delete the pending subscription change

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_subscription_change

Returns: Subscription change was deleted.

func (*Client) RemoveUsage

func (c *Client) RemoveUsage(usageId string, opts ...Option) (*Empty, error)

RemoveUsage wraps RemoveUsageWithContext using the background context

func (*Client) RemoveUsageWithContext

func (c *Client) RemoveUsageWithContext(ctx context.Context, usageId string, opts ...Option) (*Empty, error)

RemoveUsageWithContext Delete a usage record.

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/remove_usage

Returns: Usage was successfully deleted.

func (*Client) ReopenInvoice

func (c *Client) ReopenInvoice(invoiceId string, opts ...Option) (*Invoice, error)

ReopenInvoice wraps ReopenInvoiceWithContext using the background context

func (*Client) ReopenInvoiceWithContext

func (c *Client) ReopenInvoiceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

ReopenInvoiceWithContext Reopen a closed, manual invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/reopen_invoice

Returns: The updated invoice.

func (*Client) RestoreCoupon

func (c *Client) RestoreCoupon(couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)

RestoreCoupon wraps RestoreCouponWithContext using the background context

func (*Client) RestoreCouponWithContext

func (c *Client) RestoreCouponWithContext(ctx context.Context, couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)

RestoreCouponWithContext Restore an inactive coupon

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/restore_coupon

Returns: The restored coupon.

func (*Client) ResumeSubscription

func (c *Client) ResumeSubscription(subscriptionId string, opts ...Option) (*Subscription, error)

ResumeSubscription wraps ResumeSubscriptionWithContext using the background context

func (*Client) ResumeSubscriptionWithContext

func (c *Client) ResumeSubscriptionWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

ResumeSubscriptionWithContext Resume subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/resume_subscription

Returns: A subscription.

func (*Client) ShowExternalInvoice

func (c *Client) ShowExternalInvoice(externalInvoiceId string, opts ...Option) (*ExternalInvoice, error)

ShowExternalInvoice wraps ShowExternalInvoiceWithContext using the background context

func (*Client) ShowExternalInvoiceWithContext

func (c *Client) ShowExternalInvoiceWithContext(ctx context.Context, externalInvoiceId string, opts ...Option) (*ExternalInvoice, error)

ShowExternalInvoiceWithContext Fetch an external invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/show_external_invoice

Returns: Returns the external invoice

func (*Client) TerminateSubscription

func (c *Client) TerminateSubscription(subscriptionId string, params *TerminateSubscriptionParams, opts ...Option) (*Subscription, error)

TerminateSubscription wraps TerminateSubscriptionWithContext using the background context

func (*Client) TerminateSubscriptionWithContext

func (c *Client) TerminateSubscriptionWithContext(ctx context.Context, subscriptionId string, params *TerminateSubscriptionParams, opts ...Option) (*Subscription, error)

TerminateSubscriptionWithContext Terminate a subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/terminate_subscription

Returns: An expired subscription.

func (*Client) UpdateABillingInfo

func (c *Client) UpdateABillingInfo(accountId string, billingInfoId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

UpdateABillingInfo wraps UpdateABillingInfoWithContext using the background context

func (*Client) UpdateABillingInfoWithContext

func (c *Client) UpdateABillingInfoWithContext(ctx context.Context, accountId string, billingInfoId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

UpdateABillingInfoWithContext Update an account's billing information

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_a_billing_info

Returns: Updated billing information.

func (*Client) UpdateAccount

func (c *Client) UpdateAccount(accountId string, body *AccountUpdate, opts ...Option) (*Account, error)

UpdateAccount wraps UpdateAccountWithContext using the background context

func (*Client) UpdateAccountAcquisition

func (c *Client) UpdateAccountAcquisition(accountId string, body *AccountAcquisitionUpdate, opts ...Option) (*AccountAcquisition, error)

UpdateAccountAcquisition wraps UpdateAccountAcquisitionWithContext using the background context

func (*Client) UpdateAccountAcquisitionWithContext

func (c *Client) UpdateAccountAcquisitionWithContext(ctx context.Context, accountId string, body *AccountAcquisitionUpdate, opts ...Option) (*AccountAcquisition, error)

UpdateAccountAcquisitionWithContext Update an account's acquisition data

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_account_acquisition

Returns: An account's updated acquisition data.

func (*Client) UpdateAccountExternalAccount

func (c *Client) UpdateAccountExternalAccount(accountId string, externalAccountId string, body *ExternalAccountUpdate, opts ...Option) (*ExternalAccount, error)

UpdateAccountExternalAccount wraps UpdateAccountExternalAccountWithContext using the background context

func (*Client) UpdateAccountExternalAccountWithContext

func (c *Client) UpdateAccountExternalAccountWithContext(ctx context.Context, accountId string, externalAccountId string, body *ExternalAccountUpdate, opts ...Option) (*ExternalAccount, error)

UpdateAccountExternalAccountWithContext Update an external account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_account_external_account

Returns: A representation of the updated external_account.

func (*Client) UpdateAccountWithContext

func (c *Client) UpdateAccountWithContext(ctx context.Context, accountId string, body *AccountUpdate, opts ...Option) (*Account, error)

UpdateAccountWithContext Update an account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_account

Returns: An account.

func (*Client) UpdateBillingInfo

func (c *Client) UpdateBillingInfo(accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

UpdateBillingInfo wraps UpdateBillingInfoWithContext using the background context

func (*Client) UpdateBillingInfoWithContext

func (c *Client) UpdateBillingInfoWithContext(ctx context.Context, accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

UpdateBillingInfoWithContext Set an account's billing information

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_billing_info

Returns: Updated billing information.

func (*Client) UpdateCoupon

func (c *Client) UpdateCoupon(couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)

UpdateCoupon wraps UpdateCouponWithContext using the background context

func (*Client) UpdateCouponWithContext

func (c *Client) UpdateCouponWithContext(ctx context.Context, couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)

UpdateCouponWithContext Update an active coupon

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_coupon

Returns: The updated coupon.

func (*Client) UpdateExternalProduct

func (c *Client) UpdateExternalProduct(externalProductId string, body *ExternalProductUpdate, opts ...Option) (*ExternalProduct, error)

UpdateExternalProduct wraps UpdateExternalProductWithContext using the background context

func (*Client) UpdateExternalProductWithContext

func (c *Client) UpdateExternalProductWithContext(ctx context.Context, externalProductId string, body *ExternalProductUpdate, opts ...Option) (*ExternalProduct, error)

UpdateExternalProductWithContext Update an external product

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_external_product

Returns: Settings for an external product.

func (*Client) UpdateGeneralLedgerAccount

func (c *Client) UpdateGeneralLedgerAccount(generalLedgerAccountId string, body *GeneralLedgerAccountUpdate, opts ...Option) (*GeneralLedgerAccount, error)

UpdateGeneralLedgerAccount wraps UpdateGeneralLedgerAccountWithContext using the background context

func (*Client) UpdateGeneralLedgerAccountWithContext

func (c *Client) UpdateGeneralLedgerAccountWithContext(ctx context.Context, generalLedgerAccountId string, body *GeneralLedgerAccountUpdate, opts ...Option) (*GeneralLedgerAccount, error)

UpdateGeneralLedgerAccountWithContext Update a general ledger account

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_general_ledger_account

Returns: The updated general ledger account.

func (*Client) UpdateInvoice

func (c *Client) UpdateInvoice(invoiceId string, body *InvoiceUpdate, opts ...Option) (*Invoice, error)

UpdateInvoice wraps UpdateInvoiceWithContext using the background context

func (*Client) UpdateInvoiceWithContext

func (c *Client) UpdateInvoiceWithContext(ctx context.Context, invoiceId string, body *InvoiceUpdate, opts ...Option) (*Invoice, error)

UpdateInvoiceWithContext Update an invoice

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_invoice

Returns: An invoice.

func (*Client) UpdateItem

func (c *Client) UpdateItem(itemId string, body *ItemUpdate, opts ...Option) (*Item, error)

UpdateItem wraps UpdateItemWithContext using the background context

func (*Client) UpdateItemWithContext

func (c *Client) UpdateItemWithContext(ctx context.Context, itemId string, body *ItemUpdate, opts ...Option) (*Item, error)

UpdateItemWithContext Update an active item

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_item

Returns: The updated item.

func (*Client) UpdateMeasuredUnit

func (c *Client) UpdateMeasuredUnit(measuredUnitId string, body *MeasuredUnitUpdate, opts ...Option) (*MeasuredUnit, error)

UpdateMeasuredUnit wraps UpdateMeasuredUnitWithContext using the background context

func (*Client) UpdateMeasuredUnitWithContext

func (c *Client) UpdateMeasuredUnitWithContext(ctx context.Context, measuredUnitId string, body *MeasuredUnitUpdate, opts ...Option) (*MeasuredUnit, error)

UpdateMeasuredUnitWithContext Update a measured unit

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_measured_unit

Returns: The updated measured_unit.

func (*Client) UpdatePlan

func (c *Client) UpdatePlan(planId string, body *PlanUpdate, opts ...Option) (*Plan, error)

UpdatePlan wraps UpdatePlanWithContext using the background context

func (*Client) UpdatePlanAddOn

func (c *Client) UpdatePlanAddOn(planId string, addOnId string, body *AddOnUpdate, opts ...Option) (*AddOn, error)

UpdatePlanAddOn wraps UpdatePlanAddOnWithContext using the background context

func (*Client) UpdatePlanAddOnWithContext

func (c *Client) UpdatePlanAddOnWithContext(ctx context.Context, planId string, addOnId string, body *AddOnUpdate, opts ...Option) (*AddOn, error)

UpdatePlanAddOnWithContext Update an add-on

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_plan_add_on

Returns: An add-on.

func (*Client) UpdatePlanWithContext

func (c *Client) UpdatePlanWithContext(ctx context.Context, planId string, body *PlanUpdate, opts ...Option) (*Plan, error)

UpdatePlanWithContext Update a plan

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_plan

Returns: A plan.

func (*Client) UpdateShippingAddress

func (c *Client) UpdateShippingAddress(accountId string, shippingAddressId string, body *ShippingAddressUpdate, opts ...Option) (*ShippingAddress, error)

UpdateShippingAddress wraps UpdateShippingAddressWithContext using the background context

func (*Client) UpdateShippingAddressWithContext

func (c *Client) UpdateShippingAddressWithContext(ctx context.Context, accountId string, shippingAddressId string, body *ShippingAddressUpdate, opts ...Option) (*ShippingAddress, error)

UpdateShippingAddressWithContext Update an account's shipping address

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_address

Returns: The updated shipping address.

func (*Client) UpdateShippingMethod

func (c *Client) UpdateShippingMethod(shippingMethodId string, body *ShippingMethodUpdate, opts ...Option) (*ShippingMethod, error)

UpdateShippingMethod wraps UpdateShippingMethodWithContext using the background context

func (*Client) UpdateShippingMethodWithContext

func (c *Client) UpdateShippingMethodWithContext(ctx context.Context, shippingMethodId string, body *ShippingMethodUpdate, opts ...Option) (*ShippingMethod, error)

UpdateShippingMethodWithContext Update an active Shipping Method

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_shipping_method

Returns: The updated shipping method.

func (*Client) UpdateSubscription

func (c *Client) UpdateSubscription(subscriptionId string, body *SubscriptionUpdate, opts ...Option) (*Subscription, error)

UpdateSubscription wraps UpdateSubscriptionWithContext using the background context

func (*Client) UpdateSubscriptionWithContext

func (c *Client) UpdateSubscriptionWithContext(ctx context.Context, subscriptionId string, body *SubscriptionUpdate, opts ...Option) (*Subscription, error)

UpdateSubscriptionWithContext Update a subscription

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_subscription

Returns: A subscription.

func (*Client) UpdateUsage

func (c *Client) UpdateUsage(usageId string, body *UsageCreate, opts ...Option) (*Usage, error)

UpdateUsage wraps UpdateUsageWithContext using the background context

func (*Client) UpdateUsageWithContext

func (c *Client) UpdateUsageWithContext(ctx context.Context, usageId string, body *UsageCreate, opts ...Option) (*Usage, error)

UpdateUsageWithContext Update a usage record

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/update_usage

Returns: The updated usage record.

func (*Client) VerifyBillingInfo

func (c *Client) VerifyBillingInfo(accountId string, params *VerifyBillingInfoParams, opts ...Option) (*Transaction, error)

VerifyBillingInfo wraps VerifyBillingInfoWithContext using the background context

func (*Client) VerifyBillingInfoCvv

func (c *Client) VerifyBillingInfoCvv(accountId string, body *BillingInfoVerifyCVV, opts ...Option) (*Transaction, error)

VerifyBillingInfoCvv wraps VerifyBillingInfoCvvWithContext using the background context

func (*Client) VerifyBillingInfoCvvWithContext

func (c *Client) VerifyBillingInfoCvvWithContext(ctx context.Context, accountId string, body *BillingInfoVerifyCVV, opts ...Option) (*Transaction, error)

VerifyBillingInfoCvvWithContext Verify an account's credit card billing cvv

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_info_cvv

Returns: Transaction information from verify.

func (*Client) VerifyBillingInfoWithContext

func (c *Client) VerifyBillingInfoWithContext(ctx context.Context, accountId string, params *VerifyBillingInfoParams, opts ...Option) (*Transaction, error)

VerifyBillingInfoWithContext Verify an account's credit card billing information

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_info

Returns: Transaction information from verify.

func (*Client) VoidInvoice

func (c *Client) VoidInvoice(invoiceId string, opts ...Option) (*Invoice, error)

VoidInvoice wraps VoidInvoiceWithContext using the background context

func (*Client) VoidInvoiceWithContext

func (c *Client) VoidInvoiceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

VoidInvoiceWithContext Void a credit invoice.

API Documentation: https://developers.recurly.com/api/v2021-02-25#operation/void_invoice

Returns: The updated invoice.

type ClientInterface

type ClientInterface interface {
	ListSites(params *ListSitesParams, opts ...Option) (SiteLister, error)

	GetSite(siteId string, opts ...Option) (*Site, error)
	GetSiteWithContext(ctx context.Context, siteId string, opts ...Option) (*Site, error)

	ListAccounts(params *ListAccountsParams, opts ...Option) (AccountLister, error)

	CreateAccount(body *AccountCreate, opts ...Option) (*Account, error)
	CreateAccountWithContext(ctx context.Context, body *AccountCreate, opts ...Option) (*Account, error)

	GetAccount(accountId string, opts ...Option) (*Account, error)
	GetAccountWithContext(ctx context.Context, accountId string, opts ...Option) (*Account, error)

	UpdateAccount(accountId string, body *AccountUpdate, opts ...Option) (*Account, error)
	UpdateAccountWithContext(ctx context.Context, accountId string, body *AccountUpdate, opts ...Option) (*Account, error)

	DeactivateAccount(accountId string, opts ...Option) (*Account, error)
	DeactivateAccountWithContext(ctx context.Context, accountId string, opts ...Option) (*Account, error)

	GetAccountAcquisition(accountId string, opts ...Option) (*AccountAcquisition, error)
	GetAccountAcquisitionWithContext(ctx context.Context, accountId string, opts ...Option) (*AccountAcquisition, error)

	UpdateAccountAcquisition(accountId string, body *AccountAcquisitionUpdate, opts ...Option) (*AccountAcquisition, error)
	UpdateAccountAcquisitionWithContext(ctx context.Context, accountId string, body *AccountAcquisitionUpdate, opts ...Option) (*AccountAcquisition, error)

	RemoveAccountAcquisition(accountId string, opts ...Option) (*Empty, error)
	RemoveAccountAcquisitionWithContext(ctx context.Context, accountId string, opts ...Option) (*Empty, error)

	ReactivateAccount(accountId string, opts ...Option) (*Account, error)
	ReactivateAccountWithContext(ctx context.Context, accountId string, opts ...Option) (*Account, error)

	GetAccountBalance(accountId string, opts ...Option) (*AccountBalance, error)
	GetAccountBalanceWithContext(ctx context.Context, accountId string, opts ...Option) (*AccountBalance, error)

	GetBillingInfo(accountId string, opts ...Option) (*BillingInfo, error)
	GetBillingInfoWithContext(ctx context.Context, accountId string, opts ...Option) (*BillingInfo, error)

	UpdateBillingInfo(accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)
	UpdateBillingInfoWithContext(ctx context.Context, accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

	RemoveBillingInfo(accountId string, opts ...Option) (*Empty, error)
	RemoveBillingInfoWithContext(ctx context.Context, accountId string, opts ...Option) (*Empty, error)

	VerifyBillingInfo(accountId string, params *VerifyBillingInfoParams, opts ...Option) (*Transaction, error)
	VerifyBillingInfoWithContext(ctx context.Context, accountId string, params *VerifyBillingInfoParams, opts ...Option) (*Transaction, error)

	VerifyBillingInfoCvv(accountId string, body *BillingInfoVerifyCVV, opts ...Option) (*Transaction, error)
	VerifyBillingInfoCvvWithContext(ctx context.Context, accountId string, body *BillingInfoVerifyCVV, opts ...Option) (*Transaction, error)

	ListBillingInfos(accountId string, params *ListBillingInfosParams, opts ...Option) (BillingInfoLister, error)

	CreateBillingInfo(accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)
	CreateBillingInfoWithContext(ctx context.Context, accountId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

	GetABillingInfo(accountId string, billingInfoId string, opts ...Option) (*BillingInfo, error)
	GetABillingInfoWithContext(ctx context.Context, accountId string, billingInfoId string, opts ...Option) (*BillingInfo, error)

	UpdateABillingInfo(accountId string, billingInfoId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)
	UpdateABillingInfoWithContext(ctx context.Context, accountId string, billingInfoId string, body *BillingInfoCreate, opts ...Option) (*BillingInfo, error)

	RemoveABillingInfo(accountId string, billingInfoId string, opts ...Option) (*Empty, error)
	RemoveABillingInfoWithContext(ctx context.Context, accountId string, billingInfoId string, opts ...Option) (*Empty, error)

	ListAccountCouponRedemptions(accountId string, params *ListAccountCouponRedemptionsParams, opts ...Option) (CouponRedemptionLister, error)

	ListActiveCouponRedemptions(accountId string, opts ...Option) (CouponRedemptionLister, error)

	CreateCouponRedemption(accountId string, body *CouponRedemptionCreate, opts ...Option) (*CouponRedemption, error)
	CreateCouponRedemptionWithContext(ctx context.Context, accountId string, body *CouponRedemptionCreate, opts ...Option) (*CouponRedemption, error)

	RemoveCouponRedemption(accountId string, opts ...Option) (*CouponRedemption, error)
	RemoveCouponRedemptionWithContext(ctx context.Context, accountId string, opts ...Option) (*CouponRedemption, error)

	ListAccountCreditPayments(accountId string, params *ListAccountCreditPaymentsParams, opts ...Option) (CreditPaymentLister, error)

	ListAccountExternalAccount(accountId string, opts ...Option) (ExternalAccountLister, error)

	CreateAccountExternalAccount(accountId string, body *ExternalAccountCreate, opts ...Option) (*ExternalAccount, error)
	CreateAccountExternalAccountWithContext(ctx context.Context, accountId string, body *ExternalAccountCreate, opts ...Option) (*ExternalAccount, error)

	GetAccountExternalAccount(accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)
	GetAccountExternalAccountWithContext(ctx context.Context, accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)

	UpdateAccountExternalAccount(accountId string, externalAccountId string, body *ExternalAccountUpdate, opts ...Option) (*ExternalAccount, error)
	UpdateAccountExternalAccountWithContext(ctx context.Context, accountId string, externalAccountId string, body *ExternalAccountUpdate, opts ...Option) (*ExternalAccount, error)

	DeleteAccountExternalAccount(accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)
	DeleteAccountExternalAccountWithContext(ctx context.Context, accountId string, externalAccountId string, opts ...Option) (*ExternalAccount, error)

	ListAccountExternalInvoices(accountId string, params *ListAccountExternalInvoicesParams, opts ...Option) (ExternalInvoiceLister, error)

	ListAccountInvoices(accountId string, params *ListAccountInvoicesParams, opts ...Option) (InvoiceLister, error)

	CreateInvoice(accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)
	CreateInvoiceWithContext(ctx context.Context, accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)

	PreviewInvoice(accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)
	PreviewInvoiceWithContext(ctx context.Context, accountId string, body *InvoiceCreate, opts ...Option) (*InvoiceCollection, error)

	ListAccountLineItems(accountId string, params *ListAccountLineItemsParams, opts ...Option) (LineItemLister, error)

	CreateLineItem(accountId string, body *LineItemCreate, opts ...Option) (*LineItem, error)
	CreateLineItemWithContext(ctx context.Context, accountId string, body *LineItemCreate, opts ...Option) (*LineItem, error)

	ListAccountNotes(accountId string, params *ListAccountNotesParams, opts ...Option) (AccountNoteLister, error)

	GetAccountNote(accountId string, accountNoteId string, opts ...Option) (*AccountNote, error)
	GetAccountNoteWithContext(ctx context.Context, accountId string, accountNoteId string, opts ...Option) (*AccountNote, error)

	ListShippingAddresses(accountId string, params *ListShippingAddressesParams, opts ...Option) (ShippingAddressLister, error)

	CreateShippingAddress(accountId string, body *ShippingAddressCreate, opts ...Option) (*ShippingAddress, error)
	CreateShippingAddressWithContext(ctx context.Context, accountId string, body *ShippingAddressCreate, opts ...Option) (*ShippingAddress, error)

	GetShippingAddress(accountId string, shippingAddressId string, opts ...Option) (*ShippingAddress, error)
	GetShippingAddressWithContext(ctx context.Context, accountId string, shippingAddressId string, opts ...Option) (*ShippingAddress, error)

	UpdateShippingAddress(accountId string, shippingAddressId string, body *ShippingAddressUpdate, opts ...Option) (*ShippingAddress, error)
	UpdateShippingAddressWithContext(ctx context.Context, accountId string, shippingAddressId string, body *ShippingAddressUpdate, opts ...Option) (*ShippingAddress, error)

	RemoveShippingAddress(accountId string, shippingAddressId string, opts ...Option) (*Empty, error)
	RemoveShippingAddressWithContext(ctx context.Context, accountId string, shippingAddressId string, opts ...Option) (*Empty, error)

	ListAccountSubscriptions(accountId string, params *ListAccountSubscriptionsParams, opts ...Option) (SubscriptionLister, error)

	ListAccountTransactions(accountId string, params *ListAccountTransactionsParams, opts ...Option) (TransactionLister, error)

	ListChildAccounts(accountId string, params *ListChildAccountsParams, opts ...Option) (AccountLister, error)

	ListAccountAcquisition(params *ListAccountAcquisitionParams, opts ...Option) (AccountAcquisitionLister, error)

	ListCoupons(params *ListCouponsParams, opts ...Option) (CouponLister, error)

	CreateCoupon(body *CouponCreate, opts ...Option) (*Coupon, error)
	CreateCouponWithContext(ctx context.Context, body *CouponCreate, opts ...Option) (*Coupon, error)

	GetCoupon(couponId string, opts ...Option) (*Coupon, error)
	GetCouponWithContext(ctx context.Context, couponId string, opts ...Option) (*Coupon, error)

	UpdateCoupon(couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)
	UpdateCouponWithContext(ctx context.Context, couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)

	DeactivateCoupon(couponId string, opts ...Option) (*Coupon, error)
	DeactivateCouponWithContext(ctx context.Context, couponId string, opts ...Option) (*Coupon, error)

	GenerateUniqueCouponCodes(couponId string, body *CouponBulkCreate, opts ...Option) (*UniqueCouponCodeParams, error)
	GenerateUniqueCouponCodesWithContext(ctx context.Context, couponId string, body *CouponBulkCreate, opts ...Option) (*UniqueCouponCodeParams, error)

	RestoreCoupon(couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)
	RestoreCouponWithContext(ctx context.Context, couponId string, body *CouponUpdate, opts ...Option) (*Coupon, error)

	ListUniqueCouponCodes(couponId string, params *ListUniqueCouponCodesParams, opts ...Option) (UniqueCouponCodeLister, error)

	ListCreditPayments(params *ListCreditPaymentsParams, opts ...Option) (CreditPaymentLister, error)

	GetCreditPayment(creditPaymentId string, opts ...Option) (*CreditPayment, error)
	GetCreditPaymentWithContext(ctx context.Context, creditPaymentId string, opts ...Option) (*CreditPayment, error)

	ListCustomFieldDefinitions(params *ListCustomFieldDefinitionsParams, opts ...Option) (CustomFieldDefinitionLister, error)

	GetCustomFieldDefinition(customFieldDefinitionId string, opts ...Option) (*CustomFieldDefinition, error)
	GetCustomFieldDefinitionWithContext(ctx context.Context, customFieldDefinitionId string, opts ...Option) (*CustomFieldDefinition, error)

	CreateGeneralLedgerAccount(body *GeneralLedgerAccountCreate, opts ...Option) (*GeneralLedgerAccount, error)
	CreateGeneralLedgerAccountWithContext(ctx context.Context, body *GeneralLedgerAccountCreate, opts ...Option) (*GeneralLedgerAccount, error)

	ListGeneralLedgerAccounts(params *ListGeneralLedgerAccountsParams, opts ...Option) (GeneralLedgerAccountLister, error)

	GetGeneralLedgerAccount(generalLedgerAccountId string, opts ...Option) (*GeneralLedgerAccount, error)
	GetGeneralLedgerAccountWithContext(ctx context.Context, generalLedgerAccountId string, opts ...Option) (*GeneralLedgerAccount, error)

	UpdateGeneralLedgerAccount(generalLedgerAccountId string, body *GeneralLedgerAccountUpdate, opts ...Option) (*GeneralLedgerAccount, error)
	UpdateGeneralLedgerAccountWithContext(ctx context.Context, generalLedgerAccountId string, body *GeneralLedgerAccountUpdate, opts ...Option) (*GeneralLedgerAccount, error)

	GetPerformanceObligation(performanceObligationId string, opts ...Option) (*PerformanceObligation, error)
	GetPerformanceObligationWithContext(ctx context.Context, performanceObligationId string, opts ...Option) (*PerformanceObligation, error)

	GetPerformanceObligations(opts ...Option) (PerformanceObligationLister, error)

	ListInvoiceTemplateAccounts(invoiceTemplateId string, params *ListInvoiceTemplateAccountsParams, opts ...Option) (AccountLister, error)

	ListItems(params *ListItemsParams, opts ...Option) (ItemLister, error)

	CreateItem(body *ItemCreate, opts ...Option) (*Item, error)
	CreateItemWithContext(ctx context.Context, body *ItemCreate, opts ...Option) (*Item, error)

	GetItem(itemId string, opts ...Option) (*Item, error)
	GetItemWithContext(ctx context.Context, itemId string, opts ...Option) (*Item, error)

	UpdateItem(itemId string, body *ItemUpdate, opts ...Option) (*Item, error)
	UpdateItemWithContext(ctx context.Context, itemId string, body *ItemUpdate, opts ...Option) (*Item, error)

	DeactivateItem(itemId string, opts ...Option) (*Item, error)
	DeactivateItemWithContext(ctx context.Context, itemId string, opts ...Option) (*Item, error)

	ReactivateItem(itemId string, opts ...Option) (*Item, error)
	ReactivateItemWithContext(ctx context.Context, itemId string, opts ...Option) (*Item, error)

	ListMeasuredUnit(params *ListMeasuredUnitParams, opts ...Option) (MeasuredUnitLister, error)

	CreateMeasuredUnit(body *MeasuredUnitCreate, opts ...Option) (*MeasuredUnit, error)
	CreateMeasuredUnitWithContext(ctx context.Context, body *MeasuredUnitCreate, opts ...Option) (*MeasuredUnit, error)

	GetMeasuredUnit(measuredUnitId string, opts ...Option) (*MeasuredUnit, error)
	GetMeasuredUnitWithContext(ctx context.Context, measuredUnitId string, opts ...Option) (*MeasuredUnit, error)

	UpdateMeasuredUnit(measuredUnitId string, body *MeasuredUnitUpdate, opts ...Option) (*MeasuredUnit, error)
	UpdateMeasuredUnitWithContext(ctx context.Context, measuredUnitId string, body *MeasuredUnitUpdate, opts ...Option) (*MeasuredUnit, error)

	RemoveMeasuredUnit(measuredUnitId string, opts ...Option) (*MeasuredUnit, error)
	RemoveMeasuredUnitWithContext(ctx context.Context, measuredUnitId string, opts ...Option) (*MeasuredUnit, error)

	ListExternalProducts(params *ListExternalProductsParams, opts ...Option) (ExternalProductLister, error)

	CreateExternalProduct(body *ExternalProductCreate, opts ...Option) (*ExternalProduct, error)
	CreateExternalProductWithContext(ctx context.Context, body *ExternalProductCreate, opts ...Option) (*ExternalProduct, error)

	GetExternalProduct(externalProductId string, opts ...Option) (*ExternalProduct, error)
	GetExternalProductWithContext(ctx context.Context, externalProductId string, opts ...Option) (*ExternalProduct, error)

	UpdateExternalProduct(externalProductId string, body *ExternalProductUpdate, opts ...Option) (*ExternalProduct, error)
	UpdateExternalProductWithContext(ctx context.Context, externalProductId string, body *ExternalProductUpdate, opts ...Option) (*ExternalProduct, error)

	DeactivateExternalProducts(externalProductId string, opts ...Option) (*ExternalProduct, error)
	DeactivateExternalProductsWithContext(ctx context.Context, externalProductId string, opts ...Option) (*ExternalProduct, error)

	ListExternalProductExternalProductReferences(externalProductId string, params *ListExternalProductExternalProductReferencesParams, opts ...Option) (ExternalProductReferenceCollectionLister, error)

	CreateExternalProductExternalProductReference(externalProductId string, body *ExternalProductReferenceCreate, opts ...Option) (*ExternalProductReferenceMini, error)
	CreateExternalProductExternalProductReferenceWithContext(ctx context.Context, externalProductId string, body *ExternalProductReferenceCreate, opts ...Option) (*ExternalProductReferenceMini, error)

	GetExternalProductExternalProductReference(externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)
	GetExternalProductExternalProductReferenceWithContext(ctx context.Context, externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)

	DeactivateExternalProductExternalProductReference(externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)
	DeactivateExternalProductExternalProductReferenceWithContext(ctx context.Context, externalProductId string, externalProductReferenceId string, opts ...Option) (*ExternalProductReferenceMini, error)

	ListExternalSubscriptions(params *ListExternalSubscriptionsParams, opts ...Option) (ExternalSubscriptionLister, error)

	GetExternalSubscription(externalSubscriptionId string, opts ...Option) (*ExternalSubscription, error)
	GetExternalSubscriptionWithContext(ctx context.Context, externalSubscriptionId string, opts ...Option) (*ExternalSubscription, error)

	ListExternalSubscriptionExternalInvoices(externalSubscriptionId string, params *ListExternalSubscriptionExternalInvoicesParams, opts ...Option) (ExternalInvoiceLister, error)

	ListInvoices(params *ListInvoicesParams, opts ...Option) (InvoiceLister, error)

	GetInvoice(invoiceId string, opts ...Option) (*Invoice, error)
	GetInvoiceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

	UpdateInvoice(invoiceId string, body *InvoiceUpdate, opts ...Option) (*Invoice, error)
	UpdateInvoiceWithContext(ctx context.Context, invoiceId string, body *InvoiceUpdate, opts ...Option) (*Invoice, error)

	ApplyCreditBalance(invoiceId string, opts ...Option) (*Invoice, error)
	ApplyCreditBalanceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

	CollectInvoice(invoiceId string, params *CollectInvoiceParams, opts ...Option) (*Invoice, error)
	CollectInvoiceWithContext(ctx context.Context, invoiceId string, params *CollectInvoiceParams, opts ...Option) (*Invoice, error)

	MarkInvoiceFailed(invoiceId string, opts ...Option) (*Invoice, error)
	MarkInvoiceFailedWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

	MarkInvoiceSuccessful(invoiceId string, opts ...Option) (*Invoice, error)
	MarkInvoiceSuccessfulWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

	ReopenInvoice(invoiceId string, opts ...Option) (*Invoice, error)
	ReopenInvoiceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

	VoidInvoice(invoiceId string, opts ...Option) (*Invoice, error)
	VoidInvoiceWithContext(ctx context.Context, invoiceId string, opts ...Option) (*Invoice, error)

	RecordExternalTransaction(invoiceId string, body *ExternalTransaction, opts ...Option) (*Transaction, error)
	RecordExternalTransactionWithContext(ctx context.Context, invoiceId string, body *ExternalTransaction, opts ...Option) (*Transaction, error)

	ListInvoiceLineItems(invoiceId string, params *ListInvoiceLineItemsParams, opts ...Option) (LineItemLister, error)

	ListInvoiceCouponRedemptions(invoiceId string, params *ListInvoiceCouponRedemptionsParams, opts ...Option) (CouponRedemptionLister, error)

	ListRelatedInvoices(invoiceId string, opts ...Option) (InvoiceLister, error)

	RefundInvoice(invoiceId string, body *InvoiceRefund, opts ...Option) (*Invoice, error)
	RefundInvoiceWithContext(ctx context.Context, invoiceId string, body *InvoiceRefund, opts ...Option) (*Invoice, error)

	ListLineItems(params *ListLineItemsParams, opts ...Option) (LineItemLister, error)

	GetLineItem(lineItemId string, opts ...Option) (*LineItem, error)
	GetLineItemWithContext(ctx context.Context, lineItemId string, opts ...Option) (*LineItem, error)

	RemoveLineItem(lineItemId string, opts ...Option) (*Empty, error)
	RemoveLineItemWithContext(ctx context.Context, lineItemId string, opts ...Option) (*Empty, error)

	ListPlans(params *ListPlansParams, opts ...Option) (PlanLister, error)

	CreatePlan(body *PlanCreate, opts ...Option) (*Plan, error)
	CreatePlanWithContext(ctx context.Context, body *PlanCreate, opts ...Option) (*Plan, error)

	GetPlan(planId string, opts ...Option) (*Plan, error)
	GetPlanWithContext(ctx context.Context, planId string, opts ...Option) (*Plan, error)

	UpdatePlan(planId string, body *PlanUpdate, opts ...Option) (*Plan, error)
	UpdatePlanWithContext(ctx context.Context, planId string, body *PlanUpdate, opts ...Option) (*Plan, error)

	RemovePlan(planId string, opts ...Option) (*Plan, error)
	RemovePlanWithContext(ctx context.Context, planId string, opts ...Option) (*Plan, error)

	ListPlanAddOns(planId string, params *ListPlanAddOnsParams, opts ...Option) (AddOnLister, error)

	CreatePlanAddOn(planId string, body *AddOnCreate, opts ...Option) (*AddOn, error)
	CreatePlanAddOnWithContext(ctx context.Context, planId string, body *AddOnCreate, opts ...Option) (*AddOn, error)

	GetPlanAddOn(planId string, addOnId string, opts ...Option) (*AddOn, error)
	GetPlanAddOnWithContext(ctx context.Context, planId string, addOnId string, opts ...Option) (*AddOn, error)

	UpdatePlanAddOn(planId string, addOnId string, body *AddOnUpdate, opts ...Option) (*AddOn, error)
	UpdatePlanAddOnWithContext(ctx context.Context, planId string, addOnId string, body *AddOnUpdate, opts ...Option) (*AddOn, error)

	RemovePlanAddOn(planId string, addOnId string, opts ...Option) (*AddOn, error)
	RemovePlanAddOnWithContext(ctx context.Context, planId string, addOnId string, opts ...Option) (*AddOn, error)

	ListAddOns(params *ListAddOnsParams, opts ...Option) (AddOnLister, error)

	GetAddOn(addOnId string, opts ...Option) (*AddOn, error)
	GetAddOnWithContext(ctx context.Context, addOnId string, opts ...Option) (*AddOn, error)

	ListShippingMethods(params *ListShippingMethodsParams, opts ...Option) (ShippingMethodLister, error)

	CreateShippingMethod(body *ShippingMethodCreate, opts ...Option) (*ShippingMethod, error)
	CreateShippingMethodWithContext(ctx context.Context, body *ShippingMethodCreate, opts ...Option) (*ShippingMethod, error)

	GetShippingMethod(shippingMethodId string, opts ...Option) (*ShippingMethod, error)
	GetShippingMethodWithContext(ctx context.Context, shippingMethodId string, opts ...Option) (*ShippingMethod, error)

	UpdateShippingMethod(shippingMethodId string, body *ShippingMethodUpdate, opts ...Option) (*ShippingMethod, error)
	UpdateShippingMethodWithContext(ctx context.Context, shippingMethodId string, body *ShippingMethodUpdate, opts ...Option) (*ShippingMethod, error)

	DeactivateShippingMethod(shippingMethodId string, opts ...Option) (*ShippingMethod, error)
	DeactivateShippingMethodWithContext(ctx context.Context, shippingMethodId string, opts ...Option) (*ShippingMethod, error)

	ListSubscriptions(params *ListSubscriptionsParams, opts ...Option) (SubscriptionLister, error)

	CreateSubscription(body *SubscriptionCreate, opts ...Option) (*Subscription, error)
	CreateSubscriptionWithContext(ctx context.Context, body *SubscriptionCreate, opts ...Option) (*Subscription, error)

	GetSubscription(subscriptionId string, opts ...Option) (*Subscription, error)
	GetSubscriptionWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

	UpdateSubscription(subscriptionId string, body *SubscriptionUpdate, opts ...Option) (*Subscription, error)
	UpdateSubscriptionWithContext(ctx context.Context, subscriptionId string, body *SubscriptionUpdate, opts ...Option) (*Subscription, error)

	TerminateSubscription(subscriptionId string, params *TerminateSubscriptionParams, opts ...Option) (*Subscription, error)
	TerminateSubscriptionWithContext(ctx context.Context, subscriptionId string, params *TerminateSubscriptionParams, opts ...Option) (*Subscription, error)

	CancelSubscription(subscriptionId string, params *CancelSubscriptionParams, opts ...Option) (*Subscription, error)
	CancelSubscriptionWithContext(ctx context.Context, subscriptionId string, params *CancelSubscriptionParams, opts ...Option) (*Subscription, error)

	ReactivateSubscription(subscriptionId string, opts ...Option) (*Subscription, error)
	ReactivateSubscriptionWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

	PauseSubscription(subscriptionId string, body *SubscriptionPause, opts ...Option) (*Subscription, error)
	PauseSubscriptionWithContext(ctx context.Context, subscriptionId string, body *SubscriptionPause, opts ...Option) (*Subscription, error)

	ResumeSubscription(subscriptionId string, opts ...Option) (*Subscription, error)
	ResumeSubscriptionWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

	ConvertTrial(subscriptionId string, opts ...Option) (*Subscription, error)
	ConvertTrialWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Subscription, error)

	GetPreviewRenewal(subscriptionId string, opts ...Option) (*InvoiceCollection, error)
	GetPreviewRenewalWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*InvoiceCollection, error)

	GetSubscriptionChange(subscriptionId string, opts ...Option) (*SubscriptionChange, error)
	GetSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*SubscriptionChange, error)

	CreateSubscriptionChange(subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)
	CreateSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)

	RemoveSubscriptionChange(subscriptionId string, opts ...Option) (*Empty, error)
	RemoveSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, opts ...Option) (*Empty, error)

	PreviewSubscriptionChange(subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)
	PreviewSubscriptionChangeWithContext(ctx context.Context, subscriptionId string, body *SubscriptionChangeCreate, opts ...Option) (*SubscriptionChange, error)

	ListSubscriptionInvoices(subscriptionId string, params *ListSubscriptionInvoicesParams, opts ...Option) (InvoiceLister, error)

	ListSubscriptionLineItems(subscriptionId string, params *ListSubscriptionLineItemsParams, opts ...Option) (LineItemLister, error)

	ListSubscriptionCouponRedemptions(subscriptionId string, params *ListSubscriptionCouponRedemptionsParams, opts ...Option) (CouponRedemptionLister, error)

	ListUsage(subscriptionId string, addOnId string, params *ListUsageParams, opts ...Option) (UsageLister, error)

	CreateUsage(subscriptionId string, addOnId string, body *UsageCreate, opts ...Option) (*Usage, error)
	CreateUsageWithContext(ctx context.Context, subscriptionId string, addOnId string, body *UsageCreate, opts ...Option) (*Usage, error)

	GetUsage(usageId string, opts ...Option) (*Usage, error)
	GetUsageWithContext(ctx context.Context, usageId string, opts ...Option) (*Usage, error)

	UpdateUsage(usageId string, body *UsageCreate, opts ...Option) (*Usage, error)
	UpdateUsageWithContext(ctx context.Context, usageId string, body *UsageCreate, opts ...Option) (*Usage, error)

	RemoveUsage(usageId string, opts ...Option) (*Empty, error)
	RemoveUsageWithContext(ctx context.Context, usageId string, opts ...Option) (*Empty, error)

	ListTransactions(params *ListTransactionsParams, opts ...Option) (TransactionLister, error)

	GetTransaction(transactionId string, opts ...Option) (*Transaction, error)
	GetTransactionWithContext(ctx context.Context, transactionId string, opts ...Option) (*Transaction, error)

	GetUniqueCouponCode(uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)
	GetUniqueCouponCodeWithContext(ctx context.Context, uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

	DeactivateUniqueCouponCode(uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)
	DeactivateUniqueCouponCodeWithContext(ctx context.Context, uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

	ReactivateUniqueCouponCode(uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)
	ReactivateUniqueCouponCodeWithContext(ctx context.Context, uniqueCouponCodeId string, opts ...Option) (*UniqueCouponCode, error)

	CreatePurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)
	CreatePurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

	PreviewPurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)
	PreviewPurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

	CreatePendingPurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)
	CreatePendingPurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

	CreateAuthorizePurchase(body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)
	CreateAuthorizePurchaseWithContext(ctx context.Context, body *PurchaseCreate, opts ...Option) (*InvoiceCollection, error)

	CreateCapturePurchase(transactionId string, opts ...Option) (*InvoiceCollection, error)
	CreateCapturePurchaseWithContext(ctx context.Context, transactionId string, opts ...Option) (*InvoiceCollection, error)

	Cancelpurchase(transactionId string, opts ...Option) (*InvoiceCollection, error)
	CancelpurchaseWithContext(ctx context.Context, transactionId string, opts ...Option) (*InvoiceCollection, error)

	GetExportDates(opts ...Option) (*ExportDates, error)
	GetExportDatesWithContext(ctx context.Context, opts ...Option) (*ExportDates, error)

	GetExportFiles(exportDate string, opts ...Option) (*ExportFiles, error)
	GetExportFilesWithContext(ctx context.Context, exportDate string, opts ...Option) (*ExportFiles, error)

	ListDunningCampaigns(params *ListDunningCampaignsParams, opts ...Option) (DunningCampaignLister, error)

	GetDunningCampaign(dunningCampaignId string, opts ...Option) (*DunningCampaign, error)
	GetDunningCampaignWithContext(ctx context.Context, dunningCampaignId string, opts ...Option) (*DunningCampaign, error)

	PutDunningCampaignBulkUpdate(dunningCampaignId string, body *DunningCampaignsBulkUpdate, opts ...Option) (*DunningCampaignsBulkUpdateResponse, error)
	PutDunningCampaignBulkUpdateWithContext(ctx context.Context, dunningCampaignId string, body *DunningCampaignsBulkUpdate, opts ...Option) (*DunningCampaignsBulkUpdateResponse, error)

	ListInvoiceTemplates(params *ListInvoiceTemplatesParams, opts ...Option) (InvoiceTemplateLister, error)

	GetInvoiceTemplate(invoiceTemplateId string, opts ...Option) (*InvoiceTemplate, error)
	GetInvoiceTemplateWithContext(ctx context.Context, invoiceTemplateId string, opts ...Option) (*InvoiceTemplate, error)

	ListExternalInvoices(params *ListExternalInvoicesParams, opts ...Option) (ExternalInvoiceLister, error)

	ShowExternalInvoice(externalInvoiceId string, opts ...Option) (*ExternalInvoice, error)
	ShowExternalInvoiceWithContext(ctx context.Context, externalInvoiceId string, opts ...Option) (*ExternalInvoice, error)

	ListExternalSubscriptionExternalPaymentPhases(externalSubscriptionId string, params *ListExternalSubscriptionExternalPaymentPhasesParams, opts ...Option) (ExternalPaymentPhaseLister, error)

	GetExternalSubscriptionExternalPaymentPhase(externalSubscriptionId string, externalPaymentPhaseId string, opts ...Option) (*ExternalPaymentPhase, error)
	GetExternalSubscriptionExternalPaymentPhaseWithContext(ctx context.Context, externalSubscriptionId string, externalPaymentPhaseId string, opts ...Option) (*ExternalPaymentPhase, error)

	ListEntitlements(accountId string, params *ListEntitlementsParams, opts ...Option) (EntitlementsLister, error)

	ListAccountExternalSubscriptions(accountId string, params *ListAccountExternalSubscriptionsParams, opts ...Option) (ExternalSubscriptionLister, error)

	GetBusinessEntity(businessEntityId string, opts ...Option) (*BusinessEntity, error)
	GetBusinessEntityWithContext(ctx context.Context, businessEntityId string, opts ...Option) (*BusinessEntity, error)

	ListBusinessEntities(opts ...Option) (BusinessEntityLister, error)

	ListGiftCards(opts ...Option) (GiftCardLister, error)

	CreateGiftCard(body *GiftCardCreate, opts ...Option) (*GiftCard, error)
	CreateGiftCardWithContext(ctx context.Context, body *GiftCardCreate, opts ...Option) (*GiftCard, error)

	GetGiftCard(giftCardId string, opts ...Option) (*GiftCard, error)
	GetGiftCardWithContext(ctx context.Context, giftCardId string, opts ...Option) (*GiftCard, error)

	PreviewGiftCard(body *GiftCardCreate, opts ...Option) (*GiftCard, error)
	PreviewGiftCardWithContext(ctx context.Context, body *GiftCardCreate, opts ...Option) (*GiftCard, error)

	RedeemGiftCard(redemptionCode string, body *GiftCardRedeem, opts ...Option) (*GiftCard, error)
	RedeemGiftCardWithContext(ctx context.Context, redemptionCode string, body *GiftCardRedeem, opts ...Option) (*GiftCard, error)

	ListBusinessEntityInvoices(businessEntityId string, params *ListBusinessEntityInvoicesParams, opts ...Option) (InvoiceLister, error)
}

type ClientOptions

type ClientOptions struct {
	Region region
}

ClientOptions for a new API Client

type CollectInvoiceParams

type CollectInvoiceParams struct {

	// Body - The body of the request.
	Body *InvoiceCollect
}

func (*CollectInvoiceParams) URLParams

func (list *CollectInvoiceParams) URLParams() []KeyValue

type Coupon

type Coupon struct {

	// Coupon ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The code the customer enters to redeem the coupon.
	Code string `json:"code,omitempty"`

	// The internal name for the coupon.
	Name string `json:"name,omitempty"`

	// Indicates if the coupon is redeemable, and if it is not, why.
	State string `json:"state,omitempty"`

	// A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
	MaxRedemptions int `json:"max_redemptions,omitempty"`

	// Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign.
	MaxRedemptionsPerAccount int `json:"max_redemptions_per_account,omitempty"`

	// When this number reaches `max_redemptions` the coupon will no longer be redeemable.
	UniqueCouponCodesCount int `json:"unique_coupon_codes_count,omitempty"`

	// On a bulk coupon, the template from which unique coupon codes are generated.
	UniqueCodeTemplate string `json:"unique_code_template,omitempty"`

	// Will be populated when the Coupon being returned is a `UniqueCouponCode`.
	UniqueCouponCode map[string]interface{} `json:"unique_coupon_code,omitempty"`

	// - "single_use" coupons applies to the first invoice only.
	// - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes.
	Duration string `json:"duration,omitempty"`

	// If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
	TemporalAmount int `json:"temporal_amount,omitempty"`

	// If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
	TemporalUnit string `json:"temporal_unit,omitempty"`

	// Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for.
	FreeTrialUnit string `json:"free_trial_unit,omitempty"`

	// Sets the duration of time the `free_trial_unit` is for.
	FreeTrialAmount int `json:"free_trial_amount,omitempty"`

	// The coupon is valid for all plans if true. If false then `plans` will list the applicable plans.
	AppliesToAllPlans bool `json:"applies_to_all_plans,omitempty"`

	// The coupon is valid for all items if true. If false then `items`
	// will list the applicable items.
	AppliesToAllItems bool `json:"applies_to_all_items,omitempty"`

	// The coupon is valid for one-time, non-plan charges if true.
	AppliesToNonPlanCharges bool `json:"applies_to_non_plan_charges,omitempty"`

	// A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`.
	Plans []PlanMini `json:"plans,omitempty"`

	// A list of items for which this coupon applies. This will be
	// `null` if `applies_to_all_items=true`.
	Items []ItemMini `json:"items,omitempty"`

	// Whether the discount is for all eligible charges on the account, or only a specific subscription.
	RedemptionResource string `json:"redemption_resource,omitempty"`

	// Details of the discount a coupon applies. Will contain a `type`
	// property and one of the following properties: `percent`, `fixed`, `trial`.
	Discount CouponDiscount `json:"discount,omitempty"`

	// Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
	CouponType string `json:"coupon_type,omitempty"`

	// This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.
	HostedPageDescription string `json:"hosted_page_description,omitempty"`

	// Description of the coupon on the invoice.
	InvoiceDescription string `json:"invoice_description,omitempty"`

	// The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
	RedeemBy time.Time `json:"redeem_by,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// The date and time the coupon was expired early or reached its `max_redemptions`.
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Coupon) GetResponse

func (resource *Coupon) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CouponBulkCreate

type CouponBulkCreate struct {

	// The quantity of unique coupon codes to generate
	NumberOfUniqueCodes *int `json:"number_of_unique_codes,omitempty"`
}

type CouponCreate

type CouponCreate struct {

	// The internal name for the coupon.
	Name *string `json:"name,omitempty"`

	// A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
	MaxRedemptions *int `json:"max_redemptions,omitempty"`

	// Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign.
	MaxRedemptionsPerAccount *int `json:"max_redemptions_per_account,omitempty"`

	// This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.
	HostedDescription *string `json:"hosted_description,omitempty"`

	// Description of the coupon on the invoice.
	InvoiceDescription *string `json:"invoice_description,omitempty"`

	// The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
	RedeemByDate *string `json:"redeem_by_date,omitempty"`

	// The code the customer enters to redeem the coupon.
	Code *string `json:"code,omitempty"`

	// The type of discount provided by the coupon (how the amount discounted is calculated)
	DiscountType *string `json:"discount_type,omitempty"`

	// The percent of the price discounted by the coupon.  Required if `discount_type` is `percent`.
	DiscountPercent *int `json:"discount_percent,omitempty"`

	// Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for.  Required if `discount_type` is `free_trial`.
	FreeTrialUnit *string `json:"free_trial_unit,omitempty"`

	// Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`.
	FreeTrialAmount *int `json:"free_trial_amount,omitempty"`

	// Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values
	Currencies []CouponPricing `json:"currencies,omitempty"`

	// The coupon is valid for one-time, non-plan charges if true.
	AppliesToNonPlanCharges *bool `json:"applies_to_non_plan_charges,omitempty"`

	// The coupon is valid for all plans if true. If false then `plans` will list the applicable plans.
	AppliesToAllPlans *bool `json:"applies_to_all_plans,omitempty"`

	// To apply coupon to Items in your Catalog, include a list
	// of `item_codes` in the request that the coupon will apply to. Or set value
	// to true to apply to all Items in your Catalog. The following values
	// are not permitted when `applies_to_all_items` is included: `free_trial_amount`
	// and `free_trial_unit`.
	AppliesToAllItems *bool `json:"applies_to_all_items,omitempty"`

	// List of plan codes to which this coupon applies. Required
	// if `applies_to_all_plans` is false. Overrides `applies_to_all_plans`
	// when `applies_to_all_plans` is true.
	PlanCodes []string `json:"plan_codes,omitempty"`

	// List of item codes to which this coupon applies. Sending
	// `item_codes` is only permitted when `applies_to_all_items` is set to false.
	// The following values are not permitted when `item_codes` is included:
	// `free_trial_amount` and `free_trial_unit`.
	ItemCodes []string `json:"item_codes,omitempty"`

	// This field does not apply when the discount_type is `free_trial`.
	// - "single_use" coupons applies to the first invoice only.
	// - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes.
	// - "forever" coupons will apply to invoices forever.
	Duration *string `json:"duration,omitempty"`

	// If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
	TemporalAmount *int `json:"temporal_amount,omitempty"`

	// If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
	TemporalUnit *string `json:"temporal_unit,omitempty"`

	// Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
	CouponType *string `json:"coupon_type,omitempty"`

	// On a bulk coupon, the template from which unique coupon codes are generated.
	// - You must start the template with your coupon_code wrapped in single quotes.
	// - Outside of single quotes, use a 9 for a character that you want to be a random number.
	// - Outside of single quotes, use an "x" for a character that you want to be a random letter.
	// - Outside of single quotes, use an * for a character that you want to be a random number or letter.
	// - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +.
	// For example: "'abc-'****'-def'"
	UniqueCodeTemplate *string `json:"unique_code_template,omitempty"`

	// Whether the discount is for all eligible charges on the account, or only a specific subscription.
	RedemptionResource *string `json:"redemption_resource,omitempty"`
}

type CouponDiscount

type CouponDiscount struct {
	Type string `json:"type,omitempty"`

	// This is only present when `type=percent`.
	Percent int `json:"percent,omitempty"`

	// This is only present when `type=fixed`.
	Currencies []CouponDiscountPricing `json:"currencies,omitempty"`

	// This is only present when `type=free_trial`.
	Trial CouponDiscountTrial `json:"trial,omitempty"`
	// contains filtered or unexported fields
}

func (*CouponDiscount) GetResponse

func (resource *CouponDiscount) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CouponDiscountList

type CouponDiscountList struct {
	// contains filtered or unexported fields
}

CouponDiscountList allows you to paginate CouponDiscount objects

func NewCouponDiscountList

func NewCouponDiscountList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CouponDiscountList

func (*CouponDiscountList) Count

func (list *CouponDiscountList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponDiscountList) CountWithContext

func (list *CouponDiscountList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponDiscountList) Data

func (list *CouponDiscountList) Data() []CouponDiscount

func (*CouponDiscountList) Fetch

func (list *CouponDiscountList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CouponDiscountList) FetchWithContext

func (list *CouponDiscountList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CouponDiscountList) HasMore

func (list *CouponDiscountList) HasMore() bool

func (*CouponDiscountList) Next

func (list *CouponDiscountList) Next() string

type CouponDiscountLister

type CouponDiscountLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CouponDiscount
	HasMore() bool
	Next() string
}

type CouponDiscountPricing

type CouponDiscountPricing struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Value of the fixed discount that this coupon applies.
	Amount float64 `json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*CouponDiscountPricing) GetResponse

func (resource *CouponDiscountPricing) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CouponDiscountPricingList

type CouponDiscountPricingList struct {
	// contains filtered or unexported fields
}

CouponDiscountPricingList allows you to paginate CouponDiscountPricing objects

func NewCouponDiscountPricingList

func NewCouponDiscountPricingList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CouponDiscountPricingList

func (*CouponDiscountPricingList) Count

func (list *CouponDiscountPricingList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponDiscountPricingList) CountWithContext

func (list *CouponDiscountPricingList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponDiscountPricingList) Data

func (*CouponDiscountPricingList) Fetch

func (list *CouponDiscountPricingList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CouponDiscountPricingList) FetchWithContext

func (list *CouponDiscountPricingList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CouponDiscountPricingList) HasMore

func (list *CouponDiscountPricingList) HasMore() bool

func (*CouponDiscountPricingList) Next

func (list *CouponDiscountPricingList) Next() string

type CouponDiscountPricingLister

type CouponDiscountPricingLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CouponDiscountPricing
	HasMore() bool
	Next() string
}

type CouponDiscountTrial

type CouponDiscountTrial struct {

	// Temporal unit of the free trial
	Unit string `json:"unit,omitempty"`

	// Trial length measured in the units specified by the sibling `unit` property
	Length int `json:"length,omitempty"`
	// contains filtered or unexported fields
}

func (*CouponDiscountTrial) GetResponse

func (resource *CouponDiscountTrial) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CouponDiscountTrialList

type CouponDiscountTrialList struct {
	// contains filtered or unexported fields
}

CouponDiscountTrialList allows you to paginate CouponDiscountTrial objects

func NewCouponDiscountTrialList

func NewCouponDiscountTrialList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CouponDiscountTrialList

func (*CouponDiscountTrialList) Count

func (list *CouponDiscountTrialList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponDiscountTrialList) CountWithContext

func (list *CouponDiscountTrialList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponDiscountTrialList) Data

func (*CouponDiscountTrialList) Fetch

func (list *CouponDiscountTrialList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CouponDiscountTrialList) FetchWithContext

func (list *CouponDiscountTrialList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CouponDiscountTrialList) HasMore

func (list *CouponDiscountTrialList) HasMore() bool

func (*CouponDiscountTrialList) Next

func (list *CouponDiscountTrialList) Next() string

type CouponDiscountTrialLister

type CouponDiscountTrialLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CouponDiscountTrial
	HasMore() bool
	Next() string
}

type CouponList

type CouponList struct {
	// contains filtered or unexported fields
}

CouponList allows you to paginate Coupon objects

func NewCouponList

func NewCouponList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CouponList

func (*CouponList) Count

func (list *CouponList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponList) CountWithContext

func (list *CouponList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponList) Data

func (list *CouponList) Data() []Coupon

func (*CouponList) Fetch

func (list *CouponList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CouponList) FetchWithContext

func (list *CouponList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CouponList) HasMore

func (list *CouponList) HasMore() bool

func (*CouponList) Next

func (list *CouponList) Next() string

type CouponLister

type CouponLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Coupon
	HasMore() bool
	Next() string
}

type CouponMini

type CouponMini struct {

	// Coupon ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The code the customer enters to redeem the coupon.
	Code string `json:"code,omitempty"`

	// The internal name for the coupon.
	Name string `json:"name,omitempty"`

	// Indicates if the coupon is redeemable, and if it is not, why.
	State string `json:"state,omitempty"`

	// Details of the discount a coupon applies. Will contain a `type`
	// property and one of the following properties: `percent`, `fixed`, `trial`.
	Discount CouponDiscount `json:"discount,omitempty"`

	// Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
	CouponType string `json:"coupon_type,omitempty"`

	// The date and time the coupon was expired early or reached its `max_redemptions`.
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CouponMini) GetResponse

func (resource *CouponMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CouponMiniList

type CouponMiniList struct {
	// contains filtered or unexported fields
}

CouponMiniList allows you to paginate CouponMini objects

func NewCouponMiniList

func NewCouponMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CouponMiniList

func (*CouponMiniList) Count

func (list *CouponMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponMiniList) CountWithContext

func (list *CouponMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponMiniList) Data

func (list *CouponMiniList) Data() []CouponMini

func (*CouponMiniList) Fetch

func (list *CouponMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CouponMiniList) FetchWithContext

func (list *CouponMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CouponMiniList) HasMore

func (list *CouponMiniList) HasMore() bool

func (*CouponMiniList) Next

func (list *CouponMiniList) Next() string

type CouponMiniLister

type CouponMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CouponMini
	HasMore() bool
	Next() string
}

type CouponPricing

type CouponPricing struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// The fixed discount (in dollars) for the corresponding currency.
	Discount *float64 `json:"discount,omitempty"`
}

type CouponRedemption

type CouponRedemption struct {

	// Coupon Redemption ID
	Id string `json:"id,omitempty"`

	// Will always be `coupon`.
	Object string `json:"object,omitempty"`

	// The Account on which the coupon was applied.
	Account AccountMini `json:"account,omitempty"`

	// Subscription ID
	SubscriptionId string `json:"subscription_id,omitempty"`

	Coupon Coupon `json:"coupon,omitempty"`

	// Coupon Redemption state
	State string `json:"state,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// The amount that was discounted upon the application of the coupon, formatted with the currency.
	Discounted float64 `json:"discounted,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// The date and time the redemption was removed from the account (un-redeemed).
	RemovedAt time.Time `json:"removed_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CouponRedemption) GetResponse

func (resource *CouponRedemption) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CouponRedemptionCreate

type CouponRedemptionCreate struct {

	// Coupon ID
	CouponId *string `json:"coupon_id,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Subscription ID
	SubscriptionId *string `json:"subscription_id,omitempty"`
}

type CouponRedemptionList

type CouponRedemptionList struct {
	// contains filtered or unexported fields
}

CouponRedemptionList allows you to paginate CouponRedemption objects

func NewCouponRedemptionList

func NewCouponRedemptionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CouponRedemptionList

func (*CouponRedemptionList) Count

func (list *CouponRedemptionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponRedemptionList) CountWithContext

func (list *CouponRedemptionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponRedemptionList) Data

func (list *CouponRedemptionList) Data() []CouponRedemption

func (*CouponRedemptionList) Fetch

func (list *CouponRedemptionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CouponRedemptionList) FetchWithContext

func (list *CouponRedemptionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CouponRedemptionList) HasMore

func (list *CouponRedemptionList) HasMore() bool

func (*CouponRedemptionList) Next

func (list *CouponRedemptionList) Next() string

type CouponRedemptionLister

type CouponRedemptionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CouponRedemption
	HasMore() bool
	Next() string
}

type CouponRedemptionMini

type CouponRedemptionMini struct {

	// Coupon Redemption ID
	Id string `json:"id,omitempty"`

	// Will always be `coupon`.
	Object string `json:"object,omitempty"`

	Coupon CouponMini `json:"coupon,omitempty"`

	// Invoice state
	State string `json:"state,omitempty"`

	// The amount that was discounted upon the application of the coupon, formatted with the currency.
	Discounted float64 `json:"discounted,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CouponRedemptionMini) GetResponse

func (resource *CouponRedemptionMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CouponRedemptionMiniList

type CouponRedemptionMiniList struct {
	// contains filtered or unexported fields
}

CouponRedemptionMiniList allows you to paginate CouponRedemptionMini objects

func NewCouponRedemptionMiniList

func NewCouponRedemptionMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CouponRedemptionMiniList

func (*CouponRedemptionMiniList) Count

func (list *CouponRedemptionMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponRedemptionMiniList) CountWithContext

func (list *CouponRedemptionMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CouponRedemptionMiniList) Data

func (*CouponRedemptionMiniList) Fetch

func (list *CouponRedemptionMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CouponRedemptionMiniList) FetchWithContext

func (list *CouponRedemptionMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CouponRedemptionMiniList) HasMore

func (list *CouponRedemptionMiniList) HasMore() bool

func (*CouponRedemptionMiniList) Next

func (list *CouponRedemptionMiniList) Next() string

type CouponRedemptionMiniLister

type CouponRedemptionMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CouponRedemptionMini
	HasMore() bool
	Next() string
}

type CouponUpdate

type CouponUpdate struct {

	// The internal name for the coupon.
	Name *string `json:"name,omitempty"`

	// A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.
	MaxRedemptions *int `json:"max_redemptions,omitempty"`

	// Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign.
	MaxRedemptionsPerAccount *int `json:"max_redemptions_per_account,omitempty"`

	// This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.
	HostedDescription *string `json:"hosted_description,omitempty"`

	// Description of the coupon on the invoice.
	InvoiceDescription *string `json:"invoice_description,omitempty"`

	// The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.
	RedeemByDate *string `json:"redeem_by_date,omitempty"`
}

type CreditPayment

type CreditPayment struct {

	// Credit Payment ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
	Uuid string `json:"uuid,omitempty"`

	// The action for which the credit was created.
	Action string `json:"action,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// Invoice mini details
	AppliedToInvoice InvoiceMini `json:"applied_to_invoice,omitempty"`

	// Invoice mini details
	OriginalInvoice InvoiceMini `json:"original_invoice,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Total credit payment amount applied to the charge invoice.
	Amount float64 `json:"amount,omitempty"`

	// For credit payments with action `refund`, this is the credit payment that was refunded.
	OriginalCreditPaymentId string `json:"original_credit_payment_id,omitempty"`

	RefundTransaction Transaction `json:"refund_transaction,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Voided at
	VoidedAt time.Time `json:"voided_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CreditPayment) GetResponse

func (resource *CreditPayment) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CreditPaymentList

type CreditPaymentList struct {
	// contains filtered or unexported fields
}

CreditPaymentList allows you to paginate CreditPayment objects

func NewCreditPaymentList

func NewCreditPaymentList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CreditPaymentList

func (*CreditPaymentList) Count

func (list *CreditPaymentList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CreditPaymentList) CountWithContext

func (list *CreditPaymentList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CreditPaymentList) Data

func (list *CreditPaymentList) Data() []CreditPayment

func (*CreditPaymentList) Fetch

func (list *CreditPaymentList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CreditPaymentList) FetchWithContext

func (list *CreditPaymentList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CreditPaymentList) HasMore

func (list *CreditPaymentList) HasMore() bool

func (*CreditPaymentList) Next

func (list *CreditPaymentList) Next() string

type CreditPaymentLister

type CreditPaymentLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CreditPayment
	HasMore() bool
	Next() string
}

type CustomField

type CustomField struct {

	// Fields must be created in the UI before values can be assigned to them.
	Name string `json:"name,omitempty"`

	// Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
	Value string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*CustomField) GetResponse

func (resource *CustomField) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CustomFieldCreate

type CustomFieldCreate struct {

	// Fields must be created in the UI before values can be assigned to them.
	Name *string `json:"name,omitempty"`

	// Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.
	Value *string `json:"value,omitempty"`
}

type CustomFieldDefinition

type CustomFieldDefinition struct {

	// Custom field definition ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Related Recurly object type
	RelatedType string `json:"related_type,omitempty"`

	// Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type.
	Name string `json:"name,omitempty"`

	// The access control applied inside Recurly's admin UI:
	// - `api_only` - No one will be able to view or edit this field's data via the admin UI.
	// - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but
	//   editing will only be available via the API.
	// - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.
	// - `set_only` - Users with the Customers role will be able to set this field's data via the admin console.
	UserAccess string `json:"user_access,omitempty"`

	// Used to label the field when viewing and editing the field in Recurly's admin UI.
	DisplayName string `json:"display_name,omitempty"`

	// Displayed as a tooltip when editing the field in the Recurly admin UI.
	Tooltip string `json:"tooltip,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*CustomFieldDefinition) GetResponse

func (resource *CustomFieldDefinition) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CustomFieldDefinitionList

type CustomFieldDefinitionList struct {
	// contains filtered or unexported fields
}

CustomFieldDefinitionList allows you to paginate CustomFieldDefinition objects

func NewCustomFieldDefinitionList

func NewCustomFieldDefinitionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CustomFieldDefinitionList

func (*CustomFieldDefinitionList) Count

func (list *CustomFieldDefinitionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CustomFieldDefinitionList) CountWithContext

func (list *CustomFieldDefinitionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CustomFieldDefinitionList) Data

func (*CustomFieldDefinitionList) Fetch

func (list *CustomFieldDefinitionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CustomFieldDefinitionList) FetchWithContext

func (list *CustomFieldDefinitionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CustomFieldDefinitionList) HasMore

func (list *CustomFieldDefinitionList) HasMore() bool

func (*CustomFieldDefinitionList) Next

func (list *CustomFieldDefinitionList) Next() string

type CustomFieldDefinitionLister

type CustomFieldDefinitionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CustomFieldDefinition
	HasMore() bool
	Next() string
}

type CustomFieldList

type CustomFieldList struct {
	// contains filtered or unexported fields
}

CustomFieldList allows you to paginate CustomField objects

func NewCustomFieldList

func NewCustomFieldList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CustomFieldList

func (*CustomFieldList) Count

func (list *CustomFieldList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CustomFieldList) CountWithContext

func (list *CustomFieldList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CustomFieldList) Data

func (list *CustomFieldList) Data() []CustomField

func (*CustomFieldList) Fetch

func (list *CustomFieldList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CustomFieldList) FetchWithContext

func (list *CustomFieldList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CustomFieldList) HasMore

func (list *CustomFieldList) HasMore() bool

func (*CustomFieldList) Next

func (list *CustomFieldList) Next() string

type CustomFieldLister

type CustomFieldLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CustomField
	HasMore() bool
	Next() string
}

type CustomerPermission

type CustomerPermission struct {

	// Customer permission ID.
	Id string `json:"id,omitempty"`

	// Customer permission code.
	Code string `json:"code,omitempty"`

	// Customer permission name.
	Name string `json:"name,omitempty"`

	// Description of customer permission.
	Description string `json:"description,omitempty"`

	// It will always be "customer_permission".
	Object string `json:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*CustomerPermission) GetResponse

func (resource *CustomerPermission) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type CustomerPermissionList

type CustomerPermissionList struct {
	// contains filtered or unexported fields
}

CustomerPermissionList allows you to paginate CustomerPermission objects

func NewCustomerPermissionList

func NewCustomerPermissionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *CustomerPermissionList

func (*CustomerPermissionList) Count

func (list *CustomerPermissionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*CustomerPermissionList) CountWithContext

func (list *CustomerPermissionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*CustomerPermissionList) Data

func (*CustomerPermissionList) Fetch

func (list *CustomerPermissionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*CustomerPermissionList) FetchWithContext

func (list *CustomerPermissionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*CustomerPermissionList) HasMore

func (list *CustomerPermissionList) HasMore() bool

func (*CustomerPermissionList) Next

func (list *CustomerPermissionList) Next() string

type CustomerPermissionLister

type CustomerPermissionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []CustomerPermission
	HasMore() bool
	Next() string
}

type DunningCampaign

type DunningCampaign struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Campaign code.
	Code string `json:"code,omitempty"`

	// Campaign name.
	Name string `json:"name,omitempty"`

	// Campaign description.
	Description string `json:"description,omitempty"`

	// Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign.
	DefaultCampaign bool `json:"default_campaign,omitempty"`

	// Dunning Cycle settings.
	DunningCycles []DunningCycle `json:"dunning_cycles,omitempty"`

	// When the current campaign was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the current campaign was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// When the current campaign was deleted in Recurly.
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*DunningCampaign) GetResponse

func (resource *DunningCampaign) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type DunningCampaignList

type DunningCampaignList struct {
	// contains filtered or unexported fields
}

DunningCampaignList allows you to paginate DunningCampaign objects

func NewDunningCampaignList

func NewDunningCampaignList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *DunningCampaignList

func (*DunningCampaignList) Count

func (list *DunningCampaignList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*DunningCampaignList) CountWithContext

func (list *DunningCampaignList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*DunningCampaignList) Data

func (list *DunningCampaignList) Data() []DunningCampaign

func (*DunningCampaignList) Fetch

func (list *DunningCampaignList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*DunningCampaignList) FetchWithContext

func (list *DunningCampaignList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*DunningCampaignList) HasMore

func (list *DunningCampaignList) HasMore() bool

func (*DunningCampaignList) Next

func (list *DunningCampaignList) Next() string

type DunningCampaignLister

type DunningCampaignLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []DunningCampaign
	HasMore() bool
	Next() string
}

type DunningCampaignsBulkUpdate

type DunningCampaignsBulkUpdate struct {

	// List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present.
	PlanCodes []string `json:"plan_codes,omitempty"`

	// List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present.
	PlanIds []string `json:"plan_ids,omitempty"`
}

type DunningCampaignsBulkUpdateResponse

type DunningCampaignsBulkUpdateResponse struct {

	// Object type
	Object string `json:"object,omitempty"`

	// An array containing all of the `Plan` resources that have been updated.
	Plans []Plan `json:"plans,omitempty"`
	// contains filtered or unexported fields
}

func (*DunningCampaignsBulkUpdateResponse) GetResponse

func (resource *DunningCampaignsBulkUpdateResponse) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type DunningCampaignsBulkUpdateResponseList

type DunningCampaignsBulkUpdateResponseList struct {
	// contains filtered or unexported fields
}

DunningCampaignsBulkUpdateResponseList allows you to paginate DunningCampaignsBulkUpdateResponse objects

func NewDunningCampaignsBulkUpdateResponseList

func NewDunningCampaignsBulkUpdateResponseList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *DunningCampaignsBulkUpdateResponseList

func (*DunningCampaignsBulkUpdateResponseList) Count

Count returns the count of items on the server that match this pager

func (*DunningCampaignsBulkUpdateResponseList) CountWithContext

func (list *DunningCampaignsBulkUpdateResponseList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*DunningCampaignsBulkUpdateResponseList) Data

func (*DunningCampaignsBulkUpdateResponseList) Fetch

Fetch fetches the next page of data into the `Data` property

func (*DunningCampaignsBulkUpdateResponseList) FetchWithContext

func (list *DunningCampaignsBulkUpdateResponseList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*DunningCampaignsBulkUpdateResponseList) HasMore

func (*DunningCampaignsBulkUpdateResponseList) Next

type DunningCampaignsBulkUpdateResponseLister

type DunningCampaignsBulkUpdateResponseLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []DunningCampaignsBulkUpdateResponse
	HasMore() bool
	Next() string
}

type DunningCycle

type DunningCycle struct {

	// The type of invoice this cycle applies to.
	Type string `json:"type,omitempty"`

	// Whether the dunning settings will be applied to manual trials. Only applies to trial cycles.
	AppliesToManualTrial bool `json:"applies_to_manual_trial,omitempty"`

	// The number of days after a transaction failure before the first dunning email is sent.
	FirstCommunicationInterval int `json:"first_communication_interval,omitempty"`

	// Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info.
	SendImmediatelyOnHardDecline bool `json:"send_immediately_on_hard_decline,omitempty"`

	// Dunning intervals.
	Intervals []DunningInterval `json:"intervals,omitempty"`

	// Whether the subscription(s) should be cancelled at the end of the dunning cycle.
	ExpireSubscription bool `json:"expire_subscription,omitempty"`

	// Whether the invoice should be failed at the end of the dunning cycle.
	FailInvoice bool `json:"fail_invoice,omitempty"`

	// The number of days between the first dunning email being sent and the end of the dunning cycle.
	TotalDunningDays int `json:"total_dunning_days,omitempty"`

	// The number of days between a transaction failure and the end of the dunning cycle.
	TotalRecyclingDays int `json:"total_recycling_days,omitempty"`

	// Current campaign version.
	Version int `json:"version,omitempty"`

	// When the current settings were created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the current settings were updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*DunningCycle) GetResponse

func (resource *DunningCycle) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type DunningCycleList

type DunningCycleList struct {
	// contains filtered or unexported fields
}

DunningCycleList allows you to paginate DunningCycle objects

func NewDunningCycleList

func NewDunningCycleList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *DunningCycleList

func (*DunningCycleList) Count

func (list *DunningCycleList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*DunningCycleList) CountWithContext

func (list *DunningCycleList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*DunningCycleList) Data

func (list *DunningCycleList) Data() []DunningCycle

func (*DunningCycleList) Fetch

func (list *DunningCycleList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*DunningCycleList) FetchWithContext

func (list *DunningCycleList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*DunningCycleList) HasMore

func (list *DunningCycleList) HasMore() bool

func (*DunningCycleList) Next

func (list *DunningCycleList) Next() string

type DunningCycleLister

type DunningCycleLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []DunningCycle
	HasMore() bool
	Next() string
}

type DunningInterval

type DunningInterval struct {

	// Number of days before sending the next email.
	Days int `json:"days,omitempty"`

	// Email template being used.
	EmailTemplate string `json:"email_template,omitempty"`
	// contains filtered or unexported fields
}

func (*DunningInterval) GetResponse

func (resource *DunningInterval) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type DunningIntervalList

type DunningIntervalList struct {
	// contains filtered or unexported fields
}

DunningIntervalList allows you to paginate DunningInterval objects

func NewDunningIntervalList

func NewDunningIntervalList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *DunningIntervalList

func (*DunningIntervalList) Count

func (list *DunningIntervalList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*DunningIntervalList) CountWithContext

func (list *DunningIntervalList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*DunningIntervalList) Data

func (list *DunningIntervalList) Data() []DunningInterval

func (*DunningIntervalList) Fetch

func (list *DunningIntervalList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*DunningIntervalList) FetchWithContext

func (list *DunningIntervalList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*DunningIntervalList) HasMore

func (list *DunningIntervalList) HasMore() bool

func (*DunningIntervalList) Next

func (list *DunningIntervalList) Next() string

type DunningIntervalLister

type DunningIntervalLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []DunningInterval
	HasMore() bool
	Next() string
}

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) GetResponse

func (resource *Empty) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type Entitlement

type Entitlement struct {

	// Entitlement
	Object string `json:"object,omitempty"`

	CustomerPermission CustomerPermission `json:"customer_permission,omitempty"`

	// Subscription or item that granted the customer permission.
	GrantedBy []GrantedBy `json:"granted_by,omitempty"`

	// Time object was created.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Time the object was last updated
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Entitlement) GetResponse

func (resource *Entitlement) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type EntitlementList

type EntitlementList struct {
	// contains filtered or unexported fields
}

EntitlementList allows you to paginate Entitlement objects

func NewEntitlementList

func NewEntitlementList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *EntitlementList

func (*EntitlementList) Count

func (list *EntitlementList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*EntitlementList) CountWithContext

func (list *EntitlementList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*EntitlementList) Data

func (list *EntitlementList) Data() []Entitlement

func (*EntitlementList) Fetch

func (list *EntitlementList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*EntitlementList) FetchWithContext

func (list *EntitlementList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*EntitlementList) HasMore

func (list *EntitlementList) HasMore() bool

func (*EntitlementList) Next

func (list *EntitlementList) Next() string

type EntitlementLister

type EntitlementLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Entitlement
	HasMore() bool
	Next() string
}

type Entitlements

type Entitlements struct {

	// Object Type
	Object string `json:"object,omitempty"`

	// Indicates there are more results on subsequent pages.
	HasMore bool `json:"has_more,omitempty"`

	// Path to subsequent page of results.
	Next string `json:"next,omitempty"`

	Data []Entitlement `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Entitlements) GetResponse

func (resource *Entitlements) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type EntitlementsList

type EntitlementsList struct {
	// contains filtered or unexported fields
}

EntitlementsList allows you to paginate Entitlements objects

func NewEntitlementsList

func NewEntitlementsList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *EntitlementsList

func (*EntitlementsList) Count

func (list *EntitlementsList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*EntitlementsList) CountWithContext

func (list *EntitlementsList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*EntitlementsList) Data

func (list *EntitlementsList) Data() []Entitlements

func (*EntitlementsList) Fetch

func (list *EntitlementsList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*EntitlementsList) FetchWithContext

func (list *EntitlementsList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*EntitlementsList) HasMore

func (list *EntitlementsList) HasMore() bool

func (*EntitlementsList) Next

func (list *EntitlementsList) Next() string

type EntitlementsLister

type EntitlementsLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Entitlements
	HasMore() bool
	Next() string
}

type Error

type Error struct {
	Message          string
	Class            ErrorClass
	Type             ErrorType
	Params           []ErrorParam
	TransactionError *TransactionError
	// contains filtered or unexported fields
}

Error contains basic information about the error

func (*Error) Error

func (e *Error) Error() string

func (*Error) GetResponse

func (resource *Error) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this error

type ErrorClass

type ErrorClass string

type ErrorMayHaveTransaction

type ErrorMayHaveTransaction struct {

	// Type
	Type string `json:"type,omitempty"`

	// Message
	Message string `json:"message,omitempty"`

	// Parameter specific errors
	Params []map[string]interface{} `json:"params,omitempty"`

	// This is only included on errors with `type=transaction`.
	TransactionError TransactionError `json:"transaction_error,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorMayHaveTransaction) GetResponse

func (resource *ErrorMayHaveTransaction) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ErrorMayHaveTransactionList

type ErrorMayHaveTransactionList struct {
	// contains filtered or unexported fields
}

ErrorMayHaveTransactionList allows you to paginate ErrorMayHaveTransaction objects

func NewErrorMayHaveTransactionList

func NewErrorMayHaveTransactionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ErrorMayHaveTransactionList

func (*ErrorMayHaveTransactionList) Count

func (list *ErrorMayHaveTransactionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ErrorMayHaveTransactionList) CountWithContext

func (list *ErrorMayHaveTransactionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ErrorMayHaveTransactionList) Data

func (*ErrorMayHaveTransactionList) Fetch

func (list *ErrorMayHaveTransactionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ErrorMayHaveTransactionList) FetchWithContext

func (list *ErrorMayHaveTransactionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ErrorMayHaveTransactionList) HasMore

func (list *ErrorMayHaveTransactionList) HasMore() bool

func (*ErrorMayHaveTransactionList) Next

func (list *ErrorMayHaveTransactionList) Next() string

type ErrorMayHaveTransactionLister

type ErrorMayHaveTransactionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ErrorMayHaveTransaction
	HasMore() bool
	Next() string
}

type ErrorParam

type ErrorParam struct {
	Property string `json:"param"`
	Message  string `json:"message"`
}

type ErrorType

type ErrorType string

func ErrorFromStatusCode

func ErrorFromStatusCode(res *http.Response) ErrorType

type ExportDates

type ExportDates struct {

	// Object type
	Object string `json:"object,omitempty"`

	// An array of dates that have available exports.
	Dates []string `json:"dates,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportDates) GetResponse

func (resource *ExportDates) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExportDatesList

type ExportDatesList struct {
	// contains filtered or unexported fields
}

ExportDatesList allows you to paginate ExportDates objects

func NewExportDatesList

func NewExportDatesList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExportDatesList

func (*ExportDatesList) Count

func (list *ExportDatesList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExportDatesList) CountWithContext

func (list *ExportDatesList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExportDatesList) Data

func (list *ExportDatesList) Data() []ExportDates

func (*ExportDatesList) Fetch

func (list *ExportDatesList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExportDatesList) FetchWithContext

func (list *ExportDatesList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExportDatesList) HasMore

func (list *ExportDatesList) HasMore() bool

func (*ExportDatesList) Next

func (list *ExportDatesList) Next() string

type ExportDatesLister

type ExportDatesLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExportDates
	HasMore() bool
	Next() string
}

type ExportFile

type ExportFile struct {

	// Name of the export file.
	Name string `json:"name,omitempty"`

	// MD5 hash of the export file.
	Md5sum string `json:"md5sum,omitempty"`

	// A presigned link to download the export file.
	Href string `json:"href,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportFile) GetResponse

func (resource *ExportFile) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExportFileList

type ExportFileList struct {
	// contains filtered or unexported fields
}

ExportFileList allows you to paginate ExportFile objects

func NewExportFileList

func NewExportFileList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExportFileList

func (*ExportFileList) Count

func (list *ExportFileList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExportFileList) CountWithContext

func (list *ExportFileList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExportFileList) Data

func (list *ExportFileList) Data() []ExportFile

func (*ExportFileList) Fetch

func (list *ExportFileList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExportFileList) FetchWithContext

func (list *ExportFileList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExportFileList) HasMore

func (list *ExportFileList) HasMore() bool

func (*ExportFileList) Next

func (list *ExportFileList) Next() string

type ExportFileLister

type ExportFileLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExportFile
	HasMore() bool
	Next() string
}

type ExportFiles

type ExportFiles struct {

	// Object type
	Object string `json:"object,omitempty"`

	Files []ExportFile `json:"files,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportFiles) GetResponse

func (resource *ExportFiles) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExportFilesList

type ExportFilesList struct {
	// contains filtered or unexported fields
}

ExportFilesList allows you to paginate ExportFiles objects

func NewExportFilesList

func NewExportFilesList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExportFilesList

func (*ExportFilesList) Count

func (list *ExportFilesList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExportFilesList) CountWithContext

func (list *ExportFilesList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExportFilesList) Data

func (list *ExportFilesList) Data() []ExportFiles

func (*ExportFilesList) Fetch

func (list *ExportFilesList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExportFilesList) FetchWithContext

func (list *ExportFilesList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExportFilesList) HasMore

func (list *ExportFilesList) HasMore() bool

func (*ExportFilesList) Next

func (list *ExportFilesList) Next() string

type ExportFilesLister

type ExportFilesLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExportFiles
	HasMore() bool
	Next() string
}

type ExternalAccount

type ExternalAccount struct {
	Object string `json:"object,omitempty"`

	// UUID of the external_account .
	Id string `json:"id,omitempty"`

	// Represents the account code for the external account.
	ExternalAccountCode string `json:"external_account_code,omitempty"`

	// Represents the connection type. `AppleAppStore` or `GooglePlayStore`
	ExternalConnectionType string `json:"external_connection_type,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalAccount) GetResponse

func (resource *ExternalAccount) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalAccountCreate

type ExternalAccountCreate struct {

	// Represents the account code for the external account.
	ExternalAccountCode *string `json:"external_account_code,omitempty"`

	// Represents the connection type. `AppleAppStore` or `GooglePlayStore`
	ExternalConnectionType *string `json:"external_connection_type,omitempty"`
}

type ExternalAccountList

type ExternalAccountList struct {
	// contains filtered or unexported fields
}

ExternalAccountList allows you to paginate ExternalAccount objects

func NewExternalAccountList

func NewExternalAccountList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalAccountList

func (*ExternalAccountList) Count

func (list *ExternalAccountList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalAccountList) CountWithContext

func (list *ExternalAccountList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalAccountList) Data

func (list *ExternalAccountList) Data() []ExternalAccount

func (*ExternalAccountList) Fetch

func (list *ExternalAccountList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExternalAccountList) FetchWithContext

func (list *ExternalAccountList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalAccountList) HasMore

func (list *ExternalAccountList) HasMore() bool

func (*ExternalAccountList) Next

func (list *ExternalAccountList) Next() string

type ExternalAccountLister

type ExternalAccountLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalAccount
	HasMore() bool
	Next() string
}

type ExternalAccountUpdate

type ExternalAccountUpdate struct {

	// Represents the account code for the external account.
	ExternalAccountCode *string `json:"external_account_code,omitempty"`

	// Represents the connection type. `AppleAppStore` or `GooglePlayStore`
	ExternalConnectionType *string `json:"external_connection_type,omitempty"`
}

type ExternalCharge

type ExternalCharge struct {

	// System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`.
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Unit Amount
	UnitAmount string `json:"unit_amount,omitempty"`

	Quantity int `json:"quantity,omitempty"`

	Description string `json:"description,omitempty"`

	// External Product Reference details
	ExternalProductReference ExternalProductReferenceMini `json:"external_product_reference,omitempty"`

	// When the external charge was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the external charge was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalCharge) GetResponse

func (resource *ExternalCharge) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalChargeList

type ExternalChargeList struct {
	// contains filtered or unexported fields
}

ExternalChargeList allows you to paginate ExternalCharge objects

func NewExternalChargeList

func NewExternalChargeList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalChargeList

func (*ExternalChargeList) Count

func (list *ExternalChargeList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalChargeList) CountWithContext

func (list *ExternalChargeList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalChargeList) Data

func (list *ExternalChargeList) Data() []ExternalCharge

func (*ExternalChargeList) Fetch

func (list *ExternalChargeList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExternalChargeList) FetchWithContext

func (list *ExternalChargeList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalChargeList) HasMore

func (list *ExternalChargeList) HasMore() bool

func (*ExternalChargeList) Next

func (list *ExternalChargeList) Next() string

type ExternalChargeLister

type ExternalChargeLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalCharge
	HasMore() bool
	Next() string
}

type ExternalInvoice

type ExternalInvoice struct {

	// System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`.
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// Subscription from an external resource such as Apple App Store or Google Play Store.
	ExternalSubscription ExternalSubscription `json:"external_subscription,omitempty"`

	// An identifier which associates the external invoice to a corresponding object in an external platform.
	ExternalId string `json:"external_id,omitempty"`

	State string `json:"state,omitempty"`

	// Total
	Total string `json:"total,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	LineItems []ExternalCharge `json:"line_items,omitempty"`

	// When the invoice was created in the external platform.
	PurchasedAt time.Time `json:"purchased_at,omitempty"`

	// When the external invoice was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the external invoice was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalInvoice) GetResponse

func (resource *ExternalInvoice) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalInvoiceList

type ExternalInvoiceList struct {
	// contains filtered or unexported fields
}

ExternalInvoiceList allows you to paginate ExternalInvoice objects

func NewExternalInvoiceList

func NewExternalInvoiceList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalInvoiceList

func (*ExternalInvoiceList) Count

func (list *ExternalInvoiceList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalInvoiceList) CountWithContext

func (list *ExternalInvoiceList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalInvoiceList) Data

func (list *ExternalInvoiceList) Data() []ExternalInvoice

func (*ExternalInvoiceList) Fetch

func (list *ExternalInvoiceList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExternalInvoiceList) FetchWithContext

func (list *ExternalInvoiceList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalInvoiceList) HasMore

func (list *ExternalInvoiceList) HasMore() bool

func (*ExternalInvoiceList) Next

func (list *ExternalInvoiceList) Next() string

type ExternalInvoiceLister

type ExternalInvoiceLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalInvoice
	HasMore() bool
	Next() string
}

type ExternalPaymentPhase

type ExternalPaymentPhase struct {

	// System-generated unique identifier for an external payment phase ID, e.g. `e28zov4fw0v2`.
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Started At
	StartedAt time.Time `json:"started_at,omitempty"`

	// Ends At
	EndsAt time.Time `json:"ends_at,omitempty"`

	// Starting Billing Period Index
	StartingBillingPeriodIndex int `json:"starting_billing_period_index,omitempty"`

	// Ending Billing Period Index
	EndingBillingPeriodIndex int `json:"ending_billing_period_index,omitempty"`

	// Type of discount offer given, e.g. "FREE_TRIAL"
	OfferType string `json:"offer_type,omitempty"`

	// Name of the discount offer given, e.g. "introductory"
	OfferName string `json:"offer_name,omitempty"`

	// Number of billing periods
	PeriodCount int `json:"period_count,omitempty"`

	// Billing cycle length
	PeriodLength string `json:"period_length,omitempty"`

	// Allows up to 9 decimal places
	Amount string `json:"amount,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// When the external subscription was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the external subscription was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalPaymentPhase) GetResponse

func (resource *ExternalPaymentPhase) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalPaymentPhaseList

type ExternalPaymentPhaseList struct {
	// contains filtered or unexported fields
}

ExternalPaymentPhaseList allows you to paginate ExternalPaymentPhase objects

func NewExternalPaymentPhaseList

func NewExternalPaymentPhaseList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalPaymentPhaseList

func (*ExternalPaymentPhaseList) Count

func (list *ExternalPaymentPhaseList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalPaymentPhaseList) CountWithContext

func (list *ExternalPaymentPhaseList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalPaymentPhaseList) Data

func (*ExternalPaymentPhaseList) Fetch

func (list *ExternalPaymentPhaseList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExternalPaymentPhaseList) FetchWithContext

func (list *ExternalPaymentPhaseList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalPaymentPhaseList) HasMore

func (list *ExternalPaymentPhaseList) HasMore() bool

func (*ExternalPaymentPhaseList) Next

func (list *ExternalPaymentPhaseList) Next() string

type ExternalPaymentPhaseLister

type ExternalPaymentPhaseLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalPaymentPhase
	HasMore() bool
	Next() string
}

type ExternalProduct

type ExternalProduct struct {

	// System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`.
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Name to identify the external product in Recurly.
	Name string `json:"name,omitempty"`

	// Just the important parts.
	Plan PlanMini `json:"plan,omitempty"`

	// When the external product was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the external product was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// List of external product references of the external product.
	ExternalProductReferences []ExternalProductReferenceMini `json:"external_product_references,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalProduct) GetResponse

func (resource *ExternalProduct) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalProductCreate

type ExternalProductCreate struct {

	// External product name.
	Name *string `json:"name,omitempty"`

	// Recurly plan UUID.
	PlanId *string `json:"plan_id,omitempty"`

	// List of external product references of the external product.
	ExternalProductReferences []ExternalProductReferenceBase `json:"external_product_references,omitempty"`
}

type ExternalProductList

type ExternalProductList struct {
	// contains filtered or unexported fields
}

ExternalProductList allows you to paginate ExternalProduct objects

func NewExternalProductList

func NewExternalProductList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalProductList

func (*ExternalProductList) Count

func (list *ExternalProductList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalProductList) CountWithContext

func (list *ExternalProductList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalProductList) Data

func (list *ExternalProductList) Data() []ExternalProduct

func (*ExternalProductList) Fetch

func (list *ExternalProductList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExternalProductList) FetchWithContext

func (list *ExternalProductList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalProductList) HasMore

func (list *ExternalProductList) HasMore() bool

func (*ExternalProductList) Next

func (list *ExternalProductList) Next() string

type ExternalProductLister

type ExternalProductLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalProduct
	HasMore() bool
	Next() string
}

type ExternalProductReferenceBase

type ExternalProductReferenceBase struct {

	// A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
	ReferenceCode *string `json:"reference_code,omitempty"`

	ExternalConnectionType *string `json:"external_connection_type,omitempty"`
}

type ExternalProductReferenceCollection

type ExternalProductReferenceCollection struct {

	// Will always be List.
	Object string `json:"object,omitempty"`

	// Indicates there are more results on subsequent pages.
	HasMore bool `json:"has_more,omitempty"`

	// Path to subsequent page of results.
	Next string `json:"next,omitempty"`

	Data []ExternalProductReferenceMini `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalProductReferenceCollection) GetResponse

func (resource *ExternalProductReferenceCollection) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalProductReferenceCollectionList

type ExternalProductReferenceCollectionList struct {
	// contains filtered or unexported fields
}

ExternalProductReferenceCollectionList allows you to paginate ExternalProductReferenceCollection objects

func NewExternalProductReferenceCollectionList

func NewExternalProductReferenceCollectionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalProductReferenceCollectionList

func (*ExternalProductReferenceCollectionList) Count

Count returns the count of items on the server that match this pager

func (*ExternalProductReferenceCollectionList) CountWithContext

func (list *ExternalProductReferenceCollectionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalProductReferenceCollectionList) Data

func (*ExternalProductReferenceCollectionList) Fetch

Fetch fetches the next page of data into the `Data` property

func (*ExternalProductReferenceCollectionList) FetchWithContext

func (list *ExternalProductReferenceCollectionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalProductReferenceCollectionList) HasMore

func (*ExternalProductReferenceCollectionList) Next

type ExternalProductReferenceCollectionLister

type ExternalProductReferenceCollectionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalProductReferenceCollection
	HasMore() bool
	Next() string
}

type ExternalProductReferenceCreate

type ExternalProductReferenceCreate struct {

	// A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
	ReferenceCode *string `json:"reference_code,omitempty"`

	ExternalConnectionType *string `json:"external_connection_type,omitempty"`
}

type ExternalProductReferenceMini

type ExternalProductReferenceMini struct {

	// System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`.
	Id string `json:"id,omitempty"`

	// object
	Object string `json:"object,omitempty"`

	// A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
	ReferenceCode string `json:"reference_code,omitempty"`

	// Source connection platform.
	ExternalConnectionType string `json:"external_connection_type,omitempty"`

	// When the external product was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the external product was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalProductReferenceMini) GetResponse

func (resource *ExternalProductReferenceMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalProductReferenceMiniList

type ExternalProductReferenceMiniList struct {
	// contains filtered or unexported fields
}

ExternalProductReferenceMiniList allows you to paginate ExternalProductReferenceMini objects

func NewExternalProductReferenceMiniList

func NewExternalProductReferenceMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalProductReferenceMiniList

func (*ExternalProductReferenceMiniList) Count

func (list *ExternalProductReferenceMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalProductReferenceMiniList) CountWithContext

func (list *ExternalProductReferenceMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalProductReferenceMiniList) Data

func (*ExternalProductReferenceMiniList) Fetch

Fetch fetches the next page of data into the `Data` property

func (*ExternalProductReferenceMiniList) FetchWithContext

func (list *ExternalProductReferenceMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalProductReferenceMiniList) HasMore

func (list *ExternalProductReferenceMiniList) HasMore() bool

func (*ExternalProductReferenceMiniList) Next

type ExternalProductReferenceMiniLister

type ExternalProductReferenceMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalProductReferenceMini
	HasMore() bool
	Next() string
}

type ExternalProductUpdate

type ExternalProductUpdate struct {

	// Recurly plan UUID.
	PlanId *string `json:"plan_id,omitempty"`
}

type ExternalRefund

type ExternalRefund struct {

	// Payment method used for external refund transaction.
	PaymentMethod *string `json:"payment_method,omitempty"`

	// Used as the refund transactions' description.
	Description *string `json:"description,omitempty"`

	// Date the external refund payment was made. Defaults to the current date-time.
	RefundedAt *time.Time `json:"refunded_at,omitempty"`
}

type ExternalSubscription

type ExternalSubscription struct {

	// System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`.
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// External Product Reference details
	ExternalProductReference ExternalProductReferenceMini `json:"external_product_reference,omitempty"`

	// The phases of the external subscription payment lifecycle.
	ExternalPaymentPhases []ExternalPaymentPhase `json:"external_payment_phases,omitempty"`

	// The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store.
	ExternalId string `json:"external_id,omitempty"`

	// Universally Unique Identifier created automatically.
	Uuid string `json:"uuid,omitempty"`

	// When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade.
	LastPurchased time.Time `json:"last_purchased,omitempty"`

	// An indication of whether or not the external subscription will auto-renew at the expiration date.
	AutoRenew bool `json:"auto_renew,omitempty"`

	// An indication of whether or not the external subscription is in a grace period.
	InGracePeriod bool `json:"in_grace_period,omitempty"`

	// Identifier of the app that generated the external subscription.
	AppIdentifier string `json:"app_identifier,omitempty"`

	// An indication of the quantity of a subscribed item's quantity.
	Quantity int `json:"quantity,omitempty"`

	// External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused.
	State string `json:"state,omitempty"`

	// When the external subscription was activated in the external platform.
	ActivatedAt time.Time `json:"activated_at,omitempty"`

	// When the external subscription was canceled in the external platform.
	CanceledAt time.Time `json:"canceled_at,omitempty"`

	// When the external subscription expires in the external platform.
	ExpiresAt time.Time `json:"expires_at,omitempty"`

	// When the external subscription trial period started in the external platform.
	TrialStartedAt time.Time `json:"trial_started_at,omitempty"`

	// When the external subscription trial period ends in the external platform.
	TrialEndsAt time.Time `json:"trial_ends_at,omitempty"`

	// An indication of whether or not the external subscription was purchased in a sandbox environment.
	Test bool `json:"test,omitempty"`

	// An indication of whether or not the external subscription was created by a historical data import.
	Imported bool `json:"imported,omitempty"`

	// When the external subscription was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the external subscription was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalSubscription) GetResponse

func (resource *ExternalSubscription) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ExternalSubscriptionList

type ExternalSubscriptionList struct {
	// contains filtered or unexported fields
}

ExternalSubscriptionList allows you to paginate ExternalSubscription objects

func NewExternalSubscriptionList

func NewExternalSubscriptionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ExternalSubscriptionList

func (*ExternalSubscriptionList) Count

func (list *ExternalSubscriptionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalSubscriptionList) CountWithContext

func (list *ExternalSubscriptionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ExternalSubscriptionList) Data

func (*ExternalSubscriptionList) Fetch

func (list *ExternalSubscriptionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ExternalSubscriptionList) FetchWithContext

func (list *ExternalSubscriptionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ExternalSubscriptionList) HasMore

func (list *ExternalSubscriptionList) HasMore() bool

func (*ExternalSubscriptionList) Next

func (list *ExternalSubscriptionList) Next() string

type ExternalSubscriptionLister

type ExternalSubscriptionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ExternalSubscription
	HasMore() bool
	Next() string
}

type ExternalTransaction

type ExternalTransaction struct {

	// Payment method used for external transaction.
	PaymentMethod *string `json:"payment_method,omitempty"`

	// Used as the transaction's description.
	Description *string `json:"description,omitempty"`

	// The total amount of the transcaction. Cannot excceed the invoice total.
	Amount *float64 `json:"amount,omitempty"`

	// Datetime that the external payment was collected. Defaults to current datetime.
	CollectedAt *time.Time `json:"collected_at,omitempty"`
}

type FraudInfo

type FraudInfo struct {

	// Kount score
	Score int `json:"score,omitempty"`

	// Kount decision
	Decision string `json:"decision,omitempty"`

	// Kount rules
	RiskRulesTriggered map[string]interface{} `json:"risk_rules_triggered,omitempty"`
	// contains filtered or unexported fields
}

func (*FraudInfo) GetResponse

func (resource *FraudInfo) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type FraudInfoList

type FraudInfoList struct {
	// contains filtered or unexported fields
}

FraudInfoList allows you to paginate FraudInfo objects

func NewFraudInfoList

func NewFraudInfoList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *FraudInfoList

func (*FraudInfoList) Count

func (list *FraudInfoList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*FraudInfoList) CountWithContext

func (list *FraudInfoList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*FraudInfoList) Data

func (list *FraudInfoList) Data() []FraudInfo

func (*FraudInfoList) Fetch

func (list *FraudInfoList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*FraudInfoList) FetchWithContext

func (list *FraudInfoList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*FraudInfoList) HasMore

func (list *FraudInfoList) HasMore() bool

func (*FraudInfoList) Next

func (list *FraudInfoList) Next() string

type FraudInfoLister

type FraudInfoLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []FraudInfo
	HasMore() bool
	Next() string
}

type FraudRiskRule

type FraudRiskRule struct {

	// The Kount rule number.
	Code string `json:"code,omitempty"`

	// Description of why the rule was triggered
	Message string `json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*FraudRiskRule) GetResponse

func (resource *FraudRiskRule) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type FraudRiskRuleList

type FraudRiskRuleList struct {
	// contains filtered or unexported fields
}

FraudRiskRuleList allows you to paginate FraudRiskRule objects

func NewFraudRiskRuleList

func NewFraudRiskRuleList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *FraudRiskRuleList

func (*FraudRiskRuleList) Count

func (list *FraudRiskRuleList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*FraudRiskRuleList) CountWithContext

func (list *FraudRiskRuleList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*FraudRiskRuleList) Data

func (list *FraudRiskRuleList) Data() []FraudRiskRule

func (*FraudRiskRuleList) Fetch

func (list *FraudRiskRuleList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*FraudRiskRuleList) FetchWithContext

func (list *FraudRiskRuleList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*FraudRiskRuleList) HasMore

func (list *FraudRiskRuleList) HasMore() bool

func (*FraudRiskRuleList) Next

func (list *FraudRiskRuleList) Next() string

type FraudRiskRuleLister

type FraudRiskRuleLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []FraudRiskRule
	HasMore() bool
	Next() string
}

type GatewayAttributes

type GatewayAttributes struct {

	// Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response.
	AccountReference string `json:"account_reference,omitempty"`
	// contains filtered or unexported fields
}

func (*GatewayAttributes) GetResponse

func (resource *GatewayAttributes) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type GatewayAttributesCreate

type GatewayAttributesCreate struct {

	// Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code. For Braintree the PayPal PayerID is populated in the response.
	AccountReference *string `json:"account_reference,omitempty"`
}

type GatewayAttributesList

type GatewayAttributesList struct {
	// contains filtered or unexported fields
}

GatewayAttributesList allows you to paginate GatewayAttributes objects

func NewGatewayAttributesList

func NewGatewayAttributesList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *GatewayAttributesList

func (*GatewayAttributesList) Count

func (list *GatewayAttributesList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*GatewayAttributesList) CountWithContext

func (list *GatewayAttributesList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*GatewayAttributesList) Data

func (*GatewayAttributesList) Fetch

func (list *GatewayAttributesList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*GatewayAttributesList) FetchWithContext

func (list *GatewayAttributesList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*GatewayAttributesList) HasMore

func (list *GatewayAttributesList) HasMore() bool

func (*GatewayAttributesList) Next

func (list *GatewayAttributesList) Next() string

type GatewayAttributesLister

type GatewayAttributesLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []GatewayAttributes
	HasMore() bool
	Next() string
}

type GeneralLedgerAccount

type GeneralLedgerAccount struct {

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Unique code to identify the ledger account. Each code must start
	// with a letter or number. The following special characters are
	// allowed: `-_.,:`
	Code string `json:"code,omitempty"`

	// Optional description.
	Description string `json:"description,omitempty"`

	AccountType string `json:"account_type,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*GeneralLedgerAccount) GetResponse

func (resource *GeneralLedgerAccount) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type GeneralLedgerAccountCreate

type GeneralLedgerAccountCreate struct {

	// Unique code to identify the ledger account. Each code must start
	// with a letter or number. The following special characters are
	// allowed: `-_.,:`
	Code *string `json:"code,omitempty"`

	// Optional description.
	Description *string `json:"description,omitempty"`

	AccountType *string `json:"account_type,omitempty"`
}

type GeneralLedgerAccountList

type GeneralLedgerAccountList struct {
	// contains filtered or unexported fields
}

GeneralLedgerAccountList allows you to paginate GeneralLedgerAccount objects

func NewGeneralLedgerAccountList

func NewGeneralLedgerAccountList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *GeneralLedgerAccountList

func (*GeneralLedgerAccountList) Count

func (list *GeneralLedgerAccountList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*GeneralLedgerAccountList) CountWithContext

func (list *GeneralLedgerAccountList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*GeneralLedgerAccountList) Data

func (*GeneralLedgerAccountList) Fetch

func (list *GeneralLedgerAccountList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*GeneralLedgerAccountList) FetchWithContext

func (list *GeneralLedgerAccountList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*GeneralLedgerAccountList) HasMore

func (list *GeneralLedgerAccountList) HasMore() bool

func (*GeneralLedgerAccountList) Next

func (list *GeneralLedgerAccountList) Next() string

type GeneralLedgerAccountLister

type GeneralLedgerAccountLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []GeneralLedgerAccount
	HasMore() bool
	Next() string
}

type GeneralLedgerAccountUpdate

type GeneralLedgerAccountUpdate struct {

	// Unique code to identify the ledger account. Each code must start
	// with a letter or number. The following special characters are
	// allowed: `-_.,:`
	Code *string `json:"code,omitempty"`

	// Optional description.
	Description *string `json:"description,omitempty"`
}

type GiftCard

type GiftCard struct {

	// Gift card ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The ID of the account that purchased the gift card.
	GifterAccountId string `json:"gifter_account_id,omitempty"`

	// The ID of the account that redeemed the gift card redemption code.  Does not have a value until gift card is redeemed.
	RecipientAccountId string `json:"recipient_account_id,omitempty"`

	// The ID of the invoice for the gift card purchase made by the gifter.
	PurchaseInvoiceId string `json:"purchase_invoice_id,omitempty"`

	// The ID of the invoice for the gift card redemption made by the recipient.  Does not have a value until gift card is redeemed.
	RedemptionInvoiceId string `json:"redemption_invoice_id,omitempty"`

	// The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account.
	RedemptionCode string `json:"redemption_code,omitempty"`

	// The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers.
	Balance float64 `json:"balance,omitempty"`

	// The product code or SKU of the gift card product.
	ProductCode string `json:"product_code,omitempty"`

	// The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption.
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// The delivery details for the gift card.
	Delivery GiftCardDelivery `json:"delivery,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId string `json:"performance_obligation_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId string `json:"revenue_gl_account_id,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled.
	DeliveredAt time.Time `json:"delivered_at,omitempty"`

	// When the gift card was redeemed by the recipient.
	RedeemedAt time.Time `json:"redeemed_at,omitempty"`

	// When the gift card was canceled.
	CanceledAt time.Time `json:"canceled_at,omitempty"`
	// contains filtered or unexported fields
}

func (*GiftCard) GetResponse

func (resource *GiftCard) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type GiftCardCreate

type GiftCardCreate struct {

	// The product code or SKU of the gift card product.
	ProductCode *string `json:"product_code,omitempty"`

	// The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// The delivery details for the gift card.
	Delivery *GiftCardDeliveryCreate `json:"delivery,omitempty"`

	// Block of account details for the gifter. This references an existing account_code.
	GifterAccount *AccountPurchase `json:"gifter_account,omitempty"`
}

type GiftCardDelivery

type GiftCardDelivery struct {

	// Whether the delivery method is email or postal service.
	Method string `json:"method,omitempty"`

	// The email address of the recipient.
	EmailAddress string `json:"email_address,omitempty"`

	// When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch.
	DeliverAt time.Time `json:"deliver_at,omitempty"`

	// The first name of the recipient.
	FirstName string `json:"first_name,omitempty"`

	// The last name of the recipient.
	LastName string `json:"last_name,omitempty"`

	// Address information for the recipient.
	RecipientAddress Address `json:"recipient_address,omitempty"`

	// The name of the gifter for the purpose of a message displayed to the recipient.
	GifterName string `json:"gifter_name,omitempty"`

	// The personal message from the gifter to the recipient.
	PersonalMessage string `json:"personal_message,omitempty"`
	// contains filtered or unexported fields
}

func (*GiftCardDelivery) GetResponse

func (resource *GiftCardDelivery) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type GiftCardDeliveryCreate

type GiftCardDeliveryCreate struct {

	// Whether the delivery method is email or postal service.
	Method *string `json:"method,omitempty"`

	// The email address of the recipient. Required if `method` is `email`.
	EmailAddress *string `json:"email_address,omitempty"`

	// When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch.
	DeliverAt *time.Time `json:"deliver_at,omitempty"`

	// The first name of the recipient.
	FirstName *string `json:"first_name,omitempty"`

	// The last name of the recipient.
	LastName *string `json:"last_name,omitempty"`

	// Address information for the recipient. Required if `method` is `post`.
	RecipientAddress *AddressCreate `json:"recipient_address,omitempty"`

	// The name of the gifter for the purpose of a message displayed to the recipient.
	GifterName *string `json:"gifter_name,omitempty"`

	// The personal message from the gifter to the recipient.
	PersonalMessage *string `json:"personal_message,omitempty"`
}

type GiftCardDeliveryList

type GiftCardDeliveryList struct {
	// contains filtered or unexported fields
}

GiftCardDeliveryList allows you to paginate GiftCardDelivery objects

func NewGiftCardDeliveryList

func NewGiftCardDeliveryList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *GiftCardDeliveryList

func (*GiftCardDeliveryList) Count

func (list *GiftCardDeliveryList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*GiftCardDeliveryList) CountWithContext

func (list *GiftCardDeliveryList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*GiftCardDeliveryList) Data

func (list *GiftCardDeliveryList) Data() []GiftCardDelivery

func (*GiftCardDeliveryList) Fetch

func (list *GiftCardDeliveryList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*GiftCardDeliveryList) FetchWithContext

func (list *GiftCardDeliveryList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*GiftCardDeliveryList) HasMore

func (list *GiftCardDeliveryList) HasMore() bool

func (*GiftCardDeliveryList) Next

func (list *GiftCardDeliveryList) Next() string

type GiftCardDeliveryLister

type GiftCardDeliveryLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []GiftCardDelivery
	HasMore() bool
	Next() string
}

type GiftCardList

type GiftCardList struct {
	// contains filtered or unexported fields
}

GiftCardList allows you to paginate GiftCard objects

func NewGiftCardList

func NewGiftCardList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *GiftCardList

func (*GiftCardList) Count

func (list *GiftCardList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*GiftCardList) CountWithContext

func (list *GiftCardList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*GiftCardList) Data

func (list *GiftCardList) Data() []GiftCard

func (*GiftCardList) Fetch

func (list *GiftCardList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*GiftCardList) FetchWithContext

func (list *GiftCardList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*GiftCardList) HasMore

func (list *GiftCardList) HasMore() bool

func (*GiftCardList) Next

func (list *GiftCardList) Next() string

type GiftCardLister

type GiftCardLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []GiftCard
	HasMore() bool
	Next() string
}

type GiftCardRedeem

type GiftCardRedeem struct {

	// The account for the recipient of the gift card.
	RecipientAccount *AccountReference `json:"recipient_account,omitempty"`
}

type GrantedBy

type GrantedBy struct {

	// Object Type
	Object string `json:"object,omitempty"`

	// The ID of the subscription or external subscription that grants the permission to the account.
	Id string `json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GrantedBy) GetResponse

func (resource *GrantedBy) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type GrantedByList

type GrantedByList struct {
	// contains filtered or unexported fields
}

GrantedByList allows you to paginate GrantedBy objects

func NewGrantedByList

func NewGrantedByList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *GrantedByList

func (*GrantedByList) Count

func (list *GrantedByList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*GrantedByList) CountWithContext

func (list *GrantedByList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*GrantedByList) Data

func (list *GrantedByList) Data() []GrantedBy

func (*GrantedByList) Fetch

func (list *GrantedByList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*GrantedByList) FetchWithContext

func (list *GrantedByList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*GrantedByList) HasMore

func (list *GrantedByList) HasMore() bool

func (*GrantedByList) Next

func (list *GrantedByList) Next() string

type GrantedByLister

type GrantedByLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []GrantedBy
	HasMore() bool
	Next() string
}

type HTTPCaller

type HTTPCaller interface {
	Call(ctx context.Context, method string, path string, body interface{}, queryParams QueryParams, requestOptions OptionsApplier, v interface{}) error
}

HTTPCaller is the generic http interface used by the Client

type Invoice

type Invoice struct {

	// Invoice ID
	Id string `json:"id,omitempty"`

	// Invoice UUID
	Uuid string `json:"uuid,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Invoices are either charge, credit, or legacy invoices.
	Type string `json:"type,omitempty"`

	// The event that created the invoice.
	Origin string `json:"origin,omitempty"`

	// Invoice state
	State string `json:"state,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
	BillingInfoId string `json:"billing_info_id,omitempty"`

	// If the invoice is charging or refunding for one or more subscriptions, these are their IDs.
	SubscriptionIds []string `json:"subscription_ids,omitempty"`

	// On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice.
	PreviousInvoiceId string `json:"previous_invoice_id,omitempty"`

	// If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
	Number string `json:"number,omitempty"`

	// An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment.
	CollectionMethod string `json:"collection_method,omitempty"`

	// For manual invoicing, this identifies the PO number associated with the subscription.
	PoNumber string `json:"po_number,omitempty"`

	// Integer paired with `Net Terms Type` and representing the number
	// of days past the current date (for `net` Net Terms Type) or days after
	// the last day of the current month (for `eom` Net Terms Type) that the
	// invoice will become past due. For `manual` collection method, an additional 24 hours is
	// added to ensure the customer has the entire last day to make payment before
	// becoming past due. For example:
	// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
	// If an invoice is due `net 30`, it will become past due at 31 days exactly.
	// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
	// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.
	// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
	// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
	// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
	NetTerms int `json:"net_terms,omitempty"`

	// Optionally supplied string that may be either `net` or `eom` (end-of-month).
	// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
	// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
	NetTermsType string `json:"net_terms_type,omitempty"`

	Address InvoiceAddress `json:"address,omitempty"`

	ShippingAddress ShippingAddress `json:"shipping_address,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Total discounts applied to this invoice.
	Discount float64 `json:"discount,omitempty"`

	// The summation of charges and credits, before discounts and taxes.
	Subtotal float64 `json:"subtotal,omitempty"`

	// The total tax on this invoice.
	Tax float64 `json:"tax,omitempty"`

	// The final total on this invoice. The summation of invoice charges, discounts, credits, and tax.
	Total float64 `json:"total,omitempty"`

	// The refundable amount on a charge invoice. It will be null for all other invoices.
	RefundableAmount float64 `json:"refundable_amount,omitempty"`

	// The total amount of successful payments transaction on this invoice.
	Paid float64 `json:"paid,omitempty"`

	// The outstanding balance remaining on this invoice.
	Balance float64 `json:"balance,omitempty"`

	// Only for merchants using Recurly's In-The-Box taxes.
	TaxInfo TaxInfo `json:"tax_info,omitempty"`

	// Will be `true` when the invoice had a successful response from the tax service and `false` when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service.
	UsedTaxService bool `json:"used_tax_service,omitempty"`

	// VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method.
	VatNumber string `json:"vat_number,omitempty"`

	// VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription.
	VatReverseChargeNotes string `json:"vat_reverse_charge_notes,omitempty"`

	// This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions.
	TermsAndConditions string `json:"terms_and_conditions,omitempty"`

	// This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.
	CustomerNotes string `json:"customer_notes,omitempty"`

	// Line Items
	LineItems []LineItem `json:"line_items,omitempty"`

	// Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint.
	HasMoreLineItems bool `json:"has_more_line_items,omitempty"`

	// Transactions
	Transactions []Transaction `json:"transactions,omitempty"`

	// Credit payments
	CreditPayments []CreditPayment `json:"credit_payments,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Date invoice is due. This is the date the net terms are reached.
	DueAt time.Time `json:"due_at,omitempty"`

	// Date invoice was marked paid or failed.
	ClosedAt time.Time `json:"closed_at,omitempty"`

	// Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
	DunningCampaignId string `json:"dunning_campaign_id,omitempty"`

	// Number of times the event was sent.
	DunningEventsSent int `json:"dunning_events_sent,omitempty"`

	// Last communication attempt.
	FinalDunningEvent bool `json:"final_dunning_event,omitempty"`

	// Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.
	BusinessEntityId string `json:"business_entity_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Invoice) GetResponse

func (resource *Invoice) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type InvoiceAddress

type InvoiceAddress struct {

	// Name on account
	NameOnAccount string `json:"name_on_account,omitempty"`

	// Company
	Company string `json:"company,omitempty"`

	// Phone number
	Phone string `json:"phone,omitempty"`

	// Street 1
	Street1 string `json:"street1,omitempty"`

	// Street 2
	Street2 string `json:"street2,omitempty"`

	// City
	City string `json:"city,omitempty"`

	// State or province.
	Region string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode string `json:"postal_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country string `json:"country,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode string `json:"geo_code,omitempty"`

	// First name
	FirstName string `json:"first_name,omitempty"`

	// Last name
	LastName string `json:"last_name,omitempty"`
	// contains filtered or unexported fields
}

func (*InvoiceAddress) GetResponse

func (resource *InvoiceAddress) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type InvoiceAddressCreate

type InvoiceAddressCreate struct {

	// Name on account
	NameOnAccount *string `json:"name_on_account,omitempty"`

	// Company
	Company *string `json:"company,omitempty"`

	// Phone number
	Phone *string `json:"phone,omitempty"`

	// Street 1
	Street1 *string `json:"street1,omitempty"`

	// Street 2
	Street2 *string `json:"street2,omitempty"`

	// City
	City *string `json:"city,omitempty"`

	// State or province.
	Region *string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode *string `json:"postal_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country *string `json:"country,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode *string `json:"geo_code,omitempty"`

	// First name
	FirstName *string `json:"first_name,omitempty"`

	// Last name
	LastName *string `json:"last_name,omitempty"`
}

type InvoiceAddressList

type InvoiceAddressList struct {
	// contains filtered or unexported fields
}

InvoiceAddressList allows you to paginate InvoiceAddress objects

func NewInvoiceAddressList

func NewInvoiceAddressList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *InvoiceAddressList

func (*InvoiceAddressList) Count

func (list *InvoiceAddressList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceAddressList) CountWithContext

func (list *InvoiceAddressList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceAddressList) Data

func (list *InvoiceAddressList) Data() []InvoiceAddress

func (*InvoiceAddressList) Fetch

func (list *InvoiceAddressList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceAddressList) FetchWithContext

func (list *InvoiceAddressList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceAddressList) HasMore

func (list *InvoiceAddressList) HasMore() bool

func (*InvoiceAddressList) Next

func (list *InvoiceAddressList) Next() string

type InvoiceAddressLister

type InvoiceAddressLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []InvoiceAddress
	HasMore() bool
	Next() string
}

type InvoiceCollect

type InvoiceCollect struct {

	// A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
	ThreeDSecureActionResultTokenId *string `json:"three_d_secure_action_result_token_id,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`

	// The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
	BillingInfoId *string `json:"billing_info_id,omitempty"`
}

type InvoiceCollection

type InvoiceCollection struct {

	// Object type
	Object string `json:"object,omitempty"`

	ChargeInvoice Invoice `json:"charge_invoice,omitempty"`

	// Credit invoices
	CreditInvoices []Invoice `json:"credit_invoices,omitempty"`
	// contains filtered or unexported fields
}

func (*InvoiceCollection) GetResponse

func (resource *InvoiceCollection) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type InvoiceCollectionList

type InvoiceCollectionList struct {
	// contains filtered or unexported fields
}

InvoiceCollectionList allows you to paginate InvoiceCollection objects

func NewInvoiceCollectionList

func NewInvoiceCollectionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *InvoiceCollectionList

func (*InvoiceCollectionList) Count

func (list *InvoiceCollectionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceCollectionList) CountWithContext

func (list *InvoiceCollectionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceCollectionList) Data

func (*InvoiceCollectionList) Fetch

func (list *InvoiceCollectionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceCollectionList) FetchWithContext

func (list *InvoiceCollectionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceCollectionList) HasMore

func (list *InvoiceCollectionList) HasMore() bool

func (*InvoiceCollectionList) Next

func (list *InvoiceCollectionList) Next() string

type InvoiceCollectionLister

type InvoiceCollectionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []InvoiceCollection
	HasMore() bool
	Next() string
}

type InvoiceCreate

type InvoiceCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment.
	CollectionMethod *string `json:"collection_method,omitempty"`

	// This will default to the Customer Notes text specified on the Invoice Settings for charge invoices. Specify custom notes to add or override Customer Notes on charge invoices.
	ChargeCustomerNotes *string `json:"charge_customer_notes,omitempty"`

	// This will default to the Customer Notes text specified on the Invoice Settings for credit invoices. Specify customer notes to add or override Customer Notes on credit invoices.
	CreditCustomerNotes *string `json:"credit_customer_notes,omitempty"`

	// Integer paired with `Net Terms Type` and representing the number
	// of days past the current date (for `net` Net Terms Type) or days after
	// the last day of the current month (for `eom` Net Terms Type) that the
	// invoice will become past due. For `manual` collection method, an additional 24 hours is
	// added to ensure the customer has the entire last day to make payment before
	// becoming past due. For example:
	// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
	// If an invoice is due `net 30`, it will become past due at 31 days exactly.
	// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
	// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.
	// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
	// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
	// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
	NetTerms *int `json:"net_terms,omitempty"`

	// Optionally supplied string that may be either `net` or `eom` (end-of-month).
	// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
	// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
	NetTermsType *string `json:"net_terms_type,omitempty"`

	// For manual invoicing, this identifies the PO number associated with the subscription.
	PoNumber *string `json:"po_number,omitempty"`

	// This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions.
	TermsAndConditions *string `json:"terms_and_conditions,omitempty"`

	// VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription.
	VatReverseChargeNotes *string `json:"vat_reverse_charge_notes,omitempty"`
}

type InvoiceList

type InvoiceList struct {
	// contains filtered or unexported fields
}

InvoiceList allows you to paginate Invoice objects

func NewInvoiceList

func NewInvoiceList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *InvoiceList

func (*InvoiceList) Count

func (list *InvoiceList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceList) CountWithContext

func (list *InvoiceList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceList) Data

func (list *InvoiceList) Data() []Invoice

func (*InvoiceList) Fetch

func (list *InvoiceList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceList) FetchWithContext

func (list *InvoiceList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceList) HasMore

func (list *InvoiceList) HasMore() bool

func (*InvoiceList) Next

func (list *InvoiceList) Next() string

type InvoiceLister

type InvoiceLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Invoice
	HasMore() bool
	Next() string
}

type InvoiceMini

type InvoiceMini struct {

	// Invoice ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Invoice number
	Number string `json:"number,omitempty"`

	// Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.
	BusinessEntityId string `json:"business_entity_id,omitempty"`

	// Invoice type
	Type string `json:"type,omitempty"`

	// Invoice state
	State string `json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*InvoiceMini) GetResponse

func (resource *InvoiceMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type InvoiceMiniList

type InvoiceMiniList struct {
	// contains filtered or unexported fields
}

InvoiceMiniList allows you to paginate InvoiceMini objects

func NewInvoiceMiniList

func NewInvoiceMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *InvoiceMiniList

func (*InvoiceMiniList) Count

func (list *InvoiceMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceMiniList) CountWithContext

func (list *InvoiceMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceMiniList) Data

func (list *InvoiceMiniList) Data() []InvoiceMini

func (*InvoiceMiniList) Fetch

func (list *InvoiceMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceMiniList) FetchWithContext

func (list *InvoiceMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceMiniList) HasMore

func (list *InvoiceMiniList) HasMore() bool

func (*InvoiceMiniList) Next

func (list *InvoiceMiniList) Next() string

type InvoiceMiniLister

type InvoiceMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []InvoiceMini
	HasMore() bool
	Next() string
}

type InvoiceRefund

type InvoiceRefund struct {

	// The type of refund. Amount and line items cannot both be specified in the request.
	Type *string `json:"type,omitempty"`

	// The amount to be refunded. The amount will be split between the line items.
	// If `type` is "amount" and no amount is specified, it will default to refunding the total refundable amount on the invoice. Can only be present if `type` is "amount".
	Amount *float64 `json:"amount,omitempty"`

	// The percentage of the remaining balance to be refunded. The percentage will be split between the line items. If `type` is "percentage" and no percentage is specified, it will default to refunding 100% of the refundable amount on the invoice. Can only be present if `type` is "percentage".
	Percentage *int `json:"percentage,omitempty"`

	// The line items to be refunded. This is required when `type=line_items`.
	LineItems []LineItemRefund `json:"line_items,omitempty"`

	// Indicates how the invoice should be refunded when both a credit and transaction are present on the invoice:
	// - `transaction_first` – Refunds the transaction first, then any amount is issued as credit back to the account. Default value when Credit Invoices feature is enabled.
	// - `credit_first` – Issues credit back to the account first, then refunds any remaining amount back to the transaction. Default value when Credit Invoices feature is not enabled.
	// - `all_credit` – Issues credit to the account for the entire amount of the refund. Only available when the Credit Invoices feature is enabled.
	// - `all_transaction` – Refunds the entire amount back to transactions, using transactions from previous invoices if necessary. Only available when the Credit Invoices feature is enabled.
	RefundMethod *string `json:"refund_method,omitempty"`

	// Used as the Customer Notes on the credit invoice.
	// This field can only be include when the Credit Invoices feature is enabled.
	CreditCustomerNotes *string `json:"credit_customer_notes,omitempty"`

	// Indicates that the refund was settled outside of Recurly, and a manual transaction should be created to track it in Recurly.
	// Required when:
	// - refunding a manually collected charge invoice, and `refund_method` is not `all_credit`
	// - refunding a credit invoice that refunded manually collecting invoices
	// - refunding a credit invoice for a partial amount
	// This field can only be included when the Credit Invoices feature is enabled.
	ExternalRefund *ExternalRefund `json:"external_refund,omitempty"`
}

type InvoiceTemplate

type InvoiceTemplate struct {
	Id string `json:"id,omitempty"`

	// Invoice template code.
	Code string `json:"code,omitempty"`

	// Invoice template name.
	Name string `json:"name,omitempty"`

	// Invoice template description.
	Description string `json:"description,omitempty"`

	// When the invoice template was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the invoice template was updated in Recurly.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*InvoiceTemplate) GetResponse

func (resource *InvoiceTemplate) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type InvoiceTemplateList

type InvoiceTemplateList struct {
	// contains filtered or unexported fields
}

InvoiceTemplateList allows you to paginate InvoiceTemplate objects

func NewInvoiceTemplateList

func NewInvoiceTemplateList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *InvoiceTemplateList

func (*InvoiceTemplateList) Count

func (list *InvoiceTemplateList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceTemplateList) CountWithContext

func (list *InvoiceTemplateList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*InvoiceTemplateList) Data

func (list *InvoiceTemplateList) Data() []InvoiceTemplate

func (*InvoiceTemplateList) Fetch

func (list *InvoiceTemplateList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceTemplateList) FetchWithContext

func (list *InvoiceTemplateList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*InvoiceTemplateList) HasMore

func (list *InvoiceTemplateList) HasMore() bool

func (*InvoiceTemplateList) Next

func (list *InvoiceTemplateList) Next() string

type InvoiceTemplateLister

type InvoiceTemplateLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []InvoiceTemplate
	HasMore() bool
	Next() string
}

type InvoiceUpdate

type InvoiceUpdate struct {

	// This identifies the PO number associated with the invoice. Not editable for credit invoices.
	PoNumber *string `json:"po_number,omitempty"`

	// VAT Reverse Charge Notes are editable only if there was a VAT reverse charge applied to the invoice.
	VatReverseChargeNotes *string `json:"vat_reverse_charge_notes,omitempty"`

	// Terms and conditions are an optional note field. Not editable for credit invoices.
	TermsAndConditions *string `json:"terms_and_conditions,omitempty"`

	// Customer notes are an optional note field.
	CustomerNotes *string `json:"customer_notes,omitempty"`

	// Integer representing the number of days after an invoice's creation that the invoice will become past due. Changing Net terms changes due_on, and the invoice could move between past due and pending.
	NetTerms *int `json:"net_terms,omitempty"`

	Address *InvoiceAddressCreate `json:"address,omitempty"`

	// An alphanumeric code shown per gateway on your site's payment gateways page. Set this code to ensure that a given invoice targets a given gateway.
	GatewayCode *string `json:"gateway_code,omitempty"`
}

type Item

type Item struct {

	// Item ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Unique code to identify the item.
	Code string `json:"code,omitempty"`

	// The current state of the item.
	State string `json:"state,omitempty"`

	// This name describes your item and will appear on the invoice when it's purchased on a one time basis.
	Name string `json:"name,omitempty"`

	// Optional, description.
	Description string `json:"description,omitempty"`

	// Optional, stock keeping unit to link the item to other inventory systems.
	ExternalSku string `json:"external_sku,omitempty"`

	// Accounting code for invoice line items.
	AccountingCode string `json:"accounting_code,omitempty"`

	// Revenue schedule type
	RevenueScheduleType string `json:"revenue_schedule_type,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId string `json:"performance_obligation_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId string `json:"revenue_gl_account_id,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode string `json:"tax_code,omitempty"`

	// `true` exempts tax on the item, `false` applies tax on the item.
	TaxExempt bool `json:"tax_exempt,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomField `json:"custom_fields,omitempty"`

	// Item Pricing
	Currencies []Pricing `json:"currencies,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Deleted at
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) GetResponse

func (resource *Item) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ItemCreate

type ItemCreate struct {

	// Unique code to identify the item.
	Code *string `json:"code,omitempty"`

	// This name describes your item and will appear on the invoice when it's purchased on a one time basis.
	Name *string `json:"name,omitempty"`

	// Optional, description.
	Description *string `json:"description,omitempty"`

	// Optional, stock keeping unit to link the item to other inventory systems.
	ExternalSku *string `json:"external_sku,omitempty"`

	// Accounting code for invoice line items.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType *int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType *int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode *string `json:"tax_code,omitempty"`

	// `true` exempts tax on the item, `false` applies tax on the item.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// Item Pricing
	Currencies []PricingCreate `json:"currencies,omitempty"`
}

type ItemList

type ItemList struct {
	// contains filtered or unexported fields
}

ItemList allows you to paginate Item objects

func NewItemList

func NewItemList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ItemList

func (*ItemList) Count

func (list *ItemList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ItemList) CountWithContext

func (list *ItemList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ItemList) Data

func (list *ItemList) Data() []Item

func (*ItemList) Fetch

func (list *ItemList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ItemList) FetchWithContext

func (list *ItemList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ItemList) HasMore

func (list *ItemList) HasMore() bool

func (*ItemList) Next

func (list *ItemList) Next() string

type ItemLister

type ItemLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Item
	HasMore() bool
	Next() string
}

type ItemMini

type ItemMini struct {

	// Item ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Unique code to identify the item.
	Code string `json:"code,omitempty"`

	// The current state of the item.
	State string `json:"state,omitempty"`

	// This name describes your item and will appear on the invoice when it's purchased on a one time basis.
	Name string `json:"name,omitempty"`

	// Optional, description.
	Description string `json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemMini) GetResponse

func (resource *ItemMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ItemMiniList

type ItemMiniList struct {
	// contains filtered or unexported fields
}

ItemMiniList allows you to paginate ItemMini objects

func NewItemMiniList

func NewItemMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ItemMiniList

func (*ItemMiniList) Count

func (list *ItemMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ItemMiniList) CountWithContext

func (list *ItemMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ItemMiniList) Data

func (list *ItemMiniList) Data() []ItemMini

func (*ItemMiniList) Fetch

func (list *ItemMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ItemMiniList) FetchWithContext

func (list *ItemMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ItemMiniList) HasMore

func (list *ItemMiniList) HasMore() bool

func (*ItemMiniList) Next

func (list *ItemMiniList) Next() string

type ItemMiniLister

type ItemMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ItemMini
	HasMore() bool
	Next() string
}

type ItemUpdate

type ItemUpdate struct {

	// Unique code to identify the item.
	Code *string `json:"code,omitempty"`

	// This name describes your item and will appear on the invoice when it's purchased on a one time basis.
	Name *string `json:"name,omitempty"`

	// Optional, description.
	Description *string `json:"description,omitempty"`

	// Optional, stock keeping unit to link the item to other inventory systems.
	ExternalSku *string `json:"external_sku,omitempty"`

	// Accounting code for invoice line items.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType *int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType *int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode *string `json:"tax_code,omitempty"`

	// `true` exempts tax on the item, `false` applies tax on the item.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// Item Pricing
	Currencies []PricingCreate `json:"currencies,omitempty"`
}

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

type Level

type Level int

Level log level

const (
	LevelDebug Level = 0
	LevelInfo  Level = 1
	LevelWarn  Level = 2
	LevelError Level = 3
)

type LineItem

type LineItem struct {

	// Line item ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
	Uuid string `json:"uuid,omitempty"`

	// Charges are positive line items that debit the account. Credits are negative line items that credit the account.
	Type string `json:"type,omitempty"`

	// Unique code to identify an item. Available when the Credit Invoices feature is enabled.
	ItemCode string `json:"item_code,omitempty"`

	// System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
	ItemId string `json:"item_id,omitempty"`

	// Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled.
	ExternalSku string `json:"external_sku,omitempty"`

	// Revenue schedule type
	RevenueScheduleType string `json:"revenue_schedule_type,omitempty"`

	// Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an `invoice_id` value.
	State string `json:"state,omitempty"`

	// Category to describe the role of a line item on a legacy invoice:
	// - "charges" refers to charges being billed for on this invoice.
	// - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo.
	// - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated.
	// - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account.
	LegacyCategory string `json:"legacy_category,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// The UUID of the account responsible for originating the line item.
	BillForAccountId string `json:"bill_for_account_id,omitempty"`

	// If the line item is a charge or credit for a subscription, this is its ID.
	SubscriptionId string `json:"subscription_id,omitempty"`

	// If the line item is a charge or credit for a plan or add-on, this is the plan's ID.
	PlanId string `json:"plan_id,omitempty"`

	// If the line item is a charge or credit for a plan or add-on, this is the plan's code.
	PlanCode string `json:"plan_code,omitempty"`

	// If the line item is a charge or credit for an add-on this is its ID.
	AddOnId string `json:"add_on_id,omitempty"`

	// If the line item is a charge or credit for an add-on, this is its code.
	AddOnCode string `json:"add_on_code,omitempty"`

	// Once the line item has been invoiced this will be the invoice's ID.
	InvoiceId string `json:"invoice_id,omitempty"`

	// Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
	InvoiceNumber string `json:"invoice_number,omitempty"`

	// Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.
	PreviousLineItemId string `json:"previous_line_item_id,omitempty"`

	// The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund.
	OriginalLineItemInvoiceId string `json:"original_line_item_invoice_id,omitempty"`

	// A credit created from an original charge will have the value of the charge's origin.
	Origin string `json:"origin,omitempty"`

	// Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item.
	AccountingCode string `json:"accounting_code,omitempty"`

	// For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line items it will be the item's `external_sku`.
	ProductCode string `json:"product_code,omitempty"`

	// The reason the credit was given when line item is `type=credit`.
	CreditReasonCode string `json:"credit_reason_code,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// `(quantity * unit_amount) - (discount + tax)`
	Amount float64 `json:"amount,omitempty"`

	// Description that appears on the invoice. For subscription related items this will be filled in automatically.
	Description string `json:"description,omitempty"`

	// This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
	Quantity int `json:"quantity,omitempty"`

	// A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field.
	QuantityDecimal string `json:"quantity_decimal,omitempty"`

	// Positive amount for a charge, negative amount for a credit.
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// Positive amount for a charge, negative amount for a credit.
	UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`

	// Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.
	TaxInclusive bool `json:"tax_inclusive,omitempty"`

	// `quantity * unit_amount`
	Subtotal float64 `json:"subtotal,omitempty"`

	// The discount applied to the line item.
	Discount float64 `json:"discount,omitempty"`

	// Unique code to identify the ledger account. Each code must start
	// with a letter or number. The following special characters are
	// allowed: `-_.,:`
	LiabilityGlAccountCode string `json:"liability_gl_account_code,omitempty"`

	// Unique code to identify the ledger account. Each code must start
	// with a letter or number. The following special characters are
	// allowed: `-_.,:`
	RevenueGlAccountCode string `json:"revenue_gl_account_code,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId string `json:"performance_obligation_id,omitempty"`

	// The tax amount for the line item.
	Tax float64 `json:"tax,omitempty"`

	// `true` if the line item is taxable, `false` if it is not.
	Taxable bool `json:"taxable,omitempty"`

	// `true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.
	TaxExempt bool `json:"tax_exempt,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode string `json:"tax_code,omitempty"`

	// Only for merchants using Recurly's In-The-Box taxes.
	TaxInfo TaxInfo `json:"tax_info,omitempty"`

	// The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address".
	OriginTaxAddressSource string `json:"origin_tax_address_source,omitempty"`

	// The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address".
	DestinationTaxAddressSource string `json:"destination_tax_address_source,omitempty"`

	// When a line item has been prorated, this is the rate of the proration. Proration rates were made available for line items created after March 30, 2017. For line items created prior to that date, the proration rate will be `null`, even if the line item was prorated.
	ProrationRate float64 `json:"proration_rate,omitempty"`

	// Refund?
	Refund bool `json:"refund,omitempty"`

	// For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds).
	RefundedQuantity int `json:"refunded_quantity,omitempty"`

	// A floating-point alternative to Refunded Quantity. For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). The Decimal Quantity feature must be enabled to utilize this field.
	RefundedQuantityDecimal string `json:"refunded_quantity_decimal,omitempty"`

	// The amount of credit from this line item that was applied to the invoice.
	CreditApplied float64 `json:"credit_applied,omitempty"`

	ShippingAddress ShippingAddress `json:"shipping_address,omitempty"`

	// If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date.
	StartDate time.Time `json:"start_date,omitempty"`

	// If this date is provided, it indicates the end of a time range.
	EndDate time.Time `json:"end_date,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomField `json:"custom_fields,omitempty"`

	// When the line item was created.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the line item was last changed.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*LineItem) GetResponse

func (resource *LineItem) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type LineItemCreate

type LineItemCreate struct {

	// 3-letter ISO 4217 currency code. If `item_code`/`item_id` is part of the request then `currency` is optional, if the site has a single default currency. `currency` is required if `item_code`/`item_id` is present, and there are multiple currencies defined on the site. If `item_code`/`item_id` is not present `currency` is required.
	Currency *string `json:"currency,omitempty"`

	// A positive or negative amount with `type=charge` will result in a positive `unit_amount`.
	// A positive or negative amount with `type=credit` will result in a negative `unit_amount`.
	// If `item_code`/`item_id` is present, `unit_amount` can be passed in, to override the
	// `Item`'s `unit_amount`. If `item_code`/`item_id` is not present then `unit_amount` is required.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`

	// This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.
	Quantity *int `json:"quantity,omitempty"`

	// Description that appears on the invoice. If `item_code`/`item_id` is part of the request then `description` must be absent.
	Description *string `json:"description,omitempty"`

	// Unique code to identify an item. Available when the Credit Invoices feature is enabled.
	ItemCode *string `json:"item_code,omitempty"`

	// System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.
	ItemId *string `json:"item_id,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// Line item type. If `item_code`/`item_id` is present then `type` should not be present. If `item_code`/`item_id` is not present then `type` is required.
	Type *string `json:"type,omitempty"`

	// The reason the credit was given when line item is `type=credit`. When the Credit Invoices feature is enabled, the value can be set and will default to `general`. When the Credit Invoices feature is not enabled, the value will always be `null`.
	CreditReasonCode *string `json:"credit_reason_code,omitempty"`

	// Accounting Code for the `LineItem`. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`

	// `true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_transaction_type` must be absent.
	AvalaraTransactionType *int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_service_type` must be absent.
	AvalaraServiceType *int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode *string `json:"tax_code,omitempty"`

	// Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex `product` field. If `item_code`/`item_id` is part of the request then `product_code` must be absent.
	ProductCode *string `json:"product_code,omitempty"`

	// Origin `external_gift_card` is allowed if the Gift Cards feature is enabled on your site and `type` is `credit`. Set this value in order to track gift card credits from external gift cards (like InComm). It also skips billing information requirements.  Origin `prepayment` is only allowed if `type` is `charge` and `tax_exempt` is left blank or set to true.  This origin creates a charge and opposite credit on the account to be used for future invoices.
	Origin *string `json:"origin,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date. Defaults to the current date-time.
	StartDate *time.Time `json:"start_date,omitempty"`

	// If this date is provided, it indicates the end of a time range.
	EndDate *time.Time `json:"end_date,omitempty"`

	// The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of "origin" refers to the "Business entity tax address". A value of "destination" refers to the "Customer tax address".
	OriginTaxAddressSource *string `json:"origin_tax_address_source,omitempty"`

	// The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of "destination" refers to the "Customer tax address". A value of "origin" refers to the "Business entity tax address".
	DestinationTaxAddressSource *string `json:"destination_tax_address_source,omitempty"`
}

type LineItemList

type LineItemList struct {
	// contains filtered or unexported fields
}

LineItemList allows you to paginate LineItem objects

func NewLineItemList

func NewLineItemList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *LineItemList

func (*LineItemList) Count

func (list *LineItemList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*LineItemList) CountWithContext

func (list *LineItemList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*LineItemList) Data

func (list *LineItemList) Data() []LineItem

func (*LineItemList) Fetch

func (list *LineItemList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*LineItemList) FetchWithContext

func (list *LineItemList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*LineItemList) HasMore

func (list *LineItemList) HasMore() bool

func (*LineItemList) Next

func (list *LineItemList) Next() string

type LineItemLister

type LineItemLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []LineItem
	HasMore() bool
	Next() string
}

type LineItemRefund

type LineItemRefund struct {

	// Line item ID
	Id *string `json:"id,omitempty"`

	// Line item quantity to be refunded. Must be less than or equal to the `quantity_remaining`. If `quantity_decimal`, `amount`, and `percentage` are not present, `quantity` is required. If `amount` or `percentage` is present, `quantity` must be absent.
	Quantity *int `json:"quantity,omitempty"`

	// Decimal quantity to refund. The `quantity_decimal` will be used to refund charges that has a NOT null quantity decimal. Must be less than or equal to the `quantity_decimal_remaining`. If `quantity`, `amount`, and `percentage` are not present, `quantity_decimal` is required. If `amount` or `percentage` is present, `quantity_decimal` must be absent. The Decimal Quantity feature must be enabled to utilize this field.
	QuantityDecimal *string `json:"quantity_decimal,omitempty"`

	// The specific amount to be refunded from the adjustment. Must be less than or equal to the adjustment's remaining balance. If `quantity`, `quantity_decimal` and `percentage` are not present, `amount` is required. If `quantity`, `quantity_decimal`, or `percentage` is present, `amount` must be absent.
	Amount *float64 `json:"amount,omitempty"`

	// The percentage of the adjustment's remaining balance to refund. If `quantity`, `quantity_decimal` and `amount_in_cents` are not present, `percentage` is required. If `quantity`, `quantity_decimal` or `amount_in_cents` is present, `percentage` must be absent.
	Percentage *int `json:"percentage,omitempty"`

	// Set to `true` if the line item should be prorated; set to `false` if not.
	// This can only be used on line items that have a start and end date.
	Prorate *bool `json:"prorate,omitempty"`
}

type ListAccountAcquisitionParams

type ListAccountAcquisitionParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListAccountAcquisitionParams) URLParams

func (list *ListAccountAcquisitionParams) URLParams() []KeyValue

type ListAccountCouponRedemptionsParams

type ListAccountCouponRedemptionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	State *string
}

func (*ListAccountCouponRedemptionsParams) URLParams

func (list *ListAccountCouponRedemptionsParams) URLParams() []KeyValue

type ListAccountCreditPaymentsParams

type ListAccountCreditPaymentsParams struct {

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListAccountCreditPaymentsParams) URLParams

func (list *ListAccountCreditPaymentsParams) URLParams() []KeyValue

type ListAccountExternalInvoicesParams

type ListAccountExternalInvoicesParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string
}

func (*ListAccountExternalInvoicesParams) URLParams

func (list *ListAccountExternalInvoicesParams) URLParams() []KeyValue

type ListAccountExternalSubscriptionsParams

type ListAccountExternalSubscriptionsParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string
}

func (*ListAccountExternalSubscriptionsParams) URLParams

type ListAccountInvoicesParams

type ListAccountInvoicesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// State - Invoice state.
	State *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Type - Filter by type when:
	// - `type=charge`, only charge invoices will be returned.
	// - `type=credit`, only credit invoices will be returned.
	// - `type=non-legacy`, only charge and credit invoices will be returned.
	// - `type=legacy`, only legacy invoices will be returned.
	Type *string
}

func (*ListAccountInvoicesParams) URLParams

func (list *ListAccountInvoicesParams) URLParams() []KeyValue

type ListAccountLineItemsParams

type ListAccountLineItemsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Original - Filter by original field.
	Original *string

	// State - Filter by state field.
	State *string

	// Type - Filter by type field.
	Type *string
}

func (*ListAccountLineItemsParams) URLParams

func (list *ListAccountLineItemsParams) URLParams() []KeyValue

type ListAccountNotesParams

type ListAccountNotesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string
}

func (*ListAccountNotesParams) URLParams

func (list *ListAccountNotesParams) URLParams() []KeyValue

type ListAccountSubscriptionsParams

type ListAccountSubscriptionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	// - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned.
	// - When `state=in_trial`, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
	// - When `state=live`, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
	State *string
}

func (*ListAccountSubscriptionsParams) URLParams

func (list *ListAccountSubscriptionsParams) URLParams() []KeyValue

type ListAccountTransactionsParams

type ListAccountTransactionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Type - Filter by type field. The value `payment` will return both `purchase` and `capture` transactions.
	Type *string

	// Success - Filter by success field.
	Success *string
}

func (*ListAccountTransactionsParams) URLParams

func (list *ListAccountTransactionsParams) URLParams() []KeyValue

type ListAccountsParams

type ListAccountsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Email - Filter for accounts with this exact email address. A blank value will return accounts with both `null` and `""` email addresses. Note that multiple accounts can share one email address.
	Email *string

	// Subscriber - Filter for accounts with or without a subscription in the `active`,
	// `canceled`, or `future` state.
	Subscriber *bool

	// PastDue - Filter for accounts with an invoice in the `past_due` state.
	PastDue *string
}

func (*ListAccountsParams) URLParams

func (list *ListAccountsParams) URLParams() []KeyValue

type ListAddOnsParams

type ListAddOnsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	State *string
}

func (*ListAddOnsParams) URLParams

func (list *ListAddOnsParams) URLParams() []KeyValue

type ListBillingInfosParams

type ListBillingInfosParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListBillingInfosParams) URLParams

func (list *ListBillingInfosParams) URLParams() []KeyValue

type ListBusinessEntityInvoicesParams

type ListBusinessEntityInvoicesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// State - Invoice state.
	State *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Type - Filter by type when:
	// - `type=charge`, only charge invoices will be returned.
	// - `type=credit`, only credit invoices will be returned.
	// - `type=non-legacy`, only charge and credit invoices will be returned.
	// - `type=legacy`, only legacy invoices will be returned.
	Type *string
}

func (*ListBusinessEntityInvoicesParams) URLParams

func (list *ListBusinessEntityInvoicesParams) URLParams() []KeyValue

type ListChildAccountsParams

type ListChildAccountsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Email - Filter for accounts with this exact email address. A blank value will return accounts with both `null` and `""` email addresses. Note that multiple accounts can share one email address.
	Email *string

	// Subscriber - Filter for accounts with or without a subscription in the `active`,
	// `canceled`, or `future` state.
	Subscriber *bool

	// PastDue - Filter for accounts with an invoice in the `past_due` state.
	PastDue *string
}

func (*ListChildAccountsParams) URLParams

func (list *ListChildAccountsParams) URLParams() []KeyValue

type ListCouponsParams

type ListCouponsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListCouponsParams) URLParams

func (list *ListCouponsParams) URLParams() []KeyValue

type ListCreditPaymentsParams

type ListCreditPaymentsParams struct {

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListCreditPaymentsParams) URLParams

func (list *ListCreditPaymentsParams) URLParams() []KeyValue

type ListCustomFieldDefinitionsParams

type ListCustomFieldDefinitionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// RelatedType - Filter by related type.
	RelatedType *string
}

func (*ListCustomFieldDefinitionsParams) URLParams

func (list *ListCustomFieldDefinitionsParams) URLParams() []KeyValue

type ListDunningCampaignsParams

type ListDunningCampaignsParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string
}

func (*ListDunningCampaignsParams) URLParams

func (list *ListDunningCampaignsParams) URLParams() []KeyValue

type ListEntitlementsParams

type ListEntitlementsParams struct {

	// State - Filter the entitlements based on the state of the applicable subscription.
	// - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned.
	// - When no state is provided, subscriptions with active or canceled states will be returned.
	State *string
}

func (*ListEntitlementsParams) URLParams

func (list *ListEntitlementsParams) URLParams() []KeyValue

type ListExternalInvoicesParams

type ListExternalInvoicesParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string
}

func (*ListExternalInvoicesParams) URLParams

func (list *ListExternalInvoicesParams) URLParams() []KeyValue

type ListExternalProductExternalProductReferencesParams

type ListExternalProductExternalProductReferencesParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string
}

func (*ListExternalProductExternalProductReferencesParams) URLParams

type ListExternalProductsParams

type ListExternalProductsParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string
}

func (*ListExternalProductsParams) URLParams

func (list *ListExternalProductsParams) URLParams() []KeyValue

type ListExternalSubscriptionExternalInvoicesParams

type ListExternalSubscriptionExternalInvoicesParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string
}

func (*ListExternalSubscriptionExternalInvoicesParams) URLParams

type ListExternalSubscriptionExternalPaymentPhasesParams

type ListExternalSubscriptionExternalPaymentPhasesParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string
}

func (*ListExternalSubscriptionExternalPaymentPhasesParams) URLParams

type ListExternalSubscriptionsParams

type ListExternalSubscriptionsParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string
}

func (*ListExternalSubscriptionsParams) URLParams

func (list *ListExternalSubscriptionsParams) URLParams() []KeyValue

type ListGeneralLedgerAccountsParams

type ListGeneralLedgerAccountsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// AccountType - General Ledger Account type by which to filter the response.
	AccountType *string
}

func (*ListGeneralLedgerAccountsParams) URLParams

func (list *ListGeneralLedgerAccountsParams) URLParams() []KeyValue

type ListInvoiceCouponRedemptionsParams

type ListInvoiceCouponRedemptionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListInvoiceCouponRedemptionsParams) URLParams

func (list *ListInvoiceCouponRedemptionsParams) URLParams() []KeyValue

type ListInvoiceLineItemsParams

type ListInvoiceLineItemsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Original - Filter by original field.
	Original *string

	// State - Filter by state field.
	State *string

	// Type - Filter by type field.
	Type *string
}

func (*ListInvoiceLineItemsParams) URLParams

func (list *ListInvoiceLineItemsParams) URLParams() []KeyValue

type ListInvoiceTemplateAccountsParams

type ListInvoiceTemplateAccountsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Email - Filter for accounts with this exact email address. A blank value will return accounts with both `null` and `""` email addresses. Note that multiple accounts can share one email address.
	Email *string

	// Subscriber - Filter for accounts with or without a subscription in the `active`,
	// `canceled`, or `future` state.
	Subscriber *bool

	// PastDue - Filter for accounts with an invoice in the `past_due` state.
	PastDue *string
}

func (*ListInvoiceTemplateAccountsParams) URLParams

func (list *ListInvoiceTemplateAccountsParams) URLParams() []KeyValue

type ListInvoiceTemplatesParams

type ListInvoiceTemplatesParams struct {

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string
}

func (*ListInvoiceTemplatesParams) URLParams

func (list *ListInvoiceTemplatesParams) URLParams() []KeyValue

type ListInvoicesParams

type ListInvoicesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// State - Invoice state.
	State *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Type - Filter by type when:
	// - `type=charge`, only charge invoices will be returned.
	// - `type=credit`, only credit invoices will be returned.
	// - `type=non-legacy`, only charge and credit invoices will be returned.
	// - `type=legacy`, only legacy invoices will be returned.
	Type *string
}

func (*ListInvoicesParams) URLParams

func (list *ListInvoicesParams) URLParams() []KeyValue

type ListItemsParams

type ListItemsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	State *string
}

func (*ListItemsParams) URLParams

func (list *ListItemsParams) URLParams() []KeyValue

type ListLineItemsParams

type ListLineItemsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Original - Filter by original field.
	Original *string

	// State - Filter by state field.
	State *string

	// Type - Filter by type field.
	Type *string
}

func (*ListLineItemsParams) URLParams

func (list *ListLineItemsParams) URLParams() []KeyValue

type ListMeasuredUnitParams

type ListMeasuredUnitParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	State *string
}

func (*ListMeasuredUnitParams) URLParams

func (list *ListMeasuredUnitParams) URLParams() []KeyValue

type ListMetadata

type ListMetadata struct {
	ObjectName string `json:"object"`
	HasMore    bool   `json:"has_more"`
	Next       string `json:"next"`
}

type ListOrder

type ListOrder string

ListOrder options for ordering a list

type ListPlanAddOnsParams

type ListPlanAddOnsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	State *string
}

func (*ListPlanAddOnsParams) URLParams

func (list *ListPlanAddOnsParams) URLParams() []KeyValue

type ListPlansParams

type ListPlansParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	State *string
}

func (*ListPlansParams) URLParams

func (list *ListPlansParams) URLParams() []KeyValue

type ListShippingAddressesParams

type ListShippingAddressesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListShippingAddressesParams) URLParams

func (list *ListShippingAddressesParams) URLParams() []KeyValue

type ListShippingMethodsParams

type ListShippingMethodsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListShippingMethodsParams) URLParams

func (list *ListShippingMethodsParams) URLParams() []KeyValue

type ListSitesParams

type ListSitesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// State - Filter by state.
	State *string
}

func (*ListSitesParams) URLParams

func (list *ListSitesParams) URLParams() []KeyValue

type ListSubscriptionCouponRedemptionsParams

type ListSubscriptionCouponRedemptionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListSubscriptionCouponRedemptionsParams) URLParams

type ListSubscriptionInvoicesParams

type ListSubscriptionInvoicesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// State - Invoice state.
	State *string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Type - Filter by type when:
	// - `type=charge`, only charge invoices will be returned.
	// - `type=credit`, only credit invoices will be returned.
	// - `type=non-legacy`, only charge and credit invoices will be returned.
	// - `type=legacy`, only legacy invoices will be returned.
	Type *string
}

func (*ListSubscriptionInvoicesParams) URLParams

func (list *ListSubscriptionInvoicesParams) URLParams() []KeyValue

type ListSubscriptionLineItemsParams

type ListSubscriptionLineItemsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Original - Filter by original field.
	Original *string

	// State - Filter by state field.
	State *string

	// Type - Filter by type field.
	Type *string
}

func (*ListSubscriptionLineItemsParams) URLParams

func (list *ListSubscriptionLineItemsParams) URLParams() []KeyValue

type ListSubscriptionsParams

type ListSubscriptionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// State - Filter by state.
	// - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned.
	// - When `state=in_trial`, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
	// - When `state=live`, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
	State *string
}

func (*ListSubscriptionsParams) URLParams

func (list *ListSubscriptionsParams) URLParams() []KeyValue

type ListTransactionsParams

type ListTransactionsParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// Type - Filter by type field. The value `payment` will return both `purchase` and `capture` transactions.
	Type *string

	// Success - Filter by success field.
	Success *string
}

func (*ListTransactionsParams) URLParams

func (list *ListTransactionsParams) URLParams() []KeyValue

type ListUniqueCouponCodesParams

type ListUniqueCouponCodesParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `updated_at` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time
}

func (*ListUniqueCouponCodesParams) URLParams

func (list *ListUniqueCouponCodesParams) URLParams() []KeyValue

type ListUsageParams

type ListUsageParams struct {

	// Ids - Filter results by their IDs. Up to 200 IDs can be passed at once using
	// commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
	// **Important notes:**
	// * The `ids` parameter cannot be used with any other ordering or filtering
	//   parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
	// * Invalid or unknown IDs will be ignored, so you should check that the
	//   results correspond to your request.
	// * Records are returned in an arbitrary order. Since results are all
	//   returned at once you can sort the records yourself.
	Ids []string

	// Limit - Limit number of records 1-200.
	Limit *int

	// Order - Sort order.
	Order *string

	// Sort - Sort field. You *really* only want to sort by `usage_timestamp` in ascending
	// order. In descending order updated records will move behind the cursor and could
	// prevent some records from being returned.
	Sort *string

	// BeginTime - Inclusively filter by begin_time when `sort=usage_timestamp` or `sort=recorded_timestamp`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	BeginTime *time.Time

	// EndTime - Inclusively filter by end_time when `sort=usage_timestamp` or `sort=recorded_timestamp`.
	// **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
	EndTime *time.Time

	// BillingStatus - Filter by usage record's billing status
	BillingStatus *string
}

func (*ListUsageParams) URLParams

func (list *ListUsageParams) URLParams() []KeyValue

type Logger

type Logger struct {
	Level
	StdOut *log.Logger
	StdErr *log.Logger
}

Logger creates a new logger with variable level

func NewLogger

func NewLogger(logLevel Level) *Logger

func (*Logger) Debug

func (log *Logger) Debug(v ...interface{})

func (*Logger) Debugf

func (log *Logger) Debugf(format string, v ...interface{})

func (*Logger) Error

func (log *Logger) Error(v ...interface{})

func (*Logger) Errorf

func (log *Logger) Errorf(format string, v ...interface{})

func (*Logger) Info

func (log *Logger) Info(v ...interface{})

func (*Logger) Infof

func (log *Logger) Infof(format string, v ...interface{})

func (*Logger) IsLevel

func (log *Logger) IsLevel(level Level) bool

IsLevel returns true if the logger would print with the given level

func (*Logger) Warn

func (log *Logger) Warn(v ...interface{})

func (*Logger) Warnf

func (log *Logger) Warnf(format string, v ...interface{})

type MeasuredUnit

type MeasuredUnit struct {

	// Item ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Unique internal name of the measured unit on your site.
	Name string `json:"name,omitempty"`

	// Display name for the measured unit. Can only contain spaces, underscores and must be alphanumeric.
	DisplayName string `json:"display_name,omitempty"`

	// The current state of the measured unit.
	State string `json:"state,omitempty"`

	// Optional internal description.
	Description string `json:"description,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Deleted at
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*MeasuredUnit) GetResponse

func (resource *MeasuredUnit) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type MeasuredUnitCreate

type MeasuredUnitCreate struct {

	// Unique internal name of the measured unit on your site.
	Name *string `json:"name,omitempty"`

	// Display name for the measured unit.
	DisplayName *string `json:"display_name,omitempty"`

	// Optional internal description.
	Description *string `json:"description,omitempty"`
}

type MeasuredUnitList

type MeasuredUnitList struct {
	// contains filtered or unexported fields
}

MeasuredUnitList allows you to paginate MeasuredUnit objects

func NewMeasuredUnitList

func NewMeasuredUnitList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *MeasuredUnitList

func (*MeasuredUnitList) Count

func (list *MeasuredUnitList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*MeasuredUnitList) CountWithContext

func (list *MeasuredUnitList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*MeasuredUnitList) Data

func (list *MeasuredUnitList) Data() []MeasuredUnit

func (*MeasuredUnitList) Fetch

func (list *MeasuredUnitList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*MeasuredUnitList) FetchWithContext

func (list *MeasuredUnitList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*MeasuredUnitList) HasMore

func (list *MeasuredUnitList) HasMore() bool

func (*MeasuredUnitList) Next

func (list *MeasuredUnitList) Next() string

type MeasuredUnitLister

type MeasuredUnitLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []MeasuredUnit
	HasMore() bool
	Next() string
}

type MeasuredUnitUpdate

type MeasuredUnitUpdate struct {

	// Unique internal name of the measured unit on your site.
	Name *string `json:"name,omitempty"`

	// Display name for the measured unit.
	DisplayName *string `json:"display_name,omitempty"`

	// Optional internal description.
	Description *string `json:"description,omitempty"`
}

type Option

type Option func(o *RequestOptions)

Option allows for customizations to a request.

func WithHeader

func WithHeader(h http.Header) Option

WithHeader provides the capability to add custom headers to an operation.

func WithIdempotencyKey

func WithIdempotencyKey(k string) Option

WithIdempotencyKey provides the capability to add an Idempotency Key to an operation.

type OptionsApplier

type OptionsApplier interface {
	// contains filtered or unexported methods
}

type PaymentMethod

type PaymentMethod struct {
	Object string `json:"object,omitempty"`

	// Credit card number's first six digits.
	FirstSix string `json:"first_six,omitempty"`

	// Credit card number's last four digits. Will refer to bank account if payment method is ACH.
	LastFour string `json:"last_four,omitempty"`

	// The IBAN bank account's last two digits.
	LastTwo string `json:"last_two,omitempty"`

	// Expiration month.
	ExpMonth int `json:"exp_month,omitempty"`

	// Expiration year.
	ExpYear int `json:"exp_year,omitempty"`

	// A token used in place of a credit card in order to perform transactions.
	GatewayToken string `json:"gateway_token,omitempty"`

	// The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled.
	CcBinCountry string `json:"cc_bin_country,omitempty"`

	// An identifier for a specific payment gateway.
	GatewayCode string `json:"gateway_code,omitempty"`

	// Gateway specific attributes associated with this PaymentMethod
	GatewayAttributes GatewayAttributes `json:"gateway_attributes,omitempty"`

	// Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.
	CardNetworkPreference string `json:"card_network_preference,omitempty"`

	// Billing Agreement identifier. Only present for Amazon or Paypal payment methods.
	BillingAgreementId string `json:"billing_agreement_id,omitempty"`

	// The name associated with the bank account.
	NameOnAccount string `json:"name_on_account,omitempty"`

	// The bank account type. Only present for ACH payment methods.
	AccountType string `json:"account_type,omitempty"`

	// The bank account's routing number. Only present for ACH payment methods.
	RoutingNumber string `json:"routing_number,omitempty"`

	// The bank name of this routing number.
	RoutingNumberBank string `json:"routing_number_bank,omitempty"`

	// Username of the associated payment method. Currently only associated with Venmo.
	Username string `json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*PaymentMethod) GetResponse

func (resource *PaymentMethod) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PaymentMethodList

type PaymentMethodList struct {
	// contains filtered or unexported fields
}

PaymentMethodList allows you to paginate PaymentMethod objects

func NewPaymentMethodList

func NewPaymentMethodList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PaymentMethodList

func (*PaymentMethodList) Count

func (list *PaymentMethodList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PaymentMethodList) CountWithContext

func (list *PaymentMethodList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PaymentMethodList) Data

func (list *PaymentMethodList) Data() []PaymentMethod

func (*PaymentMethodList) Fetch

func (list *PaymentMethodList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PaymentMethodList) FetchWithContext

func (list *PaymentMethodList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PaymentMethodList) HasMore

func (list *PaymentMethodList) HasMore() bool

func (*PaymentMethodList) Next

func (list *PaymentMethodList) Next() string

type PaymentMethodLister

type PaymentMethodLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PaymentMethod
	HasMore() bool
	Next() string
}

type PercentageTier

type PercentageTier struct {

	// Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
	EndingAmount float64 `json:"ending_amount,omitempty"`

	// The percentage taken of the monetary amount of usage tracked.
	// This can be up to 4 decimal places represented as a string.
	UsagePercentage string `json:"usage_percentage,omitempty"`
	// contains filtered or unexported fields
}

func (*PercentageTier) GetResponse

func (resource *PercentageTier) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PercentageTierCreate

type PercentageTierCreate struct {

	// Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
	EndingAmount *float64 `json:"ending_amount,omitempty"`

	// The percentage taken of the monetary amount of usage tracked.
	// This can be up to 4 decimal places represented as a string.
	UsagePercentage *string `json:"usage_percentage,omitempty"`
}

type PercentageTierList

type PercentageTierList struct {
	// contains filtered or unexported fields
}

PercentageTierList allows you to paginate PercentageTier objects

func NewPercentageTierList

func NewPercentageTierList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PercentageTierList

func (*PercentageTierList) Count

func (list *PercentageTierList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PercentageTierList) CountWithContext

func (list *PercentageTierList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PercentageTierList) Data

func (list *PercentageTierList) Data() []PercentageTier

func (*PercentageTierList) Fetch

func (list *PercentageTierList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PercentageTierList) FetchWithContext

func (list *PercentageTierList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PercentageTierList) HasMore

func (list *PercentageTierList) HasMore() bool

func (*PercentageTierList) Next

func (list *PercentageTierList) Next() string

type PercentageTierLister

type PercentageTierLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PercentageTier
	HasMore() bool
	Next() string
}

type PercentageTiersByCurrency

type PercentageTiersByCurrency struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Tiers
	Tiers []PercentageTier `json:"tiers,omitempty"`
	// contains filtered or unexported fields
}

func (*PercentageTiersByCurrency) GetResponse

func (resource *PercentageTiersByCurrency) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PercentageTiersByCurrencyCreate

type PercentageTiersByCurrencyCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Tiers
	Tiers []PercentageTierCreate `json:"tiers,omitempty"`
}

type PercentageTiersByCurrencyList

type PercentageTiersByCurrencyList struct {
	// contains filtered or unexported fields
}

PercentageTiersByCurrencyList allows you to paginate PercentageTiersByCurrency objects

func NewPercentageTiersByCurrencyList

func NewPercentageTiersByCurrencyList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PercentageTiersByCurrencyList

func (*PercentageTiersByCurrencyList) Count

func (list *PercentageTiersByCurrencyList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PercentageTiersByCurrencyList) CountWithContext

func (list *PercentageTiersByCurrencyList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PercentageTiersByCurrencyList) Data

func (*PercentageTiersByCurrencyList) Fetch

func (list *PercentageTiersByCurrencyList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PercentageTiersByCurrencyList) FetchWithContext

func (list *PercentageTiersByCurrencyList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PercentageTiersByCurrencyList) HasMore

func (list *PercentageTiersByCurrencyList) HasMore() bool

func (*PercentageTiersByCurrencyList) Next

type PercentageTiersByCurrencyLister

type PercentageTiersByCurrencyLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PercentageTiersByCurrency
	HasMore() bool
	Next() string
}

type PerformanceObligation

type PerformanceObligation struct {

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	Id string `json:"id,omitempty"`

	// Performance Obligation Name
	Name string `json:"name,omitempty"`

	// Created At
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*PerformanceObligation) GetResponse

func (resource *PerformanceObligation) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PerformanceObligationList

type PerformanceObligationList struct {
	// contains filtered or unexported fields
}

PerformanceObligationList allows you to paginate PerformanceObligation objects

func NewPerformanceObligationList

func NewPerformanceObligationList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PerformanceObligationList

func (*PerformanceObligationList) Count

func (list *PerformanceObligationList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PerformanceObligationList) CountWithContext

func (list *PerformanceObligationList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PerformanceObligationList) Data

func (*PerformanceObligationList) Fetch

func (list *PerformanceObligationList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PerformanceObligationList) FetchWithContext

func (list *PerformanceObligationList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PerformanceObligationList) HasMore

func (list *PerformanceObligationList) HasMore() bool

func (*PerformanceObligationList) Next

func (list *PerformanceObligationList) Next() string

type PerformanceObligationLister

type PerformanceObligationLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PerformanceObligation
	HasMore() bool
	Next() string
}

type Plan

type Plan struct {

	// Plan ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
	Code string `json:"code,omitempty"`

	// The current state of the plan.
	State string `json:"state,omitempty"`

	// This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
	Name string `json:"name,omitempty"`

	// Optional description, not displayed.
	Description string `json:"description,omitempty"`

	// Unit for the plan's billing interval.
	IntervalUnit string `json:"interval_unit,omitempty"`

	// Length of the plan's billing interval in `interval_unit`.
	IntervalLength int `json:"interval_length,omitempty"`

	// Units for the plan's trial period.
	TrialUnit string `json:"trial_unit,omitempty"`

	// Length of plan's trial period in `trial_units`. `0` means `no trial`.
	TrialLength int `json:"trial_length,omitempty"`

	// Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.
	TrialRequiresBillingInfo bool `json:"trial_requires_billing_info,omitempty"`

	// Automatically terminate subscriptions after a defined number of billing cycles. Number of billing cycles before the plan automatically stops renewing, defaults to `null` for continuous, automatic renewal.
	TotalBillingCycles int `json:"total_billing_cycles,omitempty"`

	// Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
	AutoRenew bool `json:"auto_renew,omitempty"`

	// A fixed pricing model has the same price for each billing period.
	// A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on
	// a specified cadence of billing periods. The price change could be an increase or decrease.
	PricingModel string `json:"pricing_model,omitempty"`

	// Ramp Intervals
	RampIntervals []PlanRampInterval `json:"ramp_intervals,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomField `json:"custom_fields,omitempty"`

	// Revenue schedule type
	RevenueScheduleType string `json:"revenue_schedule_type,omitempty"`

	// Setup fee revenue schedule type
	SetupFeeRevenueScheduleType string `json:"setup_fee_revenue_schedule_type,omitempty"`

	// Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.
	AccountingCode string `json:"accounting_code,omitempty"`

	// Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code.
	SetupFeeAccountingCode string `json:"setup_fee_accounting_code,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode string `json:"tax_code,omitempty"`

	// `true` exempts tax on the plan, `false` applies tax on the plan.
	TaxExempt bool `json:"tax_exempt,omitempty"`

	// Pricing
	Currencies []PlanPricing `json:"currencies,omitempty"`

	// Hosted pages settings
	HostedPages PlanHostedPages `json:"hosted_pages,omitempty"`

	// Used to determine whether items can be assigned as add-ons to individual subscriptions.
	// If `true`, items can be assigned as add-ons to individual subscription add-ons.
	// If `false`, only plan add-ons can be used.
	AllowAnyItemOnSubscriptions bool `json:"allow_any_item_on_subscriptions,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId string `json:"dunning_campaign_id,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Deleted at
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Plan) GetResponse

func (resource *Plan) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PlanCreate

type PlanCreate struct {

	// Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
	Code *string `json:"code,omitempty"`

	// This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
	Name *string `json:"name,omitempty"`

	// Optional description, not displayed.
	Description *string `json:"description,omitempty"`

	// Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// Unit for the plan's billing interval.
	IntervalUnit *string `json:"interval_unit,omitempty"`

	// Length of the plan's billing interval in `interval_unit`.
	IntervalLength *int `json:"interval_length,omitempty"`

	// Units for the plan's trial period.
	TrialUnit *string `json:"trial_unit,omitempty"`

	// Length of plan's trial period in `trial_units`. `0` means `no trial`.
	TrialLength *int `json:"trial_length,omitempty"`

	// Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.
	TrialRequiresBillingInfo *bool `json:"trial_requires_billing_info,omitempty"`

	// Automatically terminate plans after a defined number of billing cycles.
	TotalBillingCycles *int `json:"total_billing_cycles,omitempty"`

	// Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
	AutoRenew *bool `json:"auto_renew,omitempty"`

	// A fixed pricing model has the same price for each billing period.
	// A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on
	// a specified cadence of billing periods. The price change could be an increase or decrease.
	PricingModel *string `json:"pricing_model,omitempty"`

	// Ramp Intervals
	RampIntervals []PlanRampIntervalCreate `json:"ramp_intervals,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	SetupFeeLiabilityGlAccountId *string `json:"setup_fee_liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	SetupFeeRevenueGlAccountId *string `json:"setup_fee_revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	SetupFeePerformanceObligationId *string `json:"setup_fee_performance_obligation_id,omitempty"`

	// Setup fee revenue schedule type
	SetupFeeRevenueScheduleType *string `json:"setup_fee_revenue_schedule_type,omitempty"`

	// Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code.
	SetupFeeAccountingCode *string `json:"setup_fee_accounting_code,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType *int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType *int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode *string `json:"tax_code,omitempty"`

	// `true` exempts tax on the plan, `false` applies tax on the plan.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// Pricing
	Currencies []PlanPricingCreate `json:"currencies,omitempty"`

	// Hosted pages settings
	HostedPages *PlanHostedPagesCreate `json:"hosted_pages,omitempty"`

	// Add Ons
	AddOns []AddOnCreate `json:"add_ons,omitempty"`

	// Used to determine whether items can be assigned as add-ons to individual subscriptions.
	// If `true`, items can be assigned as add-ons to individual subscription add-ons.
	// If `false`, only plan add-ons can be used.
	AllowAnyItemOnSubscriptions *bool `json:"allow_any_item_on_subscriptions,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId *string `json:"dunning_campaign_id,omitempty"`
}

type PlanHostedPages

type PlanHostedPages struct {

	// URL to redirect to after signup on the hosted payment pages.
	SuccessUrl string `json:"success_url,omitempty"`

	// URL to redirect to on canceled signup on the hosted payment pages.
	CancelUrl string `json:"cancel_url,omitempty"`

	// If `true`, the customer will be sent directly to your `success_url` after a successful signup, bypassing Recurly's hosted confirmation page.
	BypassConfirmation bool `json:"bypass_confirmation,omitempty"`

	// Determines if the quantity field is displayed on the hosted pages for the plan.
	DisplayQuantity bool `json:"display_quantity,omitempty"`
	// contains filtered or unexported fields
}

func (*PlanHostedPages) GetResponse

func (resource *PlanHostedPages) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PlanHostedPagesCreate

type PlanHostedPagesCreate struct {

	// URL to redirect to after signup on the hosted payment pages.
	SuccessUrl *string `json:"success_url,omitempty"`

	// URL to redirect to on canceled signup on the hosted payment pages.
	CancelUrl *string `json:"cancel_url,omitempty"`

	// If `true`, the customer will be sent directly to your `success_url` after a successful signup, bypassing Recurly's hosted confirmation page.
	BypassConfirmation *bool `json:"bypass_confirmation,omitempty"`

	// Determines if the quantity field is displayed on the hosted pages for the plan.
	DisplayQuantity *bool `json:"display_quantity,omitempty"`
}

type PlanHostedPagesList

type PlanHostedPagesList struct {
	// contains filtered or unexported fields
}

PlanHostedPagesList allows you to paginate PlanHostedPages objects

func NewPlanHostedPagesList

func NewPlanHostedPagesList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PlanHostedPagesList

func (*PlanHostedPagesList) Count

func (list *PlanHostedPagesList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanHostedPagesList) CountWithContext

func (list *PlanHostedPagesList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanHostedPagesList) Data

func (list *PlanHostedPagesList) Data() []PlanHostedPages

func (*PlanHostedPagesList) Fetch

func (list *PlanHostedPagesList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PlanHostedPagesList) FetchWithContext

func (list *PlanHostedPagesList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PlanHostedPagesList) HasMore

func (list *PlanHostedPagesList) HasMore() bool

func (*PlanHostedPagesList) Next

func (list *PlanHostedPagesList) Next() string

type PlanHostedPagesLister

type PlanHostedPagesLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PlanHostedPages
	HasMore() bool
	Next() string
}

type PlanList

type PlanList struct {
	// contains filtered or unexported fields
}

PlanList allows you to paginate Plan objects

func NewPlanList

func NewPlanList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PlanList

func (*PlanList) Count

func (list *PlanList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanList) CountWithContext

func (list *PlanList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanList) Data

func (list *PlanList) Data() []Plan

func (*PlanList) Fetch

func (list *PlanList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PlanList) FetchWithContext

func (list *PlanList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PlanList) HasMore

func (list *PlanList) HasMore() bool

func (*PlanList) Next

func (list *PlanList) Next() string

type PlanLister

type PlanLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Plan
	HasMore() bool
	Next() string
}

type PlanMini

type PlanMini struct {

	// Plan ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
	Code string `json:"code,omitempty"`

	// This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
	Name string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*PlanMini) GetResponse

func (resource *PlanMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PlanMiniList

type PlanMiniList struct {
	// contains filtered or unexported fields
}

PlanMiniList allows you to paginate PlanMini objects

func NewPlanMiniList

func NewPlanMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PlanMiniList

func (*PlanMiniList) Count

func (list *PlanMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanMiniList) CountWithContext

func (list *PlanMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanMiniList) Data

func (list *PlanMiniList) Data() []PlanMini

func (*PlanMiniList) Fetch

func (list *PlanMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PlanMiniList) FetchWithContext

func (list *PlanMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PlanMiniList) HasMore

func (list *PlanMiniList) HasMore() bool

func (*PlanMiniList) Next

func (list *PlanMiniList) Next() string

type PlanMiniLister

type PlanMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PlanMini
	HasMore() bool
	Next() string
}

type PlanPricing

type PlanPricing struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan.
	SetupFee float64 `json:"setup_fee,omitempty"`

	// This field should not be sent when the pricing model is 'ramp'.
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive bool `json:"tax_inclusive,omitempty"`
	// contains filtered or unexported fields
}

func (*PlanPricing) GetResponse

func (resource *PlanPricing) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PlanPricingCreate

type PlanPricingCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan.
	SetupFee *float64 `json:"setup_fee,omitempty"`

	// This field should not be sent when the pricing model is 'ramp'.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`
}

type PlanPricingList

type PlanPricingList struct {
	// contains filtered or unexported fields
}

PlanPricingList allows you to paginate PlanPricing objects

func NewPlanPricingList

func NewPlanPricingList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PlanPricingList

func (*PlanPricingList) Count

func (list *PlanPricingList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanPricingList) CountWithContext

func (list *PlanPricingList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanPricingList) Data

func (list *PlanPricingList) Data() []PlanPricing

func (*PlanPricingList) Fetch

func (list *PlanPricingList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PlanPricingList) FetchWithContext

func (list *PlanPricingList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PlanPricingList) HasMore

func (list *PlanPricingList) HasMore() bool

func (*PlanPricingList) Next

func (list *PlanPricingList) Next() string

type PlanPricingLister

type PlanPricingLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PlanPricing
	HasMore() bool
	Next() string
}

type PlanRampInterval

type PlanRampInterval struct {

	// Represents the billing cycle where a ramp interval starts.
	StartingBillingCycle int `json:"starting_billing_cycle,omitempty"`

	// Represents the price for the ramp interval.
	Currencies []PlanRampPricing `json:"currencies,omitempty"`
	// contains filtered or unexported fields
}

func (*PlanRampInterval) GetResponse

func (resource *PlanRampInterval) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PlanRampIntervalCreate

type PlanRampIntervalCreate struct {

	// Represents the billing cycle where a ramp interval starts.
	StartingBillingCycle *int `json:"starting_billing_cycle,omitempty"`

	// Represents the price for the ramp interval.
	Currencies []PlanRampPricingCreate `json:"currencies,omitempty"`
}

type PlanRampIntervalList

type PlanRampIntervalList struct {
	// contains filtered or unexported fields
}

PlanRampIntervalList allows you to paginate PlanRampInterval objects

func NewPlanRampIntervalList

func NewPlanRampIntervalList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PlanRampIntervalList

func (*PlanRampIntervalList) Count

func (list *PlanRampIntervalList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanRampIntervalList) CountWithContext

func (list *PlanRampIntervalList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanRampIntervalList) Data

func (list *PlanRampIntervalList) Data() []PlanRampInterval

func (*PlanRampIntervalList) Fetch

func (list *PlanRampIntervalList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PlanRampIntervalList) FetchWithContext

func (list *PlanRampIntervalList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PlanRampIntervalList) HasMore

func (list *PlanRampIntervalList) HasMore() bool

func (*PlanRampIntervalList) Next

func (list *PlanRampIntervalList) Next() string

type PlanRampIntervalLister

type PlanRampIntervalLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PlanRampInterval
	HasMore() bool
	Next() string
}

type PlanRampPricing

type PlanRampPricing struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Represents the price for the Ramp Interval.
	UnitAmount float64 `json:"unit_amount,omitempty"`
	// contains filtered or unexported fields
}

func (*PlanRampPricing) GetResponse

func (resource *PlanRampPricing) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PlanRampPricingCreate

type PlanRampPricingCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Represents the price for the Ramp Interval.
	UnitAmount *float64 `json:"unit_amount,omitempty"`
}

type PlanRampPricingList

type PlanRampPricingList struct {
	// contains filtered or unexported fields
}

PlanRampPricingList allows you to paginate PlanRampPricing objects

func NewPlanRampPricingList

func NewPlanRampPricingList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PlanRampPricingList

func (*PlanRampPricingList) Count

func (list *PlanRampPricingList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanRampPricingList) CountWithContext

func (list *PlanRampPricingList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PlanRampPricingList) Data

func (list *PlanRampPricingList) Data() []PlanRampPricing

func (*PlanRampPricingList) Fetch

func (list *PlanRampPricingList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PlanRampPricingList) FetchWithContext

func (list *PlanRampPricingList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PlanRampPricingList) HasMore

func (list *PlanRampPricingList) HasMore() bool

func (*PlanRampPricingList) Next

func (list *PlanRampPricingList) Next() string

type PlanRampPricingLister

type PlanRampPricingLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []PlanRampPricing
	HasMore() bool
	Next() string
}

type PlanUpdate

type PlanUpdate struct {

	// Plan ID
	Id *string `json:"id,omitempty"`

	// Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.
	Code *string `json:"code,omitempty"`

	// This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
	Name *string `json:"name,omitempty"`

	// Optional description, not displayed.
	Description *string `json:"description,omitempty"`

	// Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// Units for the plan's trial period.
	TrialUnit *string `json:"trial_unit,omitempty"`

	// Length of plan's trial period in `trial_units`. `0` means `no trial`.
	TrialLength *int `json:"trial_length,omitempty"`

	// Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.
	TrialRequiresBillingInfo *bool `json:"trial_requires_billing_info,omitempty"`

	// Automatically terminate plans after a defined number of billing cycles.
	TotalBillingCycles *int `json:"total_billing_cycles,omitempty"`

	// Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.
	AutoRenew *bool `json:"auto_renew,omitempty"`

	// Ramp Intervals
	RampIntervals []PlanRampIntervalCreate `json:"ramp_intervals,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	SetupFeeLiabilityGlAccountId *string `json:"setup_fee_liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	SetupFeeRevenueGlAccountId *string `json:"setup_fee_revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	SetupFeePerformanceObligationId *string `json:"setup_fee_performance_obligation_id,omitempty"`

	// Setup fee revenue schedule type
	SetupFeeRevenueScheduleType *string `json:"setup_fee_revenue_schedule_type,omitempty"`

	// Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code.
	SetupFeeAccountingCode *string `json:"setup_fee_accounting_code,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraTransactionType *int `json:"avalara_transaction_type,omitempty"`

	// Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types.
	AvalaraServiceType *int `json:"avalara_service_type,omitempty"`

	// Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
	TaxCode *string `json:"tax_code,omitempty"`

	// `true` exempts tax on the plan, `false` applies tax on the plan.
	TaxExempt *bool `json:"tax_exempt,omitempty"`

	// Optional when the pricing model is 'ramp'.
	Currencies []PlanPricingCreate `json:"currencies,omitempty"`

	// Hosted pages settings
	HostedPages *PlanHostedPagesCreate `json:"hosted_pages,omitempty"`

	// Used to determine whether items can be assigned as add-ons to individual subscriptions.
	// If `true`, items can be assigned as add-ons to individual subscription add-ons.
	// If `false`, only plan add-ons can be used.
	AllowAnyItemOnSubscriptions *bool `json:"allow_any_item_on_subscriptions,omitempty"`

	// Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
	DunningCampaignId *string `json:"dunning_campaign_id,omitempty"`
}

type Pricing

type Pricing struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Unit price
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive bool `json:"tax_inclusive,omitempty"`
	// contains filtered or unexported fields
}

func (*Pricing) GetResponse

func (resource *Pricing) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type PricingCreate

type PricingCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Unit price
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`
}

type PricingList

type PricingList struct {
	// contains filtered or unexported fields
}

PricingList allows you to paginate Pricing objects

func NewPricingList

func NewPricingList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *PricingList

func (*PricingList) Count

func (list *PricingList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*PricingList) CountWithContext

func (list *PricingList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*PricingList) Data

func (list *PricingList) Data() []Pricing

func (*PricingList) Fetch

func (list *PricingList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*PricingList) FetchWithContext

func (list *PricingList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*PricingList) HasMore

func (list *PricingList) HasMore() bool

func (*PricingList) Next

func (list *PricingList) Next() string

type PricingLister

type PricingLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Pricing
	HasMore() bool
	Next() string
}

type ProrationSettings

type ProrationSettings struct {

	// Determines how the amount charged is determined for this change
	Charge *string `json:"charge,omitempty"`

	// Determines how the amount credited is determined for this change
	Credit *string `json:"credit,omitempty"`
}

type PurchaseCreate

type PurchaseCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	Account *AccountPurchase `json:"account,omitempty"`

	// The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
	BillingInfoId *string `json:"billing_info_id,omitempty"`

	// Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info.
	CollectionMethod *string `json:"collection_method,omitempty"`

	// For manual invoicing, this identifies the PO number associated with the subscription.
	PoNumber *string `json:"po_number,omitempty"`

	// Integer paired with `Net Terms Type` and representing the number
	// of days past the current date (for `net` Net Terms Type) or days after
	// the last day of the current month (for `eom` Net Terms Type) that the
	// invoice will become past due. For `manual` collection method, an additional 24 hours is
	// added to ensure the customer has the entire last day to make payment before
	// becoming past due. For example:
	// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
	// If an invoice is due `net 30`, it will become past due at 31 days exactly.
	// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
	// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.
	// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
	// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
	// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
	NetTerms *int `json:"net_terms,omitempty"`

	// Optionally supplied string that may be either `net` or `eom` (end-of-month).
	// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
	// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
	NetTermsType *string `json:"net_terms_type,omitempty"`

	// Terms and conditions to be put on the purchase invoice.
	TermsAndConditions *string `json:"terms_and_conditions,omitempty"`

	// Customer notes
	CustomerNotes *string `json:"customer_notes,omitempty"`

	// VAT reverse charge notes for cross border European tax settlement.
	VatReverseChargeNotes *string `json:"vat_reverse_charge_notes,omitempty"`

	// Notes to be put on the credit invoice resulting from credits in the purchase, if any.
	CreditCustomerNotes *string `json:"credit_customer_notes,omitempty"`

	// The default payment gateway identifier to be used for the purchase transaction.  This will also be applied as the default for any subscriptions included in the purchase request.
	GatewayCode *string `json:"gateway_code,omitempty"`

	Shipping *ShippingPurchase `json:"shipping,omitempty"`

	// A list of one time charges or credits to be created with the purchase.
	LineItems []LineItemCreate `json:"line_items,omitempty"`

	// A list of subscriptions to be created with the purchase.
	Subscriptions []SubscriptionPurchase `json:"subscriptions,omitempty"`

	// A list of coupon_codes to be redeemed on the subscription or account during the purchase.
	CouponCodes []string `json:"coupon_codes,omitempty"`

	// A gift card redemption code to be redeemed on the purchase invoice.
	GiftCardRedemptionCode *string `json:"gift_card_redemption_code,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`
}

type QueryParams

type QueryParams interface {
	// URLParams returns a list of key/value pairs to URL encode in the request URL
	URLParams() []KeyValue
}

The QueryParams interface is used to identify optional query string parameters.

type RateLimit

type RateLimit struct {
	Limit     int
	Remaining int
	// contains filtered or unexported fields
}

RateLimit contains information about the number of API requests available within the rate limit

func (RateLimit) ResetDate

func (limit RateLimit) ResetDate() *time.Time

ResetDate return the date when the API rate limit fully resets See https://dev.recurly.com/docs/rate-limits for more information.

func (RateLimit) String

func (limit RateLimit) String() string

String formats the rate limit

type RequestMetadata

type RequestMetadata struct {
	// ID is the request id assigned by Recurly to this request. Save this for support and debugging purposes.
	ID string
	// URL is the URL created for the request
	URL *url.URL
	// Method is the HTTP method used for the request. Ex (GET, POST, etc)
	Method string
}

type RequestOptions

type RequestOptions struct {
	// IdempotencyKey used to prevent duplicate requests
	IdempotencyKey string `json:"-"`
	// Header contains additional request headers for unique requests
	Header http.Header `json:"-"`
}

RequestOptions contains additional request parameters for the API client

func NewRequestOptions

func NewRequestOptions(opts ...Option) *RequestOptions

NewRequestOptions will create a new RequestOptions with the passed Options applied to it.

func (*RequestOptions) ApplyOptions

func (o *RequestOptions) ApplyOptions(opts ...Option) *RequestOptions

ApplyOptions will apply the passed Options to the RequestOptions.

type Resource

type Resource interface {
	GetResponse() *ResponseMetadata
	// contains filtered or unexported methods
}

type ResponseMetadata

type ResponseMetadata struct {
	// Deprecated is true if the version or endpoint is now deprecated and should not be used.
	Deprecated bool
	// IdempotencyPrior todo.
	IdempotencyPrior bool
	// DeprecationDate indicates the version or endpoint will sunset and should not be used after this date.
	DeprecationDate string
	// RateLimit indicates the remaining API requests before the rate limit is exceeded.
	RateLimit RateLimit
	// StatusCode contains the response's HTTP status code
	StatusCode int
	// Version indicates the response version
	Version string
	// TotalRecords is the header corresponding to the `Recurly-Total-Records`. The count of records matching this pager.
	TotalRecords *int64
	// Request is the metadata describing the request for this response
	Request RequestMetadata
}

ResponseMetadata is the response from Recurly's API

func (*ResponseMetadata) String

func (meta *ResponseMetadata) String() string

type Settings

type Settings struct {

	// - full:      Full Address (Street, City, State, Postal Code and Country)
	// - streetzip: Street and Postal Code only
	// - zip:       Postal Code only
	// - none:      No Address
	BillingAddressRequirement string `json:"billing_address_requirement,omitempty"`

	AcceptedCurrencies []string `json:"accepted_currencies,omitempty"`

	// The default 3-letter ISO 4217 currency code.
	DefaultCurrency string `json:"default_currency,omitempty"`
	// contains filtered or unexported fields
}

func (*Settings) GetResponse

func (resource *Settings) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SettingsList

type SettingsList struct {
	// contains filtered or unexported fields
}

SettingsList allows you to paginate Settings objects

func NewSettingsList

func NewSettingsList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SettingsList

func (*SettingsList) Count

func (list *SettingsList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SettingsList) CountWithContext

func (list *SettingsList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SettingsList) Data

func (list *SettingsList) Data() []Settings

func (*SettingsList) Fetch

func (list *SettingsList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*SettingsList) FetchWithContext

func (list *SettingsList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SettingsList) HasMore

func (list *SettingsList) HasMore() bool

func (*SettingsList) Next

func (list *SettingsList) Next() string

type SettingsLister

type SettingsLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Settings
	HasMore() bool
	Next() string
}

type ShippingAddress

type ShippingAddress struct {

	// Shipping Address ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Account ID
	AccountId string `json:"account_id,omitempty"`

	Nickname string `json:"nickname,omitempty"`

	FirstName string `json:"first_name,omitempty"`

	LastName string `json:"last_name,omitempty"`

	Company string `json:"company,omitempty"`

	Email string `json:"email,omitempty"`

	VatNumber string `json:"vat_number,omitempty"`

	Phone string `json:"phone,omitempty"`

	Street1 string `json:"street1,omitempty"`

	Street2 string `json:"street2,omitempty"`

	City string `json:"city,omitempty"`

	// State or province.
	Region string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode string `json:"postal_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country string `json:"country,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode string `json:"geo_code,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ShippingAddress) GetResponse

func (resource *ShippingAddress) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ShippingAddressCreate

type ShippingAddressCreate struct {
	Nickname *string `json:"nickname,omitempty"`

	FirstName *string `json:"first_name,omitempty"`

	LastName *string `json:"last_name,omitempty"`

	Company *string `json:"company,omitempty"`

	Email *string `json:"email,omitempty"`

	VatNumber *string `json:"vat_number,omitempty"`

	Phone *string `json:"phone,omitempty"`

	Street1 *string `json:"street1,omitempty"`

	Street2 *string `json:"street2,omitempty"`

	City *string `json:"city,omitempty"`

	// State or province.
	Region *string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode *string `json:"postal_code,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode *string `json:"geo_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country *string `json:"country,omitempty"`
}

type ShippingAddressList

type ShippingAddressList struct {
	// contains filtered or unexported fields
}

ShippingAddressList allows you to paginate ShippingAddress objects

func NewShippingAddressList

func NewShippingAddressList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ShippingAddressList

func (*ShippingAddressList) Count

func (list *ShippingAddressList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ShippingAddressList) CountWithContext

func (list *ShippingAddressList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ShippingAddressList) Data

func (list *ShippingAddressList) Data() []ShippingAddress

func (*ShippingAddressList) Fetch

func (list *ShippingAddressList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ShippingAddressList) FetchWithContext

func (list *ShippingAddressList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ShippingAddressList) HasMore

func (list *ShippingAddressList) HasMore() bool

func (*ShippingAddressList) Next

func (list *ShippingAddressList) Next() string

type ShippingAddressLister

type ShippingAddressLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ShippingAddress
	HasMore() bool
	Next() string
}

type ShippingAddressUpdate

type ShippingAddressUpdate struct {

	// Shipping Address ID
	Id *string `json:"id,omitempty"`

	Nickname *string `json:"nickname,omitempty"`

	FirstName *string `json:"first_name,omitempty"`

	LastName *string `json:"last_name,omitempty"`

	Company *string `json:"company,omitempty"`

	Email *string `json:"email,omitempty"`

	VatNumber *string `json:"vat_number,omitempty"`

	Phone *string `json:"phone,omitempty"`

	Street1 *string `json:"street1,omitempty"`

	Street2 *string `json:"street2,omitempty"`

	City *string `json:"city,omitempty"`

	// State or province.
	Region *string `json:"region,omitempty"`

	// Zip or postal code.
	PostalCode *string `json:"postal_code,omitempty"`

	// Country, 2-letter ISO 3166-1 alpha-2 code.
	Country *string `json:"country,omitempty"`

	// Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
	GeoCode *string `json:"geo_code,omitempty"`
}

type ShippingFeeCreate

type ShippingFeeCreate struct {

	// The id of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodId *string `json:"method_id,omitempty"`

	// The code of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodCode *string `json:"method_code,omitempty"`

	// This is priced in the purchase's currency.
	Amount *float64 `json:"amount,omitempty"`
}

type ShippingMethod

type ShippingMethod struct {

	// Shipping Method ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The internal name used identify the shipping method.
	Code string `json:"code,omitempty"`

	// The name of the shipping method displayed to customers.
	Name string `json:"name,omitempty"`

	// Accounting code for shipping method.
	AccountingCode string `json:"accounting_code,omitempty"`

	// Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax
	// code values are specific to each tax system. If you are using Recurly’s
	// built-in taxes the values are:
	// - `FR` – Common Carrier FOB Destination
	// - `FR022000` – Common Carrier FOB Origin
	// - `FR020400` – Non Common Carrier FOB Destination
	// - `FR020500` – Non Common Carrier FOB Origin
	// - `FR010100` – Delivery by Company Vehicle Before Passage of Title
	// - `FR010200` – Delivery by Company Vehicle After Passage of Title
	// - `NT` – Non-Taxable
	TaxCode string `json:"tax_code,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId string `json:"performance_obligation_id,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Deleted at
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*ShippingMethod) GetResponse

func (resource *ShippingMethod) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ShippingMethodCreate

type ShippingMethodCreate struct {

	// The internal name used identify the shipping method.
	Code *string `json:"code,omitempty"`

	// The name of the shipping method displayed to customers.
	Name *string `json:"name,omitempty"`

	// Accounting code for shipping method.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax
	// code values are specific to each tax system. If you are using Recurly’s
	// built-in taxes the values are:
	// - `FR` – Common Carrier FOB Destination
	// - `FR022000` – Common Carrier FOB Origin
	// - `FR020400` – Non Common Carrier FOB Destination
	// - `FR020500` – Non Common Carrier FOB Origin
	// - `FR010100` – Delivery by Company Vehicle Before Passage of Title
	// - `FR010200` – Delivery by Company Vehicle After Passage of Title
	// - `NT` – Non-Taxable
	TaxCode *string `json:"tax_code,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`
}

type ShippingMethodList

type ShippingMethodList struct {
	// contains filtered or unexported fields
}

ShippingMethodList allows you to paginate ShippingMethod objects

func NewShippingMethodList

func NewShippingMethodList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ShippingMethodList

func (*ShippingMethodList) Count

func (list *ShippingMethodList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ShippingMethodList) CountWithContext

func (list *ShippingMethodList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ShippingMethodList) Data

func (list *ShippingMethodList) Data() []ShippingMethod

func (*ShippingMethodList) Fetch

func (list *ShippingMethodList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ShippingMethodList) FetchWithContext

func (list *ShippingMethodList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ShippingMethodList) HasMore

func (list *ShippingMethodList) HasMore() bool

func (*ShippingMethodList) Next

func (list *ShippingMethodList) Next() string

type ShippingMethodLister

type ShippingMethodLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ShippingMethod
	HasMore() bool
	Next() string
}

type ShippingMethodMini

type ShippingMethodMini struct {

	// Shipping Method ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The internal name used identify the shipping method.
	Code string `json:"code,omitempty"`

	// The name of the shipping method displayed to customers.
	Name string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*ShippingMethodMini) GetResponse

func (resource *ShippingMethodMini) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type ShippingMethodMiniList

type ShippingMethodMiniList struct {
	// contains filtered or unexported fields
}

ShippingMethodMiniList allows you to paginate ShippingMethodMini objects

func NewShippingMethodMiniList

func NewShippingMethodMiniList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *ShippingMethodMiniList

func (*ShippingMethodMiniList) Count

func (list *ShippingMethodMiniList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*ShippingMethodMiniList) CountWithContext

func (list *ShippingMethodMiniList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*ShippingMethodMiniList) Data

func (*ShippingMethodMiniList) Fetch

func (list *ShippingMethodMiniList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*ShippingMethodMiniList) FetchWithContext

func (list *ShippingMethodMiniList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*ShippingMethodMiniList) HasMore

func (list *ShippingMethodMiniList) HasMore() bool

func (*ShippingMethodMiniList) Next

func (list *ShippingMethodMiniList) Next() string

type ShippingMethodMiniLister

type ShippingMethodMiniLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []ShippingMethodMini
	HasMore() bool
	Next() string
}

type ShippingMethodUpdate

type ShippingMethodUpdate struct {

	// The internal name used identify the shipping method.
	Code *string `json:"code,omitempty"`

	// The name of the shipping method displayed to customers.
	Name *string `json:"name,omitempty"`

	// Accounting code for shipping method.
	AccountingCode *string `json:"accounting_code,omitempty"`

	// Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax
	// code values are specific to each tax system. If you are using Recurly’s
	// built-in taxes the values are:
	// - `FR` – Common Carrier FOB Destination
	// - `FR022000` – Common Carrier FOB Origin
	// - `FR020400` – Non Common Carrier FOB Destination
	// - `FR020500` – Non Common Carrier FOB Origin
	// - `FR010100` – Delivery by Company Vehicle Before Passage of Title
	// - `FR010200` – Delivery by Company Vehicle After Passage of Title
	// - `NT` – Non-Taxable
	TaxCode *string `json:"tax_code,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	LiabilityGlAccountId *string `json:"liability_gl_account_id,omitempty"`

	// The ID of a general ledger account. General ledger accounts are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	RevenueGlAccountId *string `json:"revenue_gl_account_id,omitempty"`

	// The ID of a performance obligation. Performance obligations are
	// only accessible as a part of the Recurly RevRec Standard and
	// Recurly RevRec Advanced features.
	PerformanceObligationId *string `json:"performance_obligation_id,omitempty"`
}

type ShippingPurchase

type ShippingPurchase struct {

	// Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence.
	AddressId *string `json:"address_id,omitempty"`

	Address *ShippingAddressCreate `json:"address,omitempty"`

	// A list of shipping fees to be created as charges with the purchase.
	Fees []ShippingFeeCreate `json:"fees,omitempty"`
}

type Site

type Site struct {

	// Site ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	Subdomain string `json:"subdomain,omitempty"`

	// This value is used to configure RecurlyJS to submit tokenized billing information.
	PublicApiKey string `json:"public_api_key,omitempty"`

	// Mode
	Mode string `json:"mode,omitempty"`

	Address Address `json:"address,omitempty"`

	Settings Settings `json:"settings,omitempty"`

	// A list of features enabled for the site.
	Features []string `json:"features,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Deleted at
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Site) GetResponse

func (resource *Site) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SiteList

type SiteList struct {
	// contains filtered or unexported fields
}

SiteList allows you to paginate Site objects

func NewSiteList

func NewSiteList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SiteList

func (*SiteList) Count

func (list *SiteList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SiteList) CountWithContext

func (list *SiteList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SiteList) Data

func (list *SiteList) Data() []Site

func (*SiteList) Fetch

func (list *SiteList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*SiteList) FetchWithContext

func (list *SiteList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SiteList) HasMore

func (list *SiteList) HasMore() bool

func (*SiteList) Next

func (list *SiteList) Next() string

type SiteLister

type SiteLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Site
	HasMore() bool
	Next() string
}

type SortField

type SortField string

SortField specifies a field to sort against

type Subscription

type Subscription struct {

	// Subscription ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
	Uuid string `json:"uuid,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// Just the important parts.
	Plan PlanMini `json:"plan,omitempty"`

	// State
	State string `json:"state,omitempty"`

	// Subscription shipping details
	Shipping SubscriptionShipping `json:"shipping,omitempty"`

	// Returns subscription level coupon redemptions that are tied to this subscription.
	CouponRedemptions []CouponRedemptionMini `json:"coupon_redemptions,omitempty"`

	// Subscription Change
	PendingChange SubscriptionChange `json:"pending_change,omitempty"`

	// Current billing period started at
	CurrentPeriodStartedAt time.Time `json:"current_period_started_at,omitempty"`

	// Current billing period ends at
	CurrentPeriodEndsAt time.Time `json:"current_period_ends_at,omitempty"`

	// The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods.
	CurrentTermStartedAt time.Time `json:"current_term_started_at,omitempty"`

	// When the term ends. This is calculated by a plan's interval and `total_billing_cycles` in a term. Subscription changes with a `timeframe=renewal` will be applied on this date.
	CurrentTermEndsAt time.Time `json:"current_term_ends_at,omitempty"`

	// Trial period started at
	TrialStartedAt time.Time `json:"trial_started_at,omitempty"`

	// Trial period ends at
	TrialEndsAt time.Time `json:"trial_ends_at,omitempty"`

	// The remaining billing cycles in the current term.
	RemainingBillingCycles int `json:"remaining_billing_cycles,omitempty"`

	// The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire.
	TotalBillingCycles int `json:"total_billing_cycles,omitempty"`

	// If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
	RenewalBillingCycles int `json:"renewal_billing_cycles,omitempty"`

	// Whether the subscription renews at the end of its term.
	AutoRenew bool `json:"auto_renew,omitempty"`

	// The ramp intervals representing the pricing schedule for the subscription.
	RampIntervals []SubscriptionRampIntervalResponse `json:"ramp_intervals,omitempty"`

	// Null unless subscription is paused or will pause at the end of the current billing period.
	PausedAt time.Time `json:"paused_at,omitempty"`

	// Null unless subscription is paused or will pause at the end of the current billing period.
	RemainingPauseCycles int `json:"remaining_pause_cycles,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Revenue schedule type
	RevenueScheduleType string `json:"revenue_schedule_type,omitempty"`

	// Subscription unit price
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.
	TaxInclusive bool `json:"tax_inclusive,omitempty"`

	// Subscription quantity
	Quantity int `json:"quantity,omitempty"`

	// Add-ons
	AddOns []SubscriptionAddOn `json:"add_ons,omitempty"`

	// Total price of add-ons
	AddOnsTotal float64 `json:"add_ons_total,omitempty"`

	// Estimated total, before tax.
	Subtotal float64 `json:"subtotal,omitempty"`

	// Only for merchants using Recurly's In-The-Box taxes.
	Tax float64 `json:"tax,omitempty"`

	// Only for merchants using Recurly's In-The-Box taxes.
	TaxInfo TaxInfo `json:"tax_info,omitempty"`

	// Estimated total
	Total float64 `json:"total,omitempty"`

	// Collection method
	CollectionMethod string `json:"collection_method,omitempty"`

	// For manual invoicing, this identifies the PO number associated with the subscription.
	PoNumber string `json:"po_number,omitempty"`

	// Integer paired with `Net Terms Type` and representing the number
	// of days past the current date (for `net` Net Terms Type) or days after
	// the last day of the current month (for `eom` Net Terms Type) that the
	// invoice will become past due. For `manual` collection method, an additional 24 hours is
	// added to ensure the customer has the entire last day to make payment before
	// becoming past due. For example:
	// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
	// If an invoice is due `net 30`, it will become past due at 31 days exactly.
	// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
	// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.
	// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
	// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
	// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
	NetTerms int `json:"net_terms,omitempty"`

	// Optionally supplied string that may be either `net` or `eom` (end-of-month).
	// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
	// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
	NetTermsType string `json:"net_terms_type,omitempty"`

	// Terms and conditions
	TermsAndConditions string `json:"terms_and_conditions,omitempty"`

	// Customer notes
	CustomerNotes string `json:"customer_notes,omitempty"`

	// Expiration reason
	ExpirationReason string `json:"expiration_reason,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomField `json:"custom_fields,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Last updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Activated at
	ActivatedAt time.Time `json:"activated_at,omitempty"`

	// Canceled at
	CanceledAt time.Time `json:"canceled_at,omitempty"`

	// Expires at
	ExpiresAt time.Time `json:"expires_at,omitempty"`

	// Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared.
	BankAccountAuthorizedAt time.Time `json:"bank_account_authorized_at,omitempty"`

	// If present, this subscription's transactions will use the payment gateway with this code.
	GatewayCode string `json:"gateway_code,omitempty"`

	// Billing Info ID.
	BillingInfoId string `json:"billing_info_id,omitempty"`

	// The invoice ID of the latest invoice created for an active subscription.
	ActiveInvoiceId string `json:"active_invoice_id,omitempty"`

	// Whether the subscription was started with a gift certificate.
	StartedWithGift bool `json:"started_with_gift,omitempty"`

	// When the subscription was converted from a gift card.
	ConvertedAt time.Time `json:"converted_at,omitempty"`

	// Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort.
	ActionResult map[string]interface{} `json:"action_result,omitempty"`
	// contains filtered or unexported fields
}

func (*Subscription) GetResponse

func (resource *Subscription) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionAddOn

type SubscriptionAddOn struct {

	// Subscription Add-on ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Subscription ID
	SubscriptionId string `json:"subscription_id,omitempty"`

	// Just the important parts.
	AddOn AddOnMini `json:"add_on,omitempty"`

	// Used to determine where the associated add-on data is pulled from. If this value is set to
	// `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated
	// `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then
	// the associated add-on data will be pulled from the site's item catalog.
	AddOnSource string `json:"add_on_source,omitempty"`

	// Add-on quantity
	Quantity int `json:"quantity,omitempty"`

	// Supports up to 2 decimal places.
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// Supports up to 9 decimal places.
	UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`

	// Revenue schedule type
	RevenueScheduleType string `json:"revenue_schedule_type,omitempty"`

	// The pricing model for the add-on.  For more information,
	// [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our
	// [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how
	// to configure quantity-based pricing models.
	TierType string `json:"tier_type,omitempty"`

	// The type of calculation to be employed for an add-on.  Cumulative billing will sum all usage records created in the current billing cycle.  Last-in-period billing will apply only the most recent usage record in the billing period.  If no value is specified, cumulative billing will be used.
	UsageCalculationType string `json:"usage_calculation_type,omitempty"`

	// The time at which usage totals are reset for billing purposes.
	UsageTimeframe string `json:"usage_timeframe,omitempty"`

	// If tiers are provided in the request, all existing tiers on the Subscription Add-on will be
	// removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and
	// add_on.usage_type is percentage use percentage_tiers instead.
	// There must be one tier without an `ending_quantity` value which represents the final tier.
	Tiers []SubscriptionAddOnTier `json:"tiers,omitempty"`

	// If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
	// removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and
	// add_on.usage_type is percentage. There must be one tier without an `ending_amount` value which represents the final tier.
	// This feature is currently in development and requires approval and enablement, please contact support.
	PercentageTiers []SubscriptionAddOnPercentageTier `json:"percentage_tiers,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage.
	UsagePercentage float64 `json:"usage_percentage,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Expired at
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionAddOn) GetResponse

func (resource *SubscriptionAddOn) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionAddOnCreate

type SubscriptionAddOnCreate struct {

	// If `add_on_source` is set to `plan_add_on` or left blank, then plan's add-on `code` should be used.
	// If `add_on_source` is set to `item`, then the `code` from the associated item should be used.
	Code *string `json:"code,omitempty"`

	// Used to determine where the associated add-on data is pulled from. If this value is set to
	// `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated
	// `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then
	// the associated add-on data will be pulled from the site's item catalog.
	AddOnSource *string `json:"add_on_source,omitempty"`

	// Quantity
	Quantity *int `json:"quantity,omitempty"`

	// Allows up to 2 decimal places. Optionally, override the add-on's default unit amount.
	// If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places.  Optionally, override the add-on's default unit amount.
	// If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided.
	// Only supported when the plan add-on's `add_on_type` = `usage`.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	UnitAmountDecimal *string `json:"unit_amount_decimal,omitempty"`

	// If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object
	// must include one to many tiers with `ending_quantity` and `unit_amount`.
	// There must be one tier without an `ending_quantity` value which represents the final tier.
	// See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html)
	// for an overview of how to configure quantity-based pricing models.
	Tiers []SubscriptionAddOnTierCreate `json:"tiers,omitempty"`

	// If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
	// removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value
	// which represents the final tier. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is
	// percentage. This feature is currently in development and requires approval and enablement, please contact support.
	PercentageTiers []SubscriptionAddOnPercentageTierCreate `json:"percentage_tiers,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage and `usage_type` is percentage. Must be omitted otherwise. `usage_percentage` does not support tiers. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.
	UsagePercentage *float64 `json:"usage_percentage,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`
}

type SubscriptionAddOnList

type SubscriptionAddOnList struct {
	// contains filtered or unexported fields
}

SubscriptionAddOnList allows you to paginate SubscriptionAddOn objects

func NewSubscriptionAddOnList

func NewSubscriptionAddOnList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionAddOnList

func (*SubscriptionAddOnList) Count

func (list *SubscriptionAddOnList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionAddOnList) CountWithContext

func (list *SubscriptionAddOnList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionAddOnList) Data

func (*SubscriptionAddOnList) Fetch

func (list *SubscriptionAddOnList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionAddOnList) FetchWithContext

func (list *SubscriptionAddOnList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionAddOnList) HasMore

func (list *SubscriptionAddOnList) HasMore() bool

func (*SubscriptionAddOnList) Next

func (list *SubscriptionAddOnList) Next() string

type SubscriptionAddOnLister

type SubscriptionAddOnLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []SubscriptionAddOn
	HasMore() bool
	Next() string
}

type SubscriptionAddOnPercentageTier

type SubscriptionAddOnPercentageTier struct {

	// Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
	EndingAmount float64 `json:"ending_amount,omitempty"`

	// The percentage taken of the monetary amount of usage tracked.
	// This can be up to 4 decimal places represented as a string.
	UsagePercentage string `json:"usage_percentage,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionAddOnPercentageTier) GetResponse

func (resource *SubscriptionAddOnPercentageTier) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionAddOnPercentageTierCreate

type SubscriptionAddOnPercentageTierCreate struct {

	// Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier.
	EndingAmount *float64 `json:"ending_amount,omitempty"`

	// The percentage taken of the monetary amount of usage tracked.
	// This can be up to 4 decimal places represented as a string.
	UsagePercentage *string `json:"usage_percentage,omitempty"`
}

type SubscriptionAddOnPercentageTierList

type SubscriptionAddOnPercentageTierList struct {
	// contains filtered or unexported fields
}

SubscriptionAddOnPercentageTierList allows you to paginate SubscriptionAddOnPercentageTier objects

func NewSubscriptionAddOnPercentageTierList

func NewSubscriptionAddOnPercentageTierList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionAddOnPercentageTierList

func (*SubscriptionAddOnPercentageTierList) Count

Count returns the count of items on the server that match this pager

func (*SubscriptionAddOnPercentageTierList) CountWithContext

func (list *SubscriptionAddOnPercentageTierList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionAddOnPercentageTierList) Data

func (*SubscriptionAddOnPercentageTierList) Fetch

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionAddOnPercentageTierList) FetchWithContext

func (list *SubscriptionAddOnPercentageTierList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionAddOnPercentageTierList) HasMore

func (list *SubscriptionAddOnPercentageTierList) HasMore() bool

func (*SubscriptionAddOnPercentageTierList) Next

type SubscriptionAddOnPercentageTierLister

type SubscriptionAddOnPercentageTierLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []SubscriptionAddOnPercentageTier
	HasMore() bool
	Next() string
}

type SubscriptionAddOnTier

type SubscriptionAddOnTier struct {

	// Ending quantity for the tier.  This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
	EndingQuantity int `json:"ending_quantity,omitempty"`

	// Allows up to 2 decimal places. Optionally, override the tiers' default unit amount. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places.  Optionally, override tiers' default unit amount.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	// If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
	UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`

	// (deprecated) -- Use the percentage_tiers object instead.
	UsagePercentage string `json:"usage_percentage,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionAddOnTier) GetResponse

func (resource *SubscriptionAddOnTier) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionAddOnTierCreate

type SubscriptionAddOnTierCreate struct {

	// Ending quantity for the tier.  This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
	EndingQuantity *int `json:"ending_quantity,omitempty"`

	// Allows up to 2 decimal places. Optionally, override the tiers' default unit amount. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places.  Optionally, override tiers' default unit amount.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	// If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided.
	UnitAmountDecimal *string `json:"unit_amount_decimal,omitempty"`

	// (deprecated) -- Use the percentage_tiers object instead.
	UsagePercentage *string `json:"usage_percentage,omitempty"`
}

type SubscriptionAddOnTierList

type SubscriptionAddOnTierList struct {
	// contains filtered or unexported fields
}

SubscriptionAddOnTierList allows you to paginate SubscriptionAddOnTier objects

func NewSubscriptionAddOnTierList

func NewSubscriptionAddOnTierList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionAddOnTierList

func (*SubscriptionAddOnTierList) Count

func (list *SubscriptionAddOnTierList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionAddOnTierList) CountWithContext

func (list *SubscriptionAddOnTierList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionAddOnTierList) Data

func (*SubscriptionAddOnTierList) Fetch

func (list *SubscriptionAddOnTierList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionAddOnTierList) FetchWithContext

func (list *SubscriptionAddOnTierList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionAddOnTierList) HasMore

func (list *SubscriptionAddOnTierList) HasMore() bool

func (*SubscriptionAddOnTierList) Next

func (list *SubscriptionAddOnTierList) Next() string

type SubscriptionAddOnTierLister

type SubscriptionAddOnTierLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []SubscriptionAddOnTier
	HasMore() bool
	Next() string
}

type SubscriptionAddOnUpdate

type SubscriptionAddOnUpdate struct {

	// When an id is provided, the existing subscription add-on attributes will
	// persist unless overridden in the request.
	Id *string `json:"id,omitempty"`

	// If a code is provided without an id, the subscription add-on attributes
	// will be set to the current value for those attributes on the plan add-on
	// unless provided in the request. If `add_on_source` is set to `plan_add_on`
	// or left blank, then plan's add-on `code` should be used. If `add_on_source`
	// is set to `item`, then the `code` from the associated item should be used.
	Code *string `json:"code,omitempty"`

	// Used to determine where the associated add-on data is pulled from. If this value is set to
	// `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated
	// `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then
	// the associated add-on data will be pulled from the site's item catalog.
	AddOnSource *string `json:"add_on_source,omitempty"`

	// Quantity
	Quantity *int `json:"quantity,omitempty"`

	// Allows up to 2 decimal places. Optionally, override the add-on's default unit amount.
	// If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places. Optionally, override the add-on's default unit amount.
	// If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided.
	// Only supported when the plan add-on's `add_on_type` = `usage`.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	UnitAmountDecimal *string `json:"unit_amount_decimal,omitempty"`

	// If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object
	// must include one to many tiers with `ending_quantity` and `unit_amount`.
	// There must be one tier without an `ending_quantity` value which represents the final tier.
	Tiers []SubscriptionAddOnTierCreate `json:"tiers,omitempty"`

	// If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be
	// removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and
	// add_on.usage_type is percentage. There must be one tier without an `ending_amount` value which represents the
	// final tier. This feature is currently in development and requires approval and enablement, please contact support.
	PercentageTiers []SubscriptionAddOnPercentageTierCreate `json:"percentage_tiers,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage.
	UsagePercentage *float64 `json:"usage_percentage,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`
}

type SubscriptionCancel

type SubscriptionCancel struct {

	// The timeframe parameter controls when the expiration takes place. The `bill_date` timeframe causes the subscription to expire when the subscription is scheduled to bill next. The `term_end` timeframe causes the subscription to continue to bill until the end of the subscription term, then expire.
	Timeframe *string `json:"timeframe,omitempty"`
}

type SubscriptionChange

type SubscriptionChange struct {

	// The ID of the Subscription Change.
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The ID of the subscription that is going to be changed.
	SubscriptionId string `json:"subscription_id,omitempty"`

	// Just the important parts.
	Plan PlanMini `json:"plan,omitempty"`

	// These add-ons will be used when the subscription renews.
	AddOns []SubscriptionAddOn `json:"add_ons,omitempty"`

	// Unit amount
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive bool `json:"tax_inclusive,omitempty"`

	// Subscription quantity
	Quantity int `json:"quantity,omitempty"`

	// Subscription shipping details
	Shipping SubscriptionShipping `json:"shipping,omitempty"`

	// Activated at
	ActivateAt time.Time `json:"activate_at,omitempty"`

	// Returns `true` if the subscription change is activated.
	Activated bool `json:"activated,omitempty"`

	// Revenue schedule type
	RevenueScheduleType string `json:"revenue_schedule_type,omitempty"`

	// Invoice Collection
	InvoiceCollection InvoiceCollection `json:"invoice_collection,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomField `json:"custom_fields,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Deleted at
	DeletedAt time.Time `json:"deleted_at,omitempty"`

	// Accept nested attributes for three_d_secure_action_result_token_id
	BillingInfo SubscriptionChangeBillingInfo `json:"billing_info,omitempty"`

	// The ramp intervals representing the pricing schedule for the subscription.
	RampIntervals []SubscriptionRampIntervalResponse `json:"ramp_intervals,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionChange) GetResponse

func (resource *SubscriptionChange) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionChangeBillingInfo

type SubscriptionChangeBillingInfo struct {

	// A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
	ThreeDSecureActionResultTokenId string `json:"three_d_secure_action_result_token_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionChangeBillingInfo) GetResponse

func (resource *SubscriptionChangeBillingInfo) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionChangeBillingInfoCreate

type SubscriptionChangeBillingInfoCreate struct {

	// A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.
	ThreeDSecureActionResultTokenId *string `json:"three_d_secure_action_result_token_id,omitempty"`
}

type SubscriptionChangeBillingInfoList

type SubscriptionChangeBillingInfoList struct {
	// contains filtered or unexported fields
}

SubscriptionChangeBillingInfoList allows you to paginate SubscriptionChangeBillingInfo objects

func NewSubscriptionChangeBillingInfoList

func NewSubscriptionChangeBillingInfoList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionChangeBillingInfoList

func (*SubscriptionChangeBillingInfoList) Count

func (list *SubscriptionChangeBillingInfoList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionChangeBillingInfoList) CountWithContext

func (list *SubscriptionChangeBillingInfoList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionChangeBillingInfoList) Data

func (*SubscriptionChangeBillingInfoList) Fetch

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionChangeBillingInfoList) FetchWithContext

func (list *SubscriptionChangeBillingInfoList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionChangeBillingInfoList) HasMore

func (list *SubscriptionChangeBillingInfoList) HasMore() bool

func (*SubscriptionChangeBillingInfoList) Next

type SubscriptionChangeBillingInfoLister

type SubscriptionChangeBillingInfoLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []SubscriptionChangeBillingInfo
	HasMore() bool
	Next() string
}

type SubscriptionChangeCreate

type SubscriptionChangeCreate struct {

	// The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription term ends. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to `term_end` or `bill_date` so the change takes effect at a scheduled billing date. The `renewal` timeframe option is accepted as an alias for `term_end`.
	Timeframe *string `json:"timeframe,omitempty"`

	// If you want to change to a new plan, you can provide the plan's code or id. If both are provided the `plan_id` will be used.
	PlanId *string `json:"plan_id,omitempty"`

	// If you want to change to a new plan, you can provide the plan's code or id. If both are provided the `plan_id` will be used.
	PlanCode *string `json:"plan_code,omitempty"`

	// Optionally, sets custom pricing for the subscription, overriding the plan's default unit amount. The subscription's current currency will be used.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`

	// Optionally override the default quantity of 1.
	Quantity *int `json:"quantity,omitempty"`

	// Shipping addresses are tied to a customer's account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription.
	Shipping *SubscriptionChangeShippingCreate `json:"shipping,omitempty"`

	// A list of coupon_codes to be redeemed on the subscription during the change. Only allowed if timeframe is now and you change something about the subscription that creates an invoice.
	CouponCodes []string `json:"coupon_codes,omitempty"`

	// If you provide a value for this field it will replace any
	// existing add-ons. So, when adding or modifying an add-on, you need to
	// include the existing subscription add-ons. Unchanged add-ons can be included
	// just using the subscription add-on”s ID: `{"id": "abc123"}`. If this
	// value is omitted your existing add-ons will be unaffected. To remove all
	// existing add-ons, this value should be an empty array.'
	// If a subscription add-on's `code` is supplied without the `id`,
	// `{"code": "def456"}`, the subscription add-on attributes will be set to the
	// current values of the plan add-on unless provided in the request.
	// - If an `id` is passed, any attributes not passed in will pull from the
	//   existing subscription add-on
	// - If a `code` is passed, any attributes not passed in will pull from the
	//   current values of the plan add-on
	// - Attributes passed in as part of the request will override either of the
	//   above scenarios
	AddOns []SubscriptionAddOnUpdate `json:"add_ons,omitempty"`

	// Collection method
	CollectionMethod *string `json:"collection_method,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// For manual invoicing, this identifies the PO number associated with the subscription.
	PoNumber *string `json:"po_number,omitempty"`

	// Integer normally paired with `Net Terms Type` and representing the number of days past
	// the current date (for `net` Net Terms Type) or days after the last day of the current
	// month (for `eom` Net Terms Type) that the invoice will become past due. During a subscription
	// change, it's not necessary to provide both the `Net Terms Type` and `Net Terms` parameters.
	// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
	// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
	NetTerms *int `json:"net_terms,omitempty"`

	// Optionally supplied string that may be either `net` or `eom` (end-of-month).
	// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
	// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
	NetTermsType *string `json:"net_terms_type,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`

	BillingInfo *SubscriptionChangeBillingInfoCreate `json:"billing_info,omitempty"`

	// The new set of ramp intervals for the subscription.
	RampIntervals []SubscriptionRampInterval `json:"ramp_intervals,omitempty"`

	// Allows you to control how any resulting charges and credits will be calculated and prorated.
	ProrationSettings *ProrationSettings `json:"proration_settings,omitempty"`
}

type SubscriptionChangeList

type SubscriptionChangeList struct {
	// contains filtered or unexported fields
}

SubscriptionChangeList allows you to paginate SubscriptionChange objects

func NewSubscriptionChangeList

func NewSubscriptionChangeList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionChangeList

func (*SubscriptionChangeList) Count

func (list *SubscriptionChangeList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionChangeList) CountWithContext

func (list *SubscriptionChangeList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionChangeList) Data

func (*SubscriptionChangeList) Fetch

func (list *SubscriptionChangeList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionChangeList) FetchWithContext

func (list *SubscriptionChangeList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionChangeList) HasMore

func (list *SubscriptionChangeList) HasMore() bool

func (*SubscriptionChangeList) Next

func (list *SubscriptionChangeList) Next() string

type SubscriptionChangeLister

type SubscriptionChangeLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []SubscriptionChange
	HasMore() bool
	Next() string
}

type SubscriptionChangeShippingCreate

type SubscriptionChangeShippingCreate struct {

	// The id of the shipping method used to deliver the subscription. To remove shipping set this to `null` and the `amount=0`. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodId *string `json:"method_id,omitempty"`

	// The code of the shipping method used to deliver the subscription. To remove shipping set this to `null` and the `amount=0`. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodCode *string `json:"method_code,omitempty"`

	// Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required.
	Amount *float64 `json:"amount,omitempty"`

	// Assign a shipping address from the account's existing shipping addresses. If this and address are both present, address will take precedence.
	AddressId *string `json:"address_id,omitempty"`

	Address *ShippingAddressCreate `json:"address,omitempty"`
}

type SubscriptionCreate

type SubscriptionCreate struct {

	// You must provide either a `plan_code` or `plan_id`. If both are provided the `plan_id` will be used.
	PlanCode *string `json:"plan_code,omitempty"`

	// You must provide either a `plan_code` or `plan_id`. If both are provided the `plan_id` will be used.
	PlanId *string `json:"plan_id,omitempty"`

	Account *AccountCreate `json:"account,omitempty"`

	// The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
	BillingInfoId *string `json:"billing_info_id,omitempty"`

	// Create a shipping address on the account and assign it to the subscription.
	Shipping *SubscriptionShippingCreate `json:"shipping,omitempty"`

	// Collection method
	CollectionMethod *string `json:"collection_method,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`

	// Optionally override the default quantity of 1.
	Quantity *int `json:"quantity,omitempty"`

	// Add-ons
	AddOns []SubscriptionAddOnCreate `json:"add_ons,omitempty"`

	// A list of coupon_codes to be redeemed on the subscription or account during the purchase.
	CouponCodes []string `json:"coupon_codes,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.
	TrialEndsAt *time.Time `json:"trial_ends_at,omitempty"`

	// If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
	StartsAt *time.Time `json:"starts_at,omitempty"`

	// If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires.
	NextBillDate *time.Time `json:"next_bill_date,omitempty"`

	// The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire.
	TotalBillingCycles *int `json:"total_billing_cycles,omitempty"`

	// If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
	RenewalBillingCycles *int `json:"renewal_billing_cycles,omitempty"`

	// Whether the subscription renews at the end of its term.
	AutoRenew *bool `json:"auto_renew,omitempty"`

	// The new set of ramp intervals for the subscription.
	RampIntervals []SubscriptionRampInterval `json:"ramp_intervals,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
	TermsAndConditions *string `json:"terms_and_conditions,omitempty"`

	// This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
	CustomerNotes *string `json:"customer_notes,omitempty"`

	// If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice.
	CreditCustomerNotes *string `json:"credit_customer_notes,omitempty"`

	// For manual invoicing, this identifies the PO number associated with the subscription.
	PoNumber *string `json:"po_number,omitempty"`

	// Integer paired with `Net Terms Type` and representing the number
	// of days past the current date (for `net` Net Terms Type) or days after
	// the last day of the current month (for `eom` Net Terms Type) that the
	// invoice will become past due. For `manual` collection method, an additional 24 hours is
	// added to ensure the customer has the entire last day to make payment before
	// becoming past due. For example:
	// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
	// If an invoice is due `net 30`, it will become past due at 31 days exactly.
	// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
	// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.
	// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
	// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
	// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
	NetTerms *int `json:"net_terms,omitempty"`

	// Optionally supplied string that may be either `net` or `eom` (end-of-month).
	// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
	// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
	NetTermsType *string `json:"net_terms_type,omitempty"`

	// If present, this subscription's transactions will use the payment gateway with this code.
	GatewayCode *string `json:"gateway_code,omitempty"`

	// An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
	TransactionType *string `json:"transaction_type,omitempty"`

	// A gift card redemption code to be redeemed on the purchase invoice.
	GiftCardRedemptionCode *string `json:"gift_card_redemption_code,omitempty"`

	// Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.
	Bulk *bool `json:"bulk,omitempty"`
}

type SubscriptionList

type SubscriptionList struct {
	// contains filtered or unexported fields
}

SubscriptionList allows you to paginate Subscription objects

func NewSubscriptionList

func NewSubscriptionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionList

func (*SubscriptionList) Count

func (list *SubscriptionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionList) CountWithContext

func (list *SubscriptionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionList) Data

func (list *SubscriptionList) Data() []Subscription

func (*SubscriptionList) Fetch

func (list *SubscriptionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionList) FetchWithContext

func (list *SubscriptionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionList) HasMore

func (list *SubscriptionList) HasMore() bool

func (*SubscriptionList) Next

func (list *SubscriptionList) Next() string

type SubscriptionLister

type SubscriptionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Subscription
	HasMore() bool
	Next() string
}

type SubscriptionPause

type SubscriptionPause struct {

	// Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription.
	RemainingPauseCycles *int `json:"remaining_pause_cycles,omitempty"`
}

type SubscriptionPurchase

type SubscriptionPurchase struct {

	// Plan code
	PlanCode *string `json:"plan_code,omitempty"`

	// Plan ID
	PlanId *string `json:"plan_id,omitempty"`

	// Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`

	// Optionally override the default quantity of 1.
	Quantity *int `json:"quantity,omitempty"`

	// Add-ons
	AddOns []SubscriptionAddOnCreate `json:"add_ons,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// Create a shipping address on the account and assign it to the subscription.
	Shipping *SubscriptionShippingPurchase `json:"shipping,omitempty"`

	// If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.
	TrialEndsAt *time.Time `json:"trial_ends_at,omitempty"`

	// If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
	StartsAt *time.Time `json:"starts_at,omitempty"`

	// If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires.
	NextBillDate *time.Time `json:"next_bill_date,omitempty"`

	// The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire.
	TotalBillingCycles *int `json:"total_billing_cycles,omitempty"`

	// If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
	RenewalBillingCycles *int `json:"renewal_billing_cycles,omitempty"`

	// Whether the subscription renews at the end of its term.
	AutoRenew *bool `json:"auto_renew,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// The new set of ramp intervals for the subscription.
	RampIntervals []SubscriptionRampInterval `json:"ramp_intervals,omitempty"`

	// Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.
	Bulk *bool `json:"bulk,omitempty"`
}

type SubscriptionRampInterval

type SubscriptionRampInterval struct {

	// Represents the billing cycle where a ramp interval starts.
	StartingBillingCycle *int `json:"starting_billing_cycle,omitempty"`

	// Represents the price for the ramp interval.
	UnitAmount *int `json:"unit_amount,omitempty"`
}

type SubscriptionRampIntervalResponse

type SubscriptionRampIntervalResponse struct {

	// Represents the billing cycle where a ramp interval starts.
	StartingBillingCycle int `json:"starting_billing_cycle,omitempty"`

	// Represents how many billing cycles are left in a ramp interval.
	RemainingBillingCycles int `json:"remaining_billing_cycles,omitempty"`

	// Date the ramp interval starts
	StartingOn time.Time `json:"starting_on,omitempty"`

	// Date the ramp interval ends
	EndingOn time.Time `json:"ending_on,omitempty"`

	// Represents the price for the ramp interval.
	UnitAmount float64 `json:"unit_amount,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionRampIntervalResponse) GetResponse

func (resource *SubscriptionRampIntervalResponse) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionRampIntervalResponseList

type SubscriptionRampIntervalResponseList struct {
	// contains filtered or unexported fields
}

SubscriptionRampIntervalResponseList allows you to paginate SubscriptionRampIntervalResponse objects

func NewSubscriptionRampIntervalResponseList

func NewSubscriptionRampIntervalResponseList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionRampIntervalResponseList

func (*SubscriptionRampIntervalResponseList) Count

Count returns the count of items on the server that match this pager

func (*SubscriptionRampIntervalResponseList) CountWithContext

func (list *SubscriptionRampIntervalResponseList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionRampIntervalResponseList) Data

func (*SubscriptionRampIntervalResponseList) Fetch

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionRampIntervalResponseList) FetchWithContext

func (list *SubscriptionRampIntervalResponseList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionRampIntervalResponseList) HasMore

func (*SubscriptionRampIntervalResponseList) Next

type SubscriptionRampIntervalResponseLister

type SubscriptionRampIntervalResponseLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []SubscriptionRampIntervalResponse
	HasMore() bool
	Next() string
}

type SubscriptionShipping

type SubscriptionShipping struct {

	// Object type
	Object string `json:"object,omitempty"`

	Address ShippingAddress `json:"address,omitempty"`

	Method ShippingMethodMini `json:"method,omitempty"`

	// Subscription's shipping cost
	Amount float64 `json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscriptionShipping) GetResponse

func (resource *SubscriptionShipping) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type SubscriptionShippingCreate

type SubscriptionShippingCreate struct {
	Address *ShippingAddressCreate `json:"address,omitempty"`

	// Assign a shipping address from the account's existing shipping addresses. If `address_id` and `address` are both present, `address` will be used.
	AddressId *string `json:"address_id,omitempty"`

	// The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodId *string `json:"method_id,omitempty"`

	// The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodCode *string `json:"method_code,omitempty"`

	// Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required.
	Amount *float64 `json:"amount,omitempty"`
}

type SubscriptionShippingList

type SubscriptionShippingList struct {
	// contains filtered or unexported fields
}

SubscriptionShippingList allows you to paginate SubscriptionShipping objects

func NewSubscriptionShippingList

func NewSubscriptionShippingList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *SubscriptionShippingList

func (*SubscriptionShippingList) Count

func (list *SubscriptionShippingList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionShippingList) CountWithContext

func (list *SubscriptionShippingList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*SubscriptionShippingList) Data

func (*SubscriptionShippingList) Fetch

func (list *SubscriptionShippingList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionShippingList) FetchWithContext

func (list *SubscriptionShippingList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*SubscriptionShippingList) HasMore

func (list *SubscriptionShippingList) HasMore() bool

func (*SubscriptionShippingList) Next

func (list *SubscriptionShippingList) Next() string

type SubscriptionShippingLister

type SubscriptionShippingLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []SubscriptionShipping
	HasMore() bool
	Next() string
}

type SubscriptionShippingPurchase

type SubscriptionShippingPurchase struct {

	// The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodId *string `json:"method_id,omitempty"`

	// The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used.
	MethodCode *string `json:"method_code,omitempty"`

	// Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required.
	Amount *float64 `json:"amount,omitempty"`
}

type SubscriptionShippingUpdate

type SubscriptionShippingUpdate struct {

	// Object type
	Object *string `json:"object,omitempty"`

	Address *ShippingAddressCreate `json:"address,omitempty"`

	// Assign a shipping address from the account's existing shipping addresses.
	AddressId *string `json:"address_id,omitempty"`
}

type SubscriptionUpdate

type SubscriptionUpdate struct {

	// Change collection method
	CollectionMethod *string `json:"collection_method,omitempty"`

	// The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
	CustomFields []CustomFieldCreate `json:"custom_fields,omitempty"`

	// The remaining billing cycles in the current term.
	RemainingBillingCycles *int `json:"remaining_billing_cycles,omitempty"`

	// If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`.
	RenewalBillingCycles *int `json:"renewal_billing_cycles,omitempty"`

	// Whether the subscription renews at the end of its term.
	AutoRenew *bool `json:"auto_renew,omitempty"`

	// If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. For a subscription in a trial period, this will change when the trial expires. This parameter is useful for postponement of a subscription to change its billing date without proration.
	NextBillDate *time.Time `json:"next_bill_date,omitempty"`

	// Revenue schedule type
	RevenueScheduleType *string `json:"revenue_schedule_type,omitempty"`

	// Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
	TermsAndConditions *string `json:"terms_and_conditions,omitempty"`

	// Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
	CustomerNotes *string `json:"customer_notes,omitempty"`

	// For manual invoicing, this identifies the PO number associated with the subscription.
	PoNumber *string `json:"po_number,omitempty"`

	// Integer paired with `Net Terms Type` and representing the number
	// of days past the current date (for `net` Net Terms Type) or days after
	// the last day of the current month (for `eom` Net Terms Type) that the
	// invoice will become past due. For `manual` collection method, an additional 24 hours is
	// added to ensure the customer has the entire last day to make payment before
	// becoming past due. For example:
	// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
	// If an invoice is due `net 30`, it will become past due at 31 days exactly.
	// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
	// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.
	// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
	// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
	// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
	NetTerms *int `json:"net_terms,omitempty"`

	// Optionally supplied string that may be either `net` or `eom` (end-of-month).
	// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
	// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
	NetTermsType *string `json:"net_terms_type,omitempty"`

	// If present, this subscription's transactions will use the payment gateway with this code.
	GatewayCode *string `json:"gateway_code,omitempty"`

	// This field is deprecated. Please do not use it.
	TaxInclusive *bool `json:"tax_inclusive,omitempty"`

	// Subscription shipping details
	Shipping *SubscriptionShippingUpdate `json:"shipping,omitempty"`

	// The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
	BillingInfoId *string `json:"billing_info_id,omitempty"`
}

type TaxDetail

type TaxDetail struct {

	// Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST.
	Type string `json:"type,omitempty"`

	// Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled.
	Region string `json:"region,omitempty"`

	// Provides the tax rate for the region.
	Rate float64 `json:"rate,omitempty"`

	// The total tax applied for this tax type.
	Tax float64 `json:"tax,omitempty"`

	// Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled.
	Name string `json:"name,omitempty"`

	// Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled.
	Level string `json:"level,omitempty"`

	// Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled.
	Billable bool `json:"billable,omitempty"`
	// contains filtered or unexported fields
}

func (*TaxDetail) GetResponse

func (resource *TaxDetail) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type TaxDetailList

type TaxDetailList struct {
	// contains filtered or unexported fields
}

TaxDetailList allows you to paginate TaxDetail objects

func NewTaxDetailList

func NewTaxDetailList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *TaxDetailList

func (*TaxDetailList) Count

func (list *TaxDetailList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*TaxDetailList) CountWithContext

func (list *TaxDetailList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*TaxDetailList) Data

func (list *TaxDetailList) Data() []TaxDetail

func (*TaxDetailList) Fetch

func (list *TaxDetailList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*TaxDetailList) FetchWithContext

func (list *TaxDetailList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*TaxDetailList) HasMore

func (list *TaxDetailList) HasMore() bool

func (*TaxDetailList) Next

func (list *TaxDetailList) Next() string

type TaxDetailLister

type TaxDetailLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []TaxDetail
	HasMore() bool
	Next() string
}

type TaxInfo

type TaxInfo struct {

	// Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled.
	Type string `json:"type,omitempty"`

	// Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled.
	Region string `json:"region,omitempty"`

	// The combined tax rate. Not present when Avalara for Communications is enabled.
	Rate float64 `json:"rate,omitempty"`

	// Provides additional tax details for Communications taxes when Avalara for Communications is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled.
	TaxDetails []TaxDetail `json:"tax_details,omitempty"`
	// contains filtered or unexported fields
}

func (*TaxInfo) GetResponse

func (resource *TaxInfo) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type TaxInfoList

type TaxInfoList struct {
	// contains filtered or unexported fields
}

TaxInfoList allows you to paginate TaxInfo objects

func NewTaxInfoList

func NewTaxInfoList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *TaxInfoList

func (*TaxInfoList) Count

func (list *TaxInfoList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*TaxInfoList) CountWithContext

func (list *TaxInfoList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*TaxInfoList) Data

func (list *TaxInfoList) Data() []TaxInfo

func (*TaxInfoList) Fetch

func (list *TaxInfoList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*TaxInfoList) FetchWithContext

func (list *TaxInfoList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*TaxInfoList) HasMore

func (list *TaxInfoList) HasMore() bool

func (*TaxInfoList) Next

func (list *TaxInfoList) Next() string

type TaxInfoLister

type TaxInfoLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []TaxInfo
	HasMore() bool
	Next() string
}

type TerminateSubscriptionParams

type TerminateSubscriptionParams struct {

	// Refund - The type of refund to perform:
	// * `full` - Performs a full refund of the last invoice for the current subscription term.
	// * `partial` - Prorates a refund based on the amount of time remaining in the current bill cycle.
	// * `none` - Terminates the subscription without a refund.
	// In the event that the most recent invoice is a $0 invoice paid entirely by credit, Recurly will apply the credit back to the customer’s account.
	// You may also terminate a subscription with no refund and then manually refund specific invoices.
	Refund *string

	// Charge - Applicable only if the subscription has usage based add-ons and unbilled usage logged for the current billing cycle. If true, current billing cycle unbilled usage is billed on the final invoice. If false, Recurly will create a negative usage record for current billing cycle usage that will zero out the final invoice line items.
	Charge *bool
}

func (*TerminateSubscriptionParams) URLParams

func (list *TerminateSubscriptionParams) URLParams() []KeyValue

type Tier

type Tier struct {

	// Ending quantity for the tier.  This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
	EndingQuantity int `json:"ending_quantity,omitempty"`

	// (deprecated) -- Use the percentage_tiers object instead.
	UsagePercentage string `json:"usage_percentage,omitempty"`

	// Tier pricing
	Currencies []TierPricing `json:"currencies,omitempty"`
	// contains filtered or unexported fields
}

func (*Tier) GetResponse

func (resource *Tier) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type TierCreate

type TierCreate struct {

	// Ending quantity for the tier.  This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier.
	EndingQuantity *int `json:"ending_quantity,omitempty"`

	// (deprecated) -- Use the percentage_tiers object instead.
	UsagePercentage *string `json:"usage_percentage,omitempty"`

	// Tier pricing
	Currencies []TierPricingCreate `json:"currencies,omitempty"`
}

type TierList

type TierList struct {
	// contains filtered or unexported fields
}

TierList allows you to paginate Tier objects

func NewTierList

func NewTierList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *TierList

func (*TierList) Count

func (list *TierList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*TierList) CountWithContext

func (list *TierList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*TierList) Data

func (list *TierList) Data() []Tier

func (*TierList) Fetch

func (list *TierList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*TierList) FetchWithContext

func (list *TierList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*TierList) HasMore

func (list *TierList) HasMore() bool

func (*TierList) Next

func (list *TierList) Next() string

type TierLister

type TierLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Tier
	HasMore() bool
	Next() string
}

type TierPricing

type TierPricing struct {

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`
	// contains filtered or unexported fields
}

func (*TierPricing) GetResponse

func (resource *TierPricing) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type TierPricingCreate

type TierPricingCreate struct {

	// 3-letter ISO 4217 currency code.
	Currency *string `json:"currency,omitempty"`

	// Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided.
	UnitAmount *float64 `json:"unit_amount,omitempty"`

	// Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`.
	// If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
	UnitAmountDecimal *string `json:"unit_amount_decimal,omitempty"`
}

type TierPricingList

type TierPricingList struct {
	// contains filtered or unexported fields
}

TierPricingList allows you to paginate TierPricing objects

func NewTierPricingList

func NewTierPricingList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *TierPricingList

func (*TierPricingList) Count

func (list *TierPricingList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*TierPricingList) CountWithContext

func (list *TierPricingList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*TierPricingList) Data

func (list *TierPricingList) Data() []TierPricing

func (*TierPricingList) Fetch

func (list *TierPricingList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*TierPricingList) FetchWithContext

func (list *TierPricingList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*TierPricingList) HasMore

func (list *TierPricingList) HasMore() bool

func (*TierPricingList) Next

func (list *TierPricingList) Next() string

type TierPricingLister

type TierPricingLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []TierPricing
	HasMore() bool
	Next() string
}

type Transaction

type Transaction struct {

	// Transaction ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
	Uuid string `json:"uuid,omitempty"`

	// If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded.
	OriginalTransactionId string `json:"original_transaction_id,omitempty"`

	// Account mini details
	Account AccountMini `json:"account,omitempty"`

	// Invoice mini details
	Invoice InvoiceMini `json:"invoice,omitempty"`

	// Invoice mini details
	VoidedByInvoice InvoiceMini `json:"voided_by_invoice,omitempty"`

	// If the transaction is charging or refunding for one or more subscriptions, these are their IDs.
	SubscriptionIds []string `json:"subscription_ids,omitempty"`

	// - `authorization` – verifies billing information and places a hold on money in the customer's account.
	// - `capture` – captures funds held by an authorization and completes a purchase.
	// - `purchase` – combines the authorization and capture in one transaction.
	// - `refund` – returns all or a portion of the money collected in a previous transaction to the customer.
	// - `verify` – a $0 or $1 transaction used to verify billing information which is immediately voided.
	Type string `json:"type,omitempty"`

	// Describes how the transaction was triggered.
	Origin string `json:"origin,omitempty"`

	// 3-letter ISO 4217 currency code.
	Currency string `json:"currency,omitempty"`

	// Total transaction amount sent to the payment gateway.
	Amount float64 `json:"amount,omitempty"`

	// The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`.
	Status string `json:"status,omitempty"`

	// Did this transaction complete successfully?
	Success bool `json:"success,omitempty"`

	// Indicates if the transaction was completed using a backup payment
	BackupPaymentMethodUsed bool `json:"backup_payment_method_used,omitempty"`

	// Indicates if part or all of this transaction was refunded.
	Refunded bool `json:"refunded,omitempty"`

	BillingAddress AddressWithName `json:"billing_address,omitempty"`

	// The method by which the payment was collected.
	CollectionMethod string `json:"collection_method,omitempty"`

	PaymentMethod PaymentMethod `json:"payment_method,omitempty"`

	// IP address provided when the billing information was collected:
	// - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address.
	// - When the merchant enters billing information using the API, the merchant may provide an IP address.
	// - When the merchant enters billing information using the UI, no IP address is recorded.
	IpAddressV4 string `json:"ip_address_v4,omitempty"`

	// Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.
	IpAddressCountry string `json:"ip_address_country,omitempty"`

	// Status code
	StatusCode string `json:"status_code,omitempty"`

	// For declined (`success=false`) transactions, the message displayed to the merchant.
	StatusMessage string `json:"status_message,omitempty"`

	// For declined (`success=false`) transactions, the message displayed to the customer.
	CustomerMessage string `json:"customer_message,omitempty"`

	// Language code for the message
	CustomerMessageLocale string `json:"customer_message_locale,omitempty"`

	PaymentGateway TransactionPaymentGateway `json:"payment_gateway,omitempty"`

	// Transaction message from the payment gateway.
	GatewayMessage string `json:"gateway_message,omitempty"`

	// Transaction reference number from the payment gateway.
	GatewayReference string `json:"gateway_reference,omitempty"`

	// Transaction approval code from the payment gateway.
	GatewayApprovalCode string `json:"gateway_approval_code,omitempty"`

	// For declined transactions (`success=false`), this field lists the gateway error code.
	GatewayResponseCode string `json:"gateway_response_code,omitempty"`

	// Time, in seconds, for gateway to process the transaction.
	GatewayResponseTime float64 `json:"gateway_response_time,omitempty"`

	// The values in this field will vary from gateway to gateway.
	GatewayResponseValues map[string]interface{} `json:"gateway_response_values,omitempty"`

	// When processed, result from checking the CVV/CVC value on the transaction.
	CvvCheck string `json:"cvv_check,omitempty"`

	// When processed, result from checking the overall AVS on the transaction.
	AvsCheck string `json:"avs_check,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// Voided at
	VoidedAt time.Time `json:"voided_at,omitempty"`

	// Collected at, or if not collected yet, the time the transaction was created.
	CollectedAt time.Time `json:"collected_at,omitempty"`

	// Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort.
	ActionResult map[string]interface{} `json:"action_result,omitempty"`

	// VAT number for the customer on this transaction. If the customer's Billing Info country is BR or AR, then this will be their Tax Identifier. For all other countries this will come from the VAT Number field in the Billing Info.
	VatNumber string `json:"vat_number,omitempty"`

	// Fraud information
	FraudInfo TransactionFraudInfo `json:"fraud_info,omitempty"`
	// contains filtered or unexported fields
}

func (*Transaction) GetResponse

func (resource *Transaction) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type TransactionError

type TransactionError struct {
	TransactionID             string                   `json:"transaction_id"`
	Category                  TransactionErrorCategory `json:"category"`
	Code                      string                   `json:"code"`
	Message                   string                   `json:"message"`
	MerchantAdvice            string                   `json:"merchant_advice"`
	ThreeDSecureActionTokenId string                   `json:"three_d_secure_action_token_id"`
}

type TransactionErrorCategory

type TransactionErrorCategory string

type TransactionFraudInfo

type TransactionFraudInfo struct {

	// Object type
	Object string `json:"object,omitempty"`

	// Kount score
	Score int `json:"score,omitempty"`

	// Kount decision
	Decision string `json:"decision,omitempty"`

	// Kount transaction reference ID
	Reference string `json:"reference,omitempty"`

	// A list of fraud risk rules that were triggered for the transaction.
	RiskRulesTriggered []FraudRiskRule `json:"risk_rules_triggered,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionFraudInfo) GetResponse

func (resource *TransactionFraudInfo) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type TransactionFraudInfoList

type TransactionFraudInfoList struct {
	// contains filtered or unexported fields
}

TransactionFraudInfoList allows you to paginate TransactionFraudInfo objects

func NewTransactionFraudInfoList

func NewTransactionFraudInfoList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *TransactionFraudInfoList

func (*TransactionFraudInfoList) Count

func (list *TransactionFraudInfoList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*TransactionFraudInfoList) CountWithContext

func (list *TransactionFraudInfoList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*TransactionFraudInfoList) Data

func (*TransactionFraudInfoList) Fetch

func (list *TransactionFraudInfoList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*TransactionFraudInfoList) FetchWithContext

func (list *TransactionFraudInfoList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*TransactionFraudInfoList) HasMore

func (list *TransactionFraudInfoList) HasMore() bool

func (*TransactionFraudInfoList) Next

func (list *TransactionFraudInfoList) Next() string

type TransactionFraudInfoLister

type TransactionFraudInfoLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []TransactionFraudInfo
	HasMore() bool
	Next() string
}

type TransactionList

type TransactionList struct {
	// contains filtered or unexported fields
}

TransactionList allows you to paginate Transaction objects

func NewTransactionList

func NewTransactionList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *TransactionList

func (*TransactionList) Count

func (list *TransactionList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*TransactionList) CountWithContext

func (list *TransactionList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*TransactionList) Data

func (list *TransactionList) Data() []Transaction

func (*TransactionList) Fetch

func (list *TransactionList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*TransactionList) FetchWithContext

func (list *TransactionList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*TransactionList) HasMore

func (list *TransactionList) HasMore() bool

func (*TransactionList) Next

func (list *TransactionList) Next() string

type TransactionLister

type TransactionLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Transaction
	HasMore() bool
	Next() string
}

type TransactionPaymentGateway

type TransactionPaymentGateway struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	Type string `json:"type,omitempty"`

	Name string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionPaymentGateway) GetResponse

func (resource *TransactionPaymentGateway) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type TransactionPaymentGatewayList

type TransactionPaymentGatewayList struct {
	// contains filtered or unexported fields
}

TransactionPaymentGatewayList allows you to paginate TransactionPaymentGateway objects

func NewTransactionPaymentGatewayList

func NewTransactionPaymentGatewayList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *TransactionPaymentGatewayList

func (*TransactionPaymentGatewayList) Count

func (list *TransactionPaymentGatewayList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*TransactionPaymentGatewayList) CountWithContext

func (list *TransactionPaymentGatewayList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*TransactionPaymentGatewayList) Data

func (*TransactionPaymentGatewayList) Fetch

func (list *TransactionPaymentGatewayList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*TransactionPaymentGatewayList) FetchWithContext

func (list *TransactionPaymentGatewayList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*TransactionPaymentGatewayList) HasMore

func (list *TransactionPaymentGatewayList) HasMore() bool

func (*TransactionPaymentGatewayList) Next

type TransactionPaymentGatewayLister

type TransactionPaymentGatewayLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []TransactionPaymentGateway
	HasMore() bool
	Next() string
}

type UniqueCouponCode

type UniqueCouponCode struct {

	// Unique Coupon Code ID
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// The code the customer enters to redeem the coupon.
	Code string `json:"code,omitempty"`

	// Indicates if the unique coupon code is redeemable or why not.
	State string `json:"state,omitempty"`

	// The Coupon ID of the parent Bulk Coupon
	BulkCouponId string `json:"bulk_coupon_id,omitempty"`

	// The Coupon code of the parent Bulk Coupon
	BulkCouponCode string `json:"bulk_coupon_code,omitempty"`

	// Created at
	CreatedAt time.Time `json:"created_at,omitempty"`

	// Updated at
	UpdatedAt time.Time `json:"updated_at,omitempty"`

	// The date and time the unique coupon code was redeemed.
	RedeemedAt time.Time `json:"redeemed_at,omitempty"`

	// The date and time the coupon was expired early or reached its `max_redemptions`.
	ExpiredAt time.Time `json:"expired_at,omitempty"`
	// contains filtered or unexported fields
}

func (*UniqueCouponCode) GetResponse

func (resource *UniqueCouponCode) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type UniqueCouponCodeList

type UniqueCouponCodeList struct {
	// contains filtered or unexported fields
}

UniqueCouponCodeList allows you to paginate UniqueCouponCode objects

func NewUniqueCouponCodeList

func NewUniqueCouponCodeList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *UniqueCouponCodeList

func (*UniqueCouponCodeList) Count

func (list *UniqueCouponCodeList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*UniqueCouponCodeList) CountWithContext

func (list *UniqueCouponCodeList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*UniqueCouponCodeList) Data

func (list *UniqueCouponCodeList) Data() []UniqueCouponCode

func (*UniqueCouponCodeList) Fetch

func (list *UniqueCouponCodeList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*UniqueCouponCodeList) FetchWithContext

func (list *UniqueCouponCodeList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*UniqueCouponCodeList) HasMore

func (list *UniqueCouponCodeList) HasMore() bool

func (*UniqueCouponCodeList) Next

func (list *UniqueCouponCodeList) Next() string

type UniqueCouponCodeLister

type UniqueCouponCodeLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []UniqueCouponCode
	HasMore() bool
	Next() string
}

type UniqueCouponCodeParams

type UniqueCouponCodeParams struct {

	// The number of UniqueCouponCodes that will be generated
	Limit int `json:"limit,omitempty"`

	// Sort order to list newly generated UniqueCouponCodes (should always be `asc`)
	Order string `json:"order,omitempty"`

	// Sort field to list newly generated UniqueCouponCodes (should always be `created_at`)
	Sort string `json:"sort,omitempty"`

	// The date-time to be included when listing UniqueCouponCodes
	BeginTime time.Time `json:"begin_time,omitempty"`
	// contains filtered or unexported fields
}

func (*UniqueCouponCodeParams) GetResponse

func (resource *UniqueCouponCodeParams) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type UniqueCouponCodeParamsList

type UniqueCouponCodeParamsList struct {
	// contains filtered or unexported fields
}

UniqueCouponCodeParamsList allows you to paginate UniqueCouponCodeParams objects

func NewUniqueCouponCodeParamsList

func NewUniqueCouponCodeParamsList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *UniqueCouponCodeParamsList

func (*UniqueCouponCodeParamsList) Count

func (list *UniqueCouponCodeParamsList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*UniqueCouponCodeParamsList) CountWithContext

func (list *UniqueCouponCodeParamsList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*UniqueCouponCodeParamsList) Data

func (*UniqueCouponCodeParamsList) Fetch

func (list *UniqueCouponCodeParamsList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*UniqueCouponCodeParamsList) FetchWithContext

func (list *UniqueCouponCodeParamsList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*UniqueCouponCodeParamsList) HasMore

func (list *UniqueCouponCodeParamsList) HasMore() bool

func (*UniqueCouponCodeParamsList) Next

func (list *UniqueCouponCodeParamsList) Next() string

type UniqueCouponCodeParamsLister

type UniqueCouponCodeParamsLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []UniqueCouponCodeParams
	HasMore() bool
	Next() string
}

type Usage

type Usage struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	// Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint.
	MerchantTag string `json:"merchant_tag,omitempty"`

	// The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places.  Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500").
	Amount float64 `json:"amount,omitempty"`

	// Type of usage, returns usage type if `add_on_type` is `usage`.
	UsageType string `json:"usage_type,omitempty"`

	// The pricing model for the add-on.  For more information,
	// [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our
	// [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how
	// to configure quantity-based pricing models.
	TierType string `json:"tier_type,omitempty"`

	// The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = []
	Tiers []SubscriptionAddOnTier `json:"tiers,omitempty"`

	// The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support.
	PercentageTiers []SubscriptionAddOnPercentageTier `json:"percentage_tiers,omitempty"`

	// The ID of the measured unit associated with the add-on the usage record is for.
	MeasuredUnitId string `json:"measured_unit_id,omitempty"`

	// When the usage was recorded in your system.
	RecordingTimestamp time.Time `json:"recording_timestamp,omitempty"`

	// When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition.
	UsageTimestamp time.Time `json:"usage_timestamp,omitempty"`

	// The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0.
	UsagePercentage float64 `json:"usage_percentage,omitempty"`

	// Unit price
	UnitAmount float64 `json:"unit_amount,omitempty"`

	// Unit price that can optionally support a sub-cent value.
	UnitAmountDecimal string `json:"unit_amount_decimal,omitempty"`

	// When the usage record was billed on an invoice.
	BilledAt time.Time `json:"billed_at,omitempty"`

	// When the usage record was created in Recurly.
	CreatedAt time.Time `json:"created_at,omitempty"`

	// When the usage record was billed on an invoice.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Usage) GetResponse

func (resource *Usage) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type UsageCreate

type UsageCreate struct {

	// Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint.
	MerchantTag *string `json:"merchant_tag,omitempty"`

	// The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places.  Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500").
	Amount *float64 `json:"amount,omitempty"`

	// When the usage was recorded in your system.
	RecordingTimestamp *time.Time `json:"recording_timestamp,omitempty"`

	// When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition.
	UsageTimestamp *time.Time `json:"usage_timestamp,omitempty"`
}

type UsageList

type UsageList struct {
	// contains filtered or unexported fields
}

UsageList allows you to paginate Usage objects

func NewUsageList

func NewUsageList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *UsageList

func (*UsageList) Count

func (list *UsageList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*UsageList) CountWithContext

func (list *UsageList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*UsageList) Data

func (list *UsageList) Data() []Usage

func (*UsageList) Fetch

func (list *UsageList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*UsageList) FetchWithContext

func (list *UsageList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*UsageList) HasMore

func (list *UsageList) HasMore() bool

func (*UsageList) Next

func (list *UsageList) Next() string

type UsageLister

type UsageLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []Usage
	HasMore() bool
	Next() string
}

type User

type User struct {
	Id string `json:"id,omitempty"`

	// Object type
	Object string `json:"object,omitempty"`

	Email string `json:"email,omitempty"`

	FirstName string `json:"first_name,omitempty"`

	LastName string `json:"last_name,omitempty"`

	TimeZone string `json:"time_zone,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`

	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

func (*User) GetResponse

func (resource *User) GetResponse() *ResponseMetadata

GetResponse returns the ResponseMetadata that generated this resource

type UserList

type UserList struct {
	// contains filtered or unexported fields
}

UserList allows you to paginate User objects

func NewUserList

func NewUserList(client HTTPCaller, nextPagePath string, requestOptions *RequestOptions) *UserList

func (*UserList) Count

func (list *UserList) Count() (*int64, error)

Count returns the count of items on the server that match this pager

func (*UserList) CountWithContext

func (list *UserList) CountWithContext(ctx context.Context) (*int64, error)

Count returns the count of items on the server that match this pager

func (*UserList) Data

func (list *UserList) Data() []User

func (*UserList) Fetch

func (list *UserList) Fetch() error

Fetch fetches the next page of data into the `Data` property

func (*UserList) FetchWithContext

func (list *UserList) FetchWithContext(ctx context.Context) error

Fetch fetches the next page of data into the `Data` property

func (*UserList) HasMore

func (list *UserList) HasMore() bool

func (*UserList) Next

func (list *UserList) Next() string

type UserLister

type UserLister interface {
	Fetch() error
	FetchWithContext(ctx context.Context) error
	Count() (*int64, error)
	CountWithContext(ctx context.Context) (*int64, error)
	Data() []User
	HasMore() bool
	Next() string
}

type VerifyBillingInfoParams

type VerifyBillingInfoParams struct {

	// Body - The body of the request.
	Body *BillingInfoVerify
}

func (*VerifyBillingInfoParams) URLParams

func (list *VerifyBillingInfoParams) URLParams() []KeyValue

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL