paypal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() terraform.ResourceProvider

Provider returns a terraform.ResourceProvider.

Types

type CatalogProductResource

type CatalogProductResource struct{}

func (CatalogProductResource) Create

func (r CatalogProductResource) Create(d *schema.ResourceData, m interface{}) error

Create - Creating a catalog product in Paypal

func (CatalogProductResource) Delete

func (r CatalogProductResource) Delete(d *schema.ResourceData, m interface{}) error

Delete - Delete the a catalog product in Paypal - Products cannot be deleted so we will update the name with a (removed) suffix and remove our reference to it

func (CatalogProductResource) Read

func (r CatalogProductResource) Read(d *schema.ResourceData, m interface{}) error

Read - Get a catalog product in Paypal

func (CatalogProductResource) Resource

func (r CatalogProductResource) Resource() *schema.Resource

func (CatalogProductResource) Schema

func (r CatalogProductResource) Schema() map[string]*schema.Schema

func (CatalogProductResource) Update

func (r CatalogProductResource) Update(d *schema.ResourceData, m interface{}) error

Update - Update a catalog product in Paypal

type Config

type Config struct {
	ClientID     string
	ClientSecret string
	BaseURL      string
}

Config stores PayPal's API configuration

func (*Config) Client

func (c *Config) Client() (*paypalSdk.Client, error)

Client returns a new Client for accessing Paypal by using the access token

type SchemaSimplified

type SchemaSimplified struct {
	Type     schema.ValueType
	Optional bool
	Required bool
	Nested   map[string]SchemaSimplified
}

SchemaSimplified Simplified schema used for tests

type SubscriptionPlanResource

type SubscriptionPlanResource struct{}

func (SubscriptionPlanResource) Create

func (r SubscriptionPlanResource) Create(d *schema.ResourceData, m interface{}) error

Create - Creating a subscription plan in Paypal

func (SubscriptionPlanResource) Delete

func (r SubscriptionPlanResource) Delete(d *schema.ResourceData, m interface{}) error

Delete - Delete a subscription plan in Paypal - Subscription plans cannot be deleted so we will update the name with a (removed) suffix and remove our reference to it

func (SubscriptionPlanResource) Read

func (r SubscriptionPlanResource) Read(d *schema.ResourceData, m interface{}) error

Read - Get a subscription plan in Paypal - https://developer.paypal.com/docs/api/subscriptions/v1/#plans_get

func (SubscriptionPlanResource) Resource

func (SubscriptionPlanResource) Schema

func (r SubscriptionPlanResource) Schema() map[string]*schema.Schema

func (SubscriptionPlanResource) Update

func (r SubscriptionPlanResource) Update(d *schema.ResourceData, m interface{}) error

Update - Update a subscription plan in Paypal

type TerraformResource

type TerraformResource interface {
	Resource() *schema.Resource
	Schema() map[string]*schema.Schema
	Create(*schema.ResourceData, interface{}) error
	Read(*schema.ResourceData, interface{}) error
	Update(*schema.ResourceData, interface{}) error
	Delete(*schema.ResourceData, interface{}) error
}

TerraformResource The terraform resource interface that all resources implement

type WebhookResource

type WebhookResource struct{}

func (WebhookResource) Create

func (r WebhookResource) Create(d *schema.ResourceData, m interface{}) error

Create - Creating notification webhook in Paypal

func (WebhookResource) Delete

func (r WebhookResource) Delete(d *schema.ResourceData, m interface{}) error

Delete - Delete the notification webhook in Paypal

func (WebhookResource) Read

func (r WebhookResource) Read(d *schema.ResourceData, m interface{}) error

Read - Get notification webhook in Paypal

func (WebhookResource) Resource

func (r WebhookResource) Resource() *schema.Resource

func (WebhookResource) Schema

func (r WebhookResource) Schema() map[string]*schema.Schema

func (WebhookResource) Update

func (r WebhookResource) Update(d *schema.ResourceData, m interface{}) error

Update - Update notification webhook in Paypal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL