Documentation
¶
Index ¶
- Constants
- Variables
- func NewApi(accessToken string, envDomain string)
- type Api
- type CardApiInterface
- type CardsApi
- func (api *CardsApi) CreateCard(req models.CreateCardRequest) (*models.CreateCardResponse, error)
- func (api *CardsApi) DisableCard(cardID string) (*models.DisableCardResponse, error)
- func (api *CardsApi) ListCards(req models.ListCardsRequest) (*models.ListCardsResponse, error)
- func (api *CardsApi) RetrieveCard(cardID string) (*models.RetrieveCardResponse, error)
- type CatalogApi
- type CatalogApiInterface
- type CustomersApi
- func (api *CustomersApi) CreateCustomer(req models.CreateCustomerRequest) (*models.CreateCustomerResponse, error)
- func (api *CustomersApi) DeleteCustomer(req models.DeleteCustomerRequest) (*models.DeleteCustomerResponse, error)
- func (api *CustomersApi) RetrieveCustomer(cID string) (*models.RetrieveCustomerResponse, error)
- type CustomersApiInterface
- type SubscriptionApi
- func (api *SubscriptionApi) CancelSubscription(subscriptionID string) (*models.CancelSubscriptionResponse, error)
- func (api *SubscriptionApi) CreateSubscription(req models.CreateSubscriptionRequest) (*models.CreateSubscriptionResponse, error)
- func (api *SubscriptionApi) UpdateSubscription(subscriptionID string, req models.UpdateSubscriptionRequest) (*models.UpdateSubscriptionResponse, error)
- type SubscriptionApiInterface
Constants ¶
const ( HTTP_POST = "POST" HTTP_GET = "GET" HTTP_DELETE = "DELETE" HTTP_PUT = "PUT" HTTP_PATCH = "PATCH" )
Variables ¶
var ApiRequest = Api{ // contains filtered or unexported fields }
ApiRequest is struct to call api
Functions ¶
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
Api has config data for calling api
type CardApiInterface ¶ added in v0.1.4
type CardApiInterface interface {
CreateCard(models.CreateCardRequest) (*models.CreateCardResponse, error)
ListCards(req models.ListCardsRequest) (*models.ListCardsResponse, error)
RetrieveCard(cardID string) (*models.RetrieveCardResponse, error)
DisableCard(cardID string) (*models.DisableCardResponse, error)
}
CardApiInterface defines the interface for the CustomerApi
type CardsApi ¶ added in v0.1.4
type CardsApi struct{}
CardsApi is a struct that implements CustomerApiInterface
func (*CardsApi) CreateCard ¶ added in v0.1.4
func (api *CardsApi) CreateCard(req models.CreateCardRequest) (*models.CreateCardResponse, error)
CreateCard create new card
func (*CardsApi) DisableCard ¶ added in v0.1.11
func (api *CardsApi) DisableCard(cardID string) (*models.DisableCardResponse, error)
func (*CardsApi) ListCards ¶ added in v0.1.11
func (api *CardsApi) ListCards(req models.ListCardsRequest) (*models.ListCardsResponse, error)
func (*CardsApi) RetrieveCard ¶ added in v0.1.11
func (api *CardsApi) RetrieveCard(cardID string) (*models.RetrieveCardResponse, error)
type CatalogApi ¶ added in v0.1.4
type CatalogApi struct{}
CatalogApi is a struct that implements CatalogApiInterface
func NewCatalogApi ¶ added in v0.1.4
func NewCatalogApi() *CatalogApi
NewCatalogApi returns a new CatalogApi
func (*CatalogApi) ListCatalog ¶ added in v0.1.4
func (api *CatalogApi) ListCatalog(req models.ListCatalogRequest) (*models.ListCatalogResponse, error)
CreateCatalog returns list of catalog objects
func (*CatalogApi) RetrieveCatalogObject ¶ added in v0.1.13
func (api *CatalogApi) RetrieveCatalogObject(objectID string) (*models.CatalogResponse, error)
RetrieveCatalogObject
type CatalogApiInterface ¶ added in v0.1.4
type CatalogApiInterface interface {
ListCatalog(models.ListCatalogRequest) (*models.ListCatalogResponse, error)
RetrieveCatalogObject(objectID string) (*models.CatalogResponse, error)
}
CatalogApiInterface defines the interface for the CatalogApi
type CustomersApi ¶ added in v0.1.3
type CustomersApi struct{}
CustomerApi is a struct that implements CustomerApiInterface
func (*CustomersApi) CreateCustomer ¶ added in v0.1.3
func (api *CustomersApi) CreateCustomer(req models.CreateCustomerRequest) (*models.CreateCustomerResponse, error)
CreateCustomer create customer
func (*CustomersApi) DeleteCustomer ¶ added in v0.1.11
func (api *CustomersApi) DeleteCustomer(req models.DeleteCustomerRequest) (*models.DeleteCustomerResponse, error)
DeleteCustomer deletes a customer profile from a business.
func (*CustomersApi) RetrieveCustomer ¶ added in v0.1.11
func (api *CustomersApi) RetrieveCustomer(cID string) (*models.RetrieveCustomerResponse, error)
RetrieveCustomer returns details for a single customer.
type CustomersApiInterface ¶ added in v0.1.3
type CustomersApiInterface interface {
CreateCustomer(models.CreateCustomerRequest) (*models.CreateCustomerResponse, error)
DeleteCustomer(req models.DeleteCustomerRequest) (*models.DeleteCustomerResponse, error)
RetrieveCustomer(cID string) (*models.RetrieveCustomerResponse, error)
}
CustomerApiInterface defines the interface for the CustomerApi
type SubscriptionApi ¶ added in v0.1.4
type SubscriptionApi struct{}
SubscriptionApi is a struct that implements SubscriptionApiInterface
func NewSubscriptionApi ¶ added in v0.1.4
func NewSubscriptionApi() *SubscriptionApi
NewSubscriptionApi returns a new SubscriptionApi
func (*SubscriptionApi) CancelSubscription ¶ added in v0.1.11
func (api *SubscriptionApi) CancelSubscription(subscriptionID string) (*models.CancelSubscriptionResponse, error)
CancelSubscription schedules a CANCEL action to cancel an active subscription by setting the canceled_date field to the end of the active billing period and changing the subscription status from ACTIVE to CANCELED after this date.
func (*SubscriptionApi) CreateSubscription ¶ added in v0.1.4
func (api *SubscriptionApi) CreateSubscription(req models.CreateSubscriptionRequest) (*models.CreateSubscriptionResponse, error)
CreateSubscription create new subscription
func (*SubscriptionApi) UpdateSubscription ¶ added in v0.1.11
func (api *SubscriptionApi) UpdateSubscription(subscriptionID string, req models.UpdateSubscriptionRequest) (*models.UpdateSubscriptionResponse, error)
UpdateSubscription update a subscription
type SubscriptionApiInterface ¶ added in v0.1.4
type SubscriptionApiInterface interface {
CreateSubscription(models.CreateSubscriptionRequest) (*models.CreateSubscriptionResponse, error)
UpdateSubscription(string, models.UpdateSubscriptionRequest) (*models.UpdateSubscriptionResponse, error)
CancelSubscription(string) (*models.CancelSubscriptionResponse, error)
}
SubscriptionApiInterface defines the interface for the SubscriptionApi