mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-25 09:07:15 +00:00
SP-API stock reconciliation
Amazon had depreciated a number of reports that were used for stock reconciliation. Application now uses the new fba ledger report to reconcile. It is currently untested, as this requires data from Amazon. Methods that require testing will return a 'NotImplementedException'. Also, removed the depreciated ILMerge and replaced with ILRepack. Plus much more tidying up, and improvements.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
Build outputs go here. Doing a build.cmd/build.sh generates artifacts here (nupkgs, dlls, pdbs, etc.)
|
||||
@@ -4,11 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
VisualStudioVersion = 17.9.34728.123
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{CF330C30-8231-4D54-B60C-FF0644713502}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
build\bnhtrade.ComTypeLib.RegAsmInstall.bat = build\bnhtrade.ComTypeLib.RegAsmInstall.bat
|
||||
build\bnhtrade.ComTypeLib.RegAsmRefresh.bat = build\bnhtrade.ComTypeLib.RegAsmRefresh.bat
|
||||
build\bnhtrade.ComTypeLib.RegAsmUninstall.bat = build\bnhtrade.ComTypeLib.RegAsmUninstall.bat
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bnhtrade.ScheduledTasks", "src\bnhtrade.ScheduledTasks\bnhtrade.ScheduledTasks.csproj", "{5D6E1D66-3901-4340-95C6-EE65051AB623}"
|
||||
EndProject
|
||||
|
||||
@@ -2,24 +2,15 @@
|
||||
@set dllpath=%batchpath%
|
||||
::bnhtrade Database Client\bin\Release\
|
||||
|
||||
rem @copy "%dllpath%bnhtrade.Core.dll" "%SYSTEMROOT%\SysWOW64\bnhtrade.Core.dll"
|
||||
@copy "%dllpath%bnhtradeCOM.dll" "%SYSTEMROOT%\SysWOW64\bnhtradeCOM.dll"
|
||||
rem @copy "%dllpath%ABrain.AmazonMWS.dll" "%SYSTEMROOT%\SysWOW64\ABrain.AmazonMWS.dll"
|
||||
|
||||
rem @copy "%dllpath%bnhtrade.Core.dll" "%SYSTEMROOT%\System32\bnhtrade.Core.dll"
|
||||
@copy "%dllpath%bnhtradeCOM.dll" "%SYSTEMROOT%\System32\bnhtradeCOM.dll"
|
||||
rem @copy "%dllpath%ABrain.AmazonMWS.dll" "%SYSTEMROOT%\System32\ABrain.AmazonMWS.dll"
|
||||
|
||||
@c:
|
||||
@cd\Windows\Microsoft.NET\Framework\v4.*
|
||||
rem regasm.exe /codebase /tlb "bnhtrade.Core.dll"
|
||||
regasm.exe /codebase /tlb "bnhtradeCOM.dll"
|
||||
rem regasm.exe /codebase /tlb "ABrain.AmazonMWS.dll"
|
||||
|
||||
@cd\Windows\Microsoft.NET\Framework64\v4.*
|
||||
rem regasm.exe /codebase /tlb "bnhtrade.Core.dll"
|
||||
regasm.exe /codebase /tlb "bnhtradeCOM.dll"
|
||||
rem regasm.exe /codebase /tlb "ABrain.AmazonMWS.dll"
|
||||
|
||||
@echo.
|
||||
@echo Finished running regasm install script.
|
||||
|
||||
@@ -1,26 +1,14 @@
|
||||
@c:
|
||||
@cd\Windows\Microsoft.NET\Framework\v4.*
|
||||
rem regasm.exe /u "%SYSTEMROOT%\System32\bnhtrade.Core.dll"
|
||||
regasm.exe /u "%SYSTEMROOT%\System32\bnhtradeCOM.dll"
|
||||
rem regasm.exe /u "%SYSTEMROOT%\System32\ABrain.AmazonMWS.dll"
|
||||
@cd\Windows\Microsoft.NET\Framework64\v4.*
|
||||
rem regasm.exe /u "%SYSTEMROOT%\System32\bnhtrade.Core.dll"
|
||||
regasm.exe /u "%SYSTEMROOT%\SysWOW64\bnhtradeCOM.dll"
|
||||
rem regasm.exe /u "%SYSTEMROOT%\SysWOW64\ABrain.AmazonMWS.dll"
|
||||
cd
|
||||
rem @del /q "%SYSTEMROOT%\SysWOW64\bnhtrade.Core.dll"
|
||||
rem @del /q "%SYSTEMROOT%\SysWOW64\bnhtrade.Core.tlb"
|
||||
@del /q "%SYSTEMROOT%\SysWOW64\bnhtradeCOM.dll"
|
||||
rem @del /q "%SYSTEMROOT%\SysWOW64\bnhtradeCOM.tlb"
|
||||
rem @del /q "%SYSTEMROOT%\SysWOW64\ABrain.AmazonMWS.dll"
|
||||
rem @del /q "%SYSTEMROOT%\SysWOW64\ABrain.AmazonMWS.tlb"
|
||||
@del /q "%SYSTEMROOT%\SysWOW64\bnhtradeCOM.tlb"
|
||||
|
||||
rem @del /q "%SYSTEMROOT%\System32\bnhtrade.Core.dll"
|
||||
rem @del /q "%SYSTEMROOT%\System32\bnhtrade.Core.tlb"
|
||||
@del /q "%SYSTEMROOT%\System32\bnhtradeCOM.dll"
|
||||
rem @del /q "%SYSTEMROOT%\System32\bnhtradeCOM.tlb"
|
||||
rem @del /q "%SYSTEMROOT%\System32\ABrain.AmazonMWS.dll"
|
||||
rem @del /q "%SYSTEMROOT%\System32\ABrain.AmazonMWS.tlb"
|
||||
@del /q "%SYSTEMROOT%\System32\bnhtradeCOM.tlb"
|
||||
|
||||
@echo.
|
||||
@echo Finished running regasm uninstall script.
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: .NET
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build --no-restore
|
||||
@@ -1,71 +0,0 @@
|
||||
name: Release
|
||||
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
- 'v*.*.*-rc*'
|
||||
- '[0-9]+.[0-9]+.[0-9]+'
|
||||
- '[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.4.0
|
||||
|
||||
- name: Install .NET
|
||||
uses: actions/setup-dotnet@v1.9.0
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build
|
||||
id: build-project
|
||||
run: dotnet build ./Source/FikaAmazonAPI/FikaAmazonAPI.csproj --configuration Release --no-restore
|
||||
|
||||
|
||||
- name: Pack
|
||||
id: pack-prohject
|
||||
run: |
|
||||
dotnet pack ./Source/FikaAmazonAPI/FikaAmazonAPI.csproj --configuration Release
|
||||
|
||||
- name: PushNuget
|
||||
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate
|
||||
|
||||
|
||||
- name: Add github package source
|
||||
run: nuget sources Add -Name "github" -Source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json -UserName ${{github.repository_owner}} -Password ${{ secrets.USERGIHUB_TOKEN }}
|
||||
|
||||
|
||||
- name: Push to GitHub Packages
|
||||
run: dotnet nuget push "**/*.nupkg" --skip-duplicate --source https://nuget.pkg.github.com/${{github.repository_owner}}/index.json --api-key ${GITHUB_TOKEN}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.USERGIHUB_TOKEN }}
|
||||
|
||||
- name: Get tag
|
||||
id: tag
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.USERGIHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{steps.tag.outputs.tag}}
|
||||
release_name: Release ${{steps.tag.outputs.tag}}
|
||||
body: TODO
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
|
||||
|
||||
|
||||
352
src/Amazon-SP-API-CSharp/.gitignore
vendored
352
src/Amazon-SP-API-CSharp/.gitignore
vendored
@@ -1,352 +0,0 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31912.275
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{3472E85C-6C29-4196-AA16-B95898241C04}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FikaAmazonAPI", "Source\FikaAmazonAPI\FikaAmazonAPI.csproj", "{70A12C48-BD11-4485-9266-9D0D86D3821D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{177F077C-82C9-4DBB-BA03-CF8E14D4AB4E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitignore = .gitignore
|
||||
azure-pipelines.yml = azure-pipelines.yml
|
||||
LICENSE = LICENSE
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FikaAmazonAPI.SampleCode", "Source\FikaAmazonAPI.SampleCode\FikaAmazonAPI.SampleCode.csproj", "{FC494085-19C4-4835-B053-F9B74FFB978A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{70A12C48-BD11-4485-9266-9D0D86D3821D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{70A12C48-BD11-4485-9266-9D0D86D3821D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{70A12C48-BD11-4485-9266-9D0D86D3821D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{70A12C48-BD11-4485-9266-9D0D86D3821D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FC494085-19C4-4835-B053-F9B74FFB978A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FC494085-19C4-4835-B053-F9B74FFB978A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FC494085-19C4-4835-B053-F9B74FFB978A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FC494085-19C4-4835-B053-F9B74FFB978A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{70A12C48-BD11-4485-9266-9D0D86D3821D} = {3472E85C-6C29-4196-AA16-B95898241C04}
|
||||
{FC494085-19C4-4835-B053-F9B74FFB978A} = {3472E85C-6C29-4196-AA16-B95898241C04}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F072E7DD-BF35-43CC-BF83-E5947CA2D772}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Tareq Abuzuhri
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
<add key="automatic" value="True" />
|
||||
</packageRestore>
|
||||
<bindingRedirects>
|
||||
<add key="skip" value="False" />
|
||||
</bindingRedirects>
|
||||
<packageManagement>
|
||||
<add key="format" value="0" />
|
||||
<add key="disabled" value="False" />
|
||||
</packageManagement>
|
||||
</configuration>
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 165 KiB |
@@ -1,430 +0,0 @@
|
||||
# Amazon Selling Partner API C# 🚀 [](https://github.com/abuzuhri/Amazon-SP-API-CSharp/actions/workflows/dotnet.yml) [](https://www.nuget.org/packages/CSharpAmazonSpAPI/) [](https://gitter.im/Amazon-SP-API-CSharp/community)
|
||||
|
||||
|
||||
This is an API Binding in .Net C# for the new Amazon Selling Partner API.
|
||||
|
||||
This library is based on the output of [swagger-codegen](https://app.swaggerhub.com/home) with the [OpenAPI files provided by Amazon (Models)](https://github.com/amzn/selling-partner-api-models/tree/main/models) and has been modified by the contributors.
|
||||
|
||||
The purpose of this package is to have an easy way of getting started with the Amazon Selling Partner API using C#, you can watch this 📷 [Youtube](https://www.youtube.com/watch?v=1gZJBCoMr70) 📣 video for easy start your project
|
||||
|
||||
---
|
||||
### Requirements
|
||||
- [AWSSDK.SecurityToken](https://www.nuget.org/packages/AWSSDK.SecurityToken/)
|
||||
- [AWSSDK.SQS](https://www.nuget.org/packages/AWSSDK.SQS/)
|
||||
- [Microsoft.CSharp](https://www.nuget.org/packages/Microsoft.CSharp/)
|
||||
- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/)
|
||||
- [RestSharp](https://www.nuget.org/packages/RestSharp/)
|
||||
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations/)
|
||||
- [System.Reflection](https://www.nuget.org/packages/System.Reflection/)
|
||||
|
||||
---
|
||||
### Useful links
|
||||
##### [Selling Partner API](https://developer-docs.amazon.com/sp-api)
|
||||
##### [Amazon MWS to SP-API Migration Guide](https://developer-docs.amazon.com/sp-api/docs/amazon-mws-to-sp-api-migration-guide#mapping-apis-from-amazon-mws-to-the-selling-partner-api)
|
||||
##### [SP-API models](https://developer-docs.amazon.com/sp-api/page/sp-api-models)
|
||||
##### [Using Postman for Selling Partner API models](https://developer-docs.amazon.com/sp-api/page/sp-api-models)
|
||||
##### [Test Project with pure C# code](https://github.com/abuzuhri/Amazon-SP-API-CSharp/tree/main/Others/PureCodeSampleForTest)
|
||||
##### [Sample Code](https://github.com/abuzuhri/Amazon-SP-API-CSharp/tree/main/Source/FikaAmazonAPI.SampleCode)
|
||||
##### [Creating And Configuring AWS](https://developer-docs.amazon.com/sp-api/docs/creating-and-configuring-iam-policies-and-entities)
|
||||
|
||||
|
||||
---
|
||||
### Tasks
|
||||
#### Seller
|
||||
|
||||
- [x] [OrdersV0](https://github.com/amzn/selling-partner-api-docs/blob/main/references/orders-api/ordersV0.md)
|
||||
- [x] [Reports](https://github.com/amzn/selling-partner-api-docs/blob/main/references/reports-api/reports_2020-09-04.md)
|
||||
- [x] [FinancesV0](https://github.com/amzn/selling-partner-api-docs/blob/main/references/finances-api/financesV0.md)
|
||||
- [x] [Feeds](https://github.com/amzn/selling-partner-api-docs/blob/main/references/feeds-api/feeds_2021-06-30.md) for [feedType](https://github.com/amzn/selling-partner-api-docs/blob/main/references/feeds-api/feedtype-values.md) for step to call feed read [doc](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/feeds-api-use-case-guide/feeds-api-use-case-guide_2021-06-30.md)
|
||||
- [ ] [ListingsItems](https://github.com/amzn/selling-partner-api-docs/blob/main/references/listings-items-api/listingsItems_2021-08-01.md)
|
||||
- [x] [Uploads](https://github.com/amzn/selling-partner-api-docs/blob/main/references/uploads-api/uploads_2020-11-01.md)
|
||||
- [x] [shipmentInvoicingV0](https://github.com/amzn/selling-partner-api-docs/blob/main/references/shipment-invoicing-api/shipmentInvoicingV0.md)
|
||||
- [x] [Shippings](https://github.com/amzn/selling-partner-api-docs/blob/main/references/shipping-api/shipping.md)
|
||||
- [x] [CatalogItemsV0](https://github.com/amzn/selling-partner-api-docs/blob/main/references/catalog-items-api/catalogItemsV0.md) (deprecated soon)
|
||||
- [ ] [CatalogItemsV20201201](https://developer-docs.amazon.com/sp-api/docs/catalog-items-api-v2020-12-01-reference)
|
||||
- [x] [FBAInventory](https://github.com/amzn/selling-partner-api-docs/tree/main/references/fba-inventory-api)
|
||||
- [x] [FBASmallAndLight](https://github.com/amzn/selling-partner-api-docs/blob/main/references/fba-small-and-light-api/fbaSmallandLight.md)
|
||||
- [x] [FBAInboundEligibility](https://github.com/amzn/selling-partner-api-docs/blob/main/references/fba-inbound-eligibility-api/fbaInbound.md)
|
||||
- [x] [FulFillmentInbound](https://github.com/amzn/selling-partner-api-docs/blob/main/references/fulfillment-inbound-api/fulfillmentInboundV0.md)
|
||||
- [x] [FulFillmentOutbound](https://github.com/amzn/selling-partner-api-docs/tree/main/references/fulfillment-outbound-api)
|
||||
- [x] [MerchantFulFillment](https://github.com/amzn/selling-partner-api-docs/blob/main/references/merchant-fulfillment-api/merchantFulfillmentV0.md)
|
||||
- [x] [Messaging](https://github.com/amzn/selling-partner-api-docs/blob/main/references/messaging-api/messaging.md)
|
||||
- [x] [Notifications](https://github.com/amzn/selling-partner-api-docs/blob/main/references/notifications-api/notifications.md) for configuration read [doc](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/notifications-api-use-case-guide/notifications-use-case-guide-v1.md)
|
||||
- [x] [ProductFeesV0](https://github.com/amzn/selling-partner-api-docs/blob/main/references/product-fees-api/productFeesV0.md)
|
||||
- [x] [ProductPricingV0](https://github.com/amzn/selling-partner-api-docs/blob/main/references/product-pricing-api/productPricingV0.md)
|
||||
- [x] [Sales](https://github.com/amzn/selling-partner-api-docs/blob/main/references/sales-api/sales.md)
|
||||
- [x] [Sellers](https://github.com/amzn/selling-partner-api-docs/blob/main/references/sellers-api/sellers.md)
|
||||
- [ ] [Services](https://github.com/amzn/selling-partner-api-docs/blob/main/references/services-api/services.md)
|
||||
- [x] [Solicitations](https://github.com/amzn/selling-partner-api-docs/blob/main/references/solicitations-api/solicitations.md)
|
||||
- [x] [Token](https://github.com/amzn/selling-partner-api-docs/blob/main/references/tokens-api/tokens_2021-03-01.md) for [doc PII](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/tokens-api-use-case-guide/tokens-API-use-case-guide-2021-03-01.md)
|
||||
|
||||
#### Vendor
|
||||
- [ ] [VendorOrders](https://github.com/amzn/selling-partner-api-docs/blob/main/references/vendor-orders-api/vendorOrders.md)
|
||||
- [ ] [VendorDirectFulfillmentInventoryV1](https://github.com/amzn/selling-partner-api-docs/blob/main/references/vendor-direct-fulfillment-inventory-api/vendorDirectFulfillmentInventoryV1.md)
|
||||
- [x] [VendorDirectFulfillmentOrdersV1](https://github.com/amzn/selling-partner-api-docs/blob/main/references/vendor-direct-fulfillment-orders-api/vendorDirectFulfillmentOrdersV1.md)
|
||||
- [ ] [VendorDirectFulfillmentPaymentsV1](https://github.com/amzn/selling-partner-api-docs/blob/main/references/vendor-direct-fulfillment-payments-api/vendorDirectFulfillmentPaymentsV1.md)
|
||||
- [ ] [VendorDirectFulfillmentShippingV1](https://github.com/amzn/selling-partner-api-docs/blob/main/references/vendor-direct-fulfillment-shipping-api/vendorDirectFulfillmentShippingV1.md)
|
||||
- [ ] [VendorDirectFulfillmentTransactionsV1](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-direct-fulfillment-transactions-api)
|
||||
- [ ] [vendorInvoices](https://github.com/amzn/selling-partner-api-docs/blob/main/references/vendor-invoices-api/vendorInvoices.md)
|
||||
- [ ] [VendorShipments](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-shipments-api)
|
||||
- [ ] [VendorTransactionStatus](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-transaction-status-api)
|
||||
|
||||
|
||||
|
||||
---
|
||||
## Installation [](https://www.nuget.org/packages/CSharpAmazonSpAPI/)
|
||||
|
||||
```powershell
|
||||
Install-Package CSharpAmazonSpAPI
|
||||
```
|
||||
|
||||
---
|
||||
## Contributing
|
||||
|
||||
1. Fork it (https://github.com/abuzuhri/Amazon-SP-API-CSharp/fork)
|
||||
2. Clone it (`git clone https://github.com/{YOUR_USERNAME}/Amazon-SP-API-CSharp`)
|
||||
3. Create your feature branch (`git checkout -b your_branch_name`)
|
||||
4. Commit your changes (`git commit -m 'Description of a commit'`)
|
||||
5. Push to the branch (`git push origin your_branch_name`)
|
||||
6. Create a new Pull Request
|
||||
|
||||
---
|
||||
## Keys
|
||||
| Name | Description |
|
||||
| --- | --- |
|
||||
| AccessKey | AWS USER ACCESS KEY |
|
||||
| SecretKey | AWS USER SECRET KEY |
|
||||
| RoleArn | AWS IAM Role ARN (needs permission to “Assume Role” STS) |
|
||||
| Region | Marketplace region |
|
||||
| ClientId | Your amazon app id |
|
||||
| ClientSecret | Your amazon app secret |
|
||||
| RefreshToken | Check how to get [RefreshToken](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md#Self-authorization) |
|
||||
|
||||
|
||||
For more information about keys please check [Amazon Selling Partner API developer guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md) , If you are not registered as developer please [Register](https://developer.amazonservices.com/) to be able to create application.
|
||||
|
||||
---
|
||||
## Usage
|
||||
|
||||
### Configuration
|
||||
```CSharp
|
||||
AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
|
||||
{
|
||||
AccessKey = "AKIAXXXXXXXXXXXXXXX",
|
||||
SecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
RoleArn = "arn:aws:iam::XXXXXXXXXXXXX:role/XXXXXXXXXXXX",
|
||||
ClientId = "amzn1.application-XXX-client.XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
ClientSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
RefreshToken= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
MarketPlace = MarketPlace.UnitedArabEmirates, //MarketPlace.GetMarketPlaceByID("A2VIGQ35RCS4UG")
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Order List, For more orders sample please check [Here](https://github.com/abuzuhri/Amazon-SP-API-CSharp/blob/main/Source/FikaAmazonAPI.Test/Reports.cs).
|
||||
```CSharp
|
||||
ParameterOrderList serachOrderList = new ParameterOrderList();
|
||||
serachOrderList.CreatedAfter = DateTime.UtcNow.AddMinutes(-600000);
|
||||
serachOrderList.OrderStatuses = new List<OrderStatuses>();
|
||||
serachOrderList.OrderStatuses.Add(OrderStatuses.Canceled);
|
||||
var orders = amazonConnection.Orders.GetOrders(serachOrderList);
|
||||
|
||||
```
|
||||
|
||||
|
||||
### Order List with parameter
|
||||
```CSharp
|
||||
ParameterOrderList serachOrderList = new ParameterOrderList();
|
||||
serachOrderList.CreatedAfter = DateTime.UtcNow.AddHours(-24);
|
||||
serachOrderList.OrderStatuses = new List<OrderStatuses>();
|
||||
serachOrderList.OrderStatuses.Add(OrderStatuses.Unshipped);
|
||||
serachOrderList.MarketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID };
|
||||
|
||||
var orders = amazonConnection.Orders.GetOrders(serachOrderList);
|
||||
|
||||
```
|
||||
|
||||
### Order List data from Sandbox
|
||||
```CSharp
|
||||
AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
|
||||
{
|
||||
AccessKey = "AKIAXXXXXXXXXXXXXXX",
|
||||
SecretKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
RoleArn = "arn:aws:iam::XXXXXXXXXXXXX:role/XXXXXXXXXXXX",
|
||||
ClientId = "amzn1.application-XXX-client.XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
ClientSecret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
RefreshToken= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
Environment=Environments.Sandbox
|
||||
});
|
||||
|
||||
var orders = amazonConnection.Orders.GetOrders
|
||||
(
|
||||
new FikaAmazonAPI.Parameter.Order.ParameterOrderList()
|
||||
{
|
||||
TestCase = Constants.TestCase200
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
### Report List, For more report sample please check [Here](https://github.com/abuzuhri/Amazon-SP-API-CSharp/blob/main/Source/FikaAmazonAPI.Test/Orders.cs).
|
||||
```CSharp
|
||||
var parameters = new ParameterReportList();
|
||||
parameters.pageSize = 100;
|
||||
parameters.reportTypes = new List<ReportTypes>();
|
||||
parameters.reportTypes.Add(ReportTypes.GET_AFN_INVENTORY_DATA);
|
||||
parameters.marketplaceIds = new List<string>();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
var reports=amazonConnection.Reports.GetReports(parameters);
|
||||
```
|
||||
|
||||
### Custom Report
|
||||
```CSharp
|
||||
var parameters = new ParameterCreateReportSpecification();
|
||||
parameters.reportType = ReportTypes.GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL;
|
||||
parameters.dataStartTime = DateTime.UtcNow.AddDays(-30);
|
||||
parameters.dataEndTime = DateTime.UtcNow.AddDays(-10);
|
||||
parameters.marketplaceIds = new MarketplaceIds();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
parameters.reportOptions = new AmazonSpApiSDK.Models.Reports.ReportOptions();
|
||||
|
||||
var report= amazonConnection.Reports.CreateReport(parameters);
|
||||
```
|
||||
|
||||
### Report Manager 🚀🧑🚀✨
|
||||
Easy way to get the report you need and convert the file return from amazon to class or list, this feature only ready for some reports as its will take much times to finish for [All report type](https://github.com/amzn/selling-partner-api-docs/blob/main/references/reports-api/reporttype-values.md) ....
|
||||
```CSharp
|
||||
ReportManager reportManager = new ReportManager(amazonConnection);
|
||||
var products = reportManager.GetProducts(); //GET_MERCHANT_LISTINGS_ALL_DATA
|
||||
var inventoryAging = reportManager.GetInventoryAging(); //GET_FBA_INVENTORY_AGED_DATA
|
||||
var ordersByDate = reportManager.GetOrdersByOrderDate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
|
||||
var ordersByLastUpdate = reportManager.GetOrdersByLastUpdate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
|
||||
var settlementOrder = reportManager.GetSettlementOrder(90); //GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2
|
||||
var returnMFNOrder = reportManager.GetReturnMFNOrder(90); //GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE
|
||||
var returnFBAOrder = reportManager.GetReturnFBAOrder(90); //GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA
|
||||
var reimbursementsOrder = reportManager.GetReimbursementsOrder(180); //GET_FBA_REIMBURSEMENTS_DATA
|
||||
var feedbacks = reportManager.GetFeedbackFromDays(180); //GET_SELLER_FEEDBACK_DATA
|
||||
```
|
||||
|
||||
|
||||
### Report GET_MERCHANT_LISTINGS_ALL_DATA sample
|
||||
```CSharp
|
||||
var parameters = new ParameterCreateReportSpecification();
|
||||
parameters.reportType = ReportTypes.GET_MERCHANT_LISTINGS_ALL_DATA;
|
||||
|
||||
parameters.marketplaceIds = new MarketplaceIds();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
|
||||
parameters.reportOptions = new FikaAmazonAPI.AmazonSpApiSDK.Models.Reports.ReportOptions();
|
||||
|
||||
var reportId = amazonConnection.Reports.CreateReport(parameters);
|
||||
var filePath = string.Empty;
|
||||
string ReportDocumentId = string.Empty;
|
||||
|
||||
while (string.IsNullOrEmpty(ReportDocumentId))
|
||||
{
|
||||
Thread.Sleep(1000 * 60);
|
||||
var reportData = amazonConnection.Reports.GetReport(reportId);
|
||||
if (!string.IsNullOrEmpty(reportData.ReportDocumentId))
|
||||
{
|
||||
filePath = amazonConnection.Reports.GetReportFile(reportData.ReportDocumentId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//filePath for report
|
||||
```
|
||||
|
||||
### Product Pricing, For more Pricing sample please check [Here](https://github.com/abuzuhri/Amazon-SP-API-CSharp/blob/main/Source/FikaAmazonAPI.Test/ProductPricing.cs).
|
||||
```CSharp
|
||||
|
||||
var data = amazonConnection.ProductPricing.GetPricing(
|
||||
new Parameter.ProductPricing.ParameterGetPricing()
|
||||
{
|
||||
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
|
||||
Asins = new string[] { "B00CZC5F0G" }
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Product Competitive Price
|
||||
```CSharp
|
||||
|
||||
var data = amazonConnection.ProductPricing.GetCompetitivePricing(
|
||||
new Parameter.ProductPricing.ParameterGetCompetitivePricing()
|
||||
{
|
||||
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
|
||||
Asins = new string[] { "B00CZC5F0G" },
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
### Notifications Create Destination, For more Notifications sample please check [Here](https://github.com/abuzuhri/Amazon-SP-API-CSharp/blob/main/Source/FikaAmazonAPI.Test/Notifications.cs).
|
||||
```CSharp
|
||||
|
||||
//EventBridge
|
||||
var data = amazonConnection.Notification.CreateDestination(
|
||||
new Notifications.CreateDestinationRequest()
|
||||
{
|
||||
Name = "CompanyName",
|
||||
ResourceSpecification = new Notifications.DestinationResourceSpecification()
|
||||
{
|
||||
EventBridge = new Notifications.EventBridgeResourceSpecification("us-east-2", "999999999")
|
||||
}
|
||||
});
|
||||
|
||||
//SQS
|
||||
var dataSqs = amazonConnection.Notification.CreateDestination(
|
||||
new Notifications.CreateDestinationRequest()
|
||||
{
|
||||
Name = "CompanyName_AE",
|
||||
ResourceSpecification = new Notifications.DestinationResourceSpecification
|
||||
{
|
||||
Sqs = new Notifications.SqsResource("arn:aws:sqs:us-east-2:9999999999999:NAME")
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Notifications read messages
|
||||
```CSharp
|
||||
|
||||
var SQS_URL = "https://sqs.us-east-2.amazonaws.com/9999999999999/IUSER_SQS";
|
||||
ParameterMessageReceiver param = new ParameterMessageReceiver(
|
||||
Environment.GetEnvironmentVariable("AccessKey"),
|
||||
Environment.GetEnvironmentVariable("SecretKey"),
|
||||
SQS_URL, Amazon.RegionEndpoint.USEast2);
|
||||
|
||||
CustomMessageReceiver messageReceiver = new CustomMessageReceiver();
|
||||
|
||||
|
||||
amazonConnection.Notification.StartReceivingNotificationMessages(param, messageReceiver);
|
||||
public class CustomMessageReceiver : IMessageReceiver
|
||||
{
|
||||
public void ErrorCatch(Exception ex)
|
||||
{
|
||||
//Your code here
|
||||
}
|
||||
|
||||
public void NewMessageRevicedTriger(NotificationMessageResponce message)
|
||||
{
|
||||
//Your Code here
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Feed Submit
|
||||
Here full sample for submit feed to change price and generate XML and get final report for result same as in [doc](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/feeds-api-use-case-guide/feeds-api-use-case-guide_2021-06-30.md).
|
||||
Notes: not all [feed type](https://github.com/amzn/selling-partner-api-docs/blob/main/references/feeds-api/feedtype-values.md) finished as it's big work and effort but all classes are partial for easy change and you can generate XML outside and use our library to get data, now we support only submit existing product, change quantity and change price , I list most of XSD here Source\FikaAmazonAPI\ConstructFeed\xsd its will help you easy generate class and add it in your app to generate final feed xml.
|
||||
|
||||
#### Feed Submit for change price
|
||||
```CSharp
|
||||
ConstructFeedService createDocument = new ConstructFeedService("{SellerID}", "1.02");
|
||||
|
||||
var list = new List<PriceMessage>();
|
||||
list.Add(new PriceMessage()
|
||||
{
|
||||
SKU = "8201031206122...",
|
||||
StandardPrice = new StandardPrice()
|
||||
{
|
||||
currency = BaseCurrencyCode.AED.ToString(),
|
||||
Value = (201.0522M).ToString("0.00")
|
||||
}
|
||||
});
|
||||
createDocument.AddPriceMessage(list);
|
||||
|
||||
var xml = createDocument.GetXML();
|
||||
|
||||
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_PRICING_DATA);
|
||||
|
||||
Thread.Sleep(1000*30);
|
||||
|
||||
var feedOutput=amazonConnection.Feed.GetFeed(feedID);
|
||||
|
||||
var outPut=amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);
|
||||
|
||||
var reportOutpit = outPut.Url;
|
||||
|
||||
var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(outPut.Url);
|
||||
|
||||
```
|
||||
|
||||
|
||||
#### Feed Submit for change Quantity
|
||||
```CSharp
|
||||
ConstructFeedService createDocument = new ConstructFeedService("{SellerID}", "1.02");
|
||||
|
||||
var list = new List<InventoryMessage>();
|
||||
list.Add(new InventoryMessage()
|
||||
{
|
||||
SKU = "82010312061.22...",
|
||||
Quantity = 2,
|
||||
FulfillmentLatency = "11",
|
||||
});
|
||||
|
||||
createDocument.AddInventoryMessage(list);
|
||||
|
||||
var xml = createDocument.GetXML();
|
||||
|
||||
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_INVENTORY_AVAILABILITY_DATA);
|
||||
|
||||
Thread.Sleep(1000*30);
|
||||
|
||||
var feedOutput=amazonConnection.Feed.GetFeed(feedID);
|
||||
|
||||
var outPut=amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);
|
||||
|
||||
var reportOutpit = outPut.Url;
|
||||
|
||||
var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(outPut.Url);
|
||||
|
||||
```
|
||||
|
||||
---
|
||||
## Usage Plans and Rate Limits in the Selling Partner API
|
||||
|
||||
Please read this doc to get all information about this limitation
|
||||
https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/usage-plans-rate-limits/Usage-Plans-and-Rate-Limits.md
|
||||
|
||||
we calc waiting time by read x-amzn-RateLimit-Limit header
|
||||
|
||||
`int sleepTime = (int)((1 / header["x-amzn-RateLimit-Limit"] ) * 1000);`
|
||||
|
||||
You can also disable libary from handelling limitaion by set IsActiveLimitRate=false in AmazonCredential
|
||||
```CSharp
|
||||
var amazonConnection = new AmazonConnection(new AmazonCredential()
|
||||
{
|
||||
.
|
||||
.
|
||||
IsActiveLimitRate=false
|
||||
});
|
||||
```
|
||||
|
||||
---
|
||||
## Q & A
|
||||
|
||||
If you have questions, please ask in GitHub discussions
|
||||
|
||||
[](https://github.com/abuzuhri/Amazon-SP-API-CSharp/discussions)
|
||||
|
||||
---
|
||||
## ToDo
|
||||
|
||||
- Improve documentation
|
||||
|
||||
---
|
||||
## Notes
|
||||
|
||||
If you are looking for a complete Feedback solution, you might want to consider giving [Soon.se](https://www.soon.se) a shot.
|
||||
|
||||
---
|
||||
## Support & Consultation
|
||||
|
||||
We offer consultation on everything SP-API related. Book your meeting here:
|
||||
|
||||
[](https://calendly.com/tareq-abuzuhri/)
|
||||
|
||||
---
|
||||
## Thanks
|
||||
|
||||
Thanks go out to everybody who worked on this package.
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class CatalogItemsSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public CatalogItemsSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
|
||||
public void GetCatalogItem()
|
||||
{
|
||||
var item = amazonConnection.CatalogItem.GetCatalogItem("B00CZC5F0G");
|
||||
|
||||
}
|
||||
|
||||
public void ListCatalogCategories()
|
||||
{
|
||||
var item = amazonConnection.CatalogItem.ListCatalogCategories("B00CZC5F0G");
|
||||
|
||||
}
|
||||
|
||||
public void ListCatalogItems()
|
||||
{
|
||||
var items = amazonConnection.CatalogItem.ListCatalogItems(new Parameter.CatalogItems.ParameterListCatalogItems()
|
||||
{
|
||||
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
|
||||
Query = "740985280133"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using Amazon;
|
||||
using FikaAmazonAPI.NotificationMessages;
|
||||
using FikaAmazonAPI.Parameter.Notification;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class CustomMessageReceiver : IMessageReceiver
|
||||
{
|
||||
|
||||
public void ErrorCatch(Exception ex)
|
||||
{
|
||||
//Your code here
|
||||
}
|
||||
|
||||
public void NewMessageRevicedTriger(NotificationMessageResponce message)
|
||||
{
|
||||
//Your Code here
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class FbaInboundEligibilitySample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public FbaInboundEligibilitySample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
public void GetItemEligibilityPreview()
|
||||
{
|
||||
|
||||
|
||||
var all = amazonConnection.FbaInboundEligibility.GetItemEligibilityPreview(new Parameter.FbaInboundEligibility.ParameterGetItemEligibilityPreview()
|
||||
{
|
||||
marketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID },
|
||||
asin = "B07Q2R45XG",
|
||||
program = FikaAmazonAPI.AmazonSpApiSDK.Models.FbaInbound.ItemEligibilityPreview.ProgramEnum.INBOUND
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
using FikaAmazonAPI.ConstructFeed;
|
||||
using FikaAmazonAPI.ConstructFeed.Messages;
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static FikaAmazonAPI.ConstructFeed.BaseXML;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class FeedsSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public FeedsSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
|
||||
public void GetFeeds()
|
||||
{
|
||||
|
||||
var data = amazonConnection.Feed.GetFeeds(new Parameter.Feed.ParameterGetFeed()
|
||||
{
|
||||
processingStatuses = ProcessingStatuses.DONE,
|
||||
pageSize = 100,
|
||||
feedTypes = new List<FeedType> { FeedType.POST_PRODUCT_PRICING_DATA },
|
||||
createdSince = DateTime.UtcNow.AddDays(-6),
|
||||
createdUntil = DateTime.UtcNow.AddDays(-1),
|
||||
marketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void CreateFeedDocument()
|
||||
{
|
||||
|
||||
var data = amazonConnection.Feed.CreateFeedDocument(ContentType.XML);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void GetFeedDocument()
|
||||
{
|
||||
|
||||
var data2 = amazonConnection.Feed.GetFeedDocument("amzn1.tortuga.3.92d8fd38-6ccf-49be-979f-6dc27375ea3e.T2DF7HINJ0NRA2");
|
||||
}
|
||||
|
||||
public void GetFeed()
|
||||
{
|
||||
|
||||
var data2 = amazonConnection.Feed.GetFeed("194146018872");
|
||||
}
|
||||
|
||||
public void CancelFeed()
|
||||
{
|
||||
|
||||
var data2 = amazonConnection.Feed.CancelFeed("194146018872");
|
||||
}
|
||||
|
||||
public void SubmitFeedInventory()
|
||||
{
|
||||
ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
|
||||
var list = new List<InventoryMessage>();
|
||||
list.Add(new InventoryMessage()
|
||||
{
|
||||
SKU = "8201031206122...",
|
||||
Quantity = 2,
|
||||
FulfillmentLatency = "11",
|
||||
});
|
||||
createDocument.AddInventoryMessage(list);
|
||||
var xml = createDocument.GetXML();
|
||||
|
||||
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_INVENTORY_AVAILABILITY_DATA);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnderTest
|
||||
/// </summary>
|
||||
//public void SubmitFeedMaxOrderQuantity()
|
||||
//{
|
||||
// ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
|
||||
|
||||
// var list = new List<ProductMessage>();
|
||||
// list.Add(new ProductMessage()
|
||||
// {
|
||||
// SKU = "8201031206122...",
|
||||
// StandardProductID = new ConstructFeed.Messages.StandardProductID()
|
||||
// {
|
||||
// Type = "ASIN",
|
||||
// Value= "B08CDYB2DC"
|
||||
// },
|
||||
// DescriptionData = new DescriptionData()
|
||||
// {
|
||||
// MaxOrderQuantity=2,
|
||||
// Title= "REBUNE RE-2061-1Hot Air Styler Hair Styler 1000 Watts 3 In 1"
|
||||
// }
|
||||
// });
|
||||
// createDocument.AddProductMessage(list,OperationType.Update);
|
||||
// var xml = createDocument.GetXML();
|
||||
|
||||
// var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_DATA);
|
||||
|
||||
//}
|
||||
public void SubmitFeedPRICING()
|
||||
{
|
||||
|
||||
ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
|
||||
|
||||
var list = new List<PriceMessage>();
|
||||
list.Add(new PriceMessage()
|
||||
{
|
||||
SKU = "8201031206122...",
|
||||
StandardPrice = new StandardPrice()
|
||||
{
|
||||
currency = BaseCurrencyCode.AED.ToString(),
|
||||
Value = (201.0522M).ToString("0.00")
|
||||
}
|
||||
});
|
||||
createDocument.AddPriceMessage(list);
|
||||
|
||||
var xml = createDocument.GetXML();
|
||||
|
||||
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_PRICING_DATA);
|
||||
|
||||
var feedOutput = amazonConnection.Feed.GetFeed(feedID);
|
||||
|
||||
var outPut = amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);
|
||||
|
||||
var reportOutput = outPut.Url;
|
||||
|
||||
|
||||
var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(reportOutput);
|
||||
}
|
||||
|
||||
public void FeebPostOrderFullfillment()
|
||||
{
|
||||
ConstructFeedService createDocument = new ConstructFeedService("{sellerId}", "1.02");
|
||||
|
||||
var list = new List<OrderFulfillmentMessage>();
|
||||
|
||||
list.Add(new OrderFulfillmentMessage()
|
||||
{
|
||||
AmazonOrderID = "{orderId}",
|
||||
FulfillmentDate = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffK"),
|
||||
FulfillmentData = new FulfillmentData()
|
||||
{
|
||||
CarrierName = "Correos Express",
|
||||
ShippingMethod = "ePaq",
|
||||
ShipperTrackingNumber = "{trackingNumber}"
|
||||
}
|
||||
});
|
||||
createDocument.AddOrderFulfillmentMessage(list);
|
||||
|
||||
var xml = createDocument.GetXML();
|
||||
|
||||
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_ORDER_FULFILLMENT_DATA);
|
||||
|
||||
|
||||
var feedOutput = amazonConnection.Feed.GetFeed(feedID);
|
||||
var outPut = amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);
|
||||
var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(outPut.Url);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UserSecretsId>f8f45c56-374b-4afe-9534-2a23dc19a915</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="appsettings.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.1.55" />
|
||||
<PackageReference Include="AWSSDK.SQS" Version="3.7.0.57" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="RestSharp" Version="106.12.0" />
|
||||
<PackageReference Include="System.Collections" Version="4.3.0" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.Reflection" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FikaAmazonAPI\FikaAmazonAPI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,28 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class FinancialSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public FinancialSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
public void ListFinancialEventGroups()
|
||||
{
|
||||
amazonConnection.Financial.ListFinancialEventGroups(new Parameter.Finance.ParameterListFinancialEventGroup()
|
||||
{
|
||||
FinancialEventGroupStartedAfter = DateTime.UtcNow.AddDays(-10),
|
||||
FinancialEventGroupStartedBefore = DateTime.UtcNow.AddDays(-1),
|
||||
MaxResultsPerPage = 55
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class FulFillmentInboundSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public FulFillmentInboundSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
public void GetInboundGuidance()
|
||||
{
|
||||
var parm = new Parameter.FulFillmentInbound.ParameterGetInboundGuidance() {
|
||||
MarketplaceId= MarketPlace.UnitedArabEmirates.ID,
|
||||
ASINList=new List<string> { "B071XVSXRL" }
|
||||
};
|
||||
amazonConnection.FulFillmentInbound.GetInboundGuidance(parm);
|
||||
}
|
||||
|
||||
public void GetPrepInstructions()
|
||||
{
|
||||
var parm = new Parameter.FulFillmentInbound.ParameterGetPrepInstructions() {
|
||||
ShipToCountryCode = "AE",
|
||||
MarketplaceId= MarketPlace.UnitedArabEmirates.ID,
|
||||
ASINList =new List<string> { "B071XVSXRL" }
|
||||
};
|
||||
amazonConnection.FulFillmentInbound.GetPrepInstructions(parm);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
using FikaAmazonAPI.NotificationMessages;
|
||||
using FikaAmazonAPI.Parameter.Notification;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class NotificationsSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public NotificationsSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
|
||||
public void GetSubscription()
|
||||
{
|
||||
var data = amazonConnection.Notification.GetSubscription(NotificationType.ANY_OFFER_CHANGED);
|
||||
}
|
||||
|
||||
public void GetDestinations()
|
||||
{
|
||||
var data = amazonConnection.Notification.GetDestinations();
|
||||
}
|
||||
|
||||
|
||||
public void DeleteDestination()
|
||||
{
|
||||
var data = amazonConnection.Notification.DeleteDestination("99999999-999-4699-999-9999999999999");
|
||||
}
|
||||
|
||||
|
||||
public void CreateDestination()
|
||||
{
|
||||
//EventBridge
|
||||
var data = amazonConnection.Notification.CreateDestination(new AmazonSpApiSDK.Models.Notifications.CreateDestinationRequest()
|
||||
{
|
||||
Name = "CompanyName",
|
||||
ResourceSpecification = new AmazonSpApiSDK.Models.Notifications.DestinationResourceSpecification()
|
||||
{
|
||||
EventBridge = new AmazonSpApiSDK.Models.Notifications.EventBridgeResourceSpecification("us-east-2", "999999999")
|
||||
}
|
||||
});
|
||||
|
||||
//SQS
|
||||
var dataSqs = amazonConnection.Notification.CreateDestination(new AmazonSpApiSDK.Models.Notifications.CreateDestinationRequest()
|
||||
{
|
||||
Name = "CompanyName_AE",
|
||||
ResourceSpecification = new AmazonSpApiSDK.Models.Notifications.DestinationResourceSpecification
|
||||
{
|
||||
Sqs = new AmazonSpApiSDK.Models.Notifications.SqsResource("arn:aws:sqs:us-east-2:9999999999999:NAME")
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void StartReceivingNotificationMessages()
|
||||
{
|
||||
var SQL_URL = "https://sqs.us-east-2.amazonaws.com/239917024027/ICANL_SQS";
|
||||
ParameterMessageReceiver param = new ParameterMessageReceiver(Environment.GetEnvironmentVariable("AccessKey"), Environment.GetEnvironmentVariable("SecretKey"), SQL_URL, Amazon.RegionEndpoint.USEast2);
|
||||
|
||||
CustomMessageReceiver messageReceiver = new CustomMessageReceiver();
|
||||
|
||||
|
||||
amazonConnection.Notification.StartReceivingNotificationMessages(param, messageReceiver);
|
||||
}
|
||||
public class CustomMessageReceiver : IMessageReceiver
|
||||
{
|
||||
|
||||
public void ErrorCatch(Exception ex)
|
||||
{
|
||||
//Your code here
|
||||
}
|
||||
|
||||
public void NewMessageRevicedTriger(NotificationMessageResponce message)
|
||||
{
|
||||
//Your Code here
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Token;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Services;
|
||||
using FikaAmazonAPI.Parameter;
|
||||
using FikaAmazonAPI.Parameter.Order;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class OrdersSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public OrdersSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
public void GetOrders()
|
||||
{
|
||||
ParameterOrderList serachOrderList = new ParameterOrderList();
|
||||
serachOrderList.CreatedAfter = DateTime.UtcNow.AddMinutes(-600000);
|
||||
|
||||
serachOrderList.OrderStatuses = new List<OrderStatuses>();
|
||||
serachOrderList.OrderStatuses.Add(OrderStatuses.Canceled);
|
||||
|
||||
serachOrderList.AmazonOrderIds = new List<string>();
|
||||
serachOrderList.AmazonOrderIds.Add("403-1710607-6240347");
|
||||
serachOrderList.AmazonOrderIds.Add("403-5583945-7236361");
|
||||
serachOrderList.AmazonOrderIds.Add("403-3320829-4528316");
|
||||
serachOrderList.AmazonOrderIds.Add("406-2574982-2047546");
|
||||
|
||||
var orders = amazonConnection.Orders.GetOrders(serachOrderList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// You must have valid PII developer to be able to call this method
|
||||
/// </summary>
|
||||
public void GetOrdersPII()
|
||||
{
|
||||
ParameterOrderList serachOrderList = new ParameterOrderList();
|
||||
serachOrderList.CreatedAfter = DateTime.UtcNow.AddMinutes(-600000);
|
||||
|
||||
serachOrderList.OrderStatuses = new List<OrderStatuses>();
|
||||
serachOrderList.OrderStatuses.Add(OrderStatuses.Canceled);
|
||||
|
||||
serachOrderList.AmazonOrderIds = new List<string>();
|
||||
serachOrderList.AmazonOrderIds.Add("403-1710607-6240347");
|
||||
serachOrderList.AmazonOrderIds.Add("403-5583945-7236361");
|
||||
serachOrderList.AmazonOrderIds.Add("403-3320829-4528316");
|
||||
serachOrderList.AmazonOrderIds.Add("406-2574982-2047546");
|
||||
|
||||
//You must have valid PII developer to be able to call this
|
||||
var restrictedResource = new RestrictedResource();
|
||||
restrictedResource.method = Method.GET.ToString();
|
||||
restrictedResource.path = ApiUrls.OrdersApiUrls.Orders;
|
||||
restrictedResource.dataElements = new List<string> { "buyerInfo", "shippingAddress" };
|
||||
|
||||
|
||||
var createRDT = new CreateRestrictedDataTokenRequest()
|
||||
{
|
||||
restrictedResources = new List<RestrictedResource> { restrictedResource }
|
||||
};
|
||||
serachOrderList.RestrictedDataTokenRequest = createRDT;
|
||||
serachOrderList.IsNeedRestrictedDataToken = true;
|
||||
|
||||
var orders = amazonConnection.Orders.GetOrders(serachOrderList);
|
||||
}
|
||||
|
||||
public void GetOrderBuyerInfo()
|
||||
{
|
||||
var BuyerInfo = amazonConnection.Orders.GetOrderBuyerInfo("402-0467973-4229120");
|
||||
}
|
||||
|
||||
|
||||
public void GetOrderAddress()
|
||||
{
|
||||
var Address = amazonConnection.Orders.GetOrderAddress("402-0467973-4229120");
|
||||
}
|
||||
|
||||
|
||||
public void GetOrderItems()
|
||||
{
|
||||
var Items = amazonConnection.Orders.GetOrderItems("402-0467973-4229120");
|
||||
}
|
||||
/// <summary>
|
||||
/// You must have valid PII developer to be able to call this method
|
||||
/// </summary>
|
||||
public void GetOrderItemsPII()
|
||||
{
|
||||
var restrictedResource = new RestrictedResource();
|
||||
restrictedResource.method = Method.GET.ToString();
|
||||
restrictedResource.path = ApiUrls.OrdersApiUrls.OrderItems("404-7777403-8594716");
|
||||
//restrictedResource.dataElements = new List<string> { "buyerInfo", "shippingAddress" };
|
||||
|
||||
|
||||
var createRDT = new CreateRestrictedDataTokenRequest()
|
||||
{
|
||||
restrictedResources = new List<RestrictedResource> { restrictedResource }
|
||||
};
|
||||
|
||||
ParameterBasedPII parameterBasedPII = new ParameterBasedPII();
|
||||
parameterBasedPII.IsNeedRestrictedDataToken = true;
|
||||
parameterBasedPII.RestrictedDataTokenRequest = createRDT;
|
||||
|
||||
var order = amazonConnection.Orders.GetOrderItems("404-7777403-8594716", parameterBasedPII);
|
||||
}
|
||||
|
||||
public void GetOrderItemsBuyerInfo()
|
||||
{
|
||||
var ItemsBuyerInfo = amazonConnection.Orders.GetOrderItemsBuyerInfo("402-0467973-4229120");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class ProductPricingSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public ProductPricingSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
public void GetPricing()
|
||||
{
|
||||
var data = amazonConnection.ProductPricing.GetPricing(new Parameter.ProductPricing.ParameterGetPricing()
|
||||
{
|
||||
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
|
||||
Asins = new string[] { "B00CZC5F0G" }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void GetCompetitivePricing()
|
||||
{
|
||||
var data = amazonConnection.ProductPricing.GetCompetitivePricing(new Parameter.ProductPricing.ParameterGetCompetitivePricing()
|
||||
{
|
||||
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
|
||||
Asins = new string[] { "B00CZC5F0G" },
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void GetListingOffers()
|
||||
{
|
||||
var data = amazonConnection.ProductPricing.GetListingOffers(new Parameter.ProductPricing.ParameterGetListingOffers()
|
||||
{
|
||||
ItemCondition = ItemCondition.New,
|
||||
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
|
||||
SellerSKU = "8809647390015"
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void GetItemOffers()
|
||||
{
|
||||
var data = amazonConnection.ProductPricing.GetItemOffers(new Parameter.ProductPricing.ParameterGetItemOffers()
|
||||
{
|
||||
ItemCondition = ItemCondition.New,
|
||||
MarketplaceId = MarketPlace.UnitedArabEmirates.ID,
|
||||
Asin = "B07K13XL4Y"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,149 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Api.Sellers;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI;
|
||||
using FikaAmazonAPI.ConstructFeed;
|
||||
using FikaAmazonAPI.ConstructFeed.Messages;
|
||||
using FikaAmazonAPI.Parameter;
|
||||
using FikaAmazonAPI.Parameter.Notification;
|
||||
using FikaAmazonAPI.Parameter.Order;
|
||||
using FikaAmazonAPI.Parameter.Report;
|
||||
using FikaAmazonAPI.Utils;
|
||||
using static FikaAmazonAPI.ConstructFeed.BaseXML;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Token;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Services;
|
||||
using static FikaAmazonAPI.AmazonSpApiSDK.Models.Token.RestrictedResource;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Reports;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.MerchantFulfillment;
|
||||
using FikaAmazonAPI.Parameter.Finance;
|
||||
using FikaAmazonAPI.ReportGeneration;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
var config = new ConfigurationBuilder()
|
||||
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
|
||||
.AddJsonFile("appsettings.json")
|
||||
.AddUserSecrets<Program>()
|
||||
.Build();
|
||||
|
||||
AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
|
||||
{
|
||||
AccessKey = config.GetSection("FikaAmazonAPI:AccessKey").Value,
|
||||
SecretKey = config.GetSection("FikaAmazonAPI:SecretKey").Value,
|
||||
RoleArn = config.GetSection("FikaAmazonAPI:RoleArn").Value,
|
||||
ClientId = config.GetSection("FikaAmazonAPI:ClientId").Value,
|
||||
ClientSecret = config.GetSection("FikaAmazonAPI:ClientSecret").Value,
|
||||
RefreshToken = config.GetSection("FikaAmazonAPI:RefreshToken").Value,
|
||||
MarketPlace = MarketPlace.GetMarketPlaceByID(config.GetSection("FikaAmazonAPI:MarketPlaceID").Value),
|
||||
IsActiveLimitRate = true
|
||||
});
|
||||
|
||||
|
||||
var list3=amazonConnection.Financial.ListFinancialEvents(new ParameterListFinancialEvents()
|
||||
{
|
||||
PostedAfter=DateTime.UtcNow.AddDays(-15)
|
||||
});
|
||||
|
||||
string text = System.IO.File.ReadAllText(@"C:\Users\tareq\Downloads\Beispiel_Upload.txt");
|
||||
|
||||
var feedresultTXT = amazonConnection.Feed.SubmitFeed(text
|
||||
, FeedType.POST_FLAT_FILE_INVLOADER_DATA
|
||||
, new List<string>() { MarketPlace.UnitedArabEmirates.ID }
|
||||
, null
|
||||
, ContentType.TXT);
|
||||
|
||||
|
||||
string pathURL = string.Empty;
|
||||
while (pathURL == string.Empty)
|
||||
{
|
||||
Thread.Sleep(1000 * 30);
|
||||
var feedOutput = amazonConnection.Feed.GetFeed(feedresultTXT);
|
||||
if (feedOutput.ProcessingStatus == AmazonSpApiSDK.Models.Feeds.Feed.ProcessingStatusEnum.DONE)
|
||||
{
|
||||
var outPut = amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);
|
||||
|
||||
pathURL = outPut.Url;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ReportManager reportManager = new ReportManager(amazonConnection);
|
||||
var products=reportManager.GetProducts(); //GET_MERCHANT_LISTINGS_ALL_DATA
|
||||
var inventoryAging = reportManager.GetInventoryAging(); //GET_FBA_INVENTORY_AGED_DATA
|
||||
var ordersByDate = reportManager.GetOrdersByOrderDate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
|
||||
var ordersByLastUpdate = reportManager.GetOrdersByLastUpdate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
|
||||
var settlementOrder = reportManager.GetSettlementOrder(90); //GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2
|
||||
var returnMFNOrder = reportManager.GetReturnMFNOrder(90); //GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE
|
||||
var returnFBAOrder = reportManager.GetReturnFBAOrder(90); //GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA
|
||||
var reimbursementsOrder = reportManager.GetReimbursementsOrder(180); //GET_FBA_REIMBURSEMENTS_DATA
|
||||
var feedbacks = reportManager.GetFeedbackFromDays(180); //GET_SELLER_FEEDBACK_DATA
|
||||
|
||||
|
||||
var options = new AmazonSpApiSDK.Models.Feeds.FeedOptions();
|
||||
options.Add("DocumentType", "Invoice");
|
||||
options.Add("InvoiceNumber", "FV-EUR/1/2/3");
|
||||
options.Add("OrderId", "???-???????-?????");
|
||||
options.Add("TotalAmount", "39.37");
|
||||
options.Add("TotalVATAmount", "6.29");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//234729019012
|
||||
|
||||
var feedresultPDF = amazonConnection.Feed.SubmitFeed(@"C:\Users\tareq\Downloads\224129324d8e2096ec0a70f223572eda36.pdf"
|
||||
, FeedType.UPLOAD_VAT_INVOICE
|
||||
, new List<string>() { MarketPlace.UnitedArabEmirates.ID }
|
||||
, options
|
||||
, ContentType.PDF);
|
||||
|
||||
|
||||
|
||||
|
||||
ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
|
||||
var list = new List<InventoryMessage>();
|
||||
list.Add(new InventoryMessage()
|
||||
{
|
||||
SKU = "82010312061.22...",
|
||||
Quantity = 2,
|
||||
FulfillmentLatency = "11",
|
||||
});
|
||||
createDocument.AddInventoryMessage(list);
|
||||
var xml = createDocument.GetXML();
|
||||
|
||||
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_INVENTORY_AVAILABILITY_DATA);
|
||||
|
||||
Thread.Sleep(1000 * 30);
|
||||
|
||||
//var feedOutput = amazonConnection.Feed.GetFeed(feedID);
|
||||
|
||||
//var outPut = amazonConnection.Feed.GetFeedDocument(feedOutput.ResultFeedDocumentId);
|
||||
//Thread.Sleep(1000 * 30);
|
||||
//var reportOutpit = outPut.Url;
|
||||
|
||||
//var processingReport = amazonConnection.Feed.GetFeedDocumentProcessingReport(reportOutpit);
|
||||
|
||||
|
||||
Console.ReadLine();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using FikaAmazonAPI.ReportGeneration;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
internal class ReportManagerSample
|
||||
{
|
||||
|
||||
AmazonConnection amazonConnection;
|
||||
public ReportManagerSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
public void CallReport()
|
||||
{
|
||||
ReportManager reportManager = new ReportManager(amazonConnection);
|
||||
var products = reportManager.GetProducts(); //GET_MERCHANT_LISTINGS_ALL_DATA
|
||||
var inventoryAging = reportManager.GetInventoryAging(); //GET_FBA_INVENTORY_AGED_DATA
|
||||
var ordersByDate = reportManager.GetOrdersByOrderDate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL
|
||||
var ordersByLastUpdate = reportManager.GetOrdersByLastUpdate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
|
||||
var settlementOrder = reportManager.GetSettlementOrder(90); //GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2
|
||||
var returnMFNOrder = reportManager.GetReturnMFNOrder(90); //GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE
|
||||
var returnFBAOrder = reportManager.GetReturnFBAOrder(90); //GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA
|
||||
var reimbursementsOrder = reportManager.GetReimbursementsOrder(180); //GET_FBA_REIMBURSEMENTS_DATA
|
||||
var feedbacks = reportManager.GetFeedbackFromDays(180); //GET_SELLER_FEEDBACK_DATA
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,233 +0,0 @@
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Reports;
|
||||
using FikaAmazonAPI.Parameter.Report;
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class ReportsSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public ReportsSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void GetReports()
|
||||
{
|
||||
var parameters = new ParameterReportList();
|
||||
parameters.pageSize = 100;
|
||||
parameters.reportTypes = new List<ReportTypes>();
|
||||
parameters.reportTypes.Add(ReportTypes.GET_AFN_INVENTORY_DATA);
|
||||
parameters.marketplaceIds = new List<string>();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
amazonConnection.Reports.GetReports(parameters);
|
||||
}
|
||||
|
||||
public void GetReportGET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATEs()
|
||||
{
|
||||
var parameters = new ParameterReportList();
|
||||
parameters.pageSize = 100;
|
||||
parameters.reportTypes = new List<ReportTypes>();
|
||||
parameters.reportTypes.Add(ReportTypes.GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE);
|
||||
parameters.marketplaceIds = new List<string>();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
var reports=amazonConnection.Reports.GetReports(parameters);
|
||||
}
|
||||
|
||||
public void CreateReport()
|
||||
{
|
||||
|
||||
var parameters = new ParameterCreateReportSpecification();
|
||||
parameters.reportType = ReportTypes.GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL;
|
||||
parameters.dataStartTime = DateTime.UtcNow.AddDays(-30);
|
||||
parameters.dataEndTime = DateTime.UtcNow.AddDays(-10);
|
||||
|
||||
parameters.marketplaceIds = new MarketplaceIds();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
|
||||
parameters.reportOptions = new AmazonSpApiSDK.Models.Reports.ReportOptions();
|
||||
|
||||
var reportId = amazonConnection.Reports.CreateReport(parameters);
|
||||
}
|
||||
|
||||
|
||||
public void GetReport()
|
||||
{
|
||||
|
||||
amazonConnection.Reports.GetReport("192841018867");
|
||||
}
|
||||
|
||||
|
||||
public void CancelReport()
|
||||
{
|
||||
|
||||
amazonConnection.Reports.CancelReport("192841018867");
|
||||
}
|
||||
|
||||
|
||||
public void GetReportSchedules()
|
||||
{
|
||||
|
||||
var parameters = new ParameterReportSchedules();
|
||||
parameters.reportTypes.Add(ReportTypes.GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL);
|
||||
|
||||
var result = amazonConnection.Reports.GetReportSchedules(parameters);
|
||||
}
|
||||
|
||||
|
||||
public void CreateReportScheduleSpecification()
|
||||
{
|
||||
|
||||
var parameters = new ParameterCreateReportScheduleSpecification();
|
||||
parameters.reportType = ReportTypes.GET_AFN_INVENTORY_DATA;
|
||||
parameters.period = FikaAmazonAPI.AmazonSpApiSDK.Models.Reports.CreateReportScheduleSpecification.PeriodEnum.PT30M;
|
||||
|
||||
parameters.marketplaceIds = new MarketplaceIds();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
|
||||
parameters.reportOptions = new AmazonSpApiSDK.Models.Reports.ReportOptions();
|
||||
|
||||
var result = amazonConnection.Reports.CreateReportSchedule(parameters);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void GetReportSchedule()
|
||||
{
|
||||
|
||||
var data = amazonConnection.Reports.GetReportSchedule("50039018867");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void CancelReportSchedule()
|
||||
{
|
||||
|
||||
var data = amazonConnection.Reports.CancelReportSchedule("50039018867");
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void GetReportDocument()
|
||||
{
|
||||
|
||||
var data = amazonConnection.Reports.GetReportDocument("50039018867");
|
||||
|
||||
}
|
||||
|
||||
public string CreateReport_GET_MERCHANT_LISTINGS_ALL_DATA()
|
||||
{
|
||||
|
||||
var parameters = new ParameterCreateReportSpecification();
|
||||
parameters.reportType = ReportTypes.GET_MERCHANT_LISTINGS_ALL_DATA;
|
||||
|
||||
parameters.marketplaceIds = new MarketplaceIds();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
|
||||
parameters.reportOptions = new FikaAmazonAPI.AmazonSpApiSDK.Models.Reports.ReportOptions();
|
||||
|
||||
|
||||
var reportId = amazonConnection.Reports.CreateReport(parameters);
|
||||
var filePath = string.Empty;
|
||||
string ReportDocumentId = string.Empty;
|
||||
|
||||
while (string.IsNullOrEmpty(ReportDocumentId))
|
||||
{
|
||||
var reportData = amazonConnection.Reports.GetReport(reportId);
|
||||
if (!string.IsNullOrEmpty(reportData.ReportDocumentId))
|
||||
{
|
||||
filePath = amazonConnection.Reports.GetReportFile(reportData.ReportDocumentId);
|
||||
break;
|
||||
}
|
||||
else Thread.Sleep(1000 * 60);
|
||||
}
|
||||
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public string CreateReport_GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE()
|
||||
{
|
||||
|
||||
var parameters = new ParameterCreateReportSpecification();
|
||||
parameters.reportType = ReportTypes.GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE;
|
||||
|
||||
parameters.marketplaceIds = new MarketplaceIds();
|
||||
parameters.marketplaceIds.Add(MarketPlace.UnitedArabEmirates.ID);
|
||||
|
||||
|
||||
parameters.reportOptions = new FikaAmazonAPI.AmazonSpApiSDK.Models.Reports.ReportOptions();
|
||||
|
||||
parameters.dataStartTime = DateTime.UtcNow.AddDays(-50);
|
||||
parameters.dataEndTime = DateTime.UtcNow.AddDays(-1);
|
||||
|
||||
var reportId = amazonConnection.Reports.CreateReport(parameters);
|
||||
var filePath = string.Empty;
|
||||
string ReportDocumentId = string.Empty;
|
||||
|
||||
while (string.IsNullOrEmpty(ReportDocumentId))
|
||||
{
|
||||
var reportData = amazonConnection.Reports.GetReport(reportId);
|
||||
if (!string.IsNullOrEmpty(reportData.ReportDocumentId))
|
||||
{
|
||||
filePath = amazonConnection.Reports.GetReportFile(reportData.ReportDocumentId);
|
||||
break;
|
||||
}
|
||||
if(reportData.ProcessingStatus== AmazonSpApiSDK.Models.Reports.Report.ProcessingStatusEnum.FATAL)
|
||||
{
|
||||
throw new Exception("Error with Generate report");
|
||||
}
|
||||
else Thread.Sleep(1000 * 60);
|
||||
}
|
||||
|
||||
return filePath;
|
||||
}
|
||||
|
||||
|
||||
public string CreateReportAndDawnload(ReportTypes reportTypes,DateTime? dataStartTime=null,DateTime? dataEndTime=null, ReportOptions reportOptions=null)
|
||||
{
|
||||
return amazonConnection.Reports.CreateReportAndDownloadFile(reportTypes, dataStartTime, dataEndTime, reportOptions);
|
||||
}
|
||||
|
||||
public void DownloadExistingReportAndDownloadFile()
|
||||
{
|
||||
DateTime createdSince = DateTime.UtcNow.AddDays(-60);
|
||||
DateTime createdUntil = DateTime.UtcNow;
|
||||
|
||||
var paths = amazonConnection.Reports.DownloadExistingReportAndDownloadFile(
|
||||
ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2,
|
||||
createdSince,
|
||||
createdUntil);
|
||||
}
|
||||
|
||||
|
||||
public void GetReport_GET_SELLER_FEEDBACK_DATA()
|
||||
{
|
||||
DateTime startDate = new DateTime(2021, 10, 03);
|
||||
var data = amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_SELLER_FEEDBACK_DATA, startDate, null, null);
|
||||
}
|
||||
public void GetReportGET_FBA_REIMBURSEMENTS_DATA()
|
||||
{
|
||||
DateTime startDate = new DateTime(2021, 10, 03);
|
||||
var data = amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_FBA_REIMBURSEMENTS_DATA, startDate, null, null);
|
||||
}
|
||||
public void GetReportFile()
|
||||
{
|
||||
|
||||
var data = amazonConnection.Reports.GetReport("192841018867");
|
||||
|
||||
|
||||
var filePath = amazonConnection.Reports.GetReportFile(data.ReportDocumentId);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class SandboxOrderSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public SandboxOrderSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
public void GetOrderTestCase200()
|
||||
{
|
||||
var orders = amazonConnection.Orders.GetOrders
|
||||
(
|
||||
new FikaAmazonAPI.Parameter.Order.ParameterOrderList(Constants.TestCase200)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using FikaAmazonAPI.Search;
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class SolicitationsSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public SolicitationsSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void GetSolicitationActionsForOrder()
|
||||
{
|
||||
ParameterMarketplaceId parameterMarketplaceId = new ParameterMarketplaceId(MarketPlace.UnitedArabEmirates.ID);
|
||||
var data = amazonConnection.Solicitations.GetSolicitationActionsForOrder("405-3087470-5953115", parameterMarketplaceId.getParameters());
|
||||
}
|
||||
|
||||
|
||||
public void CreateProductReviewAndSellerFeedbackSolicitation()
|
||||
{
|
||||
ParameterMarketplaceId parameterMarketplaceId = new ParameterMarketplaceId(MarketPlace.UnitedArabEmirates.ID);
|
||||
var data = amazonConnection.Solicitations.CreateProductReviewAndSellerFeedbackSolicitation("405-3087470-5953115", parameterMarketplaceId.getParameters());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Token;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Services;
|
||||
using FikaAmazonAPI.Parameter;
|
||||
using FikaAmazonAPI.Parameter.Order;
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class TokenSample
|
||||
{
|
||||
AmazonConnection amazonConnection;
|
||||
public TokenSample(AmazonConnection amazonConnection)
|
||||
{
|
||||
this.amazonConnection = amazonConnection;
|
||||
}
|
||||
|
||||
|
||||
public void OrderPII()
|
||||
{
|
||||
var restrictedResource = new RestrictedResource();
|
||||
restrictedResource.method = Method.GET.ToString();
|
||||
restrictedResource.path = ApiUrls.OrdersApiUrls.OrderItems("404-7777403-8594716");
|
||||
//restrictedResource.dataElements = new List<string> { "buyerInfo", "shippingAddress" };
|
||||
|
||||
|
||||
var createRDT = new CreateRestrictedDataTokenRequest()
|
||||
{
|
||||
restrictedResources = new List<RestrictedResource> { restrictedResource }
|
||||
};
|
||||
|
||||
ParameterBasedPII parameterBasedPII = new ParameterBasedPII();
|
||||
parameterBasedPII.IsNeedRestrictedDataToken = true;
|
||||
parameterBasedPII.RestrictedDataTokenRequest = createRDT;
|
||||
|
||||
var order= amazonConnection.Orders.GetOrderItems("404-7777403-8594716", parameterBasedPII);
|
||||
}
|
||||
|
||||
public void OrdersPII()
|
||||
{
|
||||
var restrictedResource = new RestrictedResource();
|
||||
restrictedResource.method = Method.GET.ToString();
|
||||
restrictedResource.path = ApiUrls.OrdersApiUrls.OrderItems("404-7777403-8594716");
|
||||
//restrictedResource.dataElements = new List<string> { "buyerInfo", "shippingAddress" };
|
||||
|
||||
|
||||
var createRDT = new CreateRestrictedDataTokenRequest()
|
||||
{
|
||||
restrictedResources = new List<RestrictedResource> { restrictedResource }
|
||||
};
|
||||
|
||||
|
||||
ParameterOrderList serachOrderList = new ParameterOrderList();
|
||||
serachOrderList.CreatedAfter = DateTime.UtcNow.AddHours(-24);
|
||||
serachOrderList.OrderStatuses = new List<OrderStatuses>();
|
||||
serachOrderList.OrderStatuses.Add(OrderStatuses.Unshipped);
|
||||
serachOrderList.MarketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID };
|
||||
serachOrderList.RestrictedDataTokenRequest = createRDT;
|
||||
serachOrderList.IsNeedRestrictedDataToken = true;
|
||||
|
||||
var orders = amazonConnection.Orders.GetOrders(serachOrderList);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FikaAmazonAPI.SampleCode
|
||||
{
|
||||
public class VendorDirectFulfillmentOrderSample
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"FikaAmazonAPI": {
|
||||
"AccessKey": "AKIAXXXXXXXXXXX",
|
||||
"SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||
"RoleArn": "arn:aws:iam::999999999999:role/USER",
|
||||
"ClientId": "amzn1.application-oa2-client.0000000000000000000000000000",
|
||||
"ClientSecret": "000000000000000000000000000000000000",
|
||||
"RefreshToken": "Atzr|00000000000000000000000000000000000000000000",
|
||||
"MarketPlaceID": "A2VIGQ35RCS4UG"
|
||||
}
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
using FikaAmazonAPI.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI
|
||||
{
|
||||
public class AmazonConnection
|
||||
{
|
||||
private AmazonCredential Credentials { get; set; }
|
||||
|
||||
public OrderService Orders => this._Orders ?? throw _NoCredentials;
|
||||
public ReportService Reports => this._Reports ?? throw _NoCredentials;
|
||||
public SolicitationService Solicitations => this._Solicitations ?? throw _NoCredentials;
|
||||
public FinancialService Financial => this._Financials ?? throw _NoCredentials;
|
||||
public CatalogItemService CatalogItem => this._CatalogItems ?? throw _NoCredentials;
|
||||
public ProductPricingService ProductPricing => this._ProductPricing ?? throw _NoCredentials;
|
||||
public AuthorizationService Authorization => this._Authorization ?? throw _NoCredentials;
|
||||
public AplusContentService AplusContent => this._AplusContent ?? throw _NoCredentials;
|
||||
public FbaInboundEligibilityService FbaInboundEligibility => this._FbaInboundEligibility ?? throw _NoCredentials;
|
||||
public FbaInboundService FbaInbound => this._FbaInbound ?? throw _NoCredentials;
|
||||
public FbaInventoryService FbaInventory => this._FbaInventory ?? throw _NoCredentials;
|
||||
public FbaOutboundService FbaOutbound => this._FbaOutbound ?? throw _NoCredentials;
|
||||
public FbaSmallandLightService FbaSmallandLight => this._FbaSmallandLight ?? throw _NoCredentials;
|
||||
public FeedService Feed => this._Feed ?? throw _NoCredentials;
|
||||
public ListingsItemService ListingsItem => this._ListingsItem ?? throw _NoCredentials;
|
||||
public MerchantFulfillmentService MerchantFulfillment => this._MerchantFulfillment ?? throw _NoCredentials;
|
||||
public MessagingService Messaging => this._Messaging ?? throw _NoCredentials;
|
||||
public NotificationService Notification => this._Notification ?? throw _NoCredentials;
|
||||
public ProductFeeService ProductFee => this._ProductFee ?? throw _NoCredentials;
|
||||
public SalesService Sales => this._Sales ?? throw _NoCredentials;
|
||||
public SellerService Seller => this._Seller ?? throw _NoCredentials;
|
||||
public ServicesService Services => this._Services ?? throw _NoCredentials;
|
||||
public ShipmentInvoicingService ShipmentInvoicing => this._ShipmentInvoicing ?? throw _NoCredentials;
|
||||
public ShippingService Shipping => this._Shipping ?? throw _NoCredentials;
|
||||
public UploadService Upload => this._Upload ?? throw _NoCredentials;
|
||||
public TokenService Tokens => this._Tokens ?? throw _NoCredentials;
|
||||
public FulFillmentInboundService FulFillmentInbound => this._FulFillmentInbound ?? throw _NoCredentials;
|
||||
public FulFillmentOutboundService FulFillmentOutbound => this._FulFillmentOutbound ?? throw _NoCredentials;
|
||||
public VendorDirectFulfillmentOrderService VendorDirectFulfillmentOrders => this._VendorDirectFulfillmentOrders ?? throw _NoCredentials;
|
||||
|
||||
|
||||
|
||||
private OrderService _Orders { get; set; }
|
||||
private ReportService _Reports { get; set; }
|
||||
private SolicitationService _Solicitations { get; set; }
|
||||
private FinancialService _Financials { get; set; }
|
||||
private CatalogItemService _CatalogItems { get; set; }
|
||||
private ProductPricingService _ProductPricing { get; set; }
|
||||
private AuthorizationService _Authorization { get; set; }
|
||||
private AplusContentService _AplusContent { get; set; }
|
||||
private FbaInboundEligibilityService _FbaInboundEligibility { get; set; }
|
||||
private FbaInboundService _FbaInbound { get; set; }
|
||||
private FbaInventoryService _FbaInventory { get; set; }
|
||||
private FbaOutboundService _FbaOutbound { get; set; }
|
||||
private FbaSmallandLightService _FbaSmallandLight { get; set; }
|
||||
private FeedService _Feed { get; set; }
|
||||
private ListingsItemService _ListingsItem { get; set; }
|
||||
private MerchantFulfillmentService _MerchantFulfillment { get; set; }
|
||||
private MessagingService _Messaging { get; set; }
|
||||
private NotificationService _Notification { get; set; }
|
||||
private ProductFeeService _ProductFee { get; set; }
|
||||
private SalesService _Sales { get; set; }
|
||||
private SellerService _Seller { get; set; }
|
||||
private ServicesService _Services { get; set; }
|
||||
private ShipmentInvoicingService _ShipmentInvoicing { get; set; }
|
||||
private ShippingService _Shipping { get; set; }
|
||||
private UploadService _Upload { get; set; }
|
||||
|
||||
private TokenService _Tokens { get; set; }
|
||||
private FulFillmentInboundService _FulFillmentInbound { get; set; }
|
||||
private FulFillmentOutboundService _FulFillmentOutbound { get; set; }
|
||||
private VendorDirectFulfillmentOrderService _VendorDirectFulfillmentOrders { get; set; }
|
||||
|
||||
private UnauthorizedAccessException _NoCredentials = new UnauthorizedAccessException($"Error, you cannot make calls to Amazon without credentials!");
|
||||
|
||||
public string RefNumber { get; set; }
|
||||
public AmazonConnection(AmazonCredential Credentials,string RefNumber=null)
|
||||
{
|
||||
this.Authenticate(Credentials);
|
||||
this.RefNumber = RefNumber;
|
||||
}
|
||||
|
||||
public void Authenticate(AmazonCredential Credentials)
|
||||
{
|
||||
if (this.Credentials == default(AmazonCredential))
|
||||
Init(Credentials);
|
||||
else
|
||||
throw new InvalidOperationException("Error, you are already authenticated to amazon in this AmazonConnection, dispose of this connection and create a new one to connect to a different account.");
|
||||
}
|
||||
|
||||
private void Init(AmazonCredential Credentials)
|
||||
{
|
||||
this.Credentials = Credentials;
|
||||
|
||||
this._Orders = new OrderService(this.Credentials);
|
||||
this._Reports = new ReportService(this.Credentials);
|
||||
this._Solicitations = new SolicitationService(this.Credentials);
|
||||
this._Financials = new FinancialService(this.Credentials);
|
||||
this._CatalogItems = new CatalogItemService(this.Credentials);
|
||||
this._ProductPricing = new ProductPricingService(this.Credentials);
|
||||
|
||||
this._FbaInbound = new FbaInboundService(this.Credentials);
|
||||
this._FbaInventory = new FbaInventoryService(this.Credentials);
|
||||
this._FbaOutbound = new FbaOutboundService(this.Credentials);
|
||||
this._FbaSmallandLight = new FbaSmallandLightService(this.Credentials);
|
||||
this._FbaInboundEligibility = new FbaInboundEligibilityService(this.Credentials);
|
||||
this._AplusContent = new AplusContentService(this.Credentials);
|
||||
this._Feed = new FeedService(this.Credentials);
|
||||
this._ListingsItem = new ListingsItemService(this.Credentials);
|
||||
this._MerchantFulfillment = new MerchantFulfillmentService(this.Credentials);
|
||||
this._Messaging= new MessagingService(this.Credentials);
|
||||
this._Notification= new NotificationService(this.Credentials);
|
||||
this._ProductFee= new ProductFeeService(this.Credentials);
|
||||
this._Sales= new SalesService(this.Credentials);
|
||||
this._Seller= new SellerService(this.Credentials);
|
||||
this._Services= new ServicesService(this.Credentials);
|
||||
this._ShipmentInvoicing= new ShipmentInvoicingService(this.Credentials);
|
||||
this._Shipping= new ShippingService(this.Credentials);
|
||||
this._Upload= new UploadService(this.Credentials);
|
||||
this._Tokens= new TokenService(this.Credentials);
|
||||
this._FulFillmentInbound= new FulFillmentInboundService(this.Credentials);
|
||||
this._FulFillmentOutbound= new FulFillmentOutboundService(this.Credentials);
|
||||
this._VendorDirectFulfillmentOrders = new VendorDirectFulfillmentOrderService(this.Credentials);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Token;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Services;
|
||||
using FikaAmazonAPI.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using static FikaAmazonAPI.AmazonSpApiSDK.Models.Token.CacheTokenData;
|
||||
using static FikaAmazonAPI.Utils.Constants;
|
||||
|
||||
namespace FikaAmazonAPI
|
||||
{
|
||||
public class AmazonCredential
|
||||
{
|
||||
public string AccessKey { get; set; }
|
||||
public string SecretKey { get; set; }
|
||||
public string RoleArn { get; set; }
|
||||
public string ClientId { get; set; }
|
||||
public string ClientSecret { get; set; }
|
||||
public string RefreshToken { get; set; }
|
||||
public MarketPlace MarketPlace { get; set; }
|
||||
private CacheTokenData CacheTokenData { get; set; }
|
||||
public bool IsActiveLimitRate { get; set; } = true;
|
||||
public Environments Environment { get; set; } = Environments.Production;
|
||||
|
||||
|
||||
|
||||
public AmazonCredential()
|
||||
{
|
||||
CacheTokenData = new CacheTokenData();
|
||||
}
|
||||
public AmazonCredential(string AccessKey, string SecretKey, string RoleArn, string ClientId, string ClientSecret,string RefreshToken)
|
||||
{
|
||||
this.AccessKey = AccessKey;
|
||||
this.SecretKey = SecretKey;
|
||||
this.RoleArn = RoleArn;
|
||||
this.ClientId = ClientId;
|
||||
this.ClientSecret = ClientSecret;
|
||||
this.RefreshToken = RefreshToken;
|
||||
CacheTokenData = new CacheTokenData();
|
||||
}
|
||||
|
||||
public TokenResponse GetToken(TokenDataType tokenDataType)
|
||||
{
|
||||
return CacheTokenData.GetToken(tokenDataType);
|
||||
}
|
||||
public void SetToken(TokenDataType tokenDataType, TokenResponse token)
|
||||
{
|
||||
CacheTokenData.SetToken(tokenDataType, token);
|
||||
}
|
||||
public AWSAuthenticationTokenData GetAWSAuthenticationTokenData()
|
||||
{
|
||||
return CacheTokenData.GetAWSAuthenticationTokenData();
|
||||
}
|
||||
public void SetAWSAuthenticationTokenData(AWSAuthenticationTokenData tokenData)
|
||||
{
|
||||
CacheTokenData.SetAWSAuthenticationTokenData(tokenData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,339 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Authorization;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IAuthorizationApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>GetAuthorizationCodeResponse</returns>
|
||||
GetAuthorizationCodeResponse GetAuthorizationCode(string sellingPartnerId, string developerId, string mwsAuthToken);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>ApiResponse of GetAuthorizationCodeResponse</returns>
|
||||
ApiResponse<GetAuthorizationCodeResponse> GetAuthorizationCodeWithHttpInfo(string sellingPartnerId, string developerId, string mwsAuthToken);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>Task of GetAuthorizationCodeResponse</returns>
|
||||
System.Threading.Tasks.Task<GetAuthorizationCodeResponse> GetAuthorizationCodeAsync(string sellingPartnerId, string developerId, string mwsAuthToken);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>Task of ApiResponse (GetAuthorizationCodeResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetAuthorizationCodeResponse>> GetAuthorizationCodeAsyncWithHttpInfo(string sellingPartnerId, string developerId, string mwsAuthToken);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class AuthorizationApi : IAuthorizationApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AuthorizationApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public AuthorizationApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AuthorizationApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public AuthorizationApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>GetAuthorizationCodeResponse</returns>
|
||||
public GetAuthorizationCodeResponse GetAuthorizationCode(string sellingPartnerId, string developerId, string mwsAuthToken)
|
||||
{
|
||||
ApiResponse<GetAuthorizationCodeResponse> localVarResponse = GetAuthorizationCodeWithHttpInfo(sellingPartnerId, developerId, mwsAuthToken);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>ApiResponse of GetAuthorizationCodeResponse</returns>
|
||||
public ApiResponse<GetAuthorizationCodeResponse> GetAuthorizationCodeWithHttpInfo(string sellingPartnerId, string developerId, string mwsAuthToken)
|
||||
{
|
||||
// verify the required parameter 'sellingPartnerId' is set
|
||||
if (sellingPartnerId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'sellingPartnerId' when calling AuthorizationApi->GetAuthorizationCode");
|
||||
// verify the required parameter 'developerId' is set
|
||||
if (developerId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'developerId' when calling AuthorizationApi->GetAuthorizationCode");
|
||||
// verify the required parameter 'mwsAuthToken' is set
|
||||
if (mwsAuthToken == null)
|
||||
throw new ApiException(400, "Missing required parameter 'mwsAuthToken' when calling AuthorizationApi->GetAuthorizationCode");
|
||||
|
||||
var localVarPath = "/authorization/v1/authorizationCode";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (sellingPartnerId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "sellingPartnerId", sellingPartnerId)); // query parameter
|
||||
if (developerId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "developerId", developerId)); // query parameter
|
||||
if (mwsAuthToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "mwsAuthToken", mwsAuthToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetAuthorizationCode", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetAuthorizationCodeResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetAuthorizationCodeResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAuthorizationCodeResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>Task of GetAuthorizationCodeResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetAuthorizationCodeResponse> GetAuthorizationCodeAsync(string sellingPartnerId, string developerId, string mwsAuthToken)
|
||||
{
|
||||
ApiResponse<GetAuthorizationCodeResponse> localVarResponse = await GetAuthorizationCodeAsyncWithHttpInfo(sellingPartnerId, developerId, mwsAuthToken);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Login with Amazon (LWA) authorization code for an existing Amazon MWS authorization. With the getAuthorizationCode operation, you can request a Login With Amazon (LWA) authorization code that will allow you to call a Selling Partner API on behalf of a seller who has already authorized you to call Amazon Marketplace Web Service (Amazon MWS). You specify a developer ID, an MWS auth token, and a seller ID. Taken together, these represent the Amazon MWS authorization that the seller previously granted you. The operation returns an LWA authorization code that can be exchanged for a refresh token and access token representing authorization to call the Selling Partner API on the seller's behalf. By using this API, sellers who have already authorized you for Amazon MWS do not need to re-authorize you for the Selling Partner API. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="sellingPartnerId">The seller ID of the seller for whom you are requesting Selling Partner API authorization. This must be the seller ID of the seller who authorized your application on the Marketplace Appstore.</param>
|
||||
/// <param name="developerId">Your developer ID. This must be one of the developer ID values that you provided when you registered your application in Developer Central.</param>
|
||||
/// <param name="mwsAuthToken">The MWS Auth Token that was generated when the seller authorized your application on the Marketplace Appstore.</param>
|
||||
/// <returns>Task of ApiResponse (GetAuthorizationCodeResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetAuthorizationCodeResponse>> GetAuthorizationCodeAsyncWithHttpInfo(string sellingPartnerId, string developerId, string mwsAuthToken)
|
||||
{
|
||||
// verify the required parameter 'sellingPartnerId' is set
|
||||
if (sellingPartnerId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'sellingPartnerId' when calling AuthorizationApi->GetAuthorizationCode");
|
||||
// verify the required parameter 'developerId' is set
|
||||
if (developerId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'developerId' when calling AuthorizationApi->GetAuthorizationCode");
|
||||
// verify the required parameter 'mwsAuthToken' is set
|
||||
if (mwsAuthToken == null)
|
||||
throw new ApiException(400, "Missing required parameter 'mwsAuthToken' when calling AuthorizationApi->GetAuthorizationCode");
|
||||
|
||||
var localVarPath = "/authorization/v1/authorizationCode";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (sellingPartnerId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "sellingPartnerId", sellingPartnerId)); // query parameter
|
||||
if (developerId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "developerId", developerId)); // query parameter
|
||||
if (mwsAuthToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "mwsAuthToken", mwsAuthToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetAuthorizationCode", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetAuthorizationCodeResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetAuthorizationCodeResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAuthorizationCodeResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,767 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface ICatalogApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>GetCatalogItemResponse</returns>
|
||||
GetCatalogItemResponse GetCatalogItem(string marketplaceId, string asin);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>ApiResponse of GetCatalogItemResponse</returns>
|
||||
ApiResponse<GetCatalogItemResponse> GetCatalogItemWithHttpInfo(string marketplaceId, string asin);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>ListCatalogCategoriesResponse</returns>
|
||||
ListCatalogCategoriesResponse ListCatalogCategories(string marketplaceId, string ASIN = null, string sellerSKU = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>ApiResponse of ListCatalogCategoriesResponse</returns>
|
||||
ApiResponse<ListCatalogCategoriesResponse> ListCatalogCategoriesWithHttpInfo(string marketplaceId, string ASIN = null, string sellerSKU = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>ListCatalogItemsResponse</returns>
|
||||
ListCatalogItemsResponse ListCatalogItems(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>ApiResponse of ListCatalogItemsResponse</returns>
|
||||
ApiResponse<ListCatalogItemsResponse> ListCatalogItemsWithHttpInfo(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of GetCatalogItemResponse</returns>
|
||||
System.Threading.Tasks.Task<GetCatalogItemResponse> GetCatalogItemAsync(string marketplaceId, string asin);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of ApiResponse (GetCatalogItemResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetCatalogItemResponse>> GetCatalogItemAsyncWithHttpInfo(string marketplaceId, string asin);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>Task of ListCatalogCategoriesResponse</returns>
|
||||
System.Threading.Tasks.Task<ListCatalogCategoriesResponse> ListCatalogCategoriesAsync(string marketplaceId, string ASIN = null, string sellerSKU = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListCatalogCategoriesResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<ListCatalogCategoriesResponse>> ListCatalogCategoriesAsyncWithHttpInfo(string marketplaceId, string ASIN = null, string sellerSKU = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>Task of ListCatalogItemsResponse</returns>
|
||||
System.Threading.Tasks.Task<ListCatalogItemsResponse> ListCatalogItemsAsync(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListCatalogItemsResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<ListCatalogItemsResponse>> ListCatalogItemsAsyncWithHttpInfo(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class CatalogApi : ICatalogApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CatalogApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public CatalogApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CatalogApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public CatalogApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>GetCatalogItemResponse</returns>
|
||||
public GetCatalogItemResponse GetCatalogItem(string marketplaceId, string asin)
|
||||
{
|
||||
ApiResponse<GetCatalogItemResponse> localVarResponse = GetCatalogItemWithHttpInfo(marketplaceId, asin);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>ApiResponse of GetCatalogItemResponse</returns>
|
||||
public ApiResponse<GetCatalogItemResponse> GetCatalogItemWithHttpInfo(string marketplaceId, string asin)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling CatalogApi->GetCatalogItem");
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling CatalogApi->GetCatalogItem");
|
||||
|
||||
var localVarPath = "/catalog/v0/items/{asin}";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (asin != null) localVarPathParams.Add("asin", Configuration.ApiClient.ParameterToString(asin)); // path parameter
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetCatalogItem", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetCatalogItemResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetCatalogItemResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetCatalogItemResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of GetCatalogItemResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetCatalogItemResponse> GetCatalogItemAsync(string marketplaceId, string asin)
|
||||
{
|
||||
ApiResponse<GetCatalogItemResponse> localVarResponse = await GetCatalogItemAsyncWithHttpInfo(marketplaceId, asin);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a specified item and its attributes. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of ApiResponse (GetCatalogItemResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetCatalogItemResponse>> GetCatalogItemAsyncWithHttpInfo(string marketplaceId, string asin)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling CatalogApi->GetCatalogItem");
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling CatalogApi->GetCatalogItem");
|
||||
|
||||
var localVarPath = "/catalog/v0/items/{asin}";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (asin != null) localVarPathParams.Add("asin", Configuration.ApiClient.ParameterToString(asin)); // path parameter
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetCatalogItem", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetCatalogItemResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetCatalogItemResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetCatalogItemResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>ListCatalogCategoriesResponse</returns>
|
||||
public ListCatalogCategoriesResponse ListCatalogCategories(string marketplaceId, string ASIN = null, string sellerSKU = null)
|
||||
{
|
||||
ApiResponse<ListCatalogCategoriesResponse> localVarResponse = ListCatalogCategoriesWithHttpInfo(marketplaceId, ASIN, sellerSKU);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>ApiResponse of ListCatalogCategoriesResponse</returns>
|
||||
public ApiResponse<ListCatalogCategoriesResponse> ListCatalogCategoriesWithHttpInfo(string marketplaceId, string ASIN = null, string sellerSKU = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling CatalogApi->ListCatalogCategories");
|
||||
|
||||
var localVarPath = "/catalog/v0/categories";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (ASIN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ASIN", ASIN)); // query parameter
|
||||
if (sellerSKU != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "SellerSKU", sellerSKU)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListCatalogCategories", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListCatalogCategoriesResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListCatalogCategoriesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListCatalogCategoriesResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>Task of ListCatalogCategoriesResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ListCatalogCategoriesResponse> ListCatalogCategoriesAsync(string marketplaceId, string ASIN = null, string sellerSKU = null)
|
||||
{
|
||||
ApiResponse<ListCatalogCategoriesResponse> localVarResponse = await ListCatalogCategoriesAsyncWithHttpInfo(marketplaceId, ASIN, sellerSKU);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for the item.</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify items in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListCatalogCategoriesResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ListCatalogCategoriesResponse>> ListCatalogCategoriesAsyncWithHttpInfo(string marketplaceId, string ASIN = null, string sellerSKU = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling CatalogApi->ListCatalogCategories");
|
||||
|
||||
var localVarPath = "/catalog/v0/categories";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (ASIN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ASIN", ASIN)); // query parameter
|
||||
if (sellerSKU != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "SellerSKU", sellerSKU)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListCatalogCategories", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListCatalogCategoriesResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListCatalogCategoriesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListCatalogCategoriesResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>ListCatalogItemsResponse</returns>
|
||||
public ListCatalogItemsResponse ListCatalogItems(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null)
|
||||
{
|
||||
ApiResponse<ListCatalogItemsResponse> localVarResponse = ListCatalogItemsWithHttpInfo(marketplaceId, query, queryContextId, sellerSKU, UPC, EAN, ISBN, JAN);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>ApiResponse of ListCatalogItemsResponse</returns>
|
||||
public ApiResponse<ListCatalogItemsResponse> ListCatalogItemsWithHttpInfo(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling CatalogApi->ListCatalogItems");
|
||||
|
||||
var localVarPath = "/catalog/v0/items";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (query != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "Query", query)); // query parameter
|
||||
if (queryContextId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "QueryContextId", queryContextId)); // query parameter
|
||||
if (sellerSKU != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "SellerSKU", sellerSKU)); // query parameter
|
||||
if (UPC != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "UPC", UPC)); // query parameter
|
||||
if (EAN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "EAN", EAN)); // query parameter
|
||||
if (ISBN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ISBN", ISBN)); // query parameter
|
||||
if (JAN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "JAN", JAN)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListCatalogItems", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListCatalogItemsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListCatalogItemsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListCatalogItemsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>Task of ListCatalogItemsResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ListCatalogItemsResponse> ListCatalogItemsAsync(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null)
|
||||
{
|
||||
ApiResponse<ListCatalogItemsResponse> localVarResponse = await ListCatalogItemsAsyncWithHttpInfo(marketplaceId, query, queryContextId, sellerSKU, UPC, EAN, ISBN, JAN);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of items and their attributes, based on a search query or item identifiers that you specify. When based on a search query, provide the Query parameter and optionally, the QueryContextId parameter. When based on item identifiers, provide a single appropriate parameter based on the identifier type, and specify the associated item value. MarketplaceId is always required. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which items are returned.</param>
|
||||
/// <param name="query">Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. (optional)</param>
|
||||
/// <param name="queryContextId">An identifier for the context within which the given search will be performed. A marketplace might provide mechanisms for constraining a search to a subset of potential items. For example, the retail marketplace allows queries to be constrained to a specific category. The QueryContextId parameter specifies such a subset. If it is omitted, the search will be performed using the default context for the marketplace, which will typically contain the largest set of items. (optional)</param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit. (optional)</param>
|
||||
/// <param name="UPC">A 12-digit bar code used for retail packaging. (optional)</param>
|
||||
/// <param name="EAN">A European article number that uniquely identifies the catalog item, manufacturer, and its attributes. (optional)</param>
|
||||
/// <param name="ISBN">The unique commercial book identifier used to identify books internationally. (optional)</param>
|
||||
/// <param name="JAN">A Japanese article number that uniquely identifies the product, manufacturer, and its attributes. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListCatalogItemsResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ListCatalogItemsResponse>> ListCatalogItemsAsyncWithHttpInfo(string marketplaceId, string query = null, string queryContextId = null, string sellerSKU = null, string UPC = null, string EAN = null, string ISBN = null, string JAN = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling CatalogApi->ListCatalogItems");
|
||||
|
||||
var localVarPath = "/catalog/v0/items";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (query != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "Query", query)); // query parameter
|
||||
if (queryContextId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "QueryContextId", queryContextId)); // query parameter
|
||||
if (sellerSKU != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "SellerSKU", sellerSKU)); // query parameter
|
||||
if (UPC != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "UPC", UPC)); // query parameter
|
||||
if (EAN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "EAN", EAN)); // query parameter
|
||||
if (ISBN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ISBN", ISBN)); // query parameter
|
||||
if (JAN != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "JAN", JAN)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListCatalogItems", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListCatalogItemsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListCatalogItemsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListCatalogItemsResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,333 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for FBA Inbound Eligibilty
|
||||
*
|
||||
* With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon's fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon's fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon's fulfillment centers.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.FbaInbound;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.FbaInbound
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IFbaInboundApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>GetItemEligibilityPreviewResponse</returns>
|
||||
GetItemEligibilityPreviewResponse GetItemEligibilityPreview(string asin, string program, List<string> marketplaceIds = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>ApiResponse of GetItemEligibilityPreviewResponse</returns>
|
||||
ApiResponse<GetItemEligibilityPreviewResponse> GetItemEligibilityPreviewWithHttpInfo(string asin, string program, List<string> marketplaceIds = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>Task of GetItemEligibilityPreviewResponse</returns>
|
||||
System.Threading.Tasks.Task<GetItemEligibilityPreviewResponse> GetItemEligibilityPreviewAsync(string asin, string program, List<string> marketplaceIds = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetItemEligibilityPreviewResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetItemEligibilityPreviewResponse>> GetItemEligibilityPreviewAsyncWithHttpInfo(string asin, string program, List<string> marketplaceIds = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class FbaInboundApi : IFbaInboundApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FbaInboundApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public FbaInboundApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FbaInboundApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public FbaInboundApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>GetItemEligibilityPreviewResponse</returns>
|
||||
public GetItemEligibilityPreviewResponse GetItemEligibilityPreview(string asin, string program, List<string> marketplaceIds = null)
|
||||
{
|
||||
ApiResponse<GetItemEligibilityPreviewResponse> localVarResponse = GetItemEligibilityPreviewWithHttpInfo(asin, program, marketplaceIds);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>ApiResponse of GetItemEligibilityPreviewResponse</returns>
|
||||
public ApiResponse<GetItemEligibilityPreviewResponse> GetItemEligibilityPreviewWithHttpInfo(string asin, string program, List<string> marketplaceIds = null)
|
||||
{
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling FbaInboundApi->GetItemEligibilityPreview");
|
||||
// verify the required parameter 'program' is set
|
||||
if (program == null)
|
||||
throw new ApiException(400, "Missing required parameter 'program' when calling FbaInboundApi->GetItemEligibilityPreview");
|
||||
|
||||
var localVarPath = "/fba/inbound/v1/eligibility/itemPreview";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
if (asin != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "asin", asin)); // query parameter
|
||||
if (program != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "program", program)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetItemEligibilityPreview", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetItemEligibilityPreviewResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetItemEligibilityPreviewResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetItemEligibilityPreviewResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>Task of GetItemEligibilityPreviewResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetItemEligibilityPreviewResponse> GetItemEligibilityPreviewAsync(string asin, string program, List<string> marketplaceIds = null)
|
||||
{
|
||||
ApiResponse<GetItemEligibilityPreviewResponse> localVarResponse = await GetItemEligibilityPreviewAsyncWithHttpInfo(asin, program, marketplaceIds);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item's eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="asin">The ASIN of the item for which you want an eligibility preview.</param>
|
||||
/// <param name="program">The program that you want to check eligibility against.</param>
|
||||
/// <param name="marketplaceIds">The identifier for the marketplace in which you want to determine eligibility. Required only when program=INBOUND. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetItemEligibilityPreviewResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetItemEligibilityPreviewResponse>> GetItemEligibilityPreviewAsyncWithHttpInfo(string asin, string program, List<string> marketplaceIds = null)
|
||||
{
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling FbaInboundApi->GetItemEligibilityPreview");
|
||||
// verify the required parameter 'program' is set
|
||||
if (program == null)
|
||||
throw new ApiException(400, "Missing required parameter 'program' when calling FbaInboundApi->GetItemEligibilityPreview");
|
||||
|
||||
var localVarPath = "/fba/inbound/v1/eligibility/itemPreview";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
if (asin != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "asin", asin)); // query parameter
|
||||
if (program != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "program", program)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetItemEligibilityPreview", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetItemEligibilityPreviewResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetItemEligibilityPreviewResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetItemEligibilityPreviewResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,379 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for FBA Inventory
|
||||
*
|
||||
* The Selling Partner API for FBA Inventory lets you programmatically retrieve information about inventory in Amazon's fulfillment network.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.FbaInventory;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.FbaInventory
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IFbaInventoryApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>GetInventorySummariesResponse</returns>
|
||||
GetInventorySummariesResponse GetInventorySummaries(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of GetInventorySummariesResponse</returns>
|
||||
ApiResponse<GetInventorySummariesResponse> GetInventorySummariesWithHttpInfo(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of GetInventorySummariesResponse</returns>
|
||||
System.Threading.Tasks.Task<GetInventorySummariesResponse> GetInventorySummariesAsync(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetInventorySummariesResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetInventorySummariesResponse>> GetInventorySummariesAsyncWithHttpInfo(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class FbaInventoryApi : IFbaInventoryApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FbaInventoryApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public FbaInventoryApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FbaInventoryApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public FbaInventoryApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>GetInventorySummariesResponse</returns>
|
||||
public GetInventorySummariesResponse GetInventorySummaries(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<GetInventorySummariesResponse> localVarResponse = GetInventorySummariesWithHttpInfo(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, nextToken);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of GetInventorySummariesResponse</returns>
|
||||
public ApiResponse<GetInventorySummariesResponse> GetInventorySummariesWithHttpInfo(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null)
|
||||
{
|
||||
// verify the required parameter 'granularityType' is set
|
||||
if (granularityType == null)
|
||||
throw new ApiException(400, "Missing required parameter 'granularityType' when calling FbaInventoryApi->GetInventorySummaries");
|
||||
// verify the required parameter 'granularityId' is set
|
||||
if (granularityId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'granularityId' when calling FbaInventoryApi->GetInventorySummaries");
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling FbaInventoryApi->GetInventorySummaries");
|
||||
|
||||
var localVarPath = "/fba/inventory/v1/summaries";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (details != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "details", details)); // query parameter
|
||||
if (granularityType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularityType", granularityType)); // query parameter
|
||||
if (granularityId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularityId", granularityId)); // query parameter
|
||||
if (startDateTime != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "startDateTime", startDateTime)); // query parameter
|
||||
if (sellerSkus != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "sellerSkus", sellerSkus)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "nextToken", nextToken)); // query parameter
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetInventorySummaries", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetInventorySummariesResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetInventorySummariesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetInventorySummariesResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of GetInventorySummariesResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetInventorySummariesResponse> GetInventorySummariesAsync(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<GetInventorySummariesResponse> localVarResponse = await GetInventorySummariesAsyncWithHttpInfo(granularityType, granularityId, marketplaceIds, details, startDateTime, sellerSkus, nextToken);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of inventory summaries. The summaries returned depend on the presence or absence of the startDateTime and sellerSkus parameters: - All inventory summaries with available details are returned when the startDateTime and sellerSkus parameters are omitted. - When startDateTime is provided, the operation returns inventory summaries that have had changes after the date and time specified. The sellerSkus parameter is ignored. - When the sellerSkus parameter is provided, the operation returns inventory summaries for only the specified sellerSkus. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 90 | 150 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="granularityType">The granularity type for the inventory aggregation level.</param>
|
||||
/// <param name="granularityId">The granularity ID for the inventory aggregation level.</param>
|
||||
/// <param name="marketplaceIds">The marketplace ID for the marketplace for which to return inventory summaries.</param>
|
||||
/// <param name="details">true to return inventory summaries with additional summarized inventory details and quantities. Otherwise, returns inventory summaries only (default value). (optional, default to false)</param>
|
||||
/// <param name="startDateTime">A start date and time in ISO8601 format. If specified, all inventory summaries that have changed since then are returned. You must specify a date and time that is no earlier than 18 months prior to the date and time when you call the API. Note: Changes in inboundWorkingQuantity, inboundShippedQuantity and inboundReceivingQuantity are not detected. (optional)</param>
|
||||
/// <param name="sellerSkus">A list of seller SKUs for which to return inventory summaries. You may specify up to 50 SKUs. (optional)</param>
|
||||
/// <param name="nextToken">String token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetInventorySummariesResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetInventorySummariesResponse>> GetInventorySummariesAsyncWithHttpInfo(string granularityType, string granularityId, List<string> marketplaceIds, bool? details = null, DateTime? startDateTime = null, List<string> sellerSkus = null, string nextToken = null)
|
||||
{
|
||||
// verify the required parameter 'granularityType' is set
|
||||
if (granularityType == null)
|
||||
throw new ApiException(400, "Missing required parameter 'granularityType' when calling FbaInventoryApi->GetInventorySummaries");
|
||||
// verify the required parameter 'granularityId' is set
|
||||
if (granularityId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'granularityId' when calling FbaInventoryApi->GetInventorySummaries");
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling FbaInventoryApi->GetInventorySummaries");
|
||||
|
||||
var localVarPath = "/fba/inventory/v1/summaries";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (details != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "details", details)); // query parameter
|
||||
if (granularityType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularityType", granularityType)); // query parameter
|
||||
if (granularityId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularityId", granularityId)); // query parameter
|
||||
if (startDateTime != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "startDateTime", startDateTime)); // query parameter
|
||||
if (sellerSkus != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "sellerSkus", sellerSkus)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "nextToken", nextToken)); // query parameter
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetInventorySummaries", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetInventorySummariesResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetInventorySummariesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetInventorySummariesResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,926 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Finances
|
||||
*
|
||||
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Finances;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.Finances
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IDefaultApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventGroupsResponse</returns>
|
||||
ListFinancialEventGroupsResponse ListFinancialEventGroups(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventGroupsResponse</returns>
|
||||
ApiResponse<ListFinancialEventGroupsResponse> ListFinancialEventGroupsWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventsResponse</returns>
|
||||
ListFinancialEventsResponse ListFinancialEvents(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventsResponse</returns>
|
||||
ApiResponse<ListFinancialEventsResponse> ListFinancialEventsWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventsResponse</returns>
|
||||
ListFinancialEventsResponse ListFinancialEventsByGroupId(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventsResponse</returns>
|
||||
ApiResponse<ListFinancialEventsResponse> ListFinancialEventsByGroupIdWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventsResponse</returns>
|
||||
ListFinancialEventsResponse ListFinancialEventsByOrderId(string orderId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventsResponse</returns>
|
||||
ApiResponse<ListFinancialEventsResponse> ListFinancialEventsByOrderIdWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventGroupsResponse</returns>
|
||||
System.Threading.Tasks.Task<ListFinancialEventGroupsResponse> ListFinancialEventGroupsAsync(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventGroupsResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<ListFinancialEventGroupsResponse>> ListFinancialEventGroupsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventsResponse</returns>
|
||||
System.Threading.Tasks.Task<ListFinancialEventsResponse> ListFinancialEventsAsync(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventsResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<ListFinancialEventsResponse>> ListFinancialEventsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventsResponse</returns>
|
||||
System.Threading.Tasks.Task<ListFinancialEventsResponse> ListFinancialEventsByGroupIdAsync(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventsResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<ListFinancialEventsResponse>> ListFinancialEventsByGroupIdAsyncWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventsResponse</returns>
|
||||
System.Threading.Tasks.Task<ListFinancialEventsResponse> ListFinancialEventsByOrderIdAsync(string orderId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventsResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<ListFinancialEventsResponse>> ListFinancialEventsByOrderIdAsyncWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DefaultApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public DefaultApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventGroupsResponse</returns>
|
||||
public ListFinancialEventGroupsResponse ListFinancialEventGroups(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventGroupsResponse> localVarResponse = ListFinancialEventGroupsWithHttpInfo(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventGroupsResponse</returns>
|
||||
public ApiResponse<ListFinancialEventGroupsResponse> ListFinancialEventGroupsWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/finances/v0/financialEventGroups";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (financialEventGroupStartedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedBefore", financialEventGroupStartedBefore)); // query parameter
|
||||
if (financialEventGroupStartedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedAfter", financialEventGroupStartedAfter)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEventGroups", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventGroupsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventGroupsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventGroupsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventGroupsResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ListFinancialEventGroupsResponse> ListFinancialEventGroupsAsync(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventGroupsResponse> localVarResponse = await ListFinancialEventGroupsAsyncWithHttpInfo(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial event groups for a given date range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="financialEventGroupStartedBefore">A date used for selecting financial event groups that opened before (but not at) a specified date and time, in ISO 8601 format. The date-time must be later than FinancialEventGroupStartedAfter and no later than two minutes before the request was submitted. If FinancialEventGroupStartedAfter and FinancialEventGroupStartedBefore are more than 180 days apart, no financial event groups are returned. (optional)</param>
|
||||
/// <param name="financialEventGroupStartedAfter">A date used for selecting financial event groups that opened after (or at) a specified date and time, in ISO 8601 format. The date-time must be no later than two minutes before the request was submitted. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventGroupsResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ListFinancialEventGroupsResponse>> ListFinancialEventGroupsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? financialEventGroupStartedBefore = null, DateTime? financialEventGroupStartedAfter = null, string nextToken = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/finances/v0/financialEventGroups";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (financialEventGroupStartedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedBefore", financialEventGroupStartedBefore)); // query parameter
|
||||
if (financialEventGroupStartedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "FinancialEventGroupStartedAfter", financialEventGroupStartedAfter)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEventGroups", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventGroupsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventGroupsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventGroupsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventsResponse</returns>
|
||||
public ListFinancialEventsResponse ListFinancialEvents(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventsResponse> localVarResponse = ListFinancialEventsWithHttpInfo(maxResultsPerPage, postedAfter, postedBefore, nextToken);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventsResponse</returns>
|
||||
public ApiResponse<ListFinancialEventsResponse> ListFinancialEventsWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/finances/v0/financialEvents";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (postedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedAfter", postedAfter)); // query parameter
|
||||
if (postedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedBefore", postedBefore)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEvents", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventsResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ListFinancialEventsResponse> ListFinancialEventsAsync(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventsResponse> localVarResponse = await ListFinancialEventsAsyncWithHttpInfo(maxResultsPerPage, postedAfter, postedBefore, nextToken);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns financial events for the specified data range. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="postedAfter">A date used for selecting financial events posted after (or at) a specified time. The date-time must be no later than two minutes before the request was submitted, in ISO 8601 date time format. (optional)</param>
|
||||
/// <param name="postedBefore">A date used for selecting financial events posted before (but not at) a specified time. The date-time must be later than PostedAfter and no later than two minutes before the request was submitted, in ISO 8601 date time format. If PostedAfter and PostedBefore are more than 180 days apart, no financial events are returned. You must specify the PostedAfter parameter if you specify the PostedBefore parameter. Default: Now minus two minutes. (optional)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventsResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ListFinancialEventsResponse>> ListFinancialEventsAsyncWithHttpInfo(int? maxResultsPerPage = null, DateTime? postedAfter = null, DateTime? postedBefore = null, string nextToken = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/finances/v0/financialEvents";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (postedAfter != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedAfter", postedAfter)); // query parameter
|
||||
if (postedBefore != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "PostedBefore", postedBefore)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEvents", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventsResponse</returns>
|
||||
public ListFinancialEventsResponse ListFinancialEventsByGroupId(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventsResponse> localVarResponse = ListFinancialEventsByGroupIdWithHttpInfo(eventGroupId, maxResultsPerPage, nextToken);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventsResponse</returns>
|
||||
public ApiResponse<ListFinancialEventsResponse> ListFinancialEventsByGroupIdWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
// verify the required parameter 'eventGroupId' is set
|
||||
if (eventGroupId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'eventGroupId' when calling DefaultApi->ListFinancialEventsByGroupId");
|
||||
|
||||
var localVarPath = "/finances/v0/financialEventGroups/{eventGroupId}/financialEvents";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (eventGroupId != null) localVarPathParams.Add("eventGroupId", Configuration.ApiClient.ParameterToString(eventGroupId)); // path parameter
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEventsByGroupId", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventsResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ListFinancialEventsResponse> ListFinancialEventsByGroupIdAsync(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventsResponse> localVarResponse = await ListFinancialEventsByGroupIdAsyncWithHttpInfo(eventGroupId, maxResultsPerPage, nextToken);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified financial event group. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="eventGroupId">The identifier of the financial event group to which the events belong.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventsResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ListFinancialEventsResponse>> ListFinancialEventsByGroupIdAsyncWithHttpInfo(string eventGroupId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
// verify the required parameter 'eventGroupId' is set
|
||||
if (eventGroupId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'eventGroupId' when calling DefaultApi->ListFinancialEventsByGroupId");
|
||||
|
||||
var localVarPath = "/finances/v0/financialEventGroups/{eventGroupId}/financialEvents";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (eventGroupId != null) localVarPathParams.Add("eventGroupId", Configuration.ApiClient.ParameterToString(eventGroupId)); // path parameter
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEventsByGroupId", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ListFinancialEventsResponse</returns>
|
||||
public ListFinancialEventsResponse ListFinancialEventsByOrderId(string orderId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventsResponse> localVarResponse = ListFinancialEventsByOrderIdWithHttpInfo(orderId, maxResultsPerPage, nextToken);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>ApiResponse of ListFinancialEventsResponse</returns>
|
||||
public ApiResponse<ListFinancialEventsResponse> ListFinancialEventsByOrderIdWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'orderId' when calling DefaultApi->ListFinancialEventsByOrderId");
|
||||
|
||||
var localVarPath = "/finances/v0/orders/{orderId}/financialEvents";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEventsByOrderId", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ListFinancialEventsResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ListFinancialEventsResponse> ListFinancialEventsByOrderIdAsync(string orderId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
ApiResponse<ListFinancialEventsResponse> localVarResponse = await ListFinancialEventsByOrderIdAsyncWithHttpInfo(orderId, maxResultsPerPage, nextToken);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all financial events for the specified order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 0.5 | 30 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="orderId">An Amazon-defined order identifier, in 3-7-7 format.</param>
|
||||
/// <param name="maxResultsPerPage">The maximum number of results to return per page. (optional, default to 100)</param>
|
||||
/// <param name="nextToken">A string token returned in the response of your previous request. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (ListFinancialEventsResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<ListFinancialEventsResponse>> ListFinancialEventsByOrderIdAsyncWithHttpInfo(string orderId, int? maxResultsPerPage = null, string nextToken = null)
|
||||
{
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'orderId' when calling DefaultApi->ListFinancialEventsByOrderId");
|
||||
|
||||
var localVarPath = "/finances/v0/orders/{orderId}/financialEvents";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (orderId != null) localVarPathParams.Add("orderId", Configuration.ApiClient.ParameterToString(orderId)); // path parameter
|
||||
if (maxResultsPerPage != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MaxResultsPerPage", maxResultsPerPage)); // query parameter
|
||||
if (nextToken != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "NextToken", nextToken)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("ListFinancialEventsByOrderId", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<ListFinancialEventsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(ListFinancialEventsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(ListFinancialEventsResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,544 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Product Fees
|
||||
*
|
||||
* The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.ProductFees;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.ProductFees
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IFeesApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>GetMyFeesEstimateResponse</returns>
|
||||
GetMyFeesEstimateResponse GetMyFeesEstimateForASIN(GetMyFeesEstimateRequest body, string asin);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>ApiResponse of GetMyFeesEstimateResponse</returns>
|
||||
ApiResponse<GetMyFeesEstimateResponse> GetMyFeesEstimateForASINWithHttpInfo(GetMyFeesEstimateRequest body, string asin);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>GetMyFeesEstimateResponse</returns>
|
||||
GetMyFeesEstimateResponse GetMyFeesEstimateForSKU(GetMyFeesEstimateRequest body, string sellerSKU);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>ApiResponse of GetMyFeesEstimateResponse</returns>
|
||||
ApiResponse<GetMyFeesEstimateResponse> GetMyFeesEstimateForSKUWithHttpInfo(GetMyFeesEstimateRequest body, string sellerSKU);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of GetMyFeesEstimateResponse</returns>
|
||||
System.Threading.Tasks.Task<GetMyFeesEstimateResponse> GetMyFeesEstimateForASINAsync(GetMyFeesEstimateRequest body, string asin);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of ApiResponse (GetMyFeesEstimateResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetMyFeesEstimateResponse>> GetMyFeesEstimateForASINAsyncWithHttpInfo(GetMyFeesEstimateRequest body, string asin);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of GetMyFeesEstimateResponse</returns>
|
||||
System.Threading.Tasks.Task<GetMyFeesEstimateResponse> GetMyFeesEstimateForSKUAsync(GetMyFeesEstimateRequest body, string sellerSKU);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of ApiResponse (GetMyFeesEstimateResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetMyFeesEstimateResponse>> GetMyFeesEstimateForSKUAsyncWithHttpInfo(GetMyFeesEstimateRequest body, string sellerSKU);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class FeesApi : IFeesApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FeesApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public FeesApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FeesApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public FeesApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>GetMyFeesEstimateResponse</returns>
|
||||
public GetMyFeesEstimateResponse GetMyFeesEstimateForASIN(GetMyFeesEstimateRequest body, string asin)
|
||||
{
|
||||
ApiResponse<GetMyFeesEstimateResponse> localVarResponse = GetMyFeesEstimateForASINWithHttpInfo(body, asin);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>ApiResponse of GetMyFeesEstimateResponse</returns>
|
||||
public ApiResponse<GetMyFeesEstimateResponse> GetMyFeesEstimateForASINWithHttpInfo(GetMyFeesEstimateRequest body, string asin)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling FeesApi->GetMyFeesEstimateForASIN");
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling FeesApi->GetMyFeesEstimateForASIN");
|
||||
|
||||
var localVarPath = "/products/fees/v0/items/{Asin}/feesEstimate";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (asin != null) localVarPathParams.Add("Asin", Configuration.ApiClient.ParameterToString(asin)); // path parameter
|
||||
if (body != null && body.GetType() != typeof(byte[]))
|
||||
{
|
||||
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
localVarPostBody = body; // byte array
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetMyFeesEstimateForASIN", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetMyFeesEstimateResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetMyFeesEstimateResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetMyFeesEstimateResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of GetMyFeesEstimateResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetMyFeesEstimateResponse> GetMyFeesEstimateForASINAsync(GetMyFeesEstimateRequest body, string asin)
|
||||
{
|
||||
ApiResponse<GetMyFeesEstimateResponse> localVarResponse = await GetMyFeesEstimateForASINAsyncWithHttpInfo(body, asin);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified Asin in the marketplace specified in the request body. You can call getMyFeesEstimateForASIN for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each product fees request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of ApiResponse (GetMyFeesEstimateResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetMyFeesEstimateResponse>> GetMyFeesEstimateForASINAsyncWithHttpInfo(GetMyFeesEstimateRequest body, string asin)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling FeesApi->GetMyFeesEstimateForASIN");
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling FeesApi->GetMyFeesEstimateForASIN");
|
||||
|
||||
var localVarPath = "/products/fees/v0/items/{Asin}/feesEstimate";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (asin != null) localVarPathParams.Add("Asin", Configuration.ApiClient.ParameterToString(asin)); // path parameter
|
||||
if (body != null && body.GetType() != typeof(byte[]))
|
||||
{
|
||||
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
localVarPostBody = body; // byte array
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetMyFeesEstimateForASIN", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetMyFeesEstimateResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetMyFeesEstimateResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetMyFeesEstimateResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>GetMyFeesEstimateResponse</returns>
|
||||
public GetMyFeesEstimateResponse GetMyFeesEstimateForSKU(GetMyFeesEstimateRequest body, string sellerSKU)
|
||||
{
|
||||
ApiResponse<GetMyFeesEstimateResponse> localVarResponse = GetMyFeesEstimateForSKUWithHttpInfo(body, sellerSKU);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>ApiResponse of GetMyFeesEstimateResponse</returns>
|
||||
public ApiResponse<GetMyFeesEstimateResponse> GetMyFeesEstimateForSKUWithHttpInfo(GetMyFeesEstimateRequest body, string sellerSKU)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling FeesApi->GetMyFeesEstimateForSKU");
|
||||
// verify the required parameter 'sellerSKU' is set
|
||||
if (sellerSKU == null)
|
||||
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling FeesApi->GetMyFeesEstimateForSKU");
|
||||
|
||||
var localVarPath = "/products/fees/v0/listings/{SellerSKU}/feesEstimate";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (sellerSKU != null) localVarPathParams.Add("SellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
|
||||
if (body != null && body.GetType() != typeof(byte[]))
|
||||
{
|
||||
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
localVarPostBody = body; // byte array
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetMyFeesEstimateForSKU", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetMyFeesEstimateResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetMyFeesEstimateResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetMyFeesEstimateResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of GetMyFeesEstimateResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetMyFeesEstimateResponse> GetMyFeesEstimateForSKUAsync(GetMyFeesEstimateRequest body, string sellerSKU)
|
||||
{
|
||||
ApiResponse<GetMyFeesEstimateResponse> localVarResponse = await GetMyFeesEstimateForSKUAsyncWithHttpInfo(body, sellerSKU);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the estimated fees for the item indicated by the specified seller SKU in the marketplace specified in the request body. You can call getMyFeesEstimateForSKU for an item on behalf of a seller before the seller sets the item's price. They can then take estimated fees into account. With each fees estimate request, you must include an original identifier. This identifier is included in the fees estimate so you can correlate a fees estimate with the original request. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sellerSKU">Used to identify an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of ApiResponse (GetMyFeesEstimateResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetMyFeesEstimateResponse>> GetMyFeesEstimateForSKUAsyncWithHttpInfo(GetMyFeesEstimateRequest body, string sellerSKU)
|
||||
{
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null)
|
||||
throw new ApiException(400, "Missing required parameter 'body' when calling FeesApi->GetMyFeesEstimateForSKU");
|
||||
// verify the required parameter 'sellerSKU' is set
|
||||
if (sellerSKU == null)
|
||||
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling FeesApi->GetMyFeesEstimateForSKU");
|
||||
|
||||
var localVarPath = "/products/fees/v0/listings/{SellerSKU}/feesEstimate";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (sellerSKU != null) localVarPathParams.Add("SellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
|
||||
if (body != null && body.GetType() != typeof(byte[]))
|
||||
{
|
||||
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
|
||||
}
|
||||
else
|
||||
{
|
||||
localVarPostBody = body; // byte array
|
||||
}
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetMyFeesEstimateForSKU", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetMyFeesEstimateResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetMyFeesEstimateResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetMyFeesEstimateResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,984 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Pricing
|
||||
*
|
||||
* The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.ProductPricing;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.ProductPricing
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IProductPricingApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>GetPricingResponse</returns>
|
||||
GetPricingResponse GetCompetitivePricing(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>ApiResponse of GetPricingResponse</returns>
|
||||
ApiResponse<GetPricingResponse> GetCompetitivePricingWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>GetOffersResponse</returns>
|
||||
GetOffersResponse GetItemOffers(string marketplaceId, string itemCondition, string asin);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>ApiResponse of GetOffersResponse</returns>
|
||||
ApiResponse<GetOffersResponse> GetItemOffersWithHttpInfo(string marketplaceId, string itemCondition, string asin);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>GetOffersResponse</returns>
|
||||
GetOffersResponse GetListingOffers(string marketplaceId, string itemCondition, string sellerSKU);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>ApiResponse of GetOffersResponse</returns>
|
||||
ApiResponse<GetOffersResponse> GetListingOffersWithHttpInfo(string marketplaceId, string itemCondition, string sellerSKU);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>GetPricingResponse</returns>
|
||||
GetPricingResponse GetPricing(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>ApiResponse of GetPricingResponse</returns>
|
||||
ApiResponse<GetPricingResponse> GetPricingWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>Task of GetPricingResponse</returns>
|
||||
System.Threading.Tasks.Task<GetPricingResponse> GetCompetitivePricingAsync(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetPricingResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetPricingResponse>> GetCompetitivePricingAsyncWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of GetOffersResponse</returns>
|
||||
System.Threading.Tasks.Task<GetOffersResponse> GetItemOffersAsync(string marketplaceId, string itemCondition, string asin);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of ApiResponse (GetOffersResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetOffersResponse>> GetItemOffersAsyncWithHttpInfo(string marketplaceId, string itemCondition, string asin);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of GetOffersResponse</returns>
|
||||
System.Threading.Tasks.Task<GetOffersResponse> GetListingOffersAsync(string marketplaceId, string itemCondition, string sellerSKU);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of ApiResponse (GetOffersResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetOffersResponse>> GetListingOffersAsyncWithHttpInfo(string marketplaceId, string itemCondition, string sellerSKU);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>Task of GetPricingResponse</returns>
|
||||
System.Threading.Tasks.Task<GetPricingResponse> GetPricingAsync(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetPricingResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetPricingResponse>> GetPricingAsyncWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class ProductPricingApi : IProductPricingApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ProductPricingApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ProductPricingApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ProductPricingApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public ProductPricingApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>GetPricingResponse</returns>
|
||||
public GetPricingResponse GetCompetitivePricing(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null)
|
||||
{
|
||||
ApiResponse<GetPricingResponse> localVarResponse = GetCompetitivePricingWithHttpInfo(marketplaceId, itemType, asins, skus);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>ApiResponse of GetPricingResponse</returns>
|
||||
public ApiResponse<GetPricingResponse> GetCompetitivePricingWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetCompetitivePricing");
|
||||
// verify the required parameter 'itemType' is set
|
||||
if (itemType == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemType' when calling ProductPricingApi->GetCompetitivePricing");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/competitivePrice";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (asins != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Asins", asins)); // query parameter
|
||||
if (skus != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Skus", skus)); // query parameter
|
||||
if (itemType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemType", itemType)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetCompetitivePricing", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetPricingResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetPricingResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPricingResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>Task of GetPricingResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetPricingResponse> GetCompetitivePricingAsync(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null)
|
||||
{
|
||||
ApiResponse<GetPricingResponse> localVarResponse = await GetCompetitivePricingAsyncWithHttpInfo(marketplaceId, itemType, asins, skus);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns competitive pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter. Possible values: Asin, Sku.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetPricingResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetPricingResponse>> GetCompetitivePricingAsyncWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetCompetitivePricing");
|
||||
// verify the required parameter 'itemType' is set
|
||||
if (itemType == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemType' when calling ProductPricingApi->GetCompetitivePricing");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/competitivePrice";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (asins != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Asins", asins)); // query parameter
|
||||
if (skus != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Skus", skus)); // query parameter
|
||||
if (itemType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemType", itemType)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetCompetitivePricing", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetPricingResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetPricingResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPricingResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>GetOffersResponse</returns>
|
||||
public GetOffersResponse GetItemOffers(string marketplaceId, string itemCondition, string asin)
|
||||
{
|
||||
ApiResponse<GetOffersResponse> localVarResponse = GetItemOffersWithHttpInfo(marketplaceId, itemCondition, asin);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>ApiResponse of GetOffersResponse</returns>
|
||||
public ApiResponse<GetOffersResponse> GetItemOffersWithHttpInfo(string marketplaceId, string itemCondition, string asin)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetItemOffers");
|
||||
// verify the required parameter 'itemCondition' is set
|
||||
if (itemCondition == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemCondition' when calling ProductPricingApi->GetItemOffers");
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling ProductPricingApi->GetItemOffers");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/items/{Asin}/offers";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (asin != null) localVarPathParams.Add("Asin", Configuration.ApiClient.ParameterToString(asin)); // path parameter
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (itemCondition != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemCondition", itemCondition)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetItemOffers", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetOffersResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetOffersResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetOffersResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of GetOffersResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetOffersResponse> GetItemOffersAsync(string marketplaceId, string itemCondition, string asin)
|
||||
{
|
||||
ApiResponse<GetOffersResponse> localVarResponse = await GetItemOffersAsyncWithHttpInfo(marketplaceId, itemCondition, asin);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single item based on ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings to be considered based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="asin">The Amazon Standard Identification Number (ASIN) of the item.</param>
|
||||
/// <returns>Task of ApiResponse (GetOffersResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetOffersResponse>> GetItemOffersAsyncWithHttpInfo(string marketplaceId, string itemCondition, string asin)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetItemOffers");
|
||||
// verify the required parameter 'itemCondition' is set
|
||||
if (itemCondition == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemCondition' when calling ProductPricingApi->GetItemOffers");
|
||||
// verify the required parameter 'asin' is set
|
||||
if (asin == null)
|
||||
throw new ApiException(400, "Missing required parameter 'asin' when calling ProductPricingApi->GetItemOffers");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/items/{Asin}/offers";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (asin != null) localVarPathParams.Add("Asin", Configuration.ApiClient.ParameterToString(asin)); // path parameter
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (itemCondition != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemCondition", itemCondition)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetItemOffers", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetOffersResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetOffersResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetOffersResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>GetOffersResponse</returns>
|
||||
public GetOffersResponse GetListingOffers(string marketplaceId, string itemCondition, string sellerSKU)
|
||||
{
|
||||
ApiResponse<GetOffersResponse> localVarResponse = GetListingOffersWithHttpInfo(marketplaceId, itemCondition, sellerSKU);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>ApiResponse of GetOffersResponse</returns>
|
||||
public ApiResponse<GetOffersResponse> GetListingOffersWithHttpInfo(string marketplaceId, string itemCondition, string sellerSKU)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetListingOffers");
|
||||
// verify the required parameter 'itemCondition' is set
|
||||
if (itemCondition == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemCondition' when calling ProductPricingApi->GetListingOffers");
|
||||
// verify the required parameter 'sellerSKU' is set
|
||||
if (sellerSKU == null)
|
||||
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling ProductPricingApi->GetListingOffers");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/listings/{SellerSKU}/offers";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (sellerSKU != null) localVarPathParams.Add("SellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (itemCondition != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemCondition", itemCondition)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetListingOffers", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetOffersResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetOffersResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetOffersResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of GetOffersResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetOffersResponse> GetListingOffersAsync(string marketplaceId, string itemCondition, string sellerSKU)
|
||||
{
|
||||
ApiResponse<GetOffersResponse> localVarResponse = await GetListingOffersAsyncWithHttpInfo(marketplaceId, itemCondition, sellerSKU);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the lowest priced offers for a single SKU listing. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club.</param>
|
||||
/// <param name="sellerSKU">Identifies an item in the given marketplace. SellerSKU is qualified by the seller's SellerId, which is included with every operation that you submit.</param>
|
||||
/// <returns>Task of ApiResponse (GetOffersResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetOffersResponse>> GetListingOffersAsyncWithHttpInfo(string marketplaceId, string itemCondition, string sellerSKU)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetListingOffers");
|
||||
// verify the required parameter 'itemCondition' is set
|
||||
if (itemCondition == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemCondition' when calling ProductPricingApi->GetListingOffers");
|
||||
// verify the required parameter 'sellerSKU' is set
|
||||
if (sellerSKU == null)
|
||||
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling ProductPricingApi->GetListingOffers");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/listings/{SellerSKU}/offers";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (sellerSKU != null) localVarPathParams.Add("SellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (itemCondition != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemCondition", itemCondition)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetListingOffers", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetOffersResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetOffersResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetOffersResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>GetPricingResponse</returns>
|
||||
public GetPricingResponse GetPricing(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null)
|
||||
{
|
||||
ApiResponse<GetPricingResponse> localVarResponse = GetPricingWithHttpInfo(marketplaceId, itemType, asins, skus, itemCondition);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>ApiResponse of GetPricingResponse</returns>
|
||||
public ApiResponse<GetPricingResponse> GetPricingWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetPricing");
|
||||
// verify the required parameter 'itemType' is set
|
||||
if (itemType == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemType' when calling ProductPricingApi->GetPricing");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/price";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (asins != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Asins", asins)); // query parameter
|
||||
if (skus != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Skus", skus)); // query parameter
|
||||
if (itemType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemType", itemType)); // query parameter
|
||||
if (itemCondition != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemCondition", itemCondition)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetPricing", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetPricingResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetPricingResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPricingResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>Task of GetPricingResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetPricingResponse> GetPricingAsync(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null)
|
||||
{
|
||||
ApiResponse<GetPricingResponse> localVarResponse = await GetPricingAsyncWithHttpInfo(marketplaceId, itemType, asins, skus, itemCondition);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pricing information for a seller's offer listings based on seller SKU or ASIN. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceId">A marketplace identifier. Specifies the marketplace for which prices are returned.</param>
|
||||
/// <param name="itemType">Indicates whether ASIN values or seller SKU values are used to identify items. If you specify Asin, the information in the response will be dependent on the list of Asins you provide in the Asins parameter. If you specify Sku, the information in the response will be dependent on the list of Skus you provide in the Skus parameter.</param>
|
||||
/// <param name="asins">A list of up to twenty Amazon Standard Identification Number (ASIN) values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="skus">A list of up to twenty seller SKU values used to identify items in the given marketplace. (optional)</param>
|
||||
/// <param name="itemCondition">Filters the offer listings based on item condition. Possible values: New, Used, Collectible, Refurbished, Club. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetPricingResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetPricingResponse>> GetPricingAsyncWithHttpInfo(string marketplaceId, string itemType, List<string> asins = null, List<string> skus = null, string itemCondition = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceId' is set
|
||||
if (marketplaceId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceId' when calling ProductPricingApi->GetPricing");
|
||||
// verify the required parameter 'itemType' is set
|
||||
if (itemType == null)
|
||||
throw new ApiException(400, "Missing required parameter 'itemType' when calling ProductPricingApi->GetPricing");
|
||||
|
||||
var localVarPath = "/products/pricing/v0/price";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceId != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "MarketplaceId", marketplaceId)); // query parameter
|
||||
if (asins != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Asins", asins)); // query parameter
|
||||
if (skus != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "Skus", skus)); // query parameter
|
||||
if (itemType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemType", itemType)); // query parameter
|
||||
if (itemCondition != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "ItemCondition", itemCondition)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetPricing", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetPricingResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetPricingResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetPricingResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,399 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Sales
|
||||
*
|
||||
* The Selling Partner API for Sales provides APIs related to sales performance.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Sales;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.Sales
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface ISalesApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>GetOrderMetricsResponse</returns>
|
||||
GetOrderMetricsResponse GetOrderMetrics(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>ApiResponse of GetOrderMetricsResponse</returns>
|
||||
ApiResponse<GetOrderMetricsResponse> GetOrderMetricsWithHttpInfo(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>Task of GetOrderMetricsResponse</returns>
|
||||
System.Threading.Tasks.Task<GetOrderMetricsResponse> GetOrderMetricsAsync(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetOrderMetricsResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetOrderMetricsResponse>> GetOrderMetricsAsyncWithHttpInfo(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class SalesApi : ISalesApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SalesApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public SalesApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SalesApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public SalesApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>GetOrderMetricsResponse</returns>
|
||||
public GetOrderMetricsResponse GetOrderMetrics(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null)
|
||||
{
|
||||
ApiResponse<GetOrderMetricsResponse> localVarResponse = GetOrderMetricsWithHttpInfo(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>ApiResponse of GetOrderMetricsResponse</returns>
|
||||
public ApiResponse<GetOrderMetricsResponse> GetOrderMetricsWithHttpInfo(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SalesApi->GetOrderMetrics");
|
||||
// verify the required parameter 'interval' is set
|
||||
if (interval == null)
|
||||
throw new ApiException(400, "Missing required parameter 'interval' when calling SalesApi->GetOrderMetrics");
|
||||
// verify the required parameter 'granularity' is set
|
||||
if (granularity == null)
|
||||
throw new ApiException(400, "Missing required parameter 'granularity' when calling SalesApi->GetOrderMetrics");
|
||||
|
||||
var localVarPath = "/sales/v1/orderMetrics";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
if (interval != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "interval", interval)); // query parameter
|
||||
if (granularityTimeZone != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularityTimeZone", granularityTimeZone)); // query parameter
|
||||
if (granularity != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularity", granularity)); // query parameter
|
||||
if (buyerType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "buyerType", buyerType)); // query parameter
|
||||
if (fulfillmentNetwork != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "fulfillmentNetwork", fulfillmentNetwork)); // query parameter
|
||||
if (firstDayOfWeek != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "firstDayOfWeek", firstDayOfWeek)); // query parameter
|
||||
if (asin != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "asin", asin)); // query parameter
|
||||
if (sku != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "sku", sku)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetOrderMetrics", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetOrderMetricsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetOrderMetricsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetOrderMetricsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>Task of GetOrderMetricsResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetOrderMetricsResponse> GetOrderMetricsAsync(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null)
|
||||
{
|
||||
ApiResponse<GetOrderMetricsResponse> localVarResponse = await GetOrderMetricsAsyncWithHttpInfo(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="marketplaceIds">A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace.</param>
|
||||
/// <param name="interval">A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00- -2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone.</param>
|
||||
/// <param name="granularity">The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone.</param>
|
||||
/// <param name="granularityTimeZone">An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)</param>
|
||||
/// <param name="buyerType">Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)</param>
|
||||
/// <param name="fulfillmentNetwork">Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)</param>
|
||||
/// <param name="firstDayOfWeek">Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)</param>
|
||||
/// <param name="asin">Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)</param>
|
||||
/// <param name="sku">Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)</param>
|
||||
/// <returns>Task of ApiResponse (GetOrderMetricsResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetOrderMetricsResponse>> GetOrderMetricsAsyncWithHttpInfo(List<string> marketplaceIds, string interval, string granularity, string granularityTimeZone = null, string buyerType = null, string fulfillmentNetwork = null, string firstDayOfWeek = null, string asin = null, string sku = null)
|
||||
{
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SalesApi->GetOrderMetrics");
|
||||
// verify the required parameter 'interval' is set
|
||||
if (interval == null)
|
||||
throw new ApiException(400, "Missing required parameter 'interval' when calling SalesApi->GetOrderMetrics");
|
||||
// verify the required parameter 'granularity' is set
|
||||
if (granularity == null)
|
||||
throw new ApiException(400, "Missing required parameter 'granularity' when calling SalesApi->GetOrderMetrics");
|
||||
|
||||
var localVarPath = "/sales/v1/orderMetrics";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
if (interval != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "interval", interval)); // query parameter
|
||||
if (granularityTimeZone != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularityTimeZone", granularityTimeZone)); // query parameter
|
||||
if (granularity != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "granularity", granularity)); // query parameter
|
||||
if (buyerType != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "buyerType", buyerType)); // query parameter
|
||||
if (fulfillmentNetwork != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "fulfillmentNetwork", fulfillmentNetwork)); // query parameter
|
||||
if (firstDayOfWeek != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "firstDayOfWeek", firstDayOfWeek)); // query parameter
|
||||
if (asin != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "asin", asin)); // query parameter
|
||||
if (sku != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("", "sku", sku)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetOrderMetrics", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetOrderMetricsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetOrderMetricsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetOrderMetricsResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,291 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Sellers
|
||||
*
|
||||
* The Selling Partner API for Sellers lets you retrieve information on behalf of sellers about their seller account, such as the marketplaces they participate in. Along with listing the marketplaces that a seller can sell in, the API also provides additional information about the marketplace such as the default language and the default currency. The API also provides seller-specific information such as whether the seller has suspended listings in that marketplace.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Sellers;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.Sellers
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface ISellersApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>GetMarketplaceParticipationsResponse</returns>
|
||||
GetMarketplaceParticipationsResponse GetMarketplaceParticipations();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of GetMarketplaceParticipationsResponse</returns>
|
||||
ApiResponse<GetMarketplaceParticipationsResponse> GetMarketplaceParticipationsWithHttpInfo();
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of GetMarketplaceParticipationsResponse</returns>
|
||||
System.Threading.Tasks.Task<GetMarketplaceParticipationsResponse> GetMarketplaceParticipationsAsync();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (GetMarketplaceParticipationsResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetMarketplaceParticipationsResponse>> GetMarketplaceParticipationsAsyncWithHttpInfo();
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class SellersApi : ISellersApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SellersApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public SellersApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SellersApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public SellersApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>GetMarketplaceParticipationsResponse</returns>
|
||||
public GetMarketplaceParticipationsResponse GetMarketplaceParticipations()
|
||||
{
|
||||
ApiResponse<GetMarketplaceParticipationsResponse> localVarResponse = GetMarketplaceParticipationsWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of GetMarketplaceParticipationsResponse</returns>
|
||||
public ApiResponse<GetMarketplaceParticipationsResponse> GetMarketplaceParticipationsWithHttpInfo()
|
||||
{
|
||||
|
||||
var localVarPath = "/sellers/v1/marketplaceParticipations";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetMarketplaceParticipations", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetMarketplaceParticipationsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetMarketplaceParticipationsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetMarketplaceParticipationsResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of GetMarketplaceParticipationsResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetMarketplaceParticipationsResponse> GetMarketplaceParticipationsAsync()
|
||||
{
|
||||
ApiResponse<GetMarketplaceParticipationsResponse> localVarResponse = await GetMarketplaceParticipationsAsyncWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of marketplaces that the seller submitting the request can sell in and information about the seller's participation in those marketplaces. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | .016 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (GetMarketplaceParticipationsResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetMarketplaceParticipationsResponse>> GetMarketplaceParticipationsAsyncWithHttpInfo()
|
||||
{
|
||||
|
||||
var localVarPath = "/sellers/v1/marketplaceParticipations";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetMarketplaceParticipations", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetMarketplaceParticipationsResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetMarketplaceParticipationsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetMarketplaceParticipationsResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,516 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Solicitations
|
||||
*
|
||||
* With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient's Message Center. The Solicitations API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
|
||||
using FikaAmazonAPI.AmazonSpApiSDK.Models.Solicitations;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.Solicitations
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface ISolicitationsApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
|
||||
CreateProductReviewAndSellerFeedbackSolicitationResponse CreateProductReviewAndSellerFeedbackSolicitation(string amazonOrderId, List<string> marketplaceIds);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>ApiResponse of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
|
||||
ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse> CreateProductReviewAndSellerFeedbackSolicitationWithHttpInfo(string amazonOrderId, List<string> marketplaceIds);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>GetSolicitationActionsForOrderResponse</returns>
|
||||
GetSolicitationActionsForOrderResponse GetSolicitationActionsForOrder(string amazonOrderId, List<string> marketplaceIds);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>ApiResponse of GetSolicitationActionsForOrderResponse</returns>
|
||||
ApiResponse<GetSolicitationActionsForOrderResponse> GetSolicitationActionsForOrderWithHttpInfo(string amazonOrderId, List<string> marketplaceIds);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
|
||||
System.Threading.Tasks.Task<CreateProductReviewAndSellerFeedbackSolicitationResponse> CreateProductReviewAndSellerFeedbackSolicitationAsync(string amazonOrderId, List<string> marketplaceIds);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of ApiResponse (CreateProductReviewAndSellerFeedbackSolicitationResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>> CreateProductReviewAndSellerFeedbackSolicitationAsyncWithHttpInfo(string amazonOrderId, List<string> marketplaceIds);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of GetSolicitationActionsForOrderResponse</returns>
|
||||
System.Threading.Tasks.Task<GetSolicitationActionsForOrderResponse> GetSolicitationActionsForOrderAsync(string amazonOrderId, List<string> marketplaceIds);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of ApiResponse (GetSolicitationActionsForOrderResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<GetSolicitationActionsForOrderResponse>> GetSolicitationActionsForOrderAsyncWithHttpInfo(string amazonOrderId, List<string> marketplaceIds);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class SolicitationsApi : ISolicitationsApi
|
||||
{
|
||||
private ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SolicitationsApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public SolicitationsApi(string basePath)
|
||||
{
|
||||
Configuration = new Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SolicitationsApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public SolicitationsApi(Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
Configuration = Configuration.Default;
|
||||
else
|
||||
Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public string GetBasePath()
|
||||
{
|
||||
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(string basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<string, string> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
|
||||
public CreateProductReviewAndSellerFeedbackSolicitationResponse CreateProductReviewAndSellerFeedbackSolicitation(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse> localVarResponse = CreateProductReviewAndSellerFeedbackSolicitationWithHttpInfo(amazonOrderId, marketplaceIds);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>ApiResponse of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
|
||||
public ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse> CreateProductReviewAndSellerFeedbackSolicitationWithHttpInfo(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
// verify the required parameter 'amazonOrderId' is set
|
||||
if (amazonOrderId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");
|
||||
|
||||
var localVarPath = "/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/hal+json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("CreateProductReviewAndSellerFeedbackSolicitation", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(CreateProductReviewAndSellerFeedbackSolicitationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateProductReviewAndSellerFeedbackSolicitationResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of CreateProductReviewAndSellerFeedbackSolicitationResponse</returns>
|
||||
public async System.Threading.Tasks.Task<CreateProductReviewAndSellerFeedbackSolicitationResponse> CreateProductReviewAndSellerFeedbackSolicitationAsync(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse> localVarResponse = await CreateProductReviewAndSellerFeedbackSolicitationAsyncWithHttpInfo(amazonOrderId, marketplaceIds);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which a solicitation is sent.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of ApiResponse (CreateProductReviewAndSellerFeedbackSolicitationResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>> CreateProductReviewAndSellerFeedbackSolicitationAsyncWithHttpInfo(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
// verify the required parameter 'amazonOrderId' is set
|
||||
if (amazonOrderId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->CreateProductReviewAndSellerFeedbackSolicitation");
|
||||
|
||||
var localVarPath = "/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/hal+json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("CreateProductReviewAndSellerFeedbackSolicitation", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<CreateProductReviewAndSellerFeedbackSolicitationResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(CreateProductReviewAndSellerFeedbackSolicitationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateProductReviewAndSellerFeedbackSolicitationResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>GetSolicitationActionsForOrderResponse</returns>
|
||||
public GetSolicitationActionsForOrderResponse GetSolicitationActionsForOrder(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
ApiResponse<GetSolicitationActionsForOrderResponse> localVarResponse = GetSolicitationActionsForOrderWithHttpInfo(amazonOrderId, marketplaceIds);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>ApiResponse of GetSolicitationActionsForOrderResponse</returns>
|
||||
public ApiResponse<GetSolicitationActionsForOrderResponse> GetSolicitationActionsForOrderWithHttpInfo(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
// verify the required parameter 'amazonOrderId' is set
|
||||
if (amazonOrderId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->GetSolicitationActionsForOrder");
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->GetSolicitationActionsForOrder");
|
||||
|
||||
var localVarPath = "/solicitations/v1/orders/{amazonOrderId}";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/hal+json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetSolicitationActionsForOrder", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetSolicitationActionsForOrderResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetSolicitationActionsForOrderResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSolicitationActionsForOrderResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of GetSolicitationActionsForOrderResponse</returns>
|
||||
public async System.Threading.Tasks.Task<GetSolicitationActionsForOrderResponse> GetSolicitationActionsForOrderAsync(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
ApiResponse<GetSolicitationActionsForOrderResponse> localVarResponse = await GetSolicitationActionsForOrderAsyncWithHttpInfo(amazonOrderId, marketplaceIds);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="amazonOrderId">An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.</param>
|
||||
/// <param name="marketplaceIds">A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.</param>
|
||||
/// <returns>Task of ApiResponse (GetSolicitationActionsForOrderResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<GetSolicitationActionsForOrderResponse>> GetSolicitationActionsForOrderAsyncWithHttpInfo(string amazonOrderId, List<string> marketplaceIds)
|
||||
{
|
||||
// verify the required parameter 'amazonOrderId' is set
|
||||
if (amazonOrderId == null)
|
||||
throw new ApiException(400, "Missing required parameter 'amazonOrderId' when calling SolicitationsApi->GetSolicitationActionsForOrder");
|
||||
// verify the required parameter 'marketplaceIds' is set
|
||||
if (marketplaceIds == null)
|
||||
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SolicitationsApi->GetSolicitationActionsForOrder");
|
||||
|
||||
var localVarPath = "/solicitations/v1/orders/{amazonOrderId}";
|
||||
var localVarPathParams = new Dictionary<string, string>();
|
||||
var localVarQueryParams = new List<KeyValuePair<string, string>>();
|
||||
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<string, string>();
|
||||
var localVarFileParams = new Dictionary<string, FileParameter>();
|
||||
object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
string[] localVarHttpContentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
string[] localVarHttpHeaderAccepts = new string[] {
|
||||
"application/hal+json"
|
||||
};
|
||||
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
if (amazonOrderId != null) localVarPathParams.Add("amazonOrderId", Configuration.ApiClient.ParameterToString(amazonOrderId)); // path parameter
|
||||
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int)localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("GetSolicitationActionsForOrder", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<GetSolicitationActionsForOrderResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(GetSolicitationActionsForOrderResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSolicitationActionsForOrderResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,542 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// API client is mainly responsible for making the HTTP call to the API backend.
|
||||
/// </summary>
|
||||
public partial class ApiClient
|
||||
{
|
||||
private JsonSerializerSettings serializerSettings = new JsonSerializerSettings
|
||||
{
|
||||
ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Allows for extending request processing for <see cref="ApiClient"/> generated code.
|
||||
/// </summary>
|
||||
/// <param name="request">The RestSharp request object</param>
|
||||
partial void InterceptRequest(IRestRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Allows for extending response processing for <see cref="ApiClient"/> generated code.
|
||||
/// </summary>
|
||||
/// <param name="request">The RestSharp request object</param>
|
||||
/// <param name="response">The RestSharp response object</param>
|
||||
partial void InterceptResponse(IRestRequest request, IRestResponse response);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default configuration.
|
||||
/// </summary>
|
||||
public ApiClient()
|
||||
{
|
||||
Configuration = Clients.Configuration.Default;
|
||||
RestClient = new RestClient("https://sellingpartnerapi-na.amazon.com");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default base path (https://sellingpartnerapi-na.amazon.com).
|
||||
/// </summary>
|
||||
/// <param name="config">An instance of Configuration.</param>
|
||||
public ApiClient(Configuration config)
|
||||
{
|
||||
Configuration = config ?? Clients.Configuration.Default;
|
||||
|
||||
RestClient = new RestClient(Configuration.BasePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiClient" /> class
|
||||
/// with default configuration.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path.</param>
|
||||
public ApiClient(String basePath = "https://sellingpartnerapi-na.amazon.com")
|
||||
{
|
||||
if (String.IsNullOrEmpty(basePath))
|
||||
throw new ArgumentException("basePath cannot be empty");
|
||||
|
||||
RestClient = new RestClient(basePath);
|
||||
Configuration = Clients.Configuration.Default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default API client for making HTTP calls.
|
||||
/// </summary>
|
||||
/// <value>The default API client.</value>
|
||||
[Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")]
|
||||
public static ApiClient Default;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an instance of the IReadableConfiguration.
|
||||
/// </summary>
|
||||
/// <value>An instance of the IReadableConfiguration.</value>
|
||||
/// <remarks>
|
||||
/// <see cref="IReadableConfiguration"/> helps us to avoid modifying possibly global
|
||||
/// configuration values from within a given client. It does not guarantee thread-safety
|
||||
/// of the <see cref="Configuration"/> instance in any way.
|
||||
/// </remarks>
|
||||
public IReadableConfiguration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the RestClient.
|
||||
/// </summary>
|
||||
/// <value>An instance of the RestClient</value>
|
||||
public RestClient RestClient { get; set; }
|
||||
|
||||
// Creates and sets up a RestRequest prior to a call.
|
||||
private RestRequest PrepareRequest(
|
||||
String path, RestSharp.Method method, List<KeyValuePair<String, String>> queryParams, Object postBody,
|
||||
Dictionary<String, String> headerParams, Dictionary<String, String> formParams,
|
||||
Dictionary<String, FileParameter> fileParams, Dictionary<String, String> pathParams,
|
||||
String contentType)
|
||||
{
|
||||
var request = new RestRequest(path, method);
|
||||
|
||||
// add path parameter, if any
|
||||
foreach (var param in pathParams)
|
||||
request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment);
|
||||
|
||||
// add header parameter, if any
|
||||
foreach (var param in headerParams)
|
||||
request.AddHeader(param.Key, param.Value);
|
||||
|
||||
// add query parameter, if any
|
||||
foreach (var param in queryParams)
|
||||
request.AddQueryParameter(param.Key, param.Value);
|
||||
|
||||
// add form parameter, if any
|
||||
foreach (var param in formParams)
|
||||
request.AddParameter(param.Key, param.Value);
|
||||
|
||||
// add file parameter, if any
|
||||
foreach (var param in fileParams)
|
||||
{
|
||||
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentLength, param.Value.ContentType);
|
||||
|
||||
}
|
||||
|
||||
if (postBody != null) // http body (model or byte[]) parameter
|
||||
{
|
||||
request.AddParameter(contentType, postBody, ParameterType.RequestBody);
|
||||
}
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
public static byte[] ReadFully(Stream input)
|
||||
{
|
||||
byte[] buffer = new byte[16 * 1024];
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
int read;
|
||||
while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
ms.Write(buffer, 0, read);
|
||||
}
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Makes the HTTP request (Sync).
|
||||
/// </summary>
|
||||
/// <param name="path">URL path.</param>
|
||||
/// <param name="method">HTTP method.</param>
|
||||
/// <param name="queryParams">Query parameters.</param>
|
||||
/// <param name="postBody">HTTP body (POST request).</param>
|
||||
/// <param name="headerParams">Header parameters.</param>
|
||||
/// <param name="formParams">Form parameters.</param>
|
||||
/// <param name="fileParams">File parameters.</param>
|
||||
/// <param name="pathParams">Path parameters.</param>
|
||||
/// <param name="contentType">Content Type of the request</param>
|
||||
/// <returns>Object</returns>
|
||||
public Object CallApi(
|
||||
String path, RestSharp.Method method, List<KeyValuePair<String, String>> queryParams, Object postBody,
|
||||
Dictionary<String, String> headerParams, Dictionary<String, String> formParams,
|
||||
Dictionary<String, FileParameter> fileParams, Dictionary<String, String> pathParams,
|
||||
String contentType)
|
||||
{
|
||||
var request = PrepareRequest(
|
||||
path, method, queryParams, postBody, headerParams, formParams, fileParams,
|
||||
pathParams, contentType);
|
||||
|
||||
// set timeout
|
||||
|
||||
RestClient.Timeout = Configuration.Timeout;
|
||||
// set user agent
|
||||
RestClient.UserAgent = Configuration.UserAgent;
|
||||
|
||||
InterceptRequest(request);
|
||||
var response = RestClient.Execute(request);
|
||||
InterceptResponse(request, response);
|
||||
|
||||
return (Object)response;
|
||||
}
|
||||
/// <summary>
|
||||
/// Makes the asynchronous HTTP request.
|
||||
/// </summary>
|
||||
/// <param name="path">URL path.</param>
|
||||
/// <param name="method">HTTP method.</param>
|
||||
/// <param name="queryParams">Query parameters.</param>
|
||||
/// <param name="postBody">HTTP body (POST request).</param>
|
||||
/// <param name="headerParams">Header parameters.</param>
|
||||
/// <param name="formParams">Form parameters.</param>
|
||||
/// <param name="fileParams">File parameters.</param>
|
||||
/// <param name="pathParams">Path parameters.</param>
|
||||
/// <param name="contentType">Content type.</param>
|
||||
/// <returns>The Task instance.</returns>
|
||||
public async System.Threading.Tasks.Task<Object> CallApiAsync(
|
||||
String path, RestSharp.Method method, List<KeyValuePair<String, String>> queryParams, Object postBody,
|
||||
Dictionary<String, String> headerParams, Dictionary<String, String> formParams,
|
||||
Dictionary<String, FileParameter> fileParams, Dictionary<String, String> pathParams,
|
||||
String contentType)
|
||||
{
|
||||
var request = PrepareRequest(
|
||||
path, method, queryParams, postBody, headerParams, formParams, fileParams,
|
||||
pathParams, contentType);
|
||||
InterceptRequest(request);
|
||||
var response = await RestClient.ExecuteTaskAsync(request);
|
||||
InterceptResponse(request, response);
|
||||
return (Object)response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Escape string (url-encoded).
|
||||
/// </summary>
|
||||
/// <param name="str">String to be escaped.</param>
|
||||
/// <returns>Escaped string.</returns>
|
||||
public string EscapeString(string str)
|
||||
{
|
||||
return UrlEncode(str);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create FileParameter based on Stream.
|
||||
/// </summary>
|
||||
/// <param name="name">Parameter name.</param>
|
||||
/// <param name="stream">Input stream.</param>
|
||||
/// <returns>FileParameter.</returns>
|
||||
public FileParameter ParameterToFile(string name, Stream stream)
|
||||
{
|
||||
if (stream is FileStream)
|
||||
return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name));
|
||||
else
|
||||
return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime.
|
||||
/// If parameter is a list, join the list with ",".
|
||||
/// Otherwise just return the string.
|
||||
/// </summary>
|
||||
/// <param name="obj">The parameter (header, path, query, form).</param>
|
||||
/// <returns>Formatted string.</returns>
|
||||
public string ParameterToString(object obj)
|
||||
{
|
||||
if (obj is DateTime)
|
||||
// Return a formatted date string - Can be customized with Configuration.DateTimeFormat
|
||||
// Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
|
||||
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
|
||||
// For example: 2009-06-15T13:45:30.0000000
|
||||
return ((DateTime)obj).ToString(Configuration.DateTimeFormat);
|
||||
else if (obj is DateTimeOffset)
|
||||
// Return a formatted date string - Can be customized with Configuration.DateTimeFormat
|
||||
// Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
|
||||
// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
|
||||
// For example: 2009-06-15T13:45:30.0000000
|
||||
return ((DateTimeOffset)obj).ToString(Configuration.DateTimeFormat);
|
||||
else if (obj is IList)
|
||||
{
|
||||
var flattenedString = new StringBuilder();
|
||||
foreach (var param in (IList)obj)
|
||||
{
|
||||
if (flattenedString.Length > 0)
|
||||
flattenedString.Append(",");
|
||||
flattenedString.Append(param);
|
||||
}
|
||||
return flattenedString.ToString();
|
||||
}
|
||||
else
|
||||
return Convert.ToString(obj);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deserialize the JSON string into a proper object.
|
||||
/// </summary>
|
||||
/// <param name="response">The HTTP response.</param>
|
||||
/// <param name="type">Object type.</param>
|
||||
/// <returns>Object representation of the JSON string.</returns>
|
||||
public object Deserialize(IRestResponse response, Type type)
|
||||
{
|
||||
IList<RestSharp.Parameter> headers = response.Headers;
|
||||
if (type == typeof(byte[])) // return byte array
|
||||
{
|
||||
return response.RawBytes;
|
||||
}
|
||||
|
||||
// TODO: ? if (type.IsAssignableFrom(typeof(Stream)))
|
||||
if (type == typeof(Stream))
|
||||
{
|
||||
if (headers != null)
|
||||
{
|
||||
var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath)
|
||||
? Path.GetTempPath()
|
||||
: Configuration.TempFolderPath;
|
||||
var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
|
||||
foreach (var header in headers)
|
||||
{
|
||||
var match = regex.Match(header.ToString());
|
||||
if (match.Success)
|
||||
{
|
||||
string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", ""));
|
||||
File.WriteAllBytes(fileName, response.RawBytes);
|
||||
return new FileStream(fileName, FileMode.Open);
|
||||
}
|
||||
}
|
||||
}
|
||||
var stream = new MemoryStream(response.RawBytes);
|
||||
return stream;
|
||||
}
|
||||
|
||||
if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object
|
||||
{
|
||||
return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind);
|
||||
}
|
||||
|
||||
if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type
|
||||
{
|
||||
return ConvertType(response.Content, type);
|
||||
}
|
||||
|
||||
// at this point, it must be a model (json)
|
||||
try
|
||||
{
|
||||
return JsonConvert.DeserializeObject(response.Content, type, serializerSettings);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new ApiException(500, e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serialize an input (model) into JSON string
|
||||
/// </summary>
|
||||
/// <param name="obj">Object.</param>
|
||||
/// <returns>JSON string.</returns>
|
||||
public String Serialize(object obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
return obj != null ? JsonConvert.SerializeObject(obj) : null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new ApiException(500, e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///Check if the given MIME is a JSON MIME.
|
||||
///JSON MIME examples:
|
||||
/// application/json
|
||||
/// application/json; charset=UTF8
|
||||
/// APPLICATION/JSON
|
||||
/// application/vnd.company+json
|
||||
/// </summary>
|
||||
/// <param name="mime">MIME</param>
|
||||
/// <returns>Returns True if MIME type is json.</returns>
|
||||
public bool IsJsonMime(String mime)
|
||||
{
|
||||
var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||
return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select the Content-Type header's value from the given content-type array:
|
||||
/// if JSON type exists in the given array, use it;
|
||||
/// otherwise use the first one defined in 'consumes'
|
||||
/// </summary>
|
||||
/// <param name="contentTypes">The Content-Type array to select from.</param>
|
||||
/// <returns>The Content-Type header to use.</returns>
|
||||
public String SelectHeaderContentType(String[] contentTypes)
|
||||
{
|
||||
if (contentTypes.Length == 0)
|
||||
return "application/json";
|
||||
|
||||
foreach (var contentType in contentTypes)
|
||||
{
|
||||
if (IsJsonMime(contentType.ToLower()))
|
||||
return contentType;
|
||||
}
|
||||
|
||||
return contentTypes[0]; // use the first content type specified in 'consumes'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select the Accept header's value from the given accepts array:
|
||||
/// if JSON exists in the given array, use it;
|
||||
/// otherwise use all of them (joining into a string)
|
||||
/// </summary>
|
||||
/// <param name="accepts">The accepts array to select from.</param>
|
||||
/// <returns>The Accept header to use.</returns>
|
||||
public String SelectHeaderAccept(String[] accepts)
|
||||
{
|
||||
if (accepts.Length == 0)
|
||||
return null;
|
||||
|
||||
if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase))
|
||||
return "application/json";
|
||||
|
||||
return String.Join(",", accepts);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Encode string in base64 format.
|
||||
/// </summary>
|
||||
/// <param name="text">String to be encoded.</param>
|
||||
/// <returns>Encoded string.</returns>
|
||||
public static string Base64Encode(string text)
|
||||
{
|
||||
return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dynamically cast the object into target type.
|
||||
/// </summary>
|
||||
/// <param name="fromObject">Object to be casted</param>
|
||||
/// <param name="toObject">Target type</param>
|
||||
/// <returns>Casted object</returns>
|
||||
public static dynamic ConvertType(dynamic fromObject, Type toObject)
|
||||
{
|
||||
return Convert.ChangeType(fromObject, toObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert stream to byte array
|
||||
/// </summary>
|
||||
/// <param name="inputStream">Input stream to be converted</param>
|
||||
/// <returns>Byte array</returns>
|
||||
public static byte[] ReadAsBytes(Stream inputStream)
|
||||
{
|
||||
byte[] buf = new byte[16 * 1024];
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
int count;
|
||||
while ((count = inputStream.Read(buf, 0, buf.Length)) > 0)
|
||||
{
|
||||
ms.Write(buf, 0, count);
|
||||
}
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URL encode a string
|
||||
/// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50
|
||||
/// </summary>
|
||||
/// <param name="input">String to be URL encoded</param>
|
||||
/// <returns>Byte array</returns>
|
||||
public static string UrlEncode(string input)
|
||||
{
|
||||
const int maxLength = 32766;
|
||||
|
||||
if (input == null)
|
||||
{
|
||||
throw new ArgumentNullException("input");
|
||||
}
|
||||
|
||||
if (input.Length <= maxLength)
|
||||
{
|
||||
return Uri.EscapeDataString(input);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder(input.Length * 2);
|
||||
int index = 0;
|
||||
|
||||
while (index < input.Length)
|
||||
{
|
||||
int length = Math.Min(input.Length - index, maxLength);
|
||||
string subString = input.Substring(index, length);
|
||||
|
||||
sb.Append(Uri.EscapeDataString(subString));
|
||||
index += subString.Length;
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sanitize filename by removing the path
|
||||
/// </summary>
|
||||
/// <param name="filename">Filename</param>
|
||||
/// <returns>Filename</returns>
|
||||
public static string SanitizeFilename(string filename)
|
||||
{
|
||||
Match match = Regex.Match(filename, @".*[/\\](.*)$");
|
||||
|
||||
if (match.Success)
|
||||
{
|
||||
return match.Groups[1].Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return filename;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert params to key/value pairs.
|
||||
/// Use collectionFormat to properly format lists and collections.
|
||||
/// </summary>
|
||||
/// <param name="name">Key name.</param>
|
||||
/// <param name="value">Value object.</param>
|
||||
/// <returns>A list of KeyValuePairs</returns>
|
||||
public IEnumerable<KeyValuePair<string, string>> ParameterToKeyValuePairs(string collectionFormat, string name, object value)
|
||||
{
|
||||
var parameters = new List<KeyValuePair<string, string>>();
|
||||
|
||||
if (IsCollection(value) && collectionFormat == "multi")
|
||||
{
|
||||
var valueCollection = value as IEnumerable;
|
||||
parameters.AddRange(from object item in valueCollection select new KeyValuePair<string, string>(name, ParameterToString(item)));
|
||||
}
|
||||
else
|
||||
{
|
||||
parameters.Add(new KeyValuePair<string, string>(name, ParameterToString(value)));
|
||||
}
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if generic object is a collection.
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns>True if object is a collection type</returns>
|
||||
private static bool IsCollection(object value)
|
||||
{
|
||||
return value is IList || value is ICollection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// API Exception
|
||||
/// </summary>
|
||||
public class ApiException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the error code (HTTP status code)
|
||||
/// </summary>
|
||||
/// <value>The error code (HTTP status code).</value>
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the error content (body json object)
|
||||
/// </summary>
|
||||
/// <value>The error content (Http response body).</value>
|
||||
public dynamic ErrorContent { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiException"/> class.
|
||||
/// </summary>
|
||||
public ApiException() { }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="errorCode">HTTP status code.</param>
|
||||
/// <param name="message">Error message.</param>
|
||||
public ApiException(int errorCode, string message) : base(message)
|
||||
{
|
||||
this.ErrorCode = errorCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="errorCode">HTTP status code.</param>
|
||||
/// <param name="message">Error message.</param>
|
||||
/// <param name="errorContent">Error content.</param>
|
||||
public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message)
|
||||
{
|
||||
this.ErrorCode = errorCode;
|
||||
this.ErrorContent = errorContent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// API Response
|
||||
/// </summary>
|
||||
public class ApiResponse<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the status code (HTTP status code)
|
||||
/// </summary>
|
||||
/// <value>The status code.</value>
|
||||
public int StatusCode { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HTTP headers
|
||||
/// </summary>
|
||||
/// <value>HTTP headers</value>
|
||||
public IDictionary<string, string> Headers { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the data (parsed HTTP body)
|
||||
/// </summary>
|
||||
/// <value>The data.</value>
|
||||
public T Data { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ApiResponse<T>" /> class.
|
||||
/// </summary>
|
||||
/// <param name="statusCode">HTTP status code.</param>
|
||||
/// <param name="headers">HTTP headers.</param>
|
||||
/// <param name="data">Data (parsed HTTP body)</param>
|
||||
public ApiResponse(int statusCode, IDictionary<string, string> headers, T data)
|
||||
{
|
||||
this.StatusCode = statusCode;
|
||||
this.Headers = headers;
|
||||
this.Data = data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,453 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a set of configuration settings
|
||||
/// </summary>
|
||||
public class Configuration : IReadableConfiguration
|
||||
{
|
||||
#region Constants
|
||||
|
||||
/// <summary>
|
||||
/// Version of the package.
|
||||
/// </summary>
|
||||
/// <value>Version of the package.</value>
|
||||
public const string Version = "1.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Identifier for ISO 8601 DateTime Format
|
||||
/// </summary>
|
||||
/// <remarks>See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information.</remarks>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public const string ISO8601_DATETIME_FORMAT = "o";
|
||||
|
||||
#endregion Constants
|
||||
|
||||
#region Static Members
|
||||
|
||||
private static readonly object GlobalConfigSync = new { };
|
||||
private static Configuration _globalConfiguration;
|
||||
|
||||
/// <summary>
|
||||
/// Default creation of exceptions for a given method name and response object
|
||||
/// </summary>
|
||||
public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) =>
|
||||
{
|
||||
var status = (int)response.StatusCode;
|
||||
if (status >= 400)
|
||||
{
|
||||
return new ApiException(status,
|
||||
string.Format("Error calling {0}: {1}", methodName, response.Content),
|
||||
response.Content);
|
||||
}
|
||||
if (status == 0)
|
||||
{
|
||||
return new ApiException(status,
|
||||
string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default Configuration.
|
||||
/// </summary>
|
||||
/// <value>Configuration.</value>
|
||||
public static Configuration Default
|
||||
{
|
||||
get { return _globalConfiguration; }
|
||||
set
|
||||
{
|
||||
lock (GlobalConfigSync)
|
||||
{
|
||||
_globalConfiguration = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Static Members
|
||||
|
||||
#region Private Members
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the API key based on the authentication name.
|
||||
/// </summary>
|
||||
/// <value>The API key.</value>
|
||||
private IDictionary<string, string> _apiKey = null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name.
|
||||
/// </summary>
|
||||
/// <value>The prefix of the API key.</value>
|
||||
private IDictionary<string, string> _apiKeyPrefix = null;
|
||||
|
||||
private string _dateTimeFormat = ISO8601_DATETIME_FORMAT;
|
||||
private string _tempFolderPath = Path.GetTempPath();
|
||||
|
||||
#endregion Private Members
|
||||
|
||||
#region Constructors
|
||||
|
||||
static Configuration()
|
||||
{
|
||||
_globalConfiguration = new GlobalConfiguration();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Configuration" /> class
|
||||
/// </summary>
|
||||
public Configuration()
|
||||
{
|
||||
UserAgent = "Swagger-Codegen/1.0.0/csharp";
|
||||
BasePath = "https://sellingpartnerapi-na.amazon.com";
|
||||
DefaultHeader = new ConcurrentDictionary<string, string>();
|
||||
ApiKey = new ConcurrentDictionary<string, string>();
|
||||
ApiKeyPrefix = new ConcurrentDictionary<string, string>();
|
||||
|
||||
// Setting Timeout has side effects (forces ApiClient creation).
|
||||
Timeout = 100000;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Configuration" /> class
|
||||
/// </summary>
|
||||
public Configuration(
|
||||
IDictionary<string, string> defaultHeader,
|
||||
IDictionary<string, string> apiKey,
|
||||
IDictionary<string, string> apiKeyPrefix,
|
||||
string basePath = "https://sellingpartnerapi-na.amazon.com") : this()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(basePath))
|
||||
throw new ArgumentException("The provided basePath is invalid.", "basePath");
|
||||
if (defaultHeader == null)
|
||||
throw new ArgumentNullException("defaultHeader");
|
||||
if (apiKey == null)
|
||||
throw new ArgumentNullException("apiKey");
|
||||
if (apiKeyPrefix == null)
|
||||
throw new ArgumentNullException("apiKeyPrefix");
|
||||
|
||||
BasePath = basePath;
|
||||
|
||||
foreach (var keyValuePair in defaultHeader)
|
||||
{
|
||||
DefaultHeader.Add(keyValuePair);
|
||||
}
|
||||
|
||||
foreach (var keyValuePair in apiKey)
|
||||
{
|
||||
ApiKey.Add(keyValuePair);
|
||||
}
|
||||
|
||||
foreach (var keyValuePair in apiKeyPrefix)
|
||||
{
|
||||
ApiKeyPrefix.Add(keyValuePair);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Configuration" /> class with different settings
|
||||
/// </summary>
|
||||
/// <param name="apiClient">Api client</param>
|
||||
/// <param name="defaultHeader">Dictionary of default HTTP header</param>
|
||||
/// <param name="username">Username</param>
|
||||
/// <param name="password">Password</param>
|
||||
/// <param name="accessToken">accessToken</param>
|
||||
/// <param name="apiKey">Dictionary of API key</param>
|
||||
/// <param name="apiKeyPrefix">Dictionary of API key prefix</param>
|
||||
/// <param name="tempFolderPath">Temp folder path</param>
|
||||
/// <param name="dateTimeFormat">DateTime format string</param>
|
||||
/// <param name="timeout">HTTP connection timeout (in milliseconds)</param>
|
||||
/// <param name="userAgent">HTTP user agent</param>
|
||||
[Obsolete("Use explicit object construction and setting of properties.", true)]
|
||||
public Configuration(
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
ApiClient apiClient = null,
|
||||
IDictionary<string, string> defaultHeader = null,
|
||||
string username = null,
|
||||
string password = null,
|
||||
string accessToken = null,
|
||||
IDictionary<string, string> apiKey = null,
|
||||
IDictionary<string, string> apiKeyPrefix = null,
|
||||
string tempFolderPath = null,
|
||||
string dateTimeFormat = null,
|
||||
int timeout = 100000,
|
||||
string userAgent = "Swagger-Codegen/1.0.0/csharp"
|
||||
// ReSharper restore UnusedParameter.Local
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the Configuration class.
|
||||
/// </summary>
|
||||
/// <param name="apiClient">Api client.</param>
|
||||
[Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)]
|
||||
// ReSharper disable once UnusedParameter.Local
|
||||
public Configuration(ApiClient apiClient)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion Constructors
|
||||
|
||||
|
||||
#region Properties
|
||||
|
||||
private ApiClient _apiClient = null;
|
||||
/// <summary>
|
||||
/// Gets an instance of an ApiClient for this configuration
|
||||
/// </summary>
|
||||
public virtual ApiClient ApiClient
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_apiClient == null) _apiClient = CreateApiClient();
|
||||
return _apiClient;
|
||||
}
|
||||
}
|
||||
|
||||
private String _basePath = null;
|
||||
/// <summary>
|
||||
/// Gets or sets the base path for API access.
|
||||
/// </summary>
|
||||
public virtual string BasePath
|
||||
{
|
||||
get { return _basePath; }
|
||||
set
|
||||
{
|
||||
_basePath = value;
|
||||
// pass-through to ApiClient if it's set.
|
||||
if (_apiClient != null)
|
||||
{
|
||||
_apiClient.RestClient.BaseUrl = new Uri(_basePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default header.
|
||||
/// </summary>
|
||||
public virtual IDictionary<string, string> DefaultHeader { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds.
|
||||
/// </summary>
|
||||
public virtual int Timeout
|
||||
{
|
||||
|
||||
get { return ApiClient.RestClient.Timeout; }
|
||||
set { ApiClient.RestClient.Timeout = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the HTTP user agent.
|
||||
/// </summary>
|
||||
/// <value>Http user agent.</value>
|
||||
public virtual string UserAgent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the username (HTTP basic authentication).
|
||||
/// </summary>
|
||||
/// <value>The username.</value>
|
||||
public virtual string Username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the password (HTTP basic authentication).
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
public virtual string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the API key with prefix.
|
||||
/// </summary>
|
||||
/// <param name="apiKeyIdentifier">API key identifier (authentication scheme).</param>
|
||||
/// <returns>API key with prefix.</returns>
|
||||
public string GetApiKeyWithPrefix(string apiKeyIdentifier)
|
||||
{
|
||||
var apiKeyValue = "";
|
||||
ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue);
|
||||
var apiKeyPrefix = "";
|
||||
if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix))
|
||||
return apiKeyPrefix + " " + apiKeyValue;
|
||||
else
|
||||
return apiKeyValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the access token for OAuth2 authentication.
|
||||
/// </summary>
|
||||
/// <value>The access token.</value>
|
||||
public virtual string AccessToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the temporary folder path to store the files downloaded from the server.
|
||||
/// </summary>
|
||||
/// <value>Folder path.</value>
|
||||
public virtual string TempFolderPath
|
||||
{
|
||||
get { return _tempFolderPath; }
|
||||
|
||||
set
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
// Possible breaking change since swagger-codegen 2.2.1, enforce a valid temporary path on set.
|
||||
_tempFolderPath = Path.GetTempPath();
|
||||
return;
|
||||
}
|
||||
|
||||
// create the directory if it does not exist
|
||||
if (!Directory.Exists(value))
|
||||
{
|
||||
Directory.CreateDirectory(value);
|
||||
}
|
||||
|
||||
// check if the path contains directory separator at the end
|
||||
if (value[value.Length - 1] == Path.DirectorySeparatorChar)
|
||||
{
|
||||
_tempFolderPath = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
_tempFolderPath = value + Path.DirectorySeparatorChar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the the date time format used when serializing in the ApiClient
|
||||
/// By default, it's set to ISO 8601 - "o", for others see:
|
||||
/// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx
|
||||
/// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx
|
||||
/// No validation is done to ensure that the string you're providing is valid
|
||||
/// </summary>
|
||||
/// <value>The DateTimeFormat string</value>
|
||||
public virtual string DateTimeFormat
|
||||
{
|
||||
get { return _dateTimeFormat; }
|
||||
set
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
// Never allow a blank or null string, go back to the default
|
||||
_dateTimeFormat = ISO8601_DATETIME_FORMAT;
|
||||
return;
|
||||
}
|
||||
|
||||
// Caution, no validation when you choose date time format other than ISO 8601
|
||||
// Take a look at the above links
|
||||
_dateTimeFormat = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name.
|
||||
/// </summary>
|
||||
/// <value>The prefix of the API key.</value>
|
||||
public virtual IDictionary<string, string> ApiKeyPrefix
|
||||
{
|
||||
get { return _apiKeyPrefix; }
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new InvalidOperationException("ApiKeyPrefix collection may not be null.");
|
||||
}
|
||||
_apiKeyPrefix = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the API key based on the authentication name.
|
||||
/// </summary>
|
||||
/// <value>The API key.</value>
|
||||
public virtual IDictionary<string, string> ApiKey
|
||||
{
|
||||
get { return _apiKey; }
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new InvalidOperationException("ApiKey collection may not be null.");
|
||||
}
|
||||
_apiKey = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
DefaultHeader[key] = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ApiClient" /> based on this <see cref="Configuration" /> instance.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ApiClient CreateApiClient()
|
||||
{
|
||||
return new ApiClient(BasePath) { Configuration = this };
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a string with essential information for debugging.
|
||||
/// </summary>
|
||||
public static String ToDebugReport()
|
||||
{
|
||||
String report = "C# SDK (IO.Swagger) Debug Report:\n";
|
||||
report += " OS: " + System.Environment.OSVersion + "\n";
|
||||
report += " .NET Framework Version: " + System.Environment.Version + "\n";
|
||||
report += " Version of the API: v1\n";
|
||||
report += " SDK Package Version: 1.0.0\n";
|
||||
|
||||
return report;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add Api Key Header.
|
||||
/// </summary>
|
||||
/// <param name="key">Api Key name.</param>
|
||||
/// <param name="value">Api Key value.</param>
|
||||
/// <returns></returns>
|
||||
public void AddApiKey(string key, string value)
|
||||
{
|
||||
ApiKey[key] = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the API key prefix.
|
||||
/// </summary>
|
||||
/// <param name="key">Api Key name.</param>
|
||||
/// <param name="value">Api Key value.</param>
|
||||
public void AddApiKeyPrefix(string key, string value)
|
||||
{
|
||||
ApiKeyPrefix[key] = value;
|
||||
}
|
||||
|
||||
#endregion Methods
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using RestSharp;
|
||||
using System;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// A delegate to ExceptionFactory method
|
||||
/// </summary>
|
||||
/// <param name="methodName">Method name</param>
|
||||
/// <param name="response">Response</param>
|
||||
/// <returns>Exceptions</returns>
|
||||
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="GlobalConfiguration"/> provides a compile-time extension point for globally configuring
|
||||
/// API Clients.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A customized implementation via partial class may reside in another file and may
|
||||
/// be excluded from automatic generation via a .swagger-codegen-ignore file.
|
||||
/// </remarks>
|
||||
public partial class GlobalConfiguration : Configuration
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents configuration aspects required to interact with the API endpoints.
|
||||
/// </summary>
|
||||
public interface IApiAccessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
Configuration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
String GetBasePath();
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
ExceptionFactory ExceptionFactory { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a readable-only configuration contract.
|
||||
/// </summary>
|
||||
public interface IReadableConfiguration
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the access token.
|
||||
/// </summary>
|
||||
/// <value>Access token.</value>
|
||||
string AccessToken { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the API key.
|
||||
/// </summary>
|
||||
/// <value>API key.</value>
|
||||
IDictionary<string, string> ApiKey { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the API key prefix.
|
||||
/// </summary>
|
||||
/// <value>API key prefix.</value>
|
||||
IDictionary<string, string> ApiKeyPrefix { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path.
|
||||
/// </summary>
|
||||
/// <value>Base path.</value>
|
||||
string BasePath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date time format.
|
||||
/// </summary>
|
||||
/// <value>Date time foramt.</value>
|
||||
string DateTimeFormat { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <value>Default header.</value>
|
||||
IDictionary<string, string> DefaultHeader { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the temp folder path.
|
||||
/// </summary>
|
||||
/// <value>Temp folder path.</value>
|
||||
string TempFolderPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HTTP connection timeout (in milliseconds)
|
||||
/// </summary>
|
||||
/// <value>HTTP connection timeout.</value>
|
||||
int Timeout { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user agent.
|
||||
/// </summary>
|
||||
/// <value>User agent.</value>
|
||||
string UserAgent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the username.
|
||||
/// </summary>
|
||||
/// <value>Username.</value>
|
||||
string Username { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the password.
|
||||
/// </summary>
|
||||
/// <value>Password.</value>
|
||||
string Password { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the API key with prefix.
|
||||
/// </summary>
|
||||
/// <param name="apiKeyIdentifier">API key identifier (authentication scheme).</param>
|
||||
/// <returns>API key with prefix.</returns>
|
||||
string GetApiKeyWithPrefix(string apiKeyIdentifier);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Clients
|
||||
{
|
||||
/// <summary>
|
||||
/// Formatter for 'date' swagger formats ss defined by full-date - RFC3339
|
||||
/// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
|
||||
/// </summary>
|
||||
public class SwaggerDateConverter : IsoDateTimeConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SwaggerDateConverter" /> class.
|
||||
/// </summary>
|
||||
public SwaggerDateConverter()
|
||||
{
|
||||
// full-date = date-fullyear "-" date-month "-" date-mday
|
||||
DateTimeFormat = "yyyy-MM-dd";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// A Login with Amazon (LWA) authorization code.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class AuthorizationCode : IEquatable<AuthorizationCode>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AuthorizationCode" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_AuthorizationCode">A Login with Amazon (LWA) authorization code that can be exchanged for a refresh token and access token that authorize you to make calls to a Selling Partner API..</param>
|
||||
public AuthorizationCode(string _AuthorizationCode = default(string))
|
||||
{
|
||||
this._AuthorizationCode = _AuthorizationCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A Login with Amazon (LWA) authorization code that can be exchanged for a refresh token and access token that authorize you to make calls to a Selling Partner API.
|
||||
/// </summary>
|
||||
/// <value>A Login with Amazon (LWA) authorization code that can be exchanged for a refresh token and access token that authorize you to make calls to a Selling Partner API.</value>
|
||||
[DataMember(Name = "authorizationCode", EmitDefaultValue = false)]
|
||||
public string _AuthorizationCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class AuthorizationCode {\n");
|
||||
sb.Append(" _AuthorizationCode: ").Append(_AuthorizationCode).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as AuthorizationCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if AuthorizationCode instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of AuthorizationCode to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(AuthorizationCode input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._AuthorizationCode == input._AuthorizationCode ||
|
||||
(this._AuthorizationCode != null &&
|
||||
this._AuthorizationCode.Equals(input._AuthorizationCode))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this._AuthorizationCode != null)
|
||||
hashCode = hashCode * 59 + this._AuthorizationCode.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// Error response returned when the request is unsuccessful.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Error : IEquatable<Error>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Error" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Error() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Error" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Code">An error code that identifies the type of error that occurred. (required).</param>
|
||||
/// <param name="Message">A message that describes the error condition in a human-readable form. (required).</param>
|
||||
/// <param name="Details">Additional details that can help the caller understand or fix the issue..</param>
|
||||
public Error(string Code = default(string), string Message = default(string), string Details = default(string))
|
||||
{
|
||||
// to ensure "Code" is required (not null)
|
||||
if (Code == null)
|
||||
{
|
||||
throw new InvalidDataException("Code is a required property for Error and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Code = Code;
|
||||
}
|
||||
// to ensure "Message" is required (not null)
|
||||
if (Message == null)
|
||||
{
|
||||
throw new InvalidDataException("Message is a required property for Error and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Message = Message;
|
||||
}
|
||||
this.Details = Details;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An error code that identifies the type of error that occurred.
|
||||
/// </summary>
|
||||
/// <value>An error code that identifies the type of error that occurred.</value>
|
||||
[DataMember(Name = "code", EmitDefaultValue = false)]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A message that describes the error condition in a human-readable form.
|
||||
/// </summary>
|
||||
/// <value>A message that describes the error condition in a human-readable form.</value>
|
||||
[DataMember(Name = "message", EmitDefaultValue = false)]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Additional details that can help the caller understand or fix the issue.
|
||||
/// </summary>
|
||||
/// <value>Additional details that can help the caller understand or fix the issue.</value>
|
||||
[DataMember(Name = "details", EmitDefaultValue = false)]
|
||||
public string Details { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Error {\n");
|
||||
sb.Append(" Code: ").Append(Code).Append("\n");
|
||||
sb.Append(" Message: ").Append(Message).Append("\n");
|
||||
sb.Append(" Details: ").Append(Details).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Error);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Error instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Error to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Error input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Code == input.Code ||
|
||||
(this.Code != null &&
|
||||
this.Code.Equals(input.Code))
|
||||
) &&
|
||||
(
|
||||
this.Message == input.Message ||
|
||||
(this.Message != null &&
|
||||
this.Message.Equals(input.Message))
|
||||
) &&
|
||||
(
|
||||
this.Details == input.Details ||
|
||||
(this.Details != null &&
|
||||
this.Details.Equals(input.Details))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Code != null)
|
||||
hashCode = hashCode * 59 + this.Code.GetHashCode();
|
||||
if (this.Message != null)
|
||||
hashCode = hashCode * 59 + this.Message.GetHashCode();
|
||||
if (this.Details != null)
|
||||
hashCode = hashCode * 59 + this.Details.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// A list of error responses returned when a request is unsuccessful.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ErrorList : List<Error>, IEquatable<ErrorList>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ErrorList" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public ErrorList() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ErrorList {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ErrorList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ErrorList instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ErrorList to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ErrorList input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Authorization
|
||||
*
|
||||
* The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// The response schema for the GetAuthorizationCode operation.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class GetAuthorizationCodeResponse : IEquatable<GetAuthorizationCodeResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetAuthorizationCodeResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Payload">Payload.</param>
|
||||
/// <param name="Errors">Errors.</param>
|
||||
public GetAuthorizationCodeResponse(AuthorizationCode Payload = default(AuthorizationCode), ErrorList Errors = default(ErrorList))
|
||||
{
|
||||
this.Payload = Payload;
|
||||
this.Errors = Errors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Payload
|
||||
/// </summary>
|
||||
[DataMember(Name = "payload", EmitDefaultValue = false)]
|
||||
public AuthorizationCode Payload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Errors
|
||||
/// </summary>
|
||||
[DataMember(Name = "errors", EmitDefaultValue = false)]
|
||||
public ErrorList Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class GetAuthorizationCodeResponse {\n");
|
||||
sb.Append(" Payload: ").Append(Payload).Append("\n");
|
||||
sb.Append(" Errors: ").Append(Errors).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as GetAuthorizationCodeResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if GetAuthorizationCodeResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of GetAuthorizationCodeResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(GetAuthorizationCodeResponse input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Payload == input.Payload ||
|
||||
(this.Payload != null &&
|
||||
this.Payload.Equals(input.Payload))
|
||||
) &&
|
||||
(
|
||||
this.Errors == input.Errors ||
|
||||
(this.Errors != null &&
|
||||
this.Errors.Equals(input.Errors))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Payload != null)
|
||||
hashCode = hashCode * 59 + this.Payload.GetHashCode();
|
||||
if (this.Errors != null)
|
||||
hashCode = hashCode * 59 + this.Errors.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// ASINIdentifier
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ASINIdentifier : IEquatable<ASINIdentifier>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ASINIdentifier" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public ASINIdentifier() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ASINIdentifier" /> class.
|
||||
/// </summary>
|
||||
/// <param name="MarketplaceId">A marketplace identifier. (required).</param>
|
||||
/// <param name="ASIN">The Amazon Standard Identification Number (ASIN) of the item. (required).</param>
|
||||
public ASINIdentifier(string MarketplaceId = default(string), string ASIN = default(string))
|
||||
{
|
||||
// to ensure "MarketplaceId" is required (not null)
|
||||
if (MarketplaceId == null)
|
||||
{
|
||||
throw new InvalidDataException("MarketplaceId is a required property for ASINIdentifier and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.MarketplaceId = MarketplaceId;
|
||||
}
|
||||
// to ensure "ASIN" is required (not null)
|
||||
if (ASIN == null)
|
||||
{
|
||||
throw new InvalidDataException("ASIN is a required property for ASINIdentifier and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ASIN = ASIN;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A marketplace identifier.
|
||||
/// </summary>
|
||||
/// <value>A marketplace identifier.</value>
|
||||
[DataMember(Name = "MarketplaceId", EmitDefaultValue = false)]
|
||||
public string MarketplaceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Amazon Standard Identification Number (ASIN) of the item.
|
||||
/// </summary>
|
||||
/// <value>The Amazon Standard Identification Number (ASIN) of the item.</value>
|
||||
[DataMember(Name = "ASIN", EmitDefaultValue = false)]
|
||||
public string ASIN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ASINIdentifier {\n");
|
||||
sb.Append(" MarketplaceId: ").Append(MarketplaceId).Append("\n");
|
||||
sb.Append(" ASIN: ").Append(ASIN).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ASINIdentifier);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ASINIdentifier instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ASINIdentifier to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ASINIdentifier input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.MarketplaceId == input.MarketplaceId ||
|
||||
(this.MarketplaceId != null &&
|
||||
this.MarketplaceId.Equals(input.MarketplaceId))
|
||||
) &&
|
||||
(
|
||||
this.ASIN == input.ASIN ||
|
||||
(this.ASIN != null &&
|
||||
this.ASIN.Equals(input.ASIN))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.MarketplaceId != null)
|
||||
hashCode = hashCode * 59 + this.MarketplaceId.GetHashCode();
|
||||
if (this.ASIN != null)
|
||||
hashCode = hashCode * 59 + this.ASIN.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// A list of attributes for the item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class AttributeSetList : List<AttributeSetListType>, IEquatable<AttributeSetList>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AttributeSetList" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public AttributeSetList() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class AttributeSetList {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as AttributeSetList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if AttributeSetList instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of AttributeSetList to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(AttributeSetList input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Categories
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Categories : IEquatable<Categories>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Categories" /> class.
|
||||
/// </summary>
|
||||
/// <param name="ProductCategoryId">The identifier for the product category (or browse node)..</param>
|
||||
/// <param name="ProductCategoryName">The name of the product category (or browse node)..</param>
|
||||
/// <param name="Parent">The parent product category..</param>
|
||||
public Categories(string ProductCategoryId = default(string), string ProductCategoryName = default(string), Object Parent = default(Object))
|
||||
{
|
||||
this.ProductCategoryId = ProductCategoryId;
|
||||
this.ProductCategoryName = ProductCategoryName;
|
||||
this.Parent = Parent;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The identifier for the product category (or browse node).
|
||||
/// </summary>
|
||||
/// <value>The identifier for the product category (or browse node).</value>
|
||||
[DataMember(Name = "ProductCategoryId", EmitDefaultValue = false)]
|
||||
public string ProductCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the product category (or browse node).
|
||||
/// </summary>
|
||||
/// <value>The name of the product category (or browse node).</value>
|
||||
[DataMember(Name = "ProductCategoryName", EmitDefaultValue = false)]
|
||||
public string ProductCategoryName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The parent product category.
|
||||
/// </summary>
|
||||
/// <value>The parent product category.</value>
|
||||
[DataMember(Name = "parent", EmitDefaultValue = false)]
|
||||
public Object Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Categories {\n");
|
||||
sb.Append(" ProductCategoryId: ").Append(ProductCategoryId).Append("\n");
|
||||
sb.Append(" ProductCategoryName: ").Append(ProductCategoryName).Append("\n");
|
||||
sb.Append(" Parent: ").Append(Parent).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Categories);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Categories instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Categories to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Categories input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.ProductCategoryId == input.ProductCategoryId ||
|
||||
(this.ProductCategoryId != null &&
|
||||
this.ProductCategoryId.Equals(input.ProductCategoryId))
|
||||
) &&
|
||||
(
|
||||
this.ProductCategoryName == input.ProductCategoryName ||
|
||||
(this.ProductCategoryName != null &&
|
||||
this.ProductCategoryName.Equals(input.ProductCategoryName))
|
||||
) &&
|
||||
(
|
||||
this.Parent == input.Parent ||
|
||||
(this.Parent != null &&
|
||||
this.Parent.Equals(input.Parent))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.ProductCategoryId != null)
|
||||
hashCode = hashCode * 59 + this.ProductCategoryId.GetHashCode();
|
||||
if (this.ProductCategoryName != null)
|
||||
hashCode = hashCode * 59 + this.ProductCategoryName.GetHashCode();
|
||||
if (this.Parent != null)
|
||||
hashCode = hashCode * 59 + this.Parent.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The creator type attribute of an item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class CreatorType : IEquatable<CreatorType>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CreatorType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Value">The value of the attribute..</param>
|
||||
/// <param name="Role">The role of the value..</param>
|
||||
public CreatorType(string Value = default(string), string Role = default(string))
|
||||
{
|
||||
this.Value = Value;
|
||||
this.Role = Role;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The value of the attribute.
|
||||
/// </summary>
|
||||
/// <value>The value of the attribute.</value>
|
||||
[DataMember(Name = "value", EmitDefaultValue = false)]
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The role of the value.
|
||||
/// </summary>
|
||||
/// <value>The role of the value.</value>
|
||||
[DataMember(Name = "Role", EmitDefaultValue = false)]
|
||||
public string Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class CreatorType {\n");
|
||||
sb.Append(" Value: ").Append(Value).Append("\n");
|
||||
sb.Append(" Role: ").Append(Role).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as CreatorType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if CreatorType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of CreatorType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(CreatorType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Value == input.Value ||
|
||||
(this.Value != null &&
|
||||
this.Value.Equals(input.Value))
|
||||
) &&
|
||||
(
|
||||
this.Role == input.Role ||
|
||||
(this.Role != null &&
|
||||
this.Role.Equals(input.Role))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Value != null)
|
||||
hashCode = hashCode * 59 + this.Value.GetHashCode();
|
||||
if (this.Role != null)
|
||||
hashCode = hashCode * 59 + this.Role.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The decimal value and unit.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class DecimalWithUnits : IEquatable<DecimalWithUnits>, IValidatableObject
|
||||
{
|
||||
public DecimalWithUnits()
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DecimalWithUnits" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Value">The decimal value..</param>
|
||||
/// <param name="Units">The unit of the decimal value..</param>
|
||||
public DecimalWithUnits(decimal? Value = default(decimal?), string Units = default(string))
|
||||
{
|
||||
this.Value = Value;
|
||||
this.Units = Units;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The decimal value.
|
||||
/// </summary>
|
||||
/// <value>The decimal value.</value>
|
||||
[DataMember(Name = "value", EmitDefaultValue = false)]
|
||||
public decimal? Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The unit of the decimal value.
|
||||
/// </summary>
|
||||
/// <value>The unit of the decimal value.</value>
|
||||
[DataMember(Name = "Units", EmitDefaultValue = false)]
|
||||
public string Units { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class DecimalWithUnits {\n");
|
||||
sb.Append(" Value: ").Append(Value).Append("\n");
|
||||
sb.Append(" Units: ").Append(Units).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as DecimalWithUnits);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if DecimalWithUnits instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of DecimalWithUnits to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(DecimalWithUnits input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Value == input.Value ||
|
||||
(this.Value != null &&
|
||||
this.Value.Equals(input.Value))
|
||||
) &&
|
||||
(
|
||||
this.Units == input.Units ||
|
||||
(this.Units != null &&
|
||||
this.Units.Equals(input.Units))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Value != null)
|
||||
hashCode = hashCode * 59 + this.Value.GetHashCode();
|
||||
if (this.Units != null)
|
||||
hashCode = hashCode * 59 + this.Units.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The dimension type attribute of an item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class DimensionType : IEquatable<DimensionType>, IValidatableObject
|
||||
{
|
||||
public DimensionType()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DimensionType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Height">The height attribute of the dimension..</param>
|
||||
/// <param name="Length">The length attribute of the dimension..</param>
|
||||
/// <param name="Width">The width attribute of the dimension..</param>
|
||||
/// <param name="Weight">The weight attribute of the dimension..</param>
|
||||
public DimensionType(DecimalWithUnits Height = default(DecimalWithUnits), DecimalWithUnits Length = default(DecimalWithUnits), DecimalWithUnits Width = default(DecimalWithUnits), DecimalWithUnits Weight = default(DecimalWithUnits))
|
||||
{
|
||||
this.Height = Height;
|
||||
this.Length = Length;
|
||||
this.Width = Width;
|
||||
this.Weight = Weight;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The height attribute of the dimension.
|
||||
/// </summary>
|
||||
/// <value>The height attribute of the dimension.</value>
|
||||
[DataMember(Name = "Height", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits Height { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The length attribute of the dimension.
|
||||
/// </summary>
|
||||
/// <value>The length attribute of the dimension.</value>
|
||||
[DataMember(Name = "Length", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits Length { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The width attribute of the dimension.
|
||||
/// </summary>
|
||||
/// <value>The width attribute of the dimension.</value>
|
||||
[DataMember(Name = "Width", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits Width { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The weight attribute of the dimension.
|
||||
/// </summary>
|
||||
/// <value>The weight attribute of the dimension.</value>
|
||||
[DataMember(Name = "Weight", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits Weight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class DimensionType {\n");
|
||||
sb.Append(" Height: ").Append(Height).Append("\n");
|
||||
sb.Append(" Length: ").Append(Length).Append("\n");
|
||||
sb.Append(" Width: ").Append(Width).Append("\n");
|
||||
sb.Append(" Weight: ").Append(Weight).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as DimensionType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if DimensionType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of DimensionType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(DimensionType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Height == input.Height ||
|
||||
(this.Height != null &&
|
||||
this.Height.Equals(input.Height))
|
||||
) &&
|
||||
(
|
||||
this.Length == input.Length ||
|
||||
(this.Length != null &&
|
||||
this.Length.Equals(input.Length))
|
||||
) &&
|
||||
(
|
||||
this.Width == input.Width ||
|
||||
(this.Width != null &&
|
||||
this.Width.Equals(input.Width))
|
||||
) &&
|
||||
(
|
||||
this.Weight == input.Weight ||
|
||||
(this.Weight != null &&
|
||||
this.Weight.Equals(input.Weight))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Height != null)
|
||||
hashCode = hashCode * 59 + this.Height.GetHashCode();
|
||||
if (this.Length != null)
|
||||
hashCode = hashCode * 59 + this.Length.GetHashCode();
|
||||
if (this.Width != null)
|
||||
hashCode = hashCode * 59 + this.Width.GetHashCode();
|
||||
if (this.Weight != null)
|
||||
hashCode = hashCode * 59 + this.Weight.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Error response returned when the request is unsuccessful.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Error : IEquatable<Error>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Error" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Error() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Error" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Code">An error code that identifies the type of error that occurred. (required).</param>
|
||||
/// <param name="Message">A message that describes the error condition in a human-readable form. (required).</param>
|
||||
/// <param name="Details">Additional information that can help the caller understand or fix the issue..</param>
|
||||
public Error(string Code = default(string), string Message = default(string), string Details = default(string))
|
||||
{
|
||||
// to ensure "Code" is required (not null)
|
||||
if (Code == null)
|
||||
{
|
||||
throw new InvalidDataException("Code is a required property for Error and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Code = Code;
|
||||
}
|
||||
// to ensure "Message" is required (not null)
|
||||
if (Message == null)
|
||||
{
|
||||
throw new InvalidDataException("Message is a required property for Error and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Message = Message;
|
||||
}
|
||||
this.Details = Details;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An error code that identifies the type of error that occurred.
|
||||
/// </summary>
|
||||
/// <value>An error code that identifies the type of error that occurred.</value>
|
||||
[DataMember(Name = "code", EmitDefaultValue = false)]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A message that describes the error condition in a human-readable form.
|
||||
/// </summary>
|
||||
/// <value>A message that describes the error condition in a human-readable form.</value>
|
||||
[DataMember(Name = "message", EmitDefaultValue = false)]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Additional information that can help the caller understand or fix the issue.
|
||||
/// </summary>
|
||||
/// <value>Additional information that can help the caller understand or fix the issue.</value>
|
||||
[DataMember(Name = "details", EmitDefaultValue = false)]
|
||||
public string Details { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Error {\n");
|
||||
sb.Append(" Code: ").Append(Code).Append("\n");
|
||||
sb.Append(" Message: ").Append(Message).Append("\n");
|
||||
sb.Append(" Details: ").Append(Details).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Error);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Error instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Error to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Error input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Code == input.Code ||
|
||||
(this.Code != null &&
|
||||
this.Code.Equals(input.Code))
|
||||
) &&
|
||||
(
|
||||
this.Message == input.Message ||
|
||||
(this.Message != null &&
|
||||
this.Message.Equals(input.Message))
|
||||
) &&
|
||||
(
|
||||
this.Details == input.Details ||
|
||||
(this.Details != null &&
|
||||
this.Details.Equals(input.Details))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Code != null)
|
||||
hashCode = hashCode * 59 + this.Code.GetHashCode();
|
||||
if (this.Message != null)
|
||||
hashCode = hashCode * 59 + this.Message.GetHashCode();
|
||||
if (this.Details != null)
|
||||
hashCode = hashCode * 59 + this.Details.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// A list of error responses returned when a request is unsuccessful.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ErrorList : List<Error>, IEquatable<ErrorList>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ErrorList" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public ErrorList() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ErrorList {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ErrorList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ErrorList instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ErrorList to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ErrorList input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// GetCatalogItemResponse
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class GetCatalogItemResponse : IEquatable<GetCatalogItemResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GetCatalogItemResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Payload">The payload for the getCatalogItem operation..</param>
|
||||
/// <param name="Errors">One or more unexpected errors occurred during the getCatalogItem operation..</param>
|
||||
public GetCatalogItemResponse(Item Payload = default(Item), ErrorList Errors = default(ErrorList))
|
||||
{
|
||||
this.Payload = Payload;
|
||||
this.Errors = Errors;
|
||||
}
|
||||
public GetCatalogItemResponse()
|
||||
{
|
||||
this.Payload = default(Item);
|
||||
this.Errors = default(ErrorList);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The payload for the getCatalogItem operation.
|
||||
/// </summary>
|
||||
/// <value>The payload for the getCatalogItem operation.</value>
|
||||
[DataMember(Name = "payload", EmitDefaultValue = false)]
|
||||
public Item Payload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// One or more unexpected errors occurred during the getCatalogItem operation.
|
||||
/// </summary>
|
||||
/// <value>One or more unexpected errors occurred during the getCatalogItem operation.</value>
|
||||
[DataMember(Name = "errors", EmitDefaultValue = false)]
|
||||
public ErrorList Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class GetCatalogItemResponse {\n");
|
||||
sb.Append(" Payload: ").Append(Payload).Append("\n");
|
||||
sb.Append(" Errors: ").Append(Errors).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as GetCatalogItemResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if GetCatalogItemResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of GetCatalogItemResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(GetCatalogItemResponse input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Payload == input.Payload ||
|
||||
(this.Payload != null &&
|
||||
this.Payload.Equals(input.Payload))
|
||||
) &&
|
||||
(
|
||||
this.Errors == input.Errors ||
|
||||
(this.Errors != null &&
|
||||
this.Errors.Equals(input.Errors))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Payload != null)
|
||||
hashCode = hashCode * 59 + this.Payload.GetHashCode();
|
||||
if (this.Errors != null)
|
||||
hashCode = hashCode * 59 + this.Errors.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// IdentifierType
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class IdentifierType : IEquatable<IdentifierType>, IValidatableObject
|
||||
{
|
||||
public IdentifierType()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IdentifierType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="MarketplaceASIN">Indicates the item is identified by MarketPlaceId and ASIN..</param>
|
||||
/// <param name="SKUIdentifier">Indicates the item is identified by MarketPlaceId, SellerId, and SellerSKU..</param>
|
||||
public IdentifierType(ASINIdentifier MarketplaceASIN = default(ASINIdentifier), SellerSKUIdentifier SKUIdentifier = default(SellerSKUIdentifier))
|
||||
{
|
||||
this.MarketplaceASIN = MarketplaceASIN;
|
||||
this.SKUIdentifier = SKUIdentifier;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the item is identified by MarketPlaceId and ASIN.
|
||||
/// </summary>
|
||||
/// <value>Indicates the item is identified by MarketPlaceId and ASIN.</value>
|
||||
[DataMember(Name = "MarketplaceASIN", EmitDefaultValue = false)]
|
||||
public ASINIdentifier MarketplaceASIN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the item is identified by MarketPlaceId, SellerId, and SellerSKU.
|
||||
/// </summary>
|
||||
/// <value>Indicates the item is identified by MarketPlaceId, SellerId, and SellerSKU.</value>
|
||||
[DataMember(Name = "SKUIdentifier", EmitDefaultValue = false)]
|
||||
public SellerSKUIdentifier SKUIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class IdentifierType {\n");
|
||||
sb.Append(" MarketplaceASIN: ").Append(MarketplaceASIN).Append("\n");
|
||||
sb.Append(" SKUIdentifier: ").Append(SKUIdentifier).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as IdentifierType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if IdentifierType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of IdentifierType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(IdentifierType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.MarketplaceASIN == input.MarketplaceASIN ||
|
||||
(this.MarketplaceASIN != null &&
|
||||
this.MarketplaceASIN.Equals(input.MarketplaceASIN))
|
||||
) &&
|
||||
(
|
||||
this.SKUIdentifier == input.SKUIdentifier ||
|
||||
(this.SKUIdentifier != null &&
|
||||
this.SKUIdentifier.Equals(input.SKUIdentifier))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.MarketplaceASIN != null)
|
||||
hashCode = hashCode * 59 + this.MarketplaceASIN.GetHashCode();
|
||||
if (this.SKUIdentifier != null)
|
||||
hashCode = hashCode * 59 + this.SKUIdentifier.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The image attribute of the item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Image : IEquatable<Image>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Image" /> class.
|
||||
/// </summary>
|
||||
/// <param name="URL">The image URL attribute of the item..</param>
|
||||
/// <param name="Height">The image height attribute of the item..</param>
|
||||
/// <param name="Width">The image width attribute of the item..</param>
|
||||
public Image(string URL = default(string), DecimalWithUnits Height = default(DecimalWithUnits), DecimalWithUnits Width = default(DecimalWithUnits))
|
||||
{
|
||||
this.URL = URL;
|
||||
this.Height = Height;
|
||||
this.Width = Width;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The image URL attribute of the item.
|
||||
/// </summary>
|
||||
/// <value>The image URL attribute of the item.</value>
|
||||
[DataMember(Name = "URL", EmitDefaultValue = false)]
|
||||
public string URL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The image height attribute of the item.
|
||||
/// </summary>
|
||||
/// <value>The image height attribute of the item.</value>
|
||||
[DataMember(Name = "Height", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits Height { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The image width attribute of the item.
|
||||
/// </summary>
|
||||
/// <value>The image width attribute of the item.</value>
|
||||
[DataMember(Name = "Width", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits Width { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Image {\n");
|
||||
sb.Append(" URL: ").Append(URL).Append("\n");
|
||||
sb.Append(" Height: ").Append(Height).Append("\n");
|
||||
sb.Append(" Width: ").Append(Width).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Image);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Image instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Image to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Image input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.URL == input.URL ||
|
||||
(this.URL != null &&
|
||||
this.URL.Equals(input.URL))
|
||||
) &&
|
||||
(
|
||||
this.Height == input.Height ||
|
||||
(this.Height != null &&
|
||||
this.Height.Equals(input.Height))
|
||||
) &&
|
||||
(
|
||||
this.Width == input.Width ||
|
||||
(this.Width != null &&
|
||||
this.Width.Equals(input.Width))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.URL != null)
|
||||
hashCode = hashCode * 59 + this.URL.GetHashCode();
|
||||
if (this.Height != null)
|
||||
hashCode = hashCode * 59 + this.Height.GetHashCode();
|
||||
if (this.Width != null)
|
||||
hashCode = hashCode * 59 + this.Width.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,183 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// An item in the Amazon catalog.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Item : IEquatable<Item>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Item" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public Item() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Item" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Identifiers">The identifiers that uniquely identify the item. (required).</param>
|
||||
/// <param name="AttributeSets">A list of attributes of the item..</param>
|
||||
/// <param name="Relationships">A list of variation relationship information for the item..</param>
|
||||
/// <param name="SalesRankings">A list of sales rank information for the item by category..</param>
|
||||
public Item(IdentifierType Identifiers = default(IdentifierType), AttributeSetList AttributeSets = default(AttributeSetList), RelationshipList Relationships = default(RelationshipList), SalesRankList SalesRankings = default(SalesRankList))
|
||||
{
|
||||
// to ensure "Identifiers" is required (not null)
|
||||
if (Identifiers == null)
|
||||
{
|
||||
throw new InvalidDataException("Identifiers is a required property for Item and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Identifiers = Identifiers;
|
||||
}
|
||||
this.AttributeSets = AttributeSets;
|
||||
this.Relationships = Relationships;
|
||||
this.SalesRankings = SalesRankings;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The identifiers that uniquely identify the item.
|
||||
/// </summary>
|
||||
/// <value>The identifiers that uniquely identify the item.</value>
|
||||
[DataMember(Name = "Identifiers", EmitDefaultValue = false)]
|
||||
public IdentifierType Identifiers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of attributes of the item.
|
||||
/// </summary>
|
||||
/// <value>A list of attributes of the item.</value>
|
||||
[DataMember(Name = "AttributeSets", EmitDefaultValue = false)]
|
||||
public AttributeSetList AttributeSets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of variation relationship information for the item.
|
||||
/// </summary>
|
||||
/// <value>A list of variation relationship information for the item.</value>
|
||||
[DataMember(Name = "Relationships", EmitDefaultValue = false)]
|
||||
public RelationshipList Relationships { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of sales rank information for the item by category.
|
||||
/// </summary>
|
||||
/// <value>A list of sales rank information for the item by category.</value>
|
||||
[DataMember(Name = "SalesRankings", EmitDefaultValue = false)]
|
||||
public SalesRankList SalesRankings { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Item {\n");
|
||||
sb.Append(" Identifiers: ").Append(Identifiers).Append("\n");
|
||||
sb.Append(" AttributeSets: ").Append(AttributeSets).Append("\n");
|
||||
sb.Append(" Relationships: ").Append(Relationships).Append("\n");
|
||||
sb.Append(" SalesRankings: ").Append(SalesRankings).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Item instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Item to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Item input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Identifiers == input.Identifiers ||
|
||||
(this.Identifiers != null &&
|
||||
this.Identifiers.Equals(input.Identifiers))
|
||||
) &&
|
||||
(
|
||||
this.AttributeSets == input.AttributeSets ||
|
||||
(this.AttributeSets != null &&
|
||||
this.AttributeSets.Equals(input.AttributeSets))
|
||||
) &&
|
||||
(
|
||||
this.Relationships == input.Relationships ||
|
||||
(this.Relationships != null &&
|
||||
this.Relationships.Equals(input.Relationships))
|
||||
) &&
|
||||
(
|
||||
this.SalesRankings == input.SalesRankings ||
|
||||
(this.SalesRankings != null &&
|
||||
this.SalesRankings.Equals(input.SalesRankings))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Identifiers != null)
|
||||
hashCode = hashCode * 59 + this.Identifiers.GetHashCode();
|
||||
if (this.AttributeSets != null)
|
||||
hashCode = hashCode * 59 + this.AttributeSets.GetHashCode();
|
||||
if (this.Relationships != null)
|
||||
hashCode = hashCode * 59 + this.Relationships.GetHashCode();
|
||||
if (this.SalesRankings != null)
|
||||
hashCode = hashCode * 59 + this.SalesRankings.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// A list of items.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ItemList : List<Item>, IEquatable<ItemList>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ItemList" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public ItemList() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ItemList {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ItemList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ItemList instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ItemList to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ItemList input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The language type attribute of an item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class LanguageType : IEquatable<LanguageType>, IValidatableObject
|
||||
{
|
||||
public LanguageType() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LanguageType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Name">The name attribute of the item..</param>
|
||||
/// <param name="Type">The type attribute of the item..</param>
|
||||
/// <param name="AudioFormat">The audio format attribute of the item..</param>
|
||||
public LanguageType(string Name = default(string), string Type = default(string), string AudioFormat = default(string))
|
||||
{
|
||||
this.Name = Name;
|
||||
this.Type = Type;
|
||||
this.AudioFormat = AudioFormat;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The name attribute of the item.
|
||||
/// </summary>
|
||||
/// <value>The name attribute of the item.</value>
|
||||
[DataMember(Name = "Name", EmitDefaultValue = false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type attribute of the item.
|
||||
/// </summary>
|
||||
/// <value>The type attribute of the item.</value>
|
||||
[DataMember(Name = "Type", EmitDefaultValue = false)]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The audio format attribute of the item.
|
||||
/// </summary>
|
||||
/// <value>The audio format attribute of the item.</value>
|
||||
[DataMember(Name = "AudioFormat", EmitDefaultValue = false)]
|
||||
public string AudioFormat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class LanguageType {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Type: ").Append(Type).Append("\n");
|
||||
sb.Append(" AudioFormat: ").Append(AudioFormat).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as LanguageType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if LanguageType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of LanguageType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(LanguageType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Name == input.Name ||
|
||||
(this.Name != null &&
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this.Type == input.Type ||
|
||||
(this.Type != null &&
|
||||
this.Type.Equals(input.Type))
|
||||
) &&
|
||||
(
|
||||
this.AudioFormat == input.AudioFormat ||
|
||||
(this.AudioFormat != null &&
|
||||
this.AudioFormat.Equals(input.AudioFormat))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this.Type != null)
|
||||
hashCode = hashCode * 59 + this.Type.GetHashCode();
|
||||
if (this.AudioFormat != null)
|
||||
hashCode = hashCode * 59 + this.AudioFormat.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// ListCatalogCategoriesResponse
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ListCatalogCategoriesResponse : IEquatable<ListCatalogCategoriesResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ListCatalogCategoriesResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Payload">The payload for the listCatalogCategories operation..</param>
|
||||
/// <param name="Errors">One or more unexpected errors occurred during the listCatalogCategories operation..</param>
|
||||
public ListCatalogCategoriesResponse(ListOfCategories Payload = default(ListOfCategories), ErrorList Errors = default(ErrorList))
|
||||
{
|
||||
this.Payload = Payload;
|
||||
this.Errors = Errors;
|
||||
}
|
||||
public ListCatalogCategoriesResponse()
|
||||
{
|
||||
this.Payload = default(ListOfCategories);
|
||||
this.Errors = default(ErrorList);
|
||||
}
|
||||
/// <summary>
|
||||
/// The payload for the listCatalogCategories operation.
|
||||
/// </summary>
|
||||
/// <value>The payload for the listCatalogCategories operation.</value>
|
||||
[DataMember(Name = "payload", EmitDefaultValue = false)]
|
||||
public ListOfCategories Payload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// One or more unexpected errors occurred during the listCatalogCategories operation.
|
||||
/// </summary>
|
||||
/// <value>One or more unexpected errors occurred during the listCatalogCategories operation.</value>
|
||||
[DataMember(Name = "errors", EmitDefaultValue = false)]
|
||||
public ErrorList Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ListCatalogCategoriesResponse {\n");
|
||||
sb.Append(" Payload: ").Append(Payload).Append("\n");
|
||||
sb.Append(" Errors: ").Append(Errors).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ListCatalogCategoriesResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ListCatalogCategoriesResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ListCatalogCategoriesResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ListCatalogCategoriesResponse input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Payload == input.Payload ||
|
||||
(this.Payload != null &&
|
||||
this.Payload.Equals(input.Payload))
|
||||
) &&
|
||||
(
|
||||
this.Errors == input.Errors ||
|
||||
(this.Errors != null &&
|
||||
this.Errors.Equals(input.Errors))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Payload != null)
|
||||
hashCode = hashCode * 59 + this.Payload.GetHashCode();
|
||||
if (this.Errors != null)
|
||||
hashCode = hashCode * 59 + this.Errors.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// ListCatalogItemsResponse
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ListCatalogItemsResponse : IEquatable<ListCatalogItemsResponse>, IValidatableObject
|
||||
{
|
||||
public ListCatalogItemsResponse()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ListCatalogItemsResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Payload">The payload for the listCatalogItems operation..</param>
|
||||
/// <param name="Errors">One or more unexpected errors occurred during the listCatalogItems operation..</param>
|
||||
public ListCatalogItemsResponse(ListMatchingItemsResponse Payload = default(ListMatchingItemsResponse), ErrorList Errors = default(ErrorList))
|
||||
{
|
||||
this.Payload = Payload;
|
||||
this.Errors = Errors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The payload for the listCatalogItems operation.
|
||||
/// </summary>
|
||||
/// <value>The payload for the listCatalogItems operation.</value>
|
||||
[DataMember(Name = "payload", EmitDefaultValue = false)]
|
||||
public ListMatchingItemsResponse Payload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// One or more unexpected errors occurred during the listCatalogItems operation.
|
||||
/// </summary>
|
||||
/// <value>One or more unexpected errors occurred during the listCatalogItems operation.</value>
|
||||
[DataMember(Name = "errors", EmitDefaultValue = false)]
|
||||
public ErrorList Errors { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ListCatalogItemsResponse {\n");
|
||||
sb.Append(" Payload: ").Append(Payload).Append("\n");
|
||||
sb.Append(" Errors: ").Append(Errors).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ListCatalogItemsResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ListCatalogItemsResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ListCatalogItemsResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ListCatalogItemsResponse input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Payload == input.Payload ||
|
||||
(this.Payload != null &&
|
||||
this.Payload.Equals(input.Payload))
|
||||
) &&
|
||||
(
|
||||
this.Errors == input.Errors ||
|
||||
(this.Errors != null &&
|
||||
this.Errors.Equals(input.Errors))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Payload != null)
|
||||
hashCode = hashCode * 59 + this.Payload.GetHashCode();
|
||||
if (this.Errors != null)
|
||||
hashCode = hashCode * 59 + this.Errors.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// ListMatchingItemsResponse
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ListMatchingItemsResponse : IEquatable<ListMatchingItemsResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ListMatchingItemsResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Items">Items.</param>
|
||||
public ListMatchingItemsResponse(ItemList Items = default(ItemList))
|
||||
{
|
||||
this.Items = Items;
|
||||
}
|
||||
|
||||
public ListMatchingItemsResponse()
|
||||
{
|
||||
this.Items = default(ItemList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Items
|
||||
/// </summary>
|
||||
[DataMember(Name = "Items", EmitDefaultValue = false)]
|
||||
public ItemList Items { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ListMatchingItemsResponse {\n");
|
||||
sb.Append(" Items: ").Append(Items).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ListMatchingItemsResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ListMatchingItemsResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ListMatchingItemsResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ListMatchingItemsResponse input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Items == input.Items ||
|
||||
(this.Items != null &&
|
||||
this.Items.Equals(input.Items))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Items != null)
|
||||
hashCode = hashCode * 59 + this.Items.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// ListOfCategories
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ListOfCategories : List<Categories>, IEquatable<ListOfCategories>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ListOfCategories" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public ListOfCategories() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ListOfCategories {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ListOfCategories);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ListOfCategories instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ListOfCategories to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ListOfCategories input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of active offer listings for the item that was submitted. The listing count is returned by condition, one for each listing condition value that is returned. Possible listing condition values are: Any, New, Used, Collectible, Refurbished, or Club.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class NumberOfOfferListingsList : List<OfferListingCountType>, IEquatable<NumberOfOfferListingsList>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NumberOfOfferListingsList" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public NumberOfOfferListingsList() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class NumberOfOfferListingsList {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as NumberOfOfferListingsList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if NumberOfOfferListingsList instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of NumberOfOfferListingsList to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(NumberOfOfferListingsList input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of offer listings with the specified condition.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class OfferListingCountType : IEquatable<OfferListingCountType>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OfferListingCountType" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected OfferListingCountType() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OfferListingCountType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Count">The number of offer listings. (required).</param>
|
||||
/// <param name="Condition">The condition of the item. (required).</param>
|
||||
public OfferListingCountType(int? Count = default(int?), string Condition = default(string))
|
||||
{
|
||||
// to ensure "Count" is required (not null)
|
||||
if (Count == null)
|
||||
{
|
||||
throw new InvalidDataException("Count is a required property for OfferListingCountType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Count = Count;
|
||||
}
|
||||
// to ensure "Condition" is required (not null)
|
||||
if (Condition == null)
|
||||
{
|
||||
throw new InvalidDataException("Condition is a required property for OfferListingCountType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Condition = Condition;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The number of offer listings.
|
||||
/// </summary>
|
||||
/// <value>The number of offer listings.</value>
|
||||
[DataMember(Name = "Count", EmitDefaultValue = false)]
|
||||
public int? Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The condition of the item.
|
||||
/// </summary>
|
||||
/// <value>The condition of the item.</value>
|
||||
[DataMember(Name = "condition", EmitDefaultValue = false)]
|
||||
public string Condition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class OfferListingCountType {\n");
|
||||
sb.Append(" Count: ").Append(Count).Append("\n");
|
||||
sb.Append(" Condition: ").Append(Condition).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as OfferListingCountType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if OfferListingCountType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of OfferListingCountType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(OfferListingCountType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Count == input.Count ||
|
||||
(this.Count != null &&
|
||||
this.Count.Equals(input.Count))
|
||||
) &&
|
||||
(
|
||||
this.Condition == input.Condition ||
|
||||
(this.Condition != null &&
|
||||
this.Condition.Equals(input.Condition))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Count != null)
|
||||
hashCode = hashCode * 59 + this.Count.GetHashCode();
|
||||
if (this.Condition != null)
|
||||
hashCode = hashCode * 59 + this.Condition.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// The price attribute of the item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Price : IEquatable<Price>, IValidatableObject
|
||||
{
|
||||
public Price()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Price" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Amount">The amount..</param>
|
||||
/// <param name="CurrencyCode">The currency code of the amount..</param>
|
||||
public Price(decimal? Amount = default(decimal?), string CurrencyCode = default(string))
|
||||
{
|
||||
this.Amount = Amount;
|
||||
this.CurrencyCode = CurrencyCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The amount.
|
||||
/// </summary>
|
||||
/// <value>The amount.</value>
|
||||
[DataMember(Name = "Amount", EmitDefaultValue = false)]
|
||||
public decimal? Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The currency code of the amount.
|
||||
/// </summary>
|
||||
/// <value>The currency code of the amount.</value>
|
||||
[DataMember(Name = "CurrencyCode", EmitDefaultValue = false)]
|
||||
public string CurrencyCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Price {\n");
|
||||
sb.Append(" Amount: ").Append(Amount).Append("\n");
|
||||
sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Price);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Price instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Price to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Price input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Amount == input.Amount ||
|
||||
(this.Amount != null &&
|
||||
this.Amount.Equals(input.Amount))
|
||||
) &&
|
||||
(
|
||||
this.CurrencyCode == input.CurrencyCode ||
|
||||
(this.CurrencyCode != null &&
|
||||
this.CurrencyCode.Equals(input.CurrencyCode))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Amount != null)
|
||||
hashCode = hashCode * 59 + this.Amount.GetHashCode();
|
||||
if (this.CurrencyCode != null)
|
||||
hashCode = hashCode * 59 + this.CurrencyCode.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,257 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// QualifiersType
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class QualifiersType : IEquatable<QualifiersType>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="QualifiersType" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public QualifiersType() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="QualifiersType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="ItemCondition">The condition of the item. Possible values: New, Used, Collectible, Refurbished, or Club. (required).</param>
|
||||
/// <param name="ItemSubcondition">The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other. (required).</param>
|
||||
/// <param name="FulfillmentChannel">The fulfillment channel for the item. Possible values: * Amazon - Fulfilled by Amazon. * Merchant - Fulfilled by the seller. (required).</param>
|
||||
/// <param name="ShipsDomestically">Indicates whether the marketplace specified in the request and the location that the item ships from are in the same country. Possible values: True, False, or Unknown. (required).</param>
|
||||
/// <param name="ShippingTime">(0-2 days, 3-7 days, 8-13 days, or 14 or more days) – Indicates the maximum time within which the item will likely be shipped once an order has been placed. (required).</param>
|
||||
/// <param name="SellerPositiveFeedbackRating">(98-100%, 95-97%, 90-94%, 80-89%, 70-79%, Less than 70%, or Just launched ) – Indicates the percentage of feedback ratings that were positive over the past 12 months. (required).</param>
|
||||
public QualifiersType(string ItemCondition = default(string), string ItemSubcondition = default(string), string FulfillmentChannel = default(string), string ShipsDomestically = default(string), ShippingTimeType ShippingTime = default(ShippingTimeType), string SellerPositiveFeedbackRating = default(string))
|
||||
{
|
||||
// to ensure "ItemCondition" is required (not null)
|
||||
if (ItemCondition == null)
|
||||
{
|
||||
throw new InvalidDataException("ItemCondition is a required property for QualifiersType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ItemCondition = ItemCondition;
|
||||
}
|
||||
// to ensure "ItemSubcondition" is required (not null)
|
||||
if (ItemSubcondition == null)
|
||||
{
|
||||
throw new InvalidDataException("ItemSubcondition is a required property for QualifiersType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ItemSubcondition = ItemSubcondition;
|
||||
}
|
||||
// to ensure "FulfillmentChannel" is required (not null)
|
||||
if (FulfillmentChannel == null)
|
||||
{
|
||||
throw new InvalidDataException("FulfillmentChannel is a required property for QualifiersType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.FulfillmentChannel = FulfillmentChannel;
|
||||
}
|
||||
// to ensure "ShipsDomestically" is required (not null)
|
||||
if (ShipsDomestically == null)
|
||||
{
|
||||
throw new InvalidDataException("ShipsDomestically is a required property for QualifiersType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ShipsDomestically = ShipsDomestically;
|
||||
}
|
||||
// to ensure "ShippingTime" is required (not null)
|
||||
if (ShippingTime == null)
|
||||
{
|
||||
throw new InvalidDataException("ShippingTime is a required property for QualifiersType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ShippingTime = ShippingTime;
|
||||
}
|
||||
// to ensure "SellerPositiveFeedbackRating" is required (not null)
|
||||
if (SellerPositiveFeedbackRating == null)
|
||||
{
|
||||
throw new InvalidDataException("SellerPositiveFeedbackRating is a required property for QualifiersType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SellerPositiveFeedbackRating = SellerPositiveFeedbackRating;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The condition of the item. Possible values: New, Used, Collectible, Refurbished, or Club.
|
||||
/// </summary>
|
||||
/// <value>The condition of the item. Possible values: New, Used, Collectible, Refurbished, or Club.</value>
|
||||
[DataMember(Name = "ItemCondition", EmitDefaultValue = false)]
|
||||
public string ItemCondition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other.
|
||||
/// </summary>
|
||||
/// <value>The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other.</value>
|
||||
[DataMember(Name = "ItemSubcondition", EmitDefaultValue = false)]
|
||||
public string ItemSubcondition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The fulfillment channel for the item. Possible values: * Amazon - Fulfilled by Amazon. * Merchant - Fulfilled by the seller.
|
||||
/// </summary>
|
||||
/// <value>The fulfillment channel for the item. Possible values: * Amazon - Fulfilled by Amazon. * Merchant - Fulfilled by the seller.</value>
|
||||
[DataMember(Name = "FulfillmentChannel", EmitDefaultValue = false)]
|
||||
public string FulfillmentChannel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the marketplace specified in the request and the location that the item ships from are in the same country. Possible values: True, False, or Unknown.
|
||||
/// </summary>
|
||||
/// <value>Indicates whether the marketplace specified in the request and the location that the item ships from are in the same country. Possible values: True, False, or Unknown.</value>
|
||||
[DataMember(Name = "ShipsDomestically", EmitDefaultValue = false)]
|
||||
public string ShipsDomestically { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (0-2 days, 3-7 days, 8-13 days, or 14 or more days) – Indicates the maximum time within which the item will likely be shipped once an order has been placed.
|
||||
/// </summary>
|
||||
/// <value>(0-2 days, 3-7 days, 8-13 days, or 14 or more days) – Indicates the maximum time within which the item will likely be shipped once an order has been placed.</value>
|
||||
[DataMember(Name = "ShippingTime", EmitDefaultValue = false)]
|
||||
public ShippingTimeType ShippingTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// (98-100%, 95-97%, 90-94%, 80-89%, 70-79%, Less than 70%, or Just launched ) – Indicates the percentage of feedback ratings that were positive over the past 12 months.
|
||||
/// </summary>
|
||||
/// <value>(98-100%, 95-97%, 90-94%, 80-89%, 70-79%, Less than 70%, or Just launched ) – Indicates the percentage of feedback ratings that were positive over the past 12 months.</value>
|
||||
[DataMember(Name = "SellerPositiveFeedbackRating", EmitDefaultValue = false)]
|
||||
public string SellerPositiveFeedbackRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class QualifiersType {\n");
|
||||
sb.Append(" ItemCondition: ").Append(ItemCondition).Append("\n");
|
||||
sb.Append(" ItemSubcondition: ").Append(ItemSubcondition).Append("\n");
|
||||
sb.Append(" FulfillmentChannel: ").Append(FulfillmentChannel).Append("\n");
|
||||
sb.Append(" ShipsDomestically: ").Append(ShipsDomestically).Append("\n");
|
||||
sb.Append(" ShippingTime: ").Append(ShippingTime).Append("\n");
|
||||
sb.Append(" SellerPositiveFeedbackRating: ").Append(SellerPositiveFeedbackRating).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as QualifiersType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if QualifiersType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of QualifiersType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(QualifiersType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.ItemCondition == input.ItemCondition ||
|
||||
(this.ItemCondition != null &&
|
||||
this.ItemCondition.Equals(input.ItemCondition))
|
||||
) &&
|
||||
(
|
||||
this.ItemSubcondition == input.ItemSubcondition ||
|
||||
(this.ItemSubcondition != null &&
|
||||
this.ItemSubcondition.Equals(input.ItemSubcondition))
|
||||
) &&
|
||||
(
|
||||
this.FulfillmentChannel == input.FulfillmentChannel ||
|
||||
(this.FulfillmentChannel != null &&
|
||||
this.FulfillmentChannel.Equals(input.FulfillmentChannel))
|
||||
) &&
|
||||
(
|
||||
this.ShipsDomestically == input.ShipsDomestically ||
|
||||
(this.ShipsDomestically != null &&
|
||||
this.ShipsDomestically.Equals(input.ShipsDomestically))
|
||||
) &&
|
||||
(
|
||||
this.ShippingTime == input.ShippingTime ||
|
||||
(this.ShippingTime != null &&
|
||||
this.ShippingTime.Equals(input.ShippingTime))
|
||||
) &&
|
||||
(
|
||||
this.SellerPositiveFeedbackRating == input.SellerPositiveFeedbackRating ||
|
||||
(this.SellerPositiveFeedbackRating != null &&
|
||||
this.SellerPositiveFeedbackRating.Equals(input.SellerPositiveFeedbackRating))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.ItemCondition != null)
|
||||
hashCode = hashCode * 59 + this.ItemCondition.GetHashCode();
|
||||
if (this.ItemSubcondition != null)
|
||||
hashCode = hashCode * 59 + this.ItemSubcondition.GetHashCode();
|
||||
if (this.FulfillmentChannel != null)
|
||||
hashCode = hashCode * 59 + this.FulfillmentChannel.GetHashCode();
|
||||
if (this.ShipsDomestically != null)
|
||||
hashCode = hashCode * 59 + this.ShipsDomestically.GetHashCode();
|
||||
if (this.ShippingTime != null)
|
||||
hashCode = hashCode * 59 + this.ShippingTime.GetHashCode();
|
||||
if (this.SellerPositiveFeedbackRating != null)
|
||||
hashCode = hashCode * 59 + this.SellerPositiveFeedbackRating.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// A list of variation relationship information, if applicable for the item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class RelationshipList : List<RelationshipType>, IEquatable<RelationshipList>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RelationshipList" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public RelationshipList() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class RelationshipList {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as RelationshipList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if RelationshipList instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of RelationshipList to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(RelationshipList input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,496 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Specific variations of the item.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class RelationshipType : IEquatable<RelationshipType>, IValidatableObject
|
||||
{
|
||||
public RelationshipType() { }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RelationshipType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Color">The color variation of the item..</param>
|
||||
/// <param name="Edition">The edition variation of the item..</param>
|
||||
/// <param name="Flavor">The flavor variation of the item..</param>
|
||||
/// <param name="GemType">The gem type variations of the item..</param>
|
||||
/// <param name="GolfClubFlex">The golf club flex variation of an item..</param>
|
||||
/// <param name="HandOrientation">The hand orientation variation of an item..</param>
|
||||
/// <param name="HardwarePlatform">The hardware platform variation of an item..</param>
|
||||
/// <param name="MaterialType">The material type variations of an item..</param>
|
||||
/// <param name="MetalType">The metal type variation of an item..</param>
|
||||
/// <param name="Model">The model variation of an item..</param>
|
||||
/// <param name="OperatingSystem">The operating system variations of an item..</param>
|
||||
/// <param name="ProductTypeSubcategory">The product type subcategory variation of an item..</param>
|
||||
/// <param name="RingSize">The ring size variation of an item..</param>
|
||||
/// <param name="ShaftMaterial">The shaft material variation of an item..</param>
|
||||
/// <param name="Scent">The scent variation of an item..</param>
|
||||
/// <param name="Size">The size variation of an item..</param>
|
||||
/// <param name="SizePerPearl">The size per pearl variation of an item..</param>
|
||||
/// <param name="GolfClubLoft">The golf club loft variation of an item..</param>
|
||||
/// <param name="TotalDiamondWeight">The total diamond weight variation of an item..</param>
|
||||
/// <param name="TotalGemWeight">The total gem weight variation of an item..</param>
|
||||
/// <param name="PackageQuantity">The package quantity variation of an item..</param>
|
||||
/// <param name="ItemDimensions">The item dimensions relationship of an item..</param>
|
||||
/// <param name="Identifiers">The item Identifiers relationship of an item..</param>
|
||||
public RelationshipType(string Color = default(string), string Edition = default(string), string Flavor = default(string), List<string> GemType = default(List<string>), string GolfClubFlex = default(string), string HandOrientation = default(string), string HardwarePlatform = default(string), List<string> MaterialType = default(List<string>), string MetalType = default(string), string Model = default(string), List<string> OperatingSystem = default(List<string>), string ProductTypeSubcategory = default(string), string RingSize = default(string), string ShaftMaterial = default(string), string Scent = default(string), string Size = default(string), string SizePerPearl = default(string), DecimalWithUnits GolfClubLoft = default(DecimalWithUnits), DecimalWithUnits TotalDiamondWeight = default(DecimalWithUnits), DecimalWithUnits TotalGemWeight = default(DecimalWithUnits), int? PackageQuantity = default(int?), DimensionType ItemDimensions = default(DimensionType), IdentifierType Identifiers = default(IdentifierType))
|
||||
{
|
||||
this.Color = Color;
|
||||
this.Edition = Edition;
|
||||
this.Flavor = Flavor;
|
||||
this.GemType = GemType;
|
||||
this.GolfClubFlex = GolfClubFlex;
|
||||
this.HandOrientation = HandOrientation;
|
||||
this.HardwarePlatform = HardwarePlatform;
|
||||
this.MaterialType = MaterialType;
|
||||
this.MetalType = MetalType;
|
||||
this.Model = Model;
|
||||
this.OperatingSystem = OperatingSystem;
|
||||
this.ProductTypeSubcategory = ProductTypeSubcategory;
|
||||
this.RingSize = RingSize;
|
||||
this.ShaftMaterial = ShaftMaterial;
|
||||
this.Scent = Scent;
|
||||
this.Size = Size;
|
||||
this.SizePerPearl = SizePerPearl;
|
||||
this.GolfClubLoft = GolfClubLoft;
|
||||
this.TotalDiamondWeight = TotalDiamondWeight;
|
||||
this.TotalGemWeight = TotalGemWeight;
|
||||
this.PackageQuantity = PackageQuantity;
|
||||
this.ItemDimensions = ItemDimensions;
|
||||
this.Identifiers = Identifiers;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The color variation of the item.
|
||||
/// </summary>
|
||||
/// <value>The color variation of the item.</value>
|
||||
[DataMember(Name = "Color", EmitDefaultValue = false)]
|
||||
public string Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The edition variation of the item.
|
||||
/// </summary>
|
||||
/// <value>The edition variation of the item.</value>
|
||||
[DataMember(Name = "Edition", EmitDefaultValue = false)]
|
||||
public string Edition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The flavor variation of the item.
|
||||
/// </summary>
|
||||
/// <value>The flavor variation of the item.</value>
|
||||
[DataMember(Name = "Flavor", EmitDefaultValue = false)]
|
||||
public string Flavor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The gem type variations of the item.
|
||||
/// </summary>
|
||||
/// <value>The gem type variations of the item.</value>
|
||||
[DataMember(Name = "GemType", EmitDefaultValue = false)]
|
||||
public List<string> GemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The golf club flex variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The golf club flex variation of an item.</value>
|
||||
[DataMember(Name = "GolfClubFlex", EmitDefaultValue = false)]
|
||||
public string GolfClubFlex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The hand orientation variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The hand orientation variation of an item.</value>
|
||||
[DataMember(Name = "HandOrientation", EmitDefaultValue = false)]
|
||||
public string HandOrientation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The hardware platform variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The hardware platform variation of an item.</value>
|
||||
[DataMember(Name = "HardwarePlatform", EmitDefaultValue = false)]
|
||||
public string HardwarePlatform { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The material type variations of an item.
|
||||
/// </summary>
|
||||
/// <value>The material type variations of an item.</value>
|
||||
[DataMember(Name = "MaterialType", EmitDefaultValue = false)]
|
||||
public List<string> MaterialType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The metal type variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The metal type variation of an item.</value>
|
||||
[DataMember(Name = "MetalType", EmitDefaultValue = false)]
|
||||
public string MetalType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The model variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The model variation of an item.</value>
|
||||
[DataMember(Name = "Model", EmitDefaultValue = false)]
|
||||
public string Model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The operating system variations of an item.
|
||||
/// </summary>
|
||||
/// <value>The operating system variations of an item.</value>
|
||||
[DataMember(Name = "OperatingSystem", EmitDefaultValue = false)]
|
||||
public List<string> OperatingSystem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The product type subcategory variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The product type subcategory variation of an item.</value>
|
||||
[DataMember(Name = "ProductTypeSubcategory", EmitDefaultValue = false)]
|
||||
public string ProductTypeSubcategory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The ring size variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The ring size variation of an item.</value>
|
||||
[DataMember(Name = "RingSize", EmitDefaultValue = false)]
|
||||
public string RingSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The shaft material variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The shaft material variation of an item.</value>
|
||||
[DataMember(Name = "ShaftMaterial", EmitDefaultValue = false)]
|
||||
public string ShaftMaterial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The scent variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The scent variation of an item.</value>
|
||||
[DataMember(Name = "Scent", EmitDefaultValue = false)]
|
||||
public string Scent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The size variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The size variation of an item.</value>
|
||||
[DataMember(Name = "Size", EmitDefaultValue = false)]
|
||||
public string Size { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The size per pearl variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The size per pearl variation of an item.</value>
|
||||
[DataMember(Name = "SizePerPearl", EmitDefaultValue = false)]
|
||||
public string SizePerPearl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The golf club loft variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The golf club loft variation of an item.</value>
|
||||
[DataMember(Name = "GolfClubLoft", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits GolfClubLoft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total diamond weight variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The total diamond weight variation of an item.</value>
|
||||
[DataMember(Name = "TotalDiamondWeight", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits TotalDiamondWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total gem weight variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The total gem weight variation of an item.</value>
|
||||
[DataMember(Name = "TotalGemWeight", EmitDefaultValue = false)]
|
||||
public DecimalWithUnits TotalGemWeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The package quantity variation of an item.
|
||||
/// </summary>
|
||||
/// <value>The package quantity variation of an item.</value>
|
||||
[DataMember(Name = "PackageQuantity", EmitDefaultValue = false)]
|
||||
public int? PackageQuantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The item dimensions relationship of an item.
|
||||
/// </summary>
|
||||
/// <value>The item dimensions relationship of an item.</value>
|
||||
[DataMember(Name = "ItemDimensions", EmitDefaultValue = false)]
|
||||
public DimensionType ItemDimensions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The identifiers that uniquely identify the item.
|
||||
/// </summary>
|
||||
/// <value>The identifiers that uniquely identify the item.</value>
|
||||
[DataMember(Name = "Identifiers", EmitDefaultValue = false)]
|
||||
public IdentifierType Identifiers { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class RelationshipType {\n");
|
||||
sb.Append(" Color: ").Append(Color).Append("\n");
|
||||
sb.Append(" Edition: ").Append(Edition).Append("\n");
|
||||
sb.Append(" Flavor: ").Append(Flavor).Append("\n");
|
||||
sb.Append(" GemType: ").Append(GemType).Append("\n");
|
||||
sb.Append(" GolfClubFlex: ").Append(GolfClubFlex).Append("\n");
|
||||
sb.Append(" HandOrientation: ").Append(HandOrientation).Append("\n");
|
||||
sb.Append(" HardwarePlatform: ").Append(HardwarePlatform).Append("\n");
|
||||
sb.Append(" MaterialType: ").Append(MaterialType).Append("\n");
|
||||
sb.Append(" MetalType: ").Append(MetalType).Append("\n");
|
||||
sb.Append(" Model: ").Append(Model).Append("\n");
|
||||
sb.Append(" OperatingSystem: ").Append(OperatingSystem).Append("\n");
|
||||
sb.Append(" ProductTypeSubcategory: ").Append(ProductTypeSubcategory).Append("\n");
|
||||
sb.Append(" RingSize: ").Append(RingSize).Append("\n");
|
||||
sb.Append(" ShaftMaterial: ").Append(ShaftMaterial).Append("\n");
|
||||
sb.Append(" Scent: ").Append(Scent).Append("\n");
|
||||
sb.Append(" Size: ").Append(Size).Append("\n");
|
||||
sb.Append(" SizePerPearl: ").Append(SizePerPearl).Append("\n");
|
||||
sb.Append(" GolfClubLoft: ").Append(GolfClubLoft).Append("\n");
|
||||
sb.Append(" TotalDiamondWeight: ").Append(TotalDiamondWeight).Append("\n");
|
||||
sb.Append(" TotalGemWeight: ").Append(TotalGemWeight).Append("\n");
|
||||
sb.Append(" PackageQuantity: ").Append(PackageQuantity).Append("\n");
|
||||
sb.Append(" ItemDimensions: ").Append(ItemDimensions).Append("\n");
|
||||
sb.Append(" Identifiers: ").Append(Identifiers).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as RelationshipType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if RelationshipType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of RelationshipType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(RelationshipType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Color == input.Color ||
|
||||
(this.Color != null &&
|
||||
this.Color.Equals(input.Color))
|
||||
) &&
|
||||
(
|
||||
this.Edition == input.Edition ||
|
||||
(this.Edition != null &&
|
||||
this.Edition.Equals(input.Edition))
|
||||
) &&
|
||||
(
|
||||
this.Flavor == input.Flavor ||
|
||||
(this.Flavor != null &&
|
||||
this.Flavor.Equals(input.Flavor))
|
||||
) &&
|
||||
(
|
||||
this.GemType == input.GemType ||
|
||||
this.GemType != null &&
|
||||
this.GemType.SequenceEqual(input.GemType)
|
||||
) &&
|
||||
(
|
||||
this.GolfClubFlex == input.GolfClubFlex ||
|
||||
(this.GolfClubFlex != null &&
|
||||
this.GolfClubFlex.Equals(input.GolfClubFlex))
|
||||
) &&
|
||||
(
|
||||
this.HandOrientation == input.HandOrientation ||
|
||||
(this.HandOrientation != null &&
|
||||
this.HandOrientation.Equals(input.HandOrientation))
|
||||
) &&
|
||||
(
|
||||
this.HardwarePlatform == input.HardwarePlatform ||
|
||||
(this.HardwarePlatform != null &&
|
||||
this.HardwarePlatform.Equals(input.HardwarePlatform))
|
||||
) &&
|
||||
(
|
||||
this.MaterialType == input.MaterialType ||
|
||||
this.MaterialType != null &&
|
||||
this.MaterialType.SequenceEqual(input.MaterialType)
|
||||
) &&
|
||||
(
|
||||
this.MetalType == input.MetalType ||
|
||||
(this.MetalType != null &&
|
||||
this.MetalType.Equals(input.MetalType))
|
||||
) &&
|
||||
(
|
||||
this.Model == input.Model ||
|
||||
(this.Model != null &&
|
||||
this.Model.Equals(input.Model))
|
||||
) &&
|
||||
(
|
||||
this.OperatingSystem == input.OperatingSystem ||
|
||||
this.OperatingSystem != null &&
|
||||
this.OperatingSystem.SequenceEqual(input.OperatingSystem)
|
||||
) &&
|
||||
(
|
||||
this.ProductTypeSubcategory == input.ProductTypeSubcategory ||
|
||||
(this.ProductTypeSubcategory != null &&
|
||||
this.ProductTypeSubcategory.Equals(input.ProductTypeSubcategory))
|
||||
) &&
|
||||
(
|
||||
this.RingSize == input.RingSize ||
|
||||
(this.RingSize != null &&
|
||||
this.RingSize.Equals(input.RingSize))
|
||||
) &&
|
||||
(
|
||||
this.ShaftMaterial == input.ShaftMaterial ||
|
||||
(this.ShaftMaterial != null &&
|
||||
this.ShaftMaterial.Equals(input.ShaftMaterial))
|
||||
) &&
|
||||
(
|
||||
this.Scent == input.Scent ||
|
||||
(this.Scent != null &&
|
||||
this.Scent.Equals(input.Scent))
|
||||
) &&
|
||||
(
|
||||
this.Size == input.Size ||
|
||||
(this.Size != null &&
|
||||
this.Size.Equals(input.Size))
|
||||
) &&
|
||||
(
|
||||
this.SizePerPearl == input.SizePerPearl ||
|
||||
(this.SizePerPearl != null &&
|
||||
this.SizePerPearl.Equals(input.SizePerPearl))
|
||||
) &&
|
||||
(
|
||||
this.GolfClubLoft == input.GolfClubLoft ||
|
||||
(this.GolfClubLoft != null &&
|
||||
this.GolfClubLoft.Equals(input.GolfClubLoft))
|
||||
) &&
|
||||
(
|
||||
this.TotalDiamondWeight == input.TotalDiamondWeight ||
|
||||
(this.TotalDiamondWeight != null &&
|
||||
this.TotalDiamondWeight.Equals(input.TotalDiamondWeight))
|
||||
) &&
|
||||
(
|
||||
this.TotalGemWeight == input.TotalGemWeight ||
|
||||
(this.TotalGemWeight != null &&
|
||||
this.TotalGemWeight.Equals(input.TotalGemWeight))
|
||||
) &&
|
||||
(
|
||||
this.PackageQuantity == input.PackageQuantity ||
|
||||
(this.PackageQuantity != null &&
|
||||
this.PackageQuantity.Equals(input.PackageQuantity))
|
||||
) &&
|
||||
(
|
||||
this.ItemDimensions == input.ItemDimensions ||
|
||||
(this.ItemDimensions != null &&
|
||||
this.ItemDimensions.Equals(input.ItemDimensions))
|
||||
) &&
|
||||
(
|
||||
this.Identifiers == input.Identifiers ||
|
||||
(this.Identifiers != null &&
|
||||
this.Identifiers.Equals(input.Identifiers))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Color != null)
|
||||
hashCode = hashCode * 59 + this.Color.GetHashCode();
|
||||
if (this.Edition != null)
|
||||
hashCode = hashCode * 59 + this.Edition.GetHashCode();
|
||||
if (this.Flavor != null)
|
||||
hashCode = hashCode * 59 + this.Flavor.GetHashCode();
|
||||
if (this.GemType != null)
|
||||
hashCode = hashCode * 59 + this.GemType.GetHashCode();
|
||||
if (this.GolfClubFlex != null)
|
||||
hashCode = hashCode * 59 + this.GolfClubFlex.GetHashCode();
|
||||
if (this.HandOrientation != null)
|
||||
hashCode = hashCode * 59 + this.HandOrientation.GetHashCode();
|
||||
if (this.HardwarePlatform != null)
|
||||
hashCode = hashCode * 59 + this.HardwarePlatform.GetHashCode();
|
||||
if (this.MaterialType != null)
|
||||
hashCode = hashCode * 59 + this.MaterialType.GetHashCode();
|
||||
if (this.MetalType != null)
|
||||
hashCode = hashCode * 59 + this.MetalType.GetHashCode();
|
||||
if (this.Model != null)
|
||||
hashCode = hashCode * 59 + this.Model.GetHashCode();
|
||||
if (this.OperatingSystem != null)
|
||||
hashCode = hashCode * 59 + this.OperatingSystem.GetHashCode();
|
||||
if (this.ProductTypeSubcategory != null)
|
||||
hashCode = hashCode * 59 + this.ProductTypeSubcategory.GetHashCode();
|
||||
if (this.RingSize != null)
|
||||
hashCode = hashCode * 59 + this.RingSize.GetHashCode();
|
||||
if (this.ShaftMaterial != null)
|
||||
hashCode = hashCode * 59 + this.ShaftMaterial.GetHashCode();
|
||||
if (this.Scent != null)
|
||||
hashCode = hashCode * 59 + this.Scent.GetHashCode();
|
||||
if (this.Size != null)
|
||||
hashCode = hashCode * 59 + this.Size.GetHashCode();
|
||||
if (this.SizePerPearl != null)
|
||||
hashCode = hashCode * 59 + this.SizePerPearl.GetHashCode();
|
||||
if (this.GolfClubLoft != null)
|
||||
hashCode = hashCode * 59 + this.GolfClubLoft.GetHashCode();
|
||||
if (this.TotalDiamondWeight != null)
|
||||
hashCode = hashCode * 59 + this.TotalDiamondWeight.GetHashCode();
|
||||
if (this.TotalGemWeight != null)
|
||||
hashCode = hashCode * 59 + this.TotalGemWeight.GetHashCode();
|
||||
if (this.PackageQuantity != null)
|
||||
hashCode = hashCode * 59 + this.PackageQuantity.GetHashCode();
|
||||
if (this.ItemDimensions != null)
|
||||
hashCode = hashCode * 59 + this.ItemDimensions.GetHashCode();
|
||||
if (this.Identifiers != null)
|
||||
hashCode = hashCode * 59 + this.Identifiers.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// A list of sales rank information for the item by category.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class SalesRankList : List<SalesRankType>, IEquatable<SalesRankList>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SalesRankList" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public SalesRankList() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class SalesRankList {\n");
|
||||
sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as SalesRankList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if SalesRankList instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of SalesRankList to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(SalesRankList input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return base.Equals(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = base.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// SalesRankType
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class SalesRankType : IEquatable<SalesRankType>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SalesRankType" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public SalesRankType() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SalesRankType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="ProductCategoryId">Identifies the item category from which the sales rank is taken. (required).</param>
|
||||
/// <param name="Rank">The sales rank of the item within the item category. (required).</param>
|
||||
public SalesRankType(string ProductCategoryId = default(string), int? Rank = default(int?))
|
||||
{
|
||||
// to ensure "ProductCategoryId" is required (not null)
|
||||
if (ProductCategoryId == null)
|
||||
{
|
||||
throw new InvalidDataException("ProductCategoryId is a required property for SalesRankType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ProductCategoryId = ProductCategoryId;
|
||||
}
|
||||
// to ensure "Rank" is required (not null)
|
||||
if (Rank == null)
|
||||
{
|
||||
throw new InvalidDataException("Rank is a required property for SalesRankType and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Rank = Rank;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Identifies the item category from which the sales rank is taken.
|
||||
/// </summary>
|
||||
/// <value>Identifies the item category from which the sales rank is taken.</value>
|
||||
[DataMember(Name = "ProductCategoryId", EmitDefaultValue = false)]
|
||||
public string ProductCategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The sales rank of the item within the item category.
|
||||
/// </summary>
|
||||
/// <value>The sales rank of the item within the item category.</value>
|
||||
[DataMember(Name = "Rank", EmitDefaultValue = false)]
|
||||
public int? Rank { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class SalesRankType {\n");
|
||||
sb.Append(" ProductCategoryId: ").Append(ProductCategoryId).Append("\n");
|
||||
sb.Append(" Rank: ").Append(Rank).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as SalesRankType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if SalesRankType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of SalesRankType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(SalesRankType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.ProductCategoryId == input.ProductCategoryId ||
|
||||
(this.ProductCategoryId != null &&
|
||||
this.ProductCategoryId.Equals(input.ProductCategoryId))
|
||||
) &&
|
||||
(
|
||||
this.Rank == input.Rank ||
|
||||
(this.Rank != null &&
|
||||
this.Rank.Equals(input.Rank))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.ProductCategoryId != null)
|
||||
hashCode = hashCode * 59 + this.ProductCategoryId.GetHashCode();
|
||||
if (this.Rank != null)
|
||||
hashCode = hashCode * 59 + this.Rank.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// SellerSKUIdentifier
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class SellerSKUIdentifier : IEquatable<SellerSKUIdentifier>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SellerSKUIdentifier" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public SellerSKUIdentifier() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SellerSKUIdentifier" /> class.
|
||||
/// </summary>
|
||||
/// <param name="MarketplaceId">A marketplace identifier. (required).</param>
|
||||
/// <param name="SellerId">The seller identifier submitted for the operation. (required).</param>
|
||||
/// <param name="SellerSKU">The seller stock keeping unit (SKU) of the item. (required).</param>
|
||||
public SellerSKUIdentifier(string MarketplaceId = default(string), string SellerId = default(string), string SellerSKU = default(string))
|
||||
{
|
||||
// to ensure "MarketplaceId" is required (not null)
|
||||
if (MarketplaceId == null)
|
||||
{
|
||||
throw new InvalidDataException("MarketplaceId is a required property for SellerSKUIdentifier and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.MarketplaceId = MarketplaceId;
|
||||
}
|
||||
// to ensure "SellerId" is required (not null)
|
||||
if (SellerId == null)
|
||||
{
|
||||
throw new InvalidDataException("SellerId is a required property for SellerSKUIdentifier and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SellerId = SellerId;
|
||||
}
|
||||
// to ensure "SellerSKU" is required (not null)
|
||||
if (SellerSKU == null)
|
||||
{
|
||||
throw new InvalidDataException("SellerSKU is a required property for SellerSKUIdentifier and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SellerSKU = SellerSKU;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A marketplace identifier.
|
||||
/// </summary>
|
||||
/// <value>A marketplace identifier.</value>
|
||||
[DataMember(Name = "MarketplaceId", EmitDefaultValue = false)]
|
||||
public string MarketplaceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The seller identifier submitted for the operation.
|
||||
/// </summary>
|
||||
/// <value>The seller identifier submitted for the operation.</value>
|
||||
[DataMember(Name = "SellerId", EmitDefaultValue = false)]
|
||||
public string SellerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The seller stock keeping unit (SKU) of the item.
|
||||
/// </summary>
|
||||
/// <value>The seller stock keeping unit (SKU) of the item.</value>
|
||||
[DataMember(Name = "SellerSKU", EmitDefaultValue = false)]
|
||||
public string SellerSKU { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class SellerSKUIdentifier {\n");
|
||||
sb.Append(" MarketplaceId: ").Append(MarketplaceId).Append("\n");
|
||||
sb.Append(" SellerId: ").Append(SellerId).Append("\n");
|
||||
sb.Append(" SellerSKU: ").Append(SellerSKU).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as SellerSKUIdentifier);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if SellerSKUIdentifier instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of SellerSKUIdentifier to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(SellerSKUIdentifier input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.MarketplaceId == input.MarketplaceId ||
|
||||
(this.MarketplaceId != null &&
|
||||
this.MarketplaceId.Equals(input.MarketplaceId))
|
||||
) &&
|
||||
(
|
||||
this.SellerId == input.SellerId ||
|
||||
(this.SellerId != null &&
|
||||
this.SellerId.Equals(input.SellerId))
|
||||
) &&
|
||||
(
|
||||
this.SellerSKU == input.SellerSKU ||
|
||||
(this.SellerSKU != null &&
|
||||
this.SellerSKU.Equals(input.SellerSKU))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.MarketplaceId != null)
|
||||
hashCode = hashCode * 59 + this.MarketplaceId.GetHashCode();
|
||||
if (this.SellerId != null)
|
||||
hashCode = hashCode * 59 + this.SellerId.GetHashCode();
|
||||
if (this.SellerSKU != null)
|
||||
hashCode = hashCode * 59 + this.SellerSKU.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for Catalog Items
|
||||
*
|
||||
* The Selling Partner API for Catalog Items helps you programmatically retrieve item details for items in the catalog.
|
||||
*
|
||||
* OpenAPI spec version: v0
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.CatalogItems
|
||||
{
|
||||
/// <summary>
|
||||
/// ShippingTimeType
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ShippingTimeType : IEquatable<ShippingTimeType>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ShippingTimeType" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Max">(0-2 days, 3-7 days, 8-13 days, or 14 or more days) – Indicates the maximum time within which the item will likely be shipped once an order has been placed..</param>
|
||||
public ShippingTimeType(string Max = default(string))
|
||||
{
|
||||
this.Max = Max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (0-2 days, 3-7 days, 8-13 days, or 14 or more days) – Indicates the maximum time within which the item will likely be shipped once an order has been placed.
|
||||
/// </summary>
|
||||
/// <value>(0-2 days, 3-7 days, 8-13 days, or 14 or more days) – Indicates the maximum time within which the item will likely be shipped once an order has been placed.</value>
|
||||
[DataMember(Name = "Max", EmitDefaultValue = false)]
|
||||
public string Max { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ShippingTimeType {\n");
|
||||
sb.Append(" Max: ").Append(Max).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as ShippingTimeType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ShippingTimeType instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of ShippingTimeType to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ShippingTimeType input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Max == input.Max ||
|
||||
(this.Max != null &&
|
||||
this.Max.Equals(input.Max))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Max != null)
|
||||
hashCode = hashCode * 59 + this.Max.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.Exceptions
|
||||
{
|
||||
public class AmazonException : Exception
|
||||
{
|
||||
public ExceptionResponse Response { get; set; }
|
||||
|
||||
public AmazonException(string msg, IRestResponse response = null) : base(msg)
|
||||
{
|
||||
if (response != null)
|
||||
{
|
||||
Response = new ExceptionResponse();
|
||||
Response.Content = response.Content;
|
||||
Response.ResponseCode = response.StatusCode;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class AmazonNotFoundException : AmazonException
|
||||
{
|
||||
public AmazonNotFoundException(string msg, IRestResponse response = null) : base(msg, response)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AmazonUnauthorizedException : AmazonException
|
||||
{
|
||||
public AmazonUnauthorizedException(string msg, IRestResponse response = null) : base(msg, response)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AmazonInvalidInputException : AmazonException
|
||||
{
|
||||
public AmazonInvalidInputException(string msg, IRestResponse response = null) : base(msg, response)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
public class AmazonQuotaExceededException : AmazonException
|
||||
{
|
||||
public AmazonQuotaExceededException(string msg, IRestResponse response = null) : base(msg, response)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AmazonInvalidSignatureException : AmazonException
|
||||
{
|
||||
public AmazonInvalidSignatureException(string msg, IRestResponse response = null) : base(msg, response)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AmazonProcessingReportDeserializeException : AmazonException
|
||||
{
|
||||
public string ReportContent { get; set; }
|
||||
public AmazonProcessingReportDeserializeException(string msg, string reportContent, IRestResponse response = null) : base(msg, response)
|
||||
{
|
||||
ReportContent = reportContent;
|
||||
}
|
||||
}
|
||||
|
||||
public class ExceptionResponse
|
||||
{
|
||||
public string Content { get; set; }
|
||||
public HttpStatusCode? ResponseCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
/*
|
||||
* Selling Partner API for FBA Inbound Eligibilty
|
||||
*
|
||||
* With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon's fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon's fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon's fulfillment centers.
|
||||
*
|
||||
* OpenAPI spec version: v1
|
||||
*
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.FbaInbound
|
||||
{
|
||||
/// <summary>
|
||||
/// Error response returned when the request is unsuccessful.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Error : IEquatable<Error>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Error" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
public Error() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Error" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Code">An error code that identifies the type of error that occurred. (required).</param>
|
||||
/// <param name="Message">A message that describes the error condition in a human-readable form..</param>
|
||||
/// <param name="Details">Additional information that can help the caller understand or fix the issue..</param>
|
||||
public Error(string Code = default(string), string Message = default(string), string Details = default(string))
|
||||
{
|
||||
// to ensure "Code" is required (not null)
|
||||
if (Code == null)
|
||||
{
|
||||
throw new InvalidDataException("Code is a required property for Error and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Code = Code;
|
||||
}
|
||||
this.Message = Message;
|
||||
this.Details = Details;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An error code that identifies the type of error that occurred.
|
||||
/// </summary>
|
||||
/// <value>An error code that identifies the type of error that occurred.</value>
|
||||
[DataMember(Name = "code", EmitDefaultValue = false)]
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A message that describes the error condition in a human-readable form.
|
||||
/// </summary>
|
||||
/// <value>A message that describes the error condition in a human-readable form.</value>
|
||||
[DataMember(Name = "message", EmitDefaultValue = false)]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Additional information that can help the caller understand or fix the issue.
|
||||
/// </summary>
|
||||
/// <value>Additional information that can help the caller understand or fix the issue.</value>
|
||||
[DataMember(Name = "details", EmitDefaultValue = false)]
|
||||
public string Details { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Error {\n");
|
||||
sb.Append(" Code: ").Append(Code).Append("\n");
|
||||
sb.Append(" Message: ").Append(Message).Append("\n");
|
||||
sb.Append(" Details: ").Append(Details).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Error);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Error instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Error to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Error input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Code == input.Code ||
|
||||
(this.Code != null &&
|
||||
this.Code.Equals(input.Code))
|
||||
) &&
|
||||
(
|
||||
this.Message == input.Message ||
|
||||
(this.Message != null &&
|
||||
this.Message.Equals(input.Message))
|
||||
) &&
|
||||
(
|
||||
this.Details == input.Details ||
|
||||
(this.Details != null &&
|
||||
this.Details.Equals(input.Details))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.Code != null)
|
||||
hashCode = hashCode * 59 + this.Code.GetHashCode();
|
||||
if (this.Message != null)
|
||||
hashCode = hashCode * 59 + this.Message.GetHashCode();
|
||||
if (this.Details != null)
|
||||
hashCode = hashCode * 59 + this.Details.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user