public SendCloudApi(string apiKey, string apiSecret, string partnerUuid = null) { if (string.IsNullOrWhiteSpace(apiKey) || string.IsNullOrWhiteSpace(apiSecret)) { throw new SendCloudException("You must have an API key and an API secret key"); } _apiKey = apiKey; _apiSecret = apiSecret; _apiUrl = new Uri(HostUrl); _partnerUuid = partnerUuid; Parcels = new SendCloudApiParcelsResource(this); ParcelStatuses = new SendCloudApiParcelStatusResource(this); ShippingMethods = new SendCloudApiShippingResource(this); User = new SendCloudApiUserResource(this); Label = new SendCloudApiLabelResource(this); Invoices = new SendCloudApiInvoicesResource(this); SenderAddresses = new SendCloudApiSenderAddressResource(this); }
public SendCloudApi(string apiKey, string apiSecret, string partnerUuid = null) { if (string.IsNullOrWhiteSpace(apiKey) || string.IsNullOrWhiteSpace(apiSecret)) { throw new SendCloudException("You must have an API key and an API secret key"); } _apiKey = apiKey; _apiSecret = apiSecret; _partnerUuid = partnerUuid; Parcels = new SendCloudApiParcelsResource(this); ParcelDocuments = new SendCloudApiParcelDocumentsResource(this); ParcelStatuses = new SendCloudApiParcelStatusResource(this); Returns = new SendCloudApiReturnsResource(this); Brands = new SendCloudApiBrandsResource(this); ShippingMethods = new SendCloudApiShippingMethodsResource(this); Label = new SendCloudApiLabelsResource(this); User = new SendCloudApiUsersResource(this); Invoices = new SendCloudApiInvoicesResource(this); SenderAddresses = new SendCloudApiSenderAddressResource(this); Integrations = new SendCloudApiIntegrationsResource(this); ReturnPortal = new SendCloudApiReturnPortalResource(this); ServicePoints = new SendCloudApiServicePointsResource(this); }