Update August 2, 2023 (#34)
This commit is contained in:
@@ -24,7 +24,7 @@ func TestGetAnalyticsData(t *testing.T) {
|
|||||||
DateFrom: core.TimeFromString(t, "2006-01-02", "2020-09-01"),
|
DateFrom: core.TimeFromString(t, "2006-01-02", "2020-09-01"),
|
||||||
DateTo: core.TimeFromString(t, "2006-01-02", "2021-10-15"),
|
DateTo: core.TimeFromString(t, "2006-01-02", "2021-10-15"),
|
||||||
Dimension: []GetAnalyticsDataDimension{SKUDimension, DayDimension},
|
Dimension: []GetAnalyticsDataDimension{SKUDimension, DayDimension},
|
||||||
Metrics: []GetAnalyticsDataFilterMetric{AdvViewAll},
|
Metrics: []GetAnalyticsDataFilterMetric{HistViewPDP},
|
||||||
Sort: []GetAnalyticsDataSort{
|
Sort: []GetAnalyticsDataSort{
|
||||||
{
|
{
|
||||||
Key: HistViewPDP,
|
Key: HistViewPDP,
|
||||||
|
|||||||
@@ -37,13 +37,7 @@ const (
|
|||||||
CancellationsMetric GetAnalyticsDataFilterMetric = "cancellations"
|
CancellationsMetric GetAnalyticsDataFilterMetric = "cancellations"
|
||||||
OrderedUnits GetAnalyticsDataFilterMetric = "ordered_units"
|
OrderedUnits GetAnalyticsDataFilterMetric = "ordered_units"
|
||||||
DeliveredUnits GetAnalyticsDataFilterMetric = "delivered_units"
|
DeliveredUnits GetAnalyticsDataFilterMetric = "delivered_units"
|
||||||
AdvViewPDP GetAnalyticsDataFilterMetric = "adv_view_pdp"
|
|
||||||
AdvViewSearchCategory GetAnalyticsDataFilterMetric = "adv_view_search_category"
|
|
||||||
AdvViewAll GetAnalyticsDataFilterMetric = "adv_view_all"
|
|
||||||
AdvSumAll GetAnalyticsDataFilterMetric = "adv_sum_all"
|
|
||||||
PositionCategory GetAnalyticsDataFilterMetric = "position_category"
|
PositionCategory GetAnalyticsDataFilterMetric = "position_category"
|
||||||
PostingsMetric GetAnalyticsDataFilterMetric = "postings"
|
|
||||||
PostingsPremium GetAnalyticsDataFilterMetric = "postings_premium"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type WarehouseType string
|
type WarehouseType string
|
||||||
@@ -518,3 +512,25 @@ const (
|
|||||||
// all shipments except FBP will be returned
|
// all shipments except FBP will be returned
|
||||||
FBPFilterWithout FBPFilter = "without"
|
FBPFilterWithout FBPFilter = "without"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type InvoiceCurrency string
|
||||||
|
|
||||||
|
const (
|
||||||
|
// dollar
|
||||||
|
InvoiceCurrencyUSD InvoiceCurrency = "USD"
|
||||||
|
|
||||||
|
// euro
|
||||||
|
InvoiceCurrencyEUR InvoiceCurrency = "EUR"
|
||||||
|
|
||||||
|
// Turkish lira
|
||||||
|
InvoiceCurrencyTRY InvoiceCurrency = "TRY"
|
||||||
|
|
||||||
|
// yuan
|
||||||
|
InvoiceCurrencyCNY InvoiceCurrency = "CNY"
|
||||||
|
|
||||||
|
// ruble
|
||||||
|
InvoiceCurrencyRUB InvoiceCurrency = "RUB"
|
||||||
|
|
||||||
|
// pound sterling
|
||||||
|
InvoiceCurrencyGBP InvoiceCurrency = "GBP"
|
||||||
|
)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package ozon
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"time"
|
||||||
|
|
||||||
core "github.com/diphantxm/ozon-api-client"
|
core "github.com/diphantxm/ozon-api-client"
|
||||||
)
|
)
|
||||||
@@ -16,6 +17,21 @@ type CreateUpdateProformaLinkParams struct {
|
|||||||
|
|
||||||
// Proforma invoice link
|
// Proforma invoice link
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
|
|
||||||
|
// Invoice HS-code. Pass a number up to 12 characters long
|
||||||
|
HSCode string `json:"hs_code"`
|
||||||
|
|
||||||
|
// Invoice date
|
||||||
|
Date time.Time `json:"date"`
|
||||||
|
|
||||||
|
// Invoice number. The number can contain letters and digits, maximum length is 50 characters
|
||||||
|
Number string `json:"number"`
|
||||||
|
|
||||||
|
// Cost stated in the invoice. The fractional part is separated by decimal point, up to two digits after the decimal poin
|
||||||
|
Price float64 `json:"price"`
|
||||||
|
|
||||||
|
// Invoice currency
|
||||||
|
PriceCurrency InvoiceCurrency `json:"price_currency" default:"USD"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateUpdateProformaLinkResponse struct {
|
type CreateUpdateProformaLinkResponse struct {
|
||||||
|
|||||||
@@ -21,8 +21,13 @@ func TestCreateUpdateProformaLink(t *testing.T) {
|
|||||||
http.StatusOK,
|
http.StatusOK,
|
||||||
map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"},
|
map[string]string{"Client-Id": "my-client-id", "Api-Key": "my-api-key"},
|
||||||
&CreateUpdateProformaLinkParams{
|
&CreateUpdateProformaLinkParams{
|
||||||
PostingNumber: "posting number",
|
PostingNumber: "33920146-0252-1",
|
||||||
URL: "link",
|
URL: "https://cdn.ozone.ru/s3/ozon-disk-api/techdoc/seller-api/earsivfatura_1690960445.pdf",
|
||||||
|
HSCode: "2134322",
|
||||||
|
Date: core.TimeFromString(t, "2006-01-02T15:04:05Z", "2023-08-01T12:08:44.342Z"),
|
||||||
|
Number: "424fdsf234",
|
||||||
|
Price: 234.34,
|
||||||
|
PriceCurrency: InvoiceCurrencyRUB,
|
||||||
},
|
},
|
||||||
`{
|
`{
|
||||||
"result": true
|
"result": true
|
||||||
|
|||||||
Reference in New Issue
Block a user