C# 클래스 Connectster.Shopify.ShopifyCommunicator

상속: IShopifyObject
파일 보기 프로젝트 열기: shopster/NconnectSter 1 사용 예제들

공개 메소드들

메소드 설명
CleanupXmlForDeserialization ( XmlDocument inDoc ) : XmlDocument

Remove tags w/ "nil=true" for "type=decimal" or "type=datetime". Do this because XMLSerializer crashes on these cases.

CleanupXmlForShopifySubmission ( XmlDocument inDoc ) : XmlDocument

Add " type="array" " to elements that require it. Remove xsi:nil="true" elements.

CreateCollection ( ShopifyStoreAuth storeAuth, ShopifyCollection collection ) : ShopifyResponse
CreateMetafield ( ShopifyStoreAuth storeAuth, ShopifyMetafield metaField, int productId ) : ShopifyResponse
CreateProduct ( ShopifyStoreAuth storeAuth, IShopifyProduct sP ) : ShopifyResponse
DateTimeToShopifyString ( System.DateTime time ) : string

encode a datetime as a string for filtering products, metafields etc. As per shopify's specification.

DeleteProduct ( ShopifyStoreAuth storeAuth, int productId ) : bool
GetAllMetafields ( ShopifyStoreAuth storeAuth, int limit, System.DateTime createdMin, System.DateTime createdMax, System.DateTime updatedMin, System.DateTime updatedMax, string fieldNamespace, string key, string valueType, int productId ) : List

GetAllProducts ( ShopifyStoreAuth storeAuth ) : List
GetCollection ( ShopifyStoreAuth storeAuth, int collectionId ) : ShopifyResponse
GetCollectionByName ( ShopifyStoreAuth storeAuth, string name ) : ShopifyResponse
GetListAllOrders ( ShopifyStoreAuth storeAuth ) : List
GetOrder ( ShopifyStoreAuth storeAuth, int orderId ) : ShopifyResponse
GetPageOfProducts ( ShopifyStoreAuth storeAuth, int numWanted, int pageNumber ) : List
GetProduct ( ShopifyStoreAuth storeAuth, int productId ) : ShopifyResponse
GetShopInformation ( ShopifyStoreAuth storeAuth ) : ShopifyResponse
Instance ( ) : ShopifyCommunicator
UpdateProduct ( ShopifyStoreAuth storeAuth, ShopifyProduct shopifyProduct ) : ShopifyResponse

비공개 메소드들

메소드 설명
HashString ( string value ) : string

Hashes(MD5) the given value. Typically used as "HashString(shopsterSecret + storeAuthToken)"

IsValidXml ( string input ) : XmlDocument
ShopifyCommunicator ( ) : System
ShopifyDelete ( string path, string storePassword ) : XmlDocument
ShopifyGet ( string path, string storePassword ) : XmlDocument

loads and returns the XML document found at path , using the storePassword.

ShopifyPutPost ( string path, string storePassword, XmlDocument xDocPost, string method ) : XmlDocument

PUT/POSTs the given XMLDocument to the path w/ the storePassword.

메소드 상세

CleanupXmlForDeserialization() 공개 정적인 메소드

Remove tags w/ "nil=true" for "type=decimal" or "type=datetime". Do this because XMLSerializer crashes on these cases.
public static CleanupXmlForDeserialization ( XmlDocument inDoc ) : XmlDocument
inDoc System.Xml.XmlDocument The XmlDocument you want cleaned up for deserialization.
리턴 System.Xml.XmlDocument

CleanupXmlForShopifySubmission() 공개 정적인 메소드

Add " type="array" " to elements that require it. Remove xsi:nil="true" elements.
public static CleanupXmlForShopifySubmission ( XmlDocument inDoc ) : XmlDocument
inDoc System.Xml.XmlDocument XmlDocument to be cleaned before submission to Shopify.
리턴 System.Xml.XmlDocument

CreateCollection() 공개 메소드

public CreateCollection ( ShopifyStoreAuth storeAuth, ShopifyCollection collection ) : ShopifyResponse
storeAuth ShopifyStoreAuth
collection ShopifyCollection
리턴 ShopifyResponse

CreateMetafield() 공개 메소드

public CreateMetafield ( ShopifyStoreAuth storeAuth, ShopifyMetafield metaField, int productId ) : ShopifyResponse
storeAuth ShopifyStoreAuth
metaField ShopifyMetafield
productId int
리턴 ShopifyResponse

CreateProduct() 공개 메소드

public CreateProduct ( ShopifyStoreAuth storeAuth, IShopifyProduct sP ) : ShopifyResponse
storeAuth ShopifyStoreAuth
sP IShopifyProduct
리턴 ShopifyResponse

DateTimeToShopifyString() 공개 메소드

encode a datetime as a string for filtering products, metafields etc. As per shopify's specification.
public DateTimeToShopifyString ( System.DateTime time ) : string
time System.DateTime
리턴 string

DeleteProduct() 공개 메소드

public DeleteProduct ( ShopifyStoreAuth storeAuth, int productId ) : bool
storeAuth ShopifyStoreAuth
productId int
리턴 bool

GetAllMetafields() 공개 메소드

public GetAllMetafields ( ShopifyStoreAuth storeAuth, int limit, System.DateTime createdMin, System.DateTime createdMax, System.DateTime updatedMin, System.DateTime updatedMax, string fieldNamespace, string key, string valueType, int productId ) : List
storeAuth ShopifyStoreAuth
limit int
createdMin System.DateTime
createdMax System.DateTime
updatedMin System.DateTime
updatedMax System.DateTime
fieldNamespace string
key string
valueType string
productId int If productId is >0 get all metafields for that product, if null get metafields tagged to the shop.
리턴 List

GetAllProducts() 공개 메소드

public GetAllProducts ( ShopifyStoreAuth storeAuth ) : List
storeAuth ShopifyStoreAuth
리턴 List

GetCollection() 공개 메소드

public GetCollection ( ShopifyStoreAuth storeAuth, int collectionId ) : ShopifyResponse
storeAuth ShopifyStoreAuth
collectionId int
리턴 ShopifyResponse

GetCollectionByName() 공개 메소드

public GetCollectionByName ( ShopifyStoreAuth storeAuth, string name ) : ShopifyResponse
storeAuth ShopifyStoreAuth
name string
리턴 ShopifyResponse

GetListAllOrders() 공개 메소드

public GetListAllOrders ( ShopifyStoreAuth storeAuth ) : List
storeAuth ShopifyStoreAuth
리턴 List

GetOrder() 공개 메소드

public GetOrder ( ShopifyStoreAuth storeAuth, int orderId ) : ShopifyResponse
storeAuth ShopifyStoreAuth
orderId int
리턴 ShopifyResponse

GetPageOfProducts() 공개 메소드

public GetPageOfProducts ( ShopifyStoreAuth storeAuth, int numWanted, int pageNumber ) : List
storeAuth ShopifyStoreAuth
numWanted int
pageNumber int
리턴 List

GetProduct() 공개 메소드

public GetProduct ( ShopifyStoreAuth storeAuth, int productId ) : ShopifyResponse
storeAuth ShopifyStoreAuth
productId int
리턴 ShopifyResponse

GetShopInformation() 공개 메소드

public GetShopInformation ( ShopifyStoreAuth storeAuth ) : ShopifyResponse
storeAuth ShopifyStoreAuth
리턴 ShopifyResponse

Instance() 공개 정적인 메소드

public static Instance ( ) : ShopifyCommunicator
리턴 ShopifyCommunicator

UpdateProduct() 공개 메소드

public UpdateProduct ( ShopifyStoreAuth storeAuth, ShopifyProduct shopifyProduct ) : ShopifyResponse
storeAuth ShopifyStoreAuth
shopifyProduct ShopifyProduct
리턴 ShopifyResponse