C# Класс Connectster.Shopify.ShopifyCommunicator

Наследование: IShopifyObject
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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