Documentation
¶
Index ¶
- Constants
- func NewCSVReader(in io.Reader) gocsv.CSVReader
- func NewDefaultHttpClient() *http.Client
- func NewLineSkipDecoder(r io.Reader) (gocsv.SimpleDecoder, error)
- func UnmarshalCSV(in []byte, out interface{}) error
- func UnmarshalCSVWithFilterLines(in []byte, out interface{}) error
- type AuthToken
- type Client
- type Config
- type CustomBoolean
- type CustomDate
- type CustomFloat64
- type CustomInteger
- type CustomTimestamp
- type Error
- type ErrorSource
- type FinancesReportType
- type FinancesReportsFilter
- func (f *FinancesReportsFilter) IsValid() error
- func (f *FinancesReportsFilter) SetRegionCode(value string) *FinancesReportsFilter
- func (f *FinancesReportsFilter) SetReportDate(value time.Time) *FinancesReportsFilter
- func (f *FinancesReportsFilter) SetReportType(value FinancesReportType) *FinancesReportsFilter
- func (f *FinancesReportsFilter) TypeFinanceDetail() *FinancesReportsFilter
- func (f *FinancesReportsFilter) TypeFinancial() *FinancesReportsFilter
- type FinancesReportsResource
- type FinancialReport
- type FinancialReportsResponse
- type NewsstandReportsFilter
- type PreOrdersReport
- type PreOrdersReportsFilter
- type PreOrdersReportsResponse
- type PrivateKey
- func (pk *PrivateKey) DecodePem(rawBytes []byte) (*pem.Block, error)
- func (pk *PrivateKey) Load(path string) (*ecdsa.PrivateKey, error)
- func (pk *PrivateKey) LoadData(pathOrContent string) ([]byte, error)
- func (pk *PrivateKey) LoadFromContent(content string) ([]byte, error)
- func (pk *PrivateKey) LoadFromFile(path string) ([]byte, error)
- func (pk *PrivateKey) ParseP8(rawBytes []byte) (*ecdsa.PrivateKey, error)
- func (pk *PrivateKey) ParsePKCS8(rawBytes []byte) (*ecdsa.PrivateKey, error)
- type RequestBuilder
- type ResourceAbstract
- type ResponseBody
- type ResponseHandlerGzip
- type ResponseHandlerInterface
- type ResponseHandlerJson
- type SalesReport
- type SalesReportFrequency
- type SalesReportSubType
- type SalesReportType
- type SalesReportVersion
- type SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) Daily() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) IsValid() error
- func (f *SalesReportsBaseFilter) Monthly() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SetFrequency(value SalesReportFrequency) *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SetReportDate(value time.Time) *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SetReportSubType(value SalesReportSubType) *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SetReportType(value SalesReportType) *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SetVersion(value SalesReportVersion) *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SubTypeDetailed() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SubTypeOptIn() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) SubTypeSummary() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) ToQueryParamsMap() map[string]interface{}
- func (f *SalesReportsBaseFilter) TypeNewsStand() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) TypePreOrder() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) TypeSales() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) TypeSubscriber() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) TypeSubscription() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) TypeSubscriptionEvent() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) Version10() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) Version11() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) Version12() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) Version13() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) Weekly() *SalesReportsBaseFilter
- func (f *SalesReportsBaseFilter) Yearly() *SalesReportsBaseFilter
- type SalesReportsFilter
- type SalesReportsFilterInterface
- type SalesReportsResource
- func (srr *SalesReportsResource) GetPreOrdersReports(ctx context.Context, filter *PreOrdersReportsFilter) (*PreOrdersReportsResponse, *http.Response, error)
- func (srr *SalesReportsResource) GetReports(ctx context.Context, filter SalesReportsFilterInterface) (*http.Response, error)
- func (srr *SalesReportsResource) GetSalesReports(ctx context.Context, filter *SalesReportsFilter) (*SalesReportsResponse, *http.Response, error)
- func (srr *SalesReportsResource) GetSubscribersReports(ctx context.Context, filter *SubscribersReportsFilter) (*SubscribersReportsResponse, *http.Response, error)
- func (srr *SalesReportsResource) GetSubscriptionsEventsReports(ctx context.Context, filter *SubscriptionsEventsReportsFilter) (*SubscriptionsEventsReportsResponse, *http.Response, error)
- func (srr *SalesReportsResource) GetSubscriptionsReports(ctx context.Context, filter *SubscriptionsReportsFilter) (*SubscriptionsReportsResponse, *http.Response, error)
- type SalesReportsResponse
- type SubscribersReport
- type SubscribersReportsFilter
- type SubscribersReportsResponse
- type SubscriptionsEventsReport
- type SubscriptionsEventsReportsFilter
- type SubscriptionsEventsReportsResponse
- type SubscriptionsOffersCodesRedemptionReportsFilter
- type SubscriptionsOffersRedemptionReport
- type SubscriptionsReport
- type SubscriptionsReportsFilter
- type SubscriptionsReportsResponse
- type TokenBuilder
- type TokenConfig
- type Transport
Constants ¶
const AppStoreConnectAPIAudience = "appstoreconnect-v1"
AppStoreConnectAPIAudience const
const AppStoreConnectAPIHttpIdleConnectionTimeout = 30 * time.Second
AppStoreConnectAPIHttpIdleConnectionTimeout const
const AppStoreConnectAPIHttpMaxIdleConnection = 10
AppStoreConnectAPIHttpMaxIdleConnection const
const AppStoreConnectAPIProductionUri = "https://api.appstoreconnect.apple.com"
AppStoreConnectAPIProductionUri const
const AppStoreConnectAPITokenTtl = 600
AppStoreConnectAPITokenTtl const
const CustomDateFormatDefault = "2006-01-02"
CustomDateFormatDefault const
const CustomDateFormatSlash = "01/02/2006"
CustomDateFormatSlash const
const CustomTimestampFormatDefault = "2006-01-02 15:04:05"
CustomTimestampFormatDefault const
const ResponseContentTypeGzip = "application/a-gzip"
const ResponseContentTypeJson = "application/json; charset=utf-8"
Variables ¶
This section is empty.
Functions ¶
func NewCSVReader ¶
NewCSVReader Create new CSV reader for unmarshaler
func NewDefaultHttpClient ¶
NewDefaultHttpClient create new http client
func NewLineSkipDecoder ¶
func NewLineSkipDecoder(r io.Reader) (gocsv.SimpleDecoder, error)
NewLineSkipDecoder
func UnmarshalCSV ¶
UnmarshalCSV unmarshal raw data to structures
func UnmarshalCSVWithFilterLines ¶
UnmarshalCSVWithFilterLines unmarshal raw data to structures with filter lines
Types ¶
type AuthToken ¶
AuthToken auth token structure
func (*AuthToken) IsNotExpired ¶
IsNotExpired Check token is not expired
type Client ¶
type Client struct { Cfg *Config // contains filtered or unexported fields }
Client common
func NewClientFromConfig ¶
NewClientFromConfig Create new client from config
func (*Client) FinancesReports ¶
func (cl *Client) FinancesReports() *FinancesReportsResource
FinancesReports resource
func (*Client) SalesReports ¶
func (cl *Client) SalesReports() *SalesReportsResource
SalesReports resource
type Config ¶
type Config struct { Uri string VendorNo string IssuerId string KeyId string PrivateKey string Token *TokenConfig }
Config structure
type CustomBoolean ¶
type CustomBoolean struct {
Boolean bool
}
CustomBoolean Custom boolean type
func (*CustomBoolean) MarshalJSON ¶
func (cb *CustomBoolean) MarshalJSON() ([]byte, error)
MarshalJSON Custom boolean MarshalJSON
func (*CustomBoolean) UnmarshalCSV ¶
func (cb *CustomBoolean) UnmarshalCSV(csv string) error
UnmarshalCSV Custom boolean UnmarshalCSV
type CustomDate ¶
CustomDate Custom date type
func (*CustomDate) MarshalJSON ¶
func (ct *CustomDate) MarshalJSON() ([]byte, error)
MarshalJSON Custom date MarshalJSON
func (*CustomDate) UnmarshalCSV ¶
func (ct *CustomDate) UnmarshalCSV(csv string) error
UnmarshalCSV Custom date UnmarshalCSV
type CustomFloat64 ¶
type CustomFloat64 struct {
Float64 float64
}
CustomFloat64 custom float type
func (*CustomFloat64) MarshalJSON ¶
func (cf *CustomFloat64) MarshalJSON() ([]byte, error)
MarshalJSON Custom float MarshalJSON
func (*CustomFloat64) UnmarshalCSV ¶
func (cf *CustomFloat64) UnmarshalCSV(csv string) error
UnmarshalCSV Custom float UnmarshalCSV
type CustomInteger ¶
type CustomInteger struct {
Integer int
}
CustomInteger custom integer type
func (*CustomInteger) MarshalJSON ¶
func (ci *CustomInteger) MarshalJSON() ([]byte, error)
MarshalJSON Custom integer MarshalJSON
func (*CustomInteger) UnmarshalCSV ¶
func (ci *CustomInteger) UnmarshalCSV(csv string) error
UnmarshalCSV Custom integer UnmarshalCSV
type CustomTimestamp ¶
CustomTimestamp custom timestamp type
func (*CustomTimestamp) MarshalJSON ¶
func (ct *CustomTimestamp) MarshalJSON() ([]byte, error)
MarshalJSON Custom timestamp MarshalJSON
func (*CustomTimestamp) UnmarshalCSV ¶
func (ct *CustomTimestamp) UnmarshalCSV(csv string) error
UnmarshalCSV Custom timestamp UnmarshalCSV
func (*CustomTimestamp) Value ¶
func (ct *CustomTimestamp) Value() time.Time
Value Custom timestamp get value
type Error ¶
type Error struct { Id string `json:"id"` //(Required) A machine-readable code indicating the type of error. The code is a hierarchical value with levels of specificity separated by the '.' character. This value is parseable for programmatic error handling in code. Status string `json:"status"` //(Required) The HTTP status code of the error. This status code usually matches the response's status code; however, if the request produces multiple errors, these two codes may differ. Code string `json:"code"` //The unique ID of a specific instance of an error, request, and response. Use this ID when providing feedback to or debugging issues with Apple. Title string `json:"title"` //(Required) A summary of the error. Do not use this field for programmatic error handling. Detail string `json:"detail"` //(Required) A detailed explanation of the error. Do not use this field for programmatic error handling. Source *ErrorSource `json:"source"` //One of two possible types of values: source.parameter, provided when a query parameter produced the error, or source.JsonPointer, provided when a problem with the entity produced the error. }
Error The details about one error that is returned when an API request is not successful. .see https://developer.apple.com/documentation/appstoreconnectapi/errorresponse/errors
type ErrorSource ¶
type ErrorSource struct { Parameter string `json:"parameter"` //The query parameter that produced the error. Pointer string `json:"pointer"` //A JSON pointer that indicates the location in the request entity where the error originates }
ErrorSource An object that contains the query parameter that produced the error. An object that contains the JSON pointer that indicates the location of the error.
type FinancesReportType ¶
type FinancesReportType string
FinancesReportType type
const ( //FinancesReportTypeFinancial const FinancesReportTypeFinancial FinancesReportType = "FINANCIAL" //FinancesReportTypeFinanceDetail const FinancesReportTypeFinanceDetail FinancesReportType = "FINANCE_DETAIL" )
type FinancesReportsFilter ¶
type FinancesReportsFilter struct { ReportDate time.Time //(Required) The fiscal month of the report you wish to download based on the Apple Fiscal Calendar. The fiscal month is specified in the YYYY-MM format. ReportType FinancesReportType //(Required) This value is always FINANCIAL. Possible values: FINANCIAL, FINANCE_DETAIL RegionCode string //(Required) You can download consolidated or separate financial reports per territory. For a complete list of possible values, see Financial Report Regions and Currencies. }
FinancesReportsFilter sales reports filter
func NewFinancesReportsFilter ¶
func NewFinancesReportsFilter() *FinancesReportsFilter
func (*FinancesReportsFilter) IsValid ¶
func (f *FinancesReportsFilter) IsValid() error
IsValid Validate sales report filter params
func (*FinancesReportsFilter) SetRegionCode ¶
func (f *FinancesReportsFilter) SetRegionCode(value string) *FinancesReportsFilter
SetRegionCode Set report date
func (*FinancesReportsFilter) SetReportDate ¶
func (f *FinancesReportsFilter) SetReportDate(value time.Time) *FinancesReportsFilter
SetReportDate Set report date
func (*FinancesReportsFilter) SetReportType ¶
func (f *FinancesReportsFilter) SetReportType(value FinancesReportType) *FinancesReportsFilter
SetReportType Set report type
func (*FinancesReportsFilter) TypeFinanceDetail ¶
func (f *FinancesReportsFilter) TypeFinanceDetail() *FinancesReportsFilter
TypeFinanceDetail Change report type to Sales
func (*FinancesReportsFilter) TypeFinancial ¶
func (f *FinancesReportsFilter) TypeFinancial() *FinancesReportsFilter
TypeFinancial Change report type to Financial
type FinancesReportsResource ¶
type FinancesReportsResource struct {
ResourceAbstract
}
FinancesReportsResource reports
func (*FinancesReportsResource) GetFinancialReports ¶
func (frr *FinancesReportsResource) GetFinancialReports(ctx context.Context, filter *FinancesReportsFilter) (*FinancialReportsResponse, *http.Response, error)
GetFinancialReports
func (*FinancesReportsResource) GetReports ¶
func (frr *FinancesReportsResource) GetReports(ctx context.Context, filter *FinancesReportsFilter) (*http.Response, error)
GetReports Get finances reports by filter
type FinancialReport ¶
type FinancialReport struct { StartDate CustomDate `csv:"Start Date" json:"start_date"` //This is the period start date, based on Apple’s fiscal calendar. EndDate CustomDate `csv:"End Date" json:"end_date"` //This is the period end date, also based on Apple’s fiscal calendar. UPC string `csv:"UPC" json:"upc"` //This field is not applicable to developers. This will display as blank. ISRCIsbn string `csv:"ISRC / ISBN" json:"isrc_isbn"` //For apps, this is your SKU. For details, see App information. For in app purchases, this is the product ID. See In-app purchase information for details. VendorIdentifier string `csv:"Vendor Identifier" json:"vendor_identifier"` //This is the “SKU” that was provided for an app, or a “Product ID” provided for an in-app purchase. Quantity CustomInteger `csv:"Quantity" json:"quantity"` //Aggregated number of units sold. SaleOrReturn string `csv:"Sales or Return" json:"sales_or_return"` //S indicates a Sale, R indicates a Return AppleIdentifier CustomInteger `csv:"Apple Identifier" json:"apple_identifier"` //Apple ID, a unique identifier automatically generated for your app when you add the app to your account. You can view this property in the App Information section in App Store Connect. This identifier is also used in the URL for the App Store on desktop computers. You can’t edit this property. ArtistShowDeveloperAuthor string `csv:"Artist / Show / Developer / Author" json:"artist_show_developer_author"` //Your legal entity name. Title string `csv:"Title" json:"title"` //The name you entered for your app as described in App information. LabelStudioNetworkDeveloperPublisher string `csv:"Label / Studio / Network / Developer / Publisher" json:"label_studio_network_developer_publisher"` //This field is not applicable to developers. This will display as blank. Grid string `csv:"Grid" json:"grid"` //This field is not applicable to developers. This will display as blank. ProductTypeIdentifier string `csv:"Product Type Identifier" json:"product_type_identifier"` //The type of product purchased. See Product Type Identifiers for more information. ISANOtherIdentifier string `csv:"ISAN / Other Identifier" json:"isan_other_identifier"` //This field is not applicable to developers. This will display as blank. CountryOfSale string `csv:"Country Of Sale" json:"country_of_sale"` //Two-character ISO code (such as US for the United States) that indicates the country or region for the App Store where the purchase occurred. This is based on the customer Apple ID country or region. PreOrderFlag string `csv:"Pre-order Flag" json:"preorder_flag"` //“P” or null PromoCode string `csv:"Promo Code" json:"promo_code"` //If the transaction was part of a promotion, a gift, or was downloaded through the Volume Purchase Program for Education, this field will contain a value. This field is empty for all non-promotional items. For more information, see Promotional Codes. CustomerPrice CustomFloat64 `csv:"Customer Price" json:"customer_price"` //The price per unit billed to the customer, which you set for your app or in-app purchase in App Store Connect. *Customer price is inclusive of any applicable taxes we collect and remit per Schedule 2 of the Paid Applications agreement. CustomerCurrency string `csv:"Customer Currency" json:"customer_currency"` //Three-character ISO code for the currency type paid by the customer. For example, USD for United States Dollar. }
FinancialReport
type FinancialReportsResponse ¶
type FinancialReportsResponse struct { ResponseBody Data []*FinancialReport `json:"data,omitempty"` }
FinancialReportsResponse struct
type NewsstandReportsFilter ¶
type NewsstandReportsFilter struct {
SalesReportsBaseFilter
}
NewsstandReportsFilter
func NewNewsstandReportsFilter ¶
func NewNewsstandReportsFilter() *NewsstandReportsFilter
NewNewsstandReportsFilter
func (*NewsstandReportsFilter) IsValid ¶
func (f *NewsstandReportsFilter) IsValid() error
IsValid Validate sales report filter params
type PreOrdersReport ¶
type PreOrdersReport struct { Provider string `csv:"Provider" json:"provider"` //Service provider in your reports (typically Apple). ProviderCountry string `csv:"Provider Country" json:"provider_country"` //Service provider country code (typically U.S.). SKU string `csv:"SKU" json:"sku"` //Product identifier provided by you during app setup. Developer string `csv:"Developer" json:"developer"` //Provided by you during the initial account setup. Title string `csv:"Title" json:"title"` //Provided by you during app setup. PreOrderStartDate CustomDate `csv:"Pre-Order Start Date" json:"preorder_start_date"` //Date the app becomes available for pre-order. PreOrderEndDate CustomDate `csv:"Pre-Order End Date" json:"preorder_end_date"` //Last date the app is available for pre-order, after which the app is available for sale. Ordered CustomFloat64 `csv:"Ordered" json:"ordered"` //Aggregated number of pre-orders for the period. Canceled CustomFloat64 `csv:"Canceled" json:"canceled"` //Aggregated number of canceled pre-orders for the period. CumulativeOrdered CustomFloat64 `csv:"Cumulative Ordered" json:"cumulative_ordered"` //Total number of pre-orders since the start of the pre-order period. CumulativeCanceled CustomFloat64 `csv:"Cumulative Canceled" json:"cumulative_canceled"` //Total number of canceled pre-orders since the start of the pre-order period. StartDate CustomDate `csv:"Start Date" json:"start_date"` //Start date of report. EndDate CustomDate `csv:"End Date" json:"end_date"` //End date of report. CountryCode string `csv:"Country Code" json:"country_code"` //Two-character ISO country code indicating the App Store territory of the Pre-Order. For more information, see Financial Report Regions and Currencies. AppleIdentifier CustomInteger `csv:"Apple Identifier" json:"apple_identifier"` //Apple ID for your app. Device string `csv:"Device" json:"device"` //Type of device used for purchase: iPhone, iPad, Apple TV, iPod touch, or Desktop. SupportedPlatforms string `csv:"Supported Platforms" json:"supported_platforms"` //List of platforms that your app supports: iOS, tvOS, iOS and tvOS, or macOS. Category string `csv:"Category" json:"category"` //Indicates the category of the app, such as Games. Client string `csv:"Client" json:"client"` //Indicates where the purchase happened: App Store, App Store for iMessage, or blank. }
PreOrdersReport Aggregated data for your apps made available for pre-order, including the number of units ordered and canceled by customers.
type PreOrdersReportsFilter ¶
type PreOrdersReportsFilter struct {
SalesReportsBaseFilter
}
PreOrdersReportsFilter
func NewPreOrdersReportsFilter ¶
func NewPreOrdersReportsFilter() *PreOrdersReportsFilter
NewPreOrdersReportsFilter
func (*PreOrdersReportsFilter) IsValid ¶
func (f *PreOrdersReportsFilter) IsValid() error
IsValid Validate sales report filter params
type PreOrdersReportsResponse ¶
type PreOrdersReportsResponse struct { ResponseBody Data []*PreOrdersReport `json:"data,omitempty"` }
PreOrdersReportsResponse struct
type PrivateKey ¶
type PrivateKey struct { }
PrivateKey private key handler
func (*PrivateKey) DecodePem ¶
func (pk *PrivateKey) DecodePem(rawBytes []byte) (*pem.Block, error)
DecodePem Decode private key pem
func (*PrivateKey) Load ¶
func (pk *PrivateKey) Load(path string) (*ecdsa.PrivateKey, error)
Load and generate private key
func (*PrivateKey) LoadData ¶
func (pk *PrivateKey) LoadData(pathOrContent string) ([]byte, error)
LoadData Load private key from string or file path
func (*PrivateKey) LoadFromContent ¶
func (pk *PrivateKey) LoadFromContent(content string) ([]byte, error)
LoadFromContent Load private key from string
func (*PrivateKey) LoadFromFile ¶
func (pk *PrivateKey) LoadFromFile(path string) ([]byte, error)
LoadFromFile Load private key from file
func (*PrivateKey) ParseP8 ¶
func (pk *PrivateKey) ParseP8(rawBytes []byte) (*ecdsa.PrivateKey, error)
ParseP8 Parse private key .p8
func (*PrivateKey) ParsePKCS8 ¶
func (pk *PrivateKey) ParsePKCS8(rawBytes []byte) (*ecdsa.PrivateKey, error)
ParsePKCS8 Parse PKCS private key .p8
type RequestBuilder ¶
type RequestBuilder struct {
// contains filtered or unexported fields
}
RequestBuilder handler
type ResourceAbstract ¶
type ResourceAbstract struct {
// contains filtered or unexported fields
}
ResourceAbstract base resource
type ResponseBody ¶
type ResponseBody struct { //ErrorResult Information with error details that an API returns in the response body whenever the API request is not successful. // .see https://developer.apple.com/documentation/appstoreconnectapi/errorresponse Errors []*Error `json:"errors,omitempty"` // contains filtered or unexported fields }
ResponseBody struct
type ResponseHandlerGzip ¶
type ResponseHandlerGzip struct {
FilterLines bool
}
func (*ResponseHandlerGzip) ReadBody ¶
func (r *ResponseHandlerGzip) ReadBody(resp *http.Response) ([]byte, error)
func (*ResponseHandlerGzip) RestoreBody ¶
func (r *ResponseHandlerGzip) RestoreBody(data []byte) (io.ReadCloser, error)
func (*ResponseHandlerGzip) UnmarshalBody ¶
func (r *ResponseHandlerGzip) UnmarshalBody(data []byte, v interface{}) error
type ResponseHandlerInterface ¶
type ResponseHandlerInterface interface { ReadBody(resp *http.Response) ([]byte, error) UnmarshalBody(data []byte, v interface{}) error RestoreBody(data []byte) (io.ReadCloser, error) }
func NewResponseHandler ¶
func NewResponseHandler(contentType string, filterLines bool) ResponseHandlerInterface
type ResponseHandlerJson ¶
type ResponseHandlerJson struct { }
func (*ResponseHandlerJson) ReadBody ¶
func (r *ResponseHandlerJson) ReadBody(resp *http.Response) ([]byte, error)
func (*ResponseHandlerJson) RestoreBody ¶
func (r *ResponseHandlerJson) RestoreBody(data []byte) (io.ReadCloser, error)
func (*ResponseHandlerJson) UnmarshalBody ¶
func (r *ResponseHandlerJson) UnmarshalBody(data []byte, v interface{}) error
type SalesReport ¶
type SalesReport struct { Provider string `csv:"Provider" json:"provider"` //The service provider in your reports (typically Apple). ProviderCountry string `csv:"Provider Country" json:"provider_country"` //The service provider country code (typically U.S.). SKU string `csv:"SKU" json:"sku"` //A product identifier provided by you during app setup. Developer string `csv:"Developer" json:"developer"` //Provided by you during the initial account setup. Name string `csv:"Name" json:"name"` //Provided by you during app setup. Title string `csv:"Title" json:"title"` //Provided by you during app setup. Version string `csv:"SalesReportVersion" json:"version"` //Provided by you during app setup. ProductTypeIdentifier string `csv:"Product Type Identifier" json:"product_type_identifier"` //Defines the type of transaction (for example, initial download, update, and so on). For more information, see Product Type Identifiers. Units CustomFloat64 `csv:"Units" json:"units"` //The aggregated number of units. Negative values indicate refunds, or CMB credits for previously purchased apps when CMB column shows ‘CMB-C’. DeveloperProceeds CustomFloat64 `csv:"Developer Proceeds" json:"developer_proceeds"` //The amount you receive per unit. This is the Customer Price minus applicable taxes and Apple’s commission, per Schedule 2 of your Paid Applications agreement. BeginDate CustomDate `csv:"Begin Date" json:"begin_date"` //Start date of report. EndDate CustomDate `csv:"End Date" json:"end_date"` //End date of report. CustomerCurrency string `csv:"Customer Currency" json:"customer_currency"` //Three-character ISO code indicating the customer’s currency. For more information, see Currency codes. CountryCode string `csv:"Country Code" json:"country_code"` //Two-character ISO country code indicating the App Store territory for the purchase. For more information, see Financial Report Regions and Currencies. CurrencyOfProceeds string `csv:"Currency of Proceeds" json:"currency_of_proceeds"` //The currency in which your proceeds are earned. For more information, see Currency codes. AppleIdentifier CustomInteger `csv:"Apple Identifier" json:"apple_identifier"` //The Apple ID for your app. CustomerPrice CustomFloat64 `csv:"Customer Price" json:"customer_price"` //The price per unit billed to the customer, which you set for your app or in-app purchase in App Store Connect. *Customer price is inclusive of any applicable taxes we collect and remit per Schedule 2 of the Paid Applications agreement. Negative values indicate refunds, or CMB credits for previously purchased apps when CMB column shows ‘CMB-C’. PromoCode string `csv:"Promo Code" json:"promo_code"` //If the transaction was part of a promotion, this field will contain a value. This field is empty for all non-promotional items. For more information, see Promotional Codes. ParentIdentifier string `csv:"Parent Identifier" json:"parent_identifier"` //In-App Purchases will show the SKU of the associated app. Subscription string `csv:"Subscription" json:"subscription"` //Defines whether an auto-renewable subscription is new or a renewal. Period string `csv:"Period" json:"period"` //Defines the duration of an auto-renewable subscription purchase. Values include: 7 days, 1 month, 2 months, 3 months, 6 months, and 1 year. Category string `csv:"Category" json:"category"` //Indicates the category of the app, such as Games. CMB string `csv:"CMB" json:"cmb"` //If the transaction involves a “completed” app bundle, this field will contain a value of “CMB.” App credits for completed bundles will show a value of “CMB-C.” Otherwise this field is blank. Device string `csv:"Device" json:"device"` //List of platforms that your app supports: iOS, tvOS, iOS and tvOS, or macOS. SupportedPlatforms string `csv:"Supported Platforms" json:"supported_platforms"` // Type of device used for purchase or redownload: iPhone, iPad, Apple TV, iPod touch, or Desktop. ProceedsReason string `csv:"Proceeds Reason" json:"proceeds_reason"` //For Renew events, if the price is preserved then this field equals “Yes”. Otherwise it is blank. PreservedPricing string `csv:"Preserved Pricing" json:"preserved_pricing"` //If a subscription has been active for more than a year then you receive 85% of the customer price, minus applicable taxes, and this field equals “Rate After One Year." Otherwise, you receive 70% and the field is blank. Client string `csv:"Client" json:"client"` //Indicates where the purchase happened: App Store for iMessage, News, or blank. OrderType string `csv:"Order Type" json:"order_type"` //For introductory offers or subscription offers, indicates what type of transaction this line item is: Pay Up Front or Pay As You Go. For pre-orders, indicates whether a purchase originated from a Pre-Order. For promotional offers, the field will populate the Order ID. }
SalesReport Aggregated sales and download data for your apps and In-App Purchases
type SalesReportFrequency ¶
type SalesReportFrequency string
SalesReportFrequency type
const ( //SalesReportFrequencyDaily const SalesReportFrequencyDaily SalesReportFrequency = "DAILY" //SalesReportFrequencyWeekly const SalesReportFrequencyWeekly SalesReportFrequency = "WEEKLY" //SalesReportFrequencyMonthly const SalesReportFrequencyMonthly SalesReportFrequency = "MONTHLY" //SalesReportFrequencyYearly const SalesReportFrequencyYearly SalesReportFrequency = "YEARLY" )
type SalesReportSubType ¶
type SalesReportSubType string
SalesReportSubType type
const ( //SalesReportSubTypeSummary const SalesReportSubTypeSummary SalesReportSubType = "SUMMARY" //SalesReportSubTypeDetailed const SalesReportSubTypeDetailed SalesReportSubType = "DETAILED" //SalesReportSubTypeOptIn const SalesReportSubTypeOptIn SalesReportSubType = "OPT_IN" )
type SalesReportType ¶
type SalesReportType string
SalesReportType type
const ( //SalesReportTypeSales const SalesReportTypeSales SalesReportType = "SALES" //SalesReportTypePreorder const SalesReportTypePreorder SalesReportType = "PRE_ORDER" //SalesReportTypeNewsStand const SalesReportTypeNewsStand SalesReportType = "NEWSSTAND" //SalesReportTypeSubscription const SalesReportTypeSubscription SalesReportType = "SUBSCRIPTION" //SalesReportTypeSubscriptionEvent const SalesReportTypeSubscriptionEvent SalesReportType = "SUBSCRIPTION_EVENT" //SalesReportTypeSubscriptionOfferCodeRedemption const SalesReportTypeSubscriptionOfferCodeRedemption SalesReportType = "SUBSCRIPTION_OFFER_CODE_REDEMPTION" //SalesReportTypeSubscriber const SalesReportTypeSubscriber SalesReportType = "SUBSCRIBER" )
type SalesReportVersion ¶
type SalesReportVersion string
SalesReportVersion type
const ( //SalesReportVersion10 const SalesReportVersion10 SalesReportVersion = "1_0" //SalesReportVersion11 const SalesReportVersion11 SalesReportVersion = "1_1" //SalesReportVersion12 const SalesReportVersion12 SalesReportVersion = "1_2" //SalesReportVersion13 const SalesReportVersion13 SalesReportVersion = "1_3" )
type SalesReportsBaseFilter ¶
type SalesReportsBaseFilter struct { ReportDate time.Time //The report date to download. The date is specified in the YYYY-MM-DD format for all report frequencies except DAILY, which does not require a specified date. For more information, see report availability and storage. ReportSubType SalesReportSubType //(Required) The report sub type to download. For a list of values, see Allowed Values Based on Sales Report Type below. Possible values: SUMMARY, DETAILED, OPT_IN ReportType SalesReportType //(Required) The report to download. For more details on each report type see About Reports. Possible values: SALES, PRE_ORDER, NEWSSTAND, SUBSCRIPTION, SUBSCRIPTION_EVENT, SUBSCRIBER Frequency SalesReportFrequency //(Required) Frequency of the report to download. For a list of values, see Allowed Values Based on Sales Report Type below. Possible values: DAILY, WEEKLY, MONTHLY, YEARLY Version SalesReportVersion //The version of the report. For a list of values, see Allowed Values Based on Sales Report Type below. }
SalesReportsBaseFilter Sales reports filter
func (*SalesReportsBaseFilter) Daily ¶
func (f *SalesReportsBaseFilter) Daily() *SalesReportsBaseFilter
Daily Change frequency to Daily
func (*SalesReportsBaseFilter) IsValid ¶
func (f *SalesReportsBaseFilter) IsValid() error
IsValid Validate sales report filter params
func (*SalesReportsBaseFilter) Monthly ¶
func (f *SalesReportsBaseFilter) Monthly() *SalesReportsBaseFilter
Monthly Change frequency to Monthly
func (*SalesReportsBaseFilter) SetFrequency ¶
func (f *SalesReportsBaseFilter) SetFrequency(value SalesReportFrequency) *SalesReportsBaseFilter
SetFrequency Set frequency
func (*SalesReportsBaseFilter) SetReportDate ¶
func (f *SalesReportsBaseFilter) SetReportDate(value time.Time) *SalesReportsBaseFilter
SetReportDate Set report date
func (*SalesReportsBaseFilter) SetReportSubType ¶
func (f *SalesReportsBaseFilter) SetReportSubType(value SalesReportSubType) *SalesReportsBaseFilter
SetReportSubType Set report sub type
func (*SalesReportsBaseFilter) SetReportType ¶
func (f *SalesReportsBaseFilter) SetReportType(value SalesReportType) *SalesReportsBaseFilter
SetReportType Set report type
func (*SalesReportsBaseFilter) SetVersion ¶
func (f *SalesReportsBaseFilter) SetVersion(value SalesReportVersion) *SalesReportsBaseFilter
SetVersion Set version
func (*SalesReportsBaseFilter) SubTypeDetailed ¶
func (f *SalesReportsBaseFilter) SubTypeDetailed() *SalesReportsBaseFilter
SubTypeDetailed Change report sub type to Detailed
func (*SalesReportsBaseFilter) SubTypeOptIn ¶
func (f *SalesReportsBaseFilter) SubTypeOptIn() *SalesReportsBaseFilter
SubTypeOptIn Change report sub type to OptIn
func (*SalesReportsBaseFilter) SubTypeSummary ¶
func (f *SalesReportsBaseFilter) SubTypeSummary() *SalesReportsBaseFilter
SubTypeSummary Change report sub type to Summary
func (*SalesReportsBaseFilter) ToQueryParamsMap ¶
func (f *SalesReportsBaseFilter) ToQueryParamsMap() map[string]interface{}
ToQueryParamsMap Convert filter to query params
func (*SalesReportsBaseFilter) TypeNewsStand ¶
func (f *SalesReportsBaseFilter) TypeNewsStand() *SalesReportsBaseFilter
TypeNewsStand Change report type to NewsStand
func (*SalesReportsBaseFilter) TypePreOrder ¶
func (f *SalesReportsBaseFilter) TypePreOrder() *SalesReportsBaseFilter
TypePreOrder Change report type to PreOrder
func (*SalesReportsBaseFilter) TypeSales ¶
func (f *SalesReportsBaseFilter) TypeSales() *SalesReportsBaseFilter
TypeSales Change report type to Sales
func (*SalesReportsBaseFilter) TypeSubscriber ¶
func (f *SalesReportsBaseFilter) TypeSubscriber() *SalesReportsBaseFilter
TypeSubscriber Change report type to Subscriber
func (*SalesReportsBaseFilter) TypeSubscription ¶
func (f *SalesReportsBaseFilter) TypeSubscription() *SalesReportsBaseFilter
TypeSubscription Change report type to Subscription
func (*SalesReportsBaseFilter) TypeSubscriptionEvent ¶
func (f *SalesReportsBaseFilter) TypeSubscriptionEvent() *SalesReportsBaseFilter
TypeSubscriptionEvent Change report type to SubscriptionEvent
func (*SalesReportsBaseFilter) Version10 ¶
func (f *SalesReportsBaseFilter) Version10() *SalesReportsBaseFilter
Version10 Change version to 1_0
func (*SalesReportsBaseFilter) Version11 ¶
func (f *SalesReportsBaseFilter) Version11() *SalesReportsBaseFilter
Version11 Change version to 1_1
func (*SalesReportsBaseFilter) Version12 ¶
func (f *SalesReportsBaseFilter) Version12() *SalesReportsBaseFilter
Version12 Change version to 1_2
func (*SalesReportsBaseFilter) Version13 ¶
func (f *SalesReportsBaseFilter) Version13() *SalesReportsBaseFilter
Version13 Change version to 1_3
func (*SalesReportsBaseFilter) Weekly ¶
func (f *SalesReportsBaseFilter) Weekly() *SalesReportsBaseFilter
Weekly Change frequency to Weekly
func (*SalesReportsBaseFilter) Yearly ¶
func (f *SalesReportsBaseFilter) Yearly() *SalesReportsBaseFilter
Yearly Change frequency to Yearly
type SalesReportsFilter ¶
type SalesReportsFilter struct {
SalesReportsBaseFilter
}
SalesReportsFilter
func (*SalesReportsFilter) IsValid ¶
func (f *SalesReportsFilter) IsValid() error
IsValid Validate sales report filter params
type SalesReportsFilterInterface ¶
type SalesReportsFilterInterface interface { IsValid() error ToQueryParamsMap() map[string]interface{} }
SalesReportsFilterInterface
type SalesReportsResource ¶
type SalesReportsResource struct {
ResourceAbstract
}
SalesReportsResource reports
func (*SalesReportsResource) GetPreOrdersReports ¶
func (srr *SalesReportsResource) GetPreOrdersReports(ctx context.Context, filter *PreOrdersReportsFilter) (*PreOrdersReportsResponse, *http.Response, error)
GetPreOrdersReports
func (*SalesReportsResource) GetReports ¶
func (srr *SalesReportsResource) GetReports(ctx context.Context, filter SalesReportsFilterInterface) (*http.Response, error)
GetReports Get sales reports by filter
func (*SalesReportsResource) GetSalesReports ¶
func (srr *SalesReportsResource) GetSalesReports(ctx context.Context, filter *SalesReportsFilter) (*SalesReportsResponse, *http.Response, error)
GetSalesReports
func (*SalesReportsResource) GetSubscribersReports ¶
func (srr *SalesReportsResource) GetSubscribersReports(ctx context.Context, filter *SubscribersReportsFilter) (*SubscribersReportsResponse, *http.Response, error)
GetSubscriptionsReports
func (*SalesReportsResource) GetSubscriptionsEventsReports ¶
func (srr *SalesReportsResource) GetSubscriptionsEventsReports(ctx context.Context, filter *SubscriptionsEventsReportsFilter) (*SubscriptionsEventsReportsResponse, *http.Response, error)
GetSubscriptionsEventsReports
func (*SalesReportsResource) GetSubscriptionsReports ¶
func (srr *SalesReportsResource) GetSubscriptionsReports(ctx context.Context, filter *SubscriptionsReportsFilter) (*SubscriptionsReportsResponse, *http.Response, error)
GetSubscriptionsReports
type SalesReportsResponse ¶
type SalesReportsResponse struct { ResponseBody Data []*SalesReport `json:"data,omitempty"` }
SalesReportsResponse struct
type SubscribersReport ¶
type SubscribersReport struct { EventDate CustomDate `csv:"Event Date" json:"event_date"` //Date the event occurred. AppName string `csv:"App Name" json:"app_name"` //Title of your subscription’s parent app. AppAppleID CustomInteger `csv:"App Apple ID" json:"app_apple_id"` //Apple ID of your subscription’s parent app. SubscriptionName string `csv:"Subscription Name" json:"subscription_name"` //Title of your subscription. SubscriptionAppleID CustomInteger `csv:"Subscription Apple ID" json:"subscription_apple_id"` //Apple ID of your subscription. SubscriptionGroupID CustomInteger `csv:"Subscription Group ID" json:"subscription_group_id"` //Your subscription’s Group ID (formerly Family ID). StandardSubscriptionDuration string `csv:"Standard Subscription Duration" json:"standard_subscription_duration"` //Duration of the standard subscription: 7 Days, 1 Month, 2 Months, 3 Months, 6 Months, or 1 Year. SubscriptionOfferName string `csv:"Subscription Offer Name" json:"subscription_offer_name"` //The promotional offer reference name or the offer code reference name used in App Store Connect when setting up the subscription offer. PromotionalOfferID string `csv:"Promotional Offer ID" json:"promotional_offer_id"` //A code that you create for customers to enter and redeem the subscription offer. IntroductoryPriceType string `csv:"Introductory Price Type" json:"introductory_price_type"` //Type of introductory price: Pay Up Front, Pay As You Go, or Free Trial PromotionalOfferName string `csv:"Promotional Offer Name" json:"promotional_offer_name"` //The Promotional Offer Reference Name used in App Store Connect when setting up the Offer. SubscriptionOfferDuration string `csv:"Subscription Offer Duration" json:"subscription_offer_duration"` //Duration of the introductory price if applicable: For example, 3 Days, 1 Week, 2 Weeks, 1 Month, 2 Months, 3 Months, 6 Months, or 1 Year. SubscriptionOfferType string `csv:"Subscription Offer Type" json:"subscription_offer_type"` //The promotional offer reference name or the offer code reference name used in App Store Connect when setting up the subscription offer. MarketingOptInDuration string `csv:"Marketing Opt-In Duration" json:"marketing_opt_in_duration"` //Duration of the marketing opt-in if applicable: 7 Days, 1 Month, 2 Months, 3 Months, 6 Months, or 1 Year. CustomerPrice CustomFloat64 `csv:"Customer Price" json:"customer_price"` //The price of your auto-renewable subscription. CustomerCurrency string `csv:"Customer Currency" json:"customer_currency"` //Three-character ISO code indicating the customer’s currency. For more information, see Currency codes. DeveloperProceeds CustomFloat64 `csv:"Developer Proceeds" json:"developer_proceeds"` //The proceeds for each item delivered. ProceedsCurrency string `csv:"Proceeds Currency" json:"proceeds_currency"` //The currency in which your proceeds are earned. For more information, see Currency codes. PreservedPricing string `csv:"Preserved Pricing" json:"preserved_pricing"` //For renewals, if the price is preserved then this field equals “Yes”. Otherwise, it is blank. ProceedsReason string `csv:"Proceeds Reason" json:"proceeds_reason"` //If a subscription has been active for more than a year then you receive 85% of the customer price, minus applicable taxes, and this field equals “Rate After One Year.” Otherwise, you receive 70% and the field is blank. Client string `csv:"Client" json:"client"` //If the subscription was purchased from News then this field equals “News”. Otherwise, it is blank. Country string `csv:"Country" json:"country"` //Two-character ISO country code indicating the App Store territory for the purchase. For more information, see Financial Report Regions and Currencies. SubscriberID CustomInteger `csv:"Subscriber ID" json:"subscriber_id"` //The randomly generated Subscriber ID that is unique to each customer and developer. SubscriberIDReset string `csv:"Subscriber ID Reset" json:"subscriber_id_reset"` //If a customer cancels all of their subscriptions with you and does not resubscribe within 180 days, the Subscriber ID will be deleted. If the same customer resubscribes after 180 days, then we create a new Subscriber ID and this field equals “Yes.” Otherwise, it is blank.Subscriber IDs are reset when an app is transferred to another developer account. Refund string `csv:"Refund" json:"refund"` //For full or partial refunds, this field equals “Yes.” Otherwise, it is blank. PurchaseDate CustomDate `csv:"Purchase Date" json:"purchase_date"` //For refunds, the date of the original purchase. Units CustomInteger `csv:"Units" json:"units"` //The aggregated number of units. }
SubscribersReport Transaction-level data about subscriber activity using randomly generated Subscriber IDs.
type SubscribersReportsFilter ¶
type SubscribersReportsFilter struct {
SalesReportsBaseFilter
}
SubscribersReportsFilter
func NewSubscribersReportsFilter ¶
func NewSubscribersReportsFilter() *SubscribersReportsFilter
NewSubscribersReportsFilter
func (*SubscribersReportsFilter) IsValid ¶
func (f *SubscribersReportsFilter) IsValid() error
IsValid Validate sales report filter params
type SubscribersReportsResponse ¶
type SubscribersReportsResponse struct { ResponseBody Data []*SubscribersReport `json:"data,omitempty"` }
SubscribersReportsResponse struct
type SubscriptionsEventsReport ¶
type SubscriptionsEventsReport struct { EventDate CustomDate `csv:"Event Date" json:"event_date"` //Date the event occurred. Event string `csv:"Event" json:"event"` //Type of event that occurred. For more information, see Subscription Events. AppName string `csv:"App Name" json:"app_name"` //Title of your subscription’s parent app. AppAppleID CustomInteger `csv:"App Apple ID" json:"app_apple_id"` //Apple ID of your subscription’s parent app. SubscriptionName string `csv:"Subscription Name" json:"subscription_name"` //Title of your subscription. SubscriptionAppleID CustomInteger `csv:"Subscription Apple ID" json:"subscription_apple_id"` //Apple ID of your subscription. SubscriptionGroupID CustomInteger `csv:"Subscription Group ID" json:"subscription_group_id"` //Your subscription’s Group ID (formerly Family ID). StandardSubscriptionDuration string `csv:"Standard Subscription Duration" json:"standard_subscription_duration"` //Duration of the standard subscription: 7 Days, 1 Month, 2 Months, 3 Months, 6 Months, or 1 Year. SubscriptionOfferType string `csv:"Subscription Offer Type" json:"subscription_offer_type"` //Type of introductory price: Pay Up Front, Pay As You Go, or Free Trial SubscriptionOfferDuration string `csv:"Subscription Offer Duration" json:"subscription_offer_duration"` //Duration of the introductory price if applicable. For example: 3 Days, 7 Days, 2 Weeks, 1 Month, 2 Months, 3 Months, 6 Months, or 1 Year. MarketingOptIn string `csv:"Marketing Opt-In" json:"marketing_opt_in"` //If the subscription included a marketing opt-in then this field equals “Yes”. Otherwise, it is blank. MarketingOptInDuration string `csv:"Marketing Opt-In Duration" json:"marketing_opt_in_duration"` //Duration of the opt-in if applicable: 7 Days, 1 Month, 2 Months, 3 Months, 6 Months, or 1 Year. PreservedPricing string `csv:"Preserved Pricing" json:"preserved_pricing"` //For Renew events, if the price is preserved then this field equals “Yes”. Otherwise, it is blank. ProceedsReason string `csv:"Proceeds Reason" json:"proceeds_reason"` //For Renew events, if the subscription has been active for more than a year then you receive 85% of the customer price, minus applicable taxes, and this field equals “Rate After One Year”. Otherwise, you receive 70% and the field is blank. PromotionalOfferName string `csv:"Promotional Offer Name" json:"promotional_offer_name"` //The Promotional Offer Reference Name used in App Store Connect when setting up the offer. PromotionalOfferID string `csv:"Promotional Offer ID" json:"promotional_offer_id"` //An identifier that you set for your subscription offers in App Store Connect. For Promotional Offers this is the value entered in the Promotional Offer Reference Name field when setting up the offer. For one-time use offer codes, this is the value entered in the Offer Code Reference Name field when setting up the offer. For custom offer codes this is the code shared with your users. ConsecutivePaidPeriods CustomInteger `csv:"Consecutive Paid Periods" json:"consecutive_paid_periods"` //The total number of paid periods that the subscription has been active without cancellation. This does not include free trials, marketing opt-in bonus periods, or grace periods. OriginalStartDate CustomDate `csv:"Original Start Date" json:"original_start_date"` //Date of the initial subscription purchase. Device string `csv:"Device" json:"device"` //Type of device used for initial subscription purchase: iPhone, iPad, Apple TV, iPod touch, or Desktop. Client string `csv:"Client" json:"client"` //If the subscription was purchased from News then this field equals “News”. Otherwise, it is blank. State string `csv:"State" json:"state"` //State field in the address submitted by the customer when signing up for their Apple ID. This field is not validated and may be blank. Country string `csv:"Country" json:"country"` //Two-character ISO country code indicating the App Store territory for the purchase. For more information, see Financial Report Regions and Currencies PreviousSubscriptionName string `csv:"Previous Subscription Name" json:"previous_subscription_name"` //For upgrade, downgrade, and crossgrade events, the title of the previous subscription. PreviousSubscriptionAppleID CustomInteger `csv:"Previous Subscription Apple ID" json:"previous_subscription_apple_id"` //For upgrade, downgrade, and crossgrade events, the Apple ID of the previous subscription. DaysBeforeCanceling CustomInteger `csv:"Days Before Canceling" json:"days_before_canceling"` //For cancel events, the number of days from the start date to when a subscriber canceled, which could be in the middle of the period. This only applies to cancel events where cancellation reason equals ‘canceled.' Otherwise, it is blank. CancellationReason string `csv:"Cancellation Reason" json:"cancellation_reason"` //Reason for a cancellation: Billing issue, Price increase, Canceled, Removed from Sale, or Other. For more information, see Cancellation Reasons. DaysCanceled CustomInteger `csv:"Days Canceled" json:"days_canceled"` //For reactivate events, the number of days ago that the subscriber canceled. Quantity CustomInteger `csv:"Quantity" json:"quantity"` //Number of events with the same values for the other fields. }
SubscriptionsEventsReport Aggregated data about subscriber activity, including upgrades, renewals, and introductory price conversions
type SubscriptionsEventsReportsFilter ¶
type SubscriptionsEventsReportsFilter struct {
SalesReportsBaseFilter
}
SubscriptionsEventsReportsFilter
func NewSubscriptionsEventsReportsFilter ¶
func NewSubscriptionsEventsReportsFilter() *SubscriptionsEventsReportsFilter
NewSubscriptionsEventsReportsFilter
func (*SubscriptionsEventsReportsFilter) IsValid ¶
func (f *SubscriptionsEventsReportsFilter) IsValid() error
IsValid Validate sales report filter params
type SubscriptionsEventsReportsResponse ¶
type SubscriptionsEventsReportsResponse struct { ResponseBody Data []*SubscriptionsEventsReport `json:"data,omitempty"` }
SubscriptionsEventsReportsResponse struct
type SubscriptionsOffersCodesRedemptionReportsFilter ¶
type SubscriptionsOffersCodesRedemptionReportsFilter struct {
SalesReportsBaseFilter
}
SubscriptionsOffersCodesRedemptionReportsFilter
func NewSubscriptionsOffersCodesRedemptionReportsFilter ¶
func NewSubscriptionsOffersCodesRedemptionReportsFilter() *SubscriptionsOffersCodesRedemptionReportsFilter
func (*SubscriptionsOffersCodesRedemptionReportsFilter) IsValid ¶
func (f *SubscriptionsOffersCodesRedemptionReportsFilter) IsValid() error
IsValid Validate sales report filter params
type SubscriptionsOffersRedemptionReport ¶
type SubscriptionsOffersRedemptionReport struct { Date CustomDate `csv:"Date" json:"date"` //The date the redemptions occurred. AppName string `csv:"App Name" json:"app_name"` //Title of your subscription’s parent app. AppAppleID CustomInteger `csv:"App Apple ID" json:"app_apple_id"` //Apple ID of your subscription’s parent app. SubscriptionName string `csv:"Subscription Name" json:"subscription_name"` //Title of your subscription. SubscriptionAppleID CustomInteger `csv:"Subscription Apple ID" json:"subscription_apple_id"` //Apple ID of your subscription. OfferReferenceName string `csv:"Offer Reference Name" json:"offer_reference_name"` //The Offer Reference Name used in App Store Connect when setting up the offer. OfferCode string `csv:"Offer Code" json:"offer_code"` //The custom code you created in App Store Connect. In the case of one-time use code redemptions, this field is blank. Territory string `csv:"Territory" json:"territory"` //Two-character ISO country code indicating the App Store territory. Redemptions CustomInteger `csv:"Redemptions" json:"redemptions"` //Number of redemptions }
SubscriptionsOffersRedemptionReport
type SubscriptionsReport ¶
type SubscriptionsReport struct { AppName string `csv:"App Name" json:"app_name"` //Title of your subscription’s parent app. AppAppleID CustomInteger `csv:"App Apple ID" json:"app_apple_id"` //Apple ID of your subscription’s parent app. SubscriptionName string `csv:"Subscription Name" json:"subscription_name"` //Title of your subscription. SubscriptionAppleID CustomInteger `csv:"Subscription Apple ID" json:"subscription_apple_id"` //Apple ID of your subscription. SubscriptionGroupID CustomInteger `csv:"Subscription Group ID" json:"subscription_group_id"` //Your subscription’s Group ID (formerly Family ID). StandardSubscriptionDuration string `csv:"Standard Subscription Duration" json:"standard_subscription_duration"` //Duration of the standard subscription: 7 Days, 1 Month, 2 Months, 3 Months, 6 Months, or 1 Year. PromotionalOfferName string `csv:"Promotional Offer Name" json:"promotional_offer_name"` //Retail Price displayed on the App Store and charged to the customer. PromotionalOfferID string `csv:"Promotional Offer ID" json:"promotional_offer_id"` //Three-character ISO code indicating the customer’s currency. For more information, see Currency codes. CustomerPrice CustomFloat64 `csv:"Customer Price" json:"customer_price"` //The proceeds for each subscription. CustomerCurrency string `csv:"Customer Currency" json:"customer_currency"` //The currency in which your proceeds are earned. For more information, see Currency codes. DeveloperProceeds CustomFloat64 `csv:"Developer Proceeds" json:"developer_proceeds"` //For Renew events, if the price is preserved then this field equals “Yes”. Otherwise, it is blank. ProceedsCurrency string `csv:"Proceeds Currency" json:"proceeds_currency"` //For Renew events, if the subscription has been active for more than a year then you receive 85% of the customer price, minus applicable taxes, and this field equals “Rate After One Year”. Otherwise, you receive 70% and the field is blank. PreservedPricing string `csv:"Preserved Pricing" json:"preserved_pricing"` //The promotional offer reference name or the offer code reference name used in App Store Connect when setting up the subscription offer. ProceedsReason string `csv:"Proceeds Reason" json:"proceeds_reason"` //An identifier that you set for your subscription offers in App Store Connect. For Promotional Offers this is the value entered in the Promotional Offer Reference Name field when setting up the offer. For one-time use offer codes, this is the value entered in the Offer Code Reference Name field when setting up the offer. For custom offer codes this is the code shared with your users. Client string `csv:"Client" json:"client"` //State field in the address submitted by the customer when signing up for their Apple ID. This field is not validated and may be blank. Device string `csv:"Device" json:"device"` //Two-character ISO country code indicating the App Store territory for the purchase. For more information, see Financial Report Regions and Currencies. State string `csv:"State" json:"state"` //Type of device used for subscription purchase: iPhone, iPad, Apple TV, iPod touch, or Desktop. Country string `csv:"Country" json:"country"` //If the subscription was purchased from News then this field equals “News”. Otherwise, it is blank. ActiveStandardPriceSubscriptions CustomInteger `csv:"Active Standard Price Subscriptions" json:"active_standard_price_subscriptions"` //Total number of auto-renewable standard paid subscriptions currently active, excluding free trials, subscription offers, introductory offers, and marketing opt-ins. Subscriptions are active during the period for which the customer has paid without cancellation. ActiveFreeTrialIntroductoryOfferSubscriptions CustomInteger `csv:"Active Free Trial Introductory Offer Subscriptions" json:"active_free_trial_introductory_offer_subscriptions"` //Total number of introductory offer subscriptions currently in a free trial. ActivePayUpFrontIntroductoryOfferSubscriptions CustomInteger `csv:"Active Pay Up Front Introductory Offer Subscriptions" json:"active_pay_up_front_introductory_offer_subscriptions"` //Total number of introductory offer subscriptions currently with a pay up front introductory price. ActivePayAsYouGoIntroductoryOfferSubscriptions CustomInteger `csv:"Active Pay As You Go Introductory Offer Subscriptions" json:"active_pay_as_you_go_introductory_offer_subscriptions"` //Total number of introductory offer subscriptions currently with a pay as you go introductory price. FreeTrialPromotionalOfferSubscriptions CustomInteger `csv:"Free Trial Promotional Offer Subscriptions" json:"free_trial_promotional_offer_subscriptions"` //Total number of promotional offers currently in a free trial. PayUpFrontPromotionalOfferSubscriptions CustomInteger `csv:"Pay Up Front Promotional Offer Subscriptions" json:"pay_up_front_promotional_offer_subscriptions"` //Total number of promotional offers with a pay up front promotional price. PayAsYouGoPromotionalOfferSubscriptions CustomInteger `csv:"Pay As You Go Promotional Offer Subscriptions" json:"pay_as_you_go_promotional_offer_subscriptions"` //Total number of promotional offers with a pay as you go promotional price. MarketingOptIns CustomInteger `csv:"Marketing Opt-Ins" json:"marketing_opt_ins"` //Total number of subscriptions currently in a marketing opt-in bonus period. BillingRetry CustomInteger `csv:"Billing Retry" json:"billing_retry"` //Total number of subscriptions in the Billing Retry status. This indicates that the App Store is still attempting to automatically renew a subscription when billing issues arise (for example, an expired credit card). Available in reports for dates starting December 7, 2017. GracePeriod CustomInteger `csv:"Grace Period" json:"grace_period"` //Total number of subscriptions in the Billing Grace Period state. This indicates that subscriber can continue accessing your content for a certain period of time (6 or 16 days) while Apple attempts to correct the billing issue. FreeTrialOfferCodeSubscriptions CustomInteger `csv:"Free Trial Offer Code Subscriptions" json:"free_trial_offer_code_subscriptions"` //Total number of offer code subscriptions currently in a free trial. PayUpFrontOfferCodeSubscriptions CustomInteger `csv:"Pay Up Front Offer Code Subscriptions" json:"pay_up_front_offer_code_subscriptions"` //Total number of offer code subscriptions with a pay up front offer price. PayAsYouGoOfferCodeSubscriptions CustomInteger `csv:"Pay As You Go Offer Code Subscriptions" json:"pay_as_you_go_offer_code_subscriptions"` //Total number of offer code subscriptions with a pay as you go offer price. Subscribers string `csv:"Subscribers" json:"subscribers"` //The number of subscribers who have access to the auto-renewable subscription including entitled family members. Note that this field is only populated when the record represents more than 3 subscriptions. Learn more. }
SubscriptionsReport Total number of Active Subscriptions, Subscriptions with Introductory Prices, and Marketing Opt-Ins for your auto-renewable subscriptions.
type SubscriptionsReportsFilter ¶
type SubscriptionsReportsFilter struct {
SalesReportsBaseFilter
}
SubscriptionsReportsFilter
func NewSubscriptionsReportsFilter ¶
func NewSubscriptionsReportsFilter() *SubscriptionsReportsFilter
NewSubscriptionsReportsFilter
func (*SubscriptionsReportsFilter) IsValid ¶
func (f *SubscriptionsReportsFilter) IsValid() error
IsValid Validate sales report filter params
type SubscriptionsReportsResponse ¶
type SubscriptionsReportsResponse struct { ResponseBody Data []*SubscriptionsReport `json:"data,omitempty"` }
SubscriptionsReportsResponse struct
type TokenBuilder ¶
type TokenBuilder struct { PrivateKey *PrivateKey // contains filtered or unexported fields }
TokenBuilder token builder
func NewTokenBuilder ¶
func NewTokenBuilder(cfg *Config) *TokenBuilder
NewTokenBuilder Create new TokenBuilder from config
func (*TokenBuilder) BuildAuthToken ¶
func (tb *TokenBuilder) BuildAuthToken() (*AuthToken, error)
BuildAuthToken Build Auth token
func (*TokenBuilder) BuildJWTToken ¶
func (tb *TokenBuilder) BuildJWTToken(payload *jwt.StandardClaims) *jwt.Token
BuildJWTToken Build JWT token
func (*TokenBuilder) BuildPayload ¶
func (tb *TokenBuilder) BuildPayload() *jwt.StandardClaims
BuildPayload Build JWT token payload
type TokenConfig ¶
TokenConfig token config structure
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport wrapper
func NewHttpTransport ¶
NewHttpTransport create new http transport