data

package
v0.0.0-...-34c969b Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddContact

func AddContact(client SimpleForceClient, user *Contact) *simpleforce.SObject

func AddOpportunity

func AddOpportunity(opp Opportunity) (*simpleforce.SObject, error)

func CreateClient

func CreateClient() *simpleforce.Client

func UpdateContact

func UpdateContact(client SimpleForceClient, user *Contact) (*simpleforce.SObject, error)

func UpdateOpportunity

func UpdateOpportunity(opp Opportunity, email string) ([]byte, error)

Types

type Contact

type Contact struct {
	Email          string `validate:"required"`
	FxA_Id__c      string `validate:"required"`
	Id             string
	LastName       string `validate:"required"`
	PMT_Cust_Id__c string `validate:"required"`
	RecordTypeId   string
	Token__c       string `validate:"omitempty"`
	Event_Id__c    string
	Event_Name__c  string
}

func ConvertQueryToContact

func ConvertQueryToContact(query *simpleforce.QueryResult) Contact

func GetContactByEmail

func GetContactByEmail(client SimpleForceClient, email string) Contact

func QueryContact

func QueryContact(client SimpleForceClient, email string) Contact

func (*Contact) ValidateContact

func (c *Contact) ValidateContact() error

type Contacts

type Contacts []*Contact

type Event

type Event struct {
	Event_Id__c   string `validate:"required"`
	Event_Name__c string `validate:"required"`
}

type Opportunities

type Opportunities []*Opportunity

type Opportunity

type Opportunity struct {
	Amount                   string `validate:"gt=0`
	Billing_Cycle_End__c     string `validate:"required,billing_end"`
	Billing_Cycle_Start__c   string `validate:"required,billing_start"`
	CloseDate                string `validate:"required,closedate"`
	Credit_Card_Exp_Month__c string `validate:"omitempty"`
	Credit_Card_Exp_Year__c  string `validate:"omitempty"`
	Credit_Card_Type__c      string `validate:"omitempty"`
	Currency__c              string `validate:"required"`
	Donation_Contact__c      string `validate:"required"`
	Event_Id__c              string `validate:"required"`
	Event_Name__c            string `validate:"required"`
	Id                       string `validate:"omitempty"`
	Initial_Purchase__c      string `validate:"omitempty"`
	Invoice_Number__c        string `validate:"required"`
	Last_4_Digits__c         string `validate:"omitempty"`
	Name                     string `validate:"required"`
	Next_Invoice_Date__c     string `validate:"omitempty"`
	Nickname_Old__c          string `validate:"omitempty"`
	Payment_Interval__c      string `validate:"omitempty"`
	Payment_Source__c        string `validate:"required"`
	Plan_Amount_Old__c       string `validate:"omitempty"`
	PMT_Invoice_ID__c        string `validate:"required"`
	PMT_Subscription_ID__c   string `validate:"required"`
	PMT_Transaction_ID__c    string `validate:"required"`
	Proration_Amount__c      string `validate:"omitempty"`
	RecordTypeId             string `validate:"required"`
	Service_Plan__c          string `validate:"required"`
	StageName                string `validate:"required"`
}

func QueryOppourtunityByFxA

func QueryOppourtunityByFxA(user Contact) Opportunity

func (*Opportunity) FromJSON

func (o *Opportunity) FromJSON(r io.Reader) error

func (*Opportunity) ToJSON

func (o *Opportunity) ToJSON(w io.Writer) error

func (*Opportunity) ValidateOpportunity

func (o *Opportunity) ValidateOpportunity() error

type SimpleForceClient

type SimpleForceClient interface {
	Query(query string) (*simpleforce.QueryResult, error)
	SObject(typeName ...string) *simpleforce.SObject
}

type TempContact

type TempContact struct {
	Email string
	Id    string
}

type TempOpportunity

type TempOpportunity struct {
	Id string
}

Jump to

Keyboard shortcuts

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