C# 클래스 Confer.CheddarGetter.CheddarGetter

파일 보기 프로젝트 열기: nofxsnap/CheddarGetter

공개 메소드들

메소드 설명
AddCustomCharge ( CustomChargePost customCharge ) : Customer

Add a customer charge for a customer

AddItem ( string customerCode, string itemCode, int quantityToAdd ) : Customer

Add an item and set the quantity for a customer Note: if no quantity is specified then it will increment by 1 by default

CancelSubscription ( string customerCode ) : bool

Cancel a customer's subscription

CreateCustomer ( CustomerPost customer ) : Customer

Create a new customer based on the passed in CustomerPost object

GetCustomer ( string customerCode ) : Customer

Get a particular customer based on a passed in customer code and your product code

GetCustomers ( ) : List

Get a list of all customers for your product code

GetSubscriptionPlans ( ) : List

Get all of the subscription plans for your product code

RemoveItem ( string customerCode, string itemCode, int quantityToRemove ) : Customer

Remove an item and set the quantity for a customer Note: if no quantity is specified then it will decrement by 1 by default

SetItem ( string customerCode, ProductItemCode itemCode, int quantityToSet ) : Customer

Set an item count to a specific quantity

UpdateCustomer ( CustomerPost customer ) : Customer

Update a customer

UpdateCustomerAndSubscription ( CustomerPost customer ) : Customer

Update a customer and their subscription

UpdateSubscription ( CustomerPost customer ) : Customer

Update a customer's subscription

UpdateSubscriptionPartial ( CustomerPost customer ) : Customer

Update a customer's subscription with only partial subscription information

UpdateSubscriptionPlanOnly ( string customerCode, PlanCodeEnum newPlan ) : Customer

Update a customer's subscription plan

비공개 메소드들

메소드 설명
CheddarGetter ( ) : System

The constructor will set the username and password for the CheddarGetter account

formatMonth ( string ccMonth ) : string

Will format the string into a acceptable month date format for CG

getCharges ( System.Xml.Linq.XElement charges ) : List

Get a list of charges based on a charge XML node in a XElement object

getCustomerList ( System.Xml.Linq.XDocument customersXML ) : Customers

Get the customer list and any associated CG errors from a XDocument (customer XML)

getInvoiceList ( System.Xml.Linq.XElement invoices ) : List

Get a list of invoices based on an invoice XML node in a XElement object

getPlanItemsList ( System.Xml.Linq.XElement items ) : List

Get a list of plan items based on an items XML node in a XElement object

getRequest ( string urlBase, string urlPath ) : string

Handles the GET requests

getSubscriptionItems ( System.Xml.Linq.XElement item ) : List

Get a list of SubscriptionItem objects based on an item XML node in a XElement object

getSubscriptionList ( System.Xml.Linq.XElement subscriptions ) : List

Get a list of subscriptions based on a subscriptions XML node in a XElement object

getSubscriptionPlanList ( System.Xml.Linq.XElement plans ) : List

Get a list of subscription plans based on a plan XML node in a XElement object

postRequest ( string urlBase, string urlPath, string postParams ) : string

Handles the POST request

메소드 상세

AddCustomCharge() 공개 정적인 메소드

Add a customer charge for a customer
public static AddCustomCharge ( CustomChargePost customCharge ) : Customer
customCharge CustomChargePost A CustomerChargePost object with the customer charge and customer code
리턴 Customer

AddItem() 공개 정적인 메소드

Add an item and set the quantity for a customer Note: if no quantity is specified then it will increment by 1 by default
public static AddItem ( string customerCode, string itemCode, int quantityToAdd ) : Customer
customerCode string The customer's code to associate the item with
itemCode string The item code of the item which we are adding
quantityToAdd int The number of units to add of this item
리턴 Customer

CancelSubscription() 공개 정적인 메소드

Cancel a customer's subscription
public static CancelSubscription ( string customerCode ) : bool
customerCode string The customer code of the customer to cancel
리턴 bool

CreateCustomer() 공개 정적인 메소드

Create a new customer based on the passed in CustomerPost object
public static CreateCustomer ( CustomerPost customer ) : Customer
customer CustomerPost A CustomerPost object that represents a customer to be created
리턴 Customer

GetCustomer() 공개 정적인 메소드

Get a particular customer based on a passed in customer code and your product code
public static GetCustomer ( string customerCode ) : Customer
customerCode string A string representing a customer's code in CG
리턴 Customer

GetCustomers() 공개 정적인 메소드

Get a list of all customers for your product code
public static GetCustomers ( ) : List
리턴 List

GetSubscriptionPlans() 공개 정적인 메소드

Get all of the subscription plans for your product code
public static GetSubscriptionPlans ( ) : List
리턴 List

RemoveItem() 공개 정적인 메소드

Remove an item and set the quantity for a customer Note: if no quantity is specified then it will decrement by 1 by default
public static RemoveItem ( string customerCode, string itemCode, int quantityToRemove ) : Customer
customerCode string The customer's code to associate the item with
itemCode string The item code of the item which we are removing
quantityToRemove int The number of units to remove of this item
리턴 Customer

SetItem() 공개 정적인 메소드

Set an item count to a specific quantity
public static SetItem ( string customerCode, ProductItemCode itemCode, int quantityToSet ) : Customer
customerCode string The customer's code of the customer that will be updated
itemCode ProductItemCode The code of the item that will be updated
quantityToSet int The quantity to set for the item
리턴 Customer

UpdateCustomer() 공개 정적인 메소드

Update a customer
public static UpdateCustomer ( CustomerPost customer ) : Customer
customer CustomerPost A CustomerPost object that represents the changes to be updated
리턴 Customer

UpdateCustomerAndSubscription() 공개 정적인 메소드

Update a customer and their subscription
public static UpdateCustomerAndSubscription ( CustomerPost customer ) : Customer
customer CustomerPost A CustomerPost object that represents the changes to be updated
리턴 Customer

UpdateSubscription() 공개 정적인 메소드

Update a customer's subscription
public static UpdateSubscription ( CustomerPost customer ) : Customer
customer CustomerPost A CustomerPost object with the subscription details to update
리턴 Customer

UpdateSubscriptionPartial() 공개 정적인 메소드

Update a customer's subscription with only partial subscription information
public static UpdateSubscriptionPartial ( CustomerPost customer ) : Customer
customer CustomerPost A CustomerPost object with the changes that are to be updated
리턴 Customer

UpdateSubscriptionPlanOnly() 공개 정적인 메소드

Update a customer's subscription plan
public static UpdateSubscriptionPlanOnly ( string customerCode, PlanCodeEnum newPlan ) : Customer
customerCode string The customer's code of the customer to be updated
newPlan PlanCodeEnum The plan to set the customer to
리턴 Customer