Advertisement
Guest User

Untitled

a guest
Jun 7th, 2017
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.70 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: "API rest Rivermatic Omnichannel"
  4. version: "1.0.0"
  5. title: "Rivermatic"
  6. termsOfService: "http://swagger.io/terms/"
  7. contact:
  8. email: "marcos@visie.com.br"
  9. license:
  10. name: "Apache 2.0"
  11. url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  12. host: "http://127.0.0.1/"
  13. basePath: "rivermatic"
  14. tags:
  15. - name: "Shippingmethods"
  16. description: " Método que permite setar e retornar as formas de envio do produto"
  17. - name: "Paymentmethods"
  18. description: "Método que permite setar e retornar as formas de pagamentos escolhidas pelo usuario"
  19. - name: "Confirm"
  20. description: "Método que permite confirmar se o pagamento foi feito ou permite conferir o andamento do pagamento"
  21. schemes:
  22. - "http"
  23. paths:
  24. /Shippingmethods:
  25. post:
  26. tags:
  27. - "Shippingmethods"
  28. summary: "Seta o tipo de envio escolhido"
  29. description: ""
  30. operationId: "setShippingmethods"
  31. consumes:
  32. - "application/json"
  33. - "application/xml"
  34. produces:
  35. - "application/xml"
  36. - "application/json"
  37. parameters:
  38. - in: "body"
  39. name: "body"
  40. description: "Esse metodo irá setar o tipo de envio que o usuario escolher"
  41. required: true
  42. schema:
  43. $ref: "#/definitions/Shippingmethods"
  44. responses:
  45. 405:
  46. description: "Invalid input"
  47. security:
  48. - petstore_auth:
  49. - "write:pets"
  50. - "read:pets"
  51. put:
  52. tags:
  53. - "Shippingmethods"
  54. summary: "Atualiza o tipo de envio escolhido"
  55. description: ""
  56. operationId: "updateShippingmethods"
  57. consumes:
  58. - "application/json"
  59. - "application/xml"
  60. produces:
  61. - "application/xml"
  62. - "application/json"
  63. parameters:
  64. - in: "body"
  65. name: "body"
  66. description: "O tipo de envio deve estar setado para poder ser atualizado."
  67. required: true
  68. schema:
  69. $ref: "#/definitions/Shippingmethods"
  70. responses:
  71. 400:
  72. description: "Invalid ID supplied"
  73. 404:
  74. description: "Pet not found"
  75. 405:
  76. description: "Validation exception"
  77. security:
  78. - petstore_auth:
  79. - "write:pets"
  80. - "read:pets"
  81. get:
  82. tags:
  83. - "Shippingmethods"
  84. summary: "Retorna o tipo de envio escolhido "
  85. description: ""
  86. operationId: "getShippingmethods"
  87. consumes:
  88. - "application/json"
  89. - "application/xml"
  90. produces:
  91. - "application/xml"
  92. - "application/json"
  93. parameters:
  94. - in: "body"
  95. name: "body"
  96. description: "O tipo de envio deve estar setado para poder ser retornado."
  97. required: true
  98. schema:
  99. $ref: "#/definitions/Shippingmethods"
  100. responses:
  101. 400:
  102. description: "Invalid ID supplied"
  103. 404:
  104. description: "Pet not found"
  105. 405:
  106. description: "Validation exception"
  107. security:
  108. - petstore_auth:
  109. - "write:pets"
  110. - "read:pets"
  111. /Paymentmethods:
  112. post:
  113. tags:
  114. - "Paymentmethods"
  115. summary: "Seta o tipo de pagamento escolhido"
  116. description: ""
  117. operationId: "setPaymentmethods"
  118. consumes:
  119. - "application/json"
  120. - "application/xml"
  121. produces:
  122. - "application/xml"
  123. - "application/json"
  124. parameters:
  125. - in: "body"
  126. name: "body"
  127. description: "Esse metodo irá setar o tipo de pagamento escolhido pelo usuario"
  128. required: true
  129. schema:
  130. $ref: "#/definitions/Paymentmethods"
  131. responses:
  132. 405:
  133. description: "Invalid input"
  134. security:
  135. - petstore_auth:
  136. - "write:pets"
  137. - "read:pets"
  138. get:
  139. tags:
  140. - "Paymentmethods"
  141. summary: "Retorna o tipo de pagamento escolhido "
  142. description: ""
  143. operationId: "getPaymentmethods"
  144. consumes:
  145. - "application/json"
  146. - "application/xml"
  147. produces:
  148. - "application/xml"
  149. - "application/json"
  150. parameters:
  151. - in: "body"
  152. name: "body"
  153. description: "O tipo de pagamento escolhido deve estar setado para poder ser retornado."
  154. required: true
  155. schema:
  156. $ref: "#/definitions/Paymentmethods"
  157. responses:
  158. 400:
  159. description: "Invalid ID supplied"
  160. 404:
  161. description: "Pet not found"
  162. 405:
  163. description: "Validation exception"
  164. security:
  165. - petstore_auth:
  166. - "write:pets"
  167. - "read:pets"
  168. /Confirm:
  169. post:
  170. tags:
  171. - "Confirm"
  172. summary: "Confirma o pagamento"
  173. description: ""
  174. operationId: "setConfirm"
  175. consumes:
  176. - "application/json"
  177. - "application/xml"
  178. produces:
  179. - "application/xml"
  180. - "application/json"
  181. parameters:
  182. - in: "body"
  183. name: "body"
  184. description: "Esse metodo irá setar o pagamento do usuario"
  185. required: true
  186. schema:
  187. $ref: "#/definitions/Confirm"
  188. responses:
  189. 405:
  190. description: "Invalid input"
  191. security:
  192. - petstore_auth:
  193. - "write:pets"
  194. - "read:pets"
  195. put:
  196. tags:
  197. - "Confirm"
  198. summary: "Atualiza o pagamento, precisa estar setado para poder usar essa opção"
  199. description: ""
  200. operationId: "updateConfirm"
  201. consumes:
  202. - "application/json"
  203. - "application/xml"
  204. produces:
  205. - "application/xml"
  206. - "application/json"
  207. parameters:
  208. - in: "body"
  209. name: "body"
  210. description: "Esse metodo irá atualizar o pagamento"
  211. required: true
  212. schema:
  213. $ref: "#/definitions/Confirm"
  214. responses:
  215. 405:
  216. description: "Invalid input"
  217. security:
  218. - petstore_auth:
  219. - "write:pets"
  220. - "read:pets"
  221. get:
  222. tags:
  223. - "Confirm"
  224. summary: "Retorna o pagamento"
  225. description: ""
  226. operationId: "getPayment"
  227. consumes:
  228. - "application/json"
  229. - "application/xml"
  230. produces:
  231. - "application/xml"
  232. - "application/json"
  233. parameters:
  234. - in: "body"
  235. name: "body"
  236. description: "O pagamento deve estar setado para poder ser retornado."
  237. required: true
  238. schema:
  239. $ref: "#/definitions/Shippingmethods"
  240. responses:
  241. 400:
  242. description: "Invalid ID supplied"
  243. 404:
  244. description: "Pet not found"
  245. 405:
  246. description: "Validation exception"
  247. security:
  248. - petstore_auth:
  249. - "write:pets"
  250. - "read:pets"
  251. securityDefinitions:
  252. petstore_auth:
  253. type: "oauth2"
  254. authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
  255. flow: "implicit"
  256. scopes:
  257. write:pets: "modify pets in your account"
  258. read:pets: "read your pets"
  259. api_key:
  260. type: "apiKey"
  261. name: "api_key"
  262. in: "header"
  263. definitions:
  264. Confirm:
  265. type: "object"
  266. required:
  267. - "custom_field[account][3]"
  268. - "custom_field[account][2]"
  269. - "firstname"
  270. - "lastname"
  271. - "email"
  272. - "telephone"
  273. - "custom_field[address][1]"
  274. - "address_1"
  275. - "address_2"
  276. - "city"
  277. - "postcode"
  278. - "country_id"
  279. - "zone_id"
  280. properties:
  281. custom_field[account][3]:
  282. type: "integer"
  283. format: "int64"
  284. custom_field[account][2]:
  285. type: "string"
  286. example: "2017-12-30"
  287. firstname:
  288. type: "string"
  289. example: "João"
  290. lastname:
  291. type: "string"
  292. example: "da Silva"
  293. email:
  294. type: "string"
  295. example: "joao@gmail.com"
  296. telephone:
  297. type: "string"
  298. example: "(55) 11 947474747"
  299. fax:
  300. type: "string"
  301. example: "(55) 11 947474747"
  302. custom_field[address][1]:
  303. type: "string"
  304. example: "275 ou 275B"
  305. company:
  306. type: "string"
  307. example: "Proximo ao Parque"
  308. address_1:
  309. type: "string"
  310. example: "Alameda das Naçõe Unidas"
  311. address_2:
  312. type: "string"
  313. example: "Campo Limpo Paulista"
  314. city:
  315. type: "string"
  316. example: "São Paulo"
  317. postcode:
  318. type: "integer"
  319. example: "04602190"
  320. country_id:
  321. type: "integer"
  322. example: "14"
  323. zone_id:
  324. type: "integer"
  325. example: "244"
  326. Paymentmethods:
  327. type: "object"
  328. required:
  329. - "custom_field[account][3]"
  330. - "custom_field[account][2]"
  331. - "firstname"
  332. - "lastname"
  333. - "email"
  334. - "telephone"
  335. - "custom_field[address][1]"
  336. - "address_1"
  337. - "address_2"
  338. - "city"
  339. - "postcode"
  340. - "country_id"
  341. - "zone_id"
  342. properties:
  343. custom_field[account][3]:
  344. type: "integer"
  345. format: "int64"
  346. custom_field[account][2]:
  347. type: "string"
  348. example: "2017-12-30"
  349. firstname:
  350. type: "string"
  351. example: "João"
  352. lastname:
  353. type: "string"
  354. example: "da Silva"
  355. email:
  356. type: "string"
  357. example: "joao@gmail.com"
  358. telephone:
  359. type: "string"
  360. example: "(55) 11 947474747"
  361. fax:
  362. type: "string"
  363. example: "(55) 11 947474747"
  364. custom_field[address][1]:
  365. type: "string"
  366. example: "275 ou 275B"
  367. company:
  368. type: "string"
  369. example: "Proximo ao Parque"
  370. address_1:
  371. type: "string"
  372. example: "Alameda das Naçõe Unidas"
  373. address_2:
  374. type: "string"
  375. example: "Campo Limpo Paulista"
  376. city:
  377. type: "string"
  378. example: "São Paulo"
  379. postcode:
  380. type: "integer"
  381. example: "04602190"
  382. country_id:
  383. type: "integer"
  384. example: "14"
  385. zone_id:
  386. type: "integer"
  387. example: "244"
  388. Shippingmethods:
  389. type: "object"
  390. required:
  391. - "custom_field[account][3]"
  392. - "custom_field[account][2]"
  393. - "firstname"
  394. - "lastname"
  395. - "email"
  396. - "telephone"
  397. - "custom_field[address][1]"
  398. - "address_1"
  399. - "address_2"
  400. - "city"
  401. - "postcode"
  402. - "country_id"
  403. - "zone_id"
  404. properties:
  405. custom_field[account][3]:
  406. type: "integer"
  407. format: "int64"
  408. custom_field[account][2]:
  409. type: "string"
  410. example: "2017-12-30"
  411. firstname:
  412. type: "string"
  413. example: "João"
  414. lastname:
  415. type: "string"
  416. example: "da Silva"
  417. email:
  418. type: "string"
  419. example: "joao@gmail.com"
  420. telephone:
  421. type: "string"
  422. example: "(55) 11 947474747"
  423. fax:
  424. type: "string"
  425. example: "(55) 11 947474747"
  426. custom_field[address][1]:
  427. type: "string"
  428. example: "275 ou 275B"
  429. company:
  430. type: "string"
  431. example: "Proximo ao Parque"
  432. address_1:
  433. type: "string"
  434. example: "Alameda das Naçõe Unidas"
  435. address_2:
  436. type: "string"
  437. example: "Campo Limpo Paulista"
  438. city:
  439. type: "string"
  440. example: "São Paulo"
  441. postcode:
  442. type: "integer"
  443. example: "04602190"
  444. country_id:
  445. type: "integer"
  446. example: "14"
  447. zone_id:
  448. type: "integer"
  449. example: "244"
  450. ApiResponse:
  451. type: "object"
  452. properties:
  453. code:
  454. type: "integer"
  455. format: "int32"
  456. type:
  457. type: "string"
  458. message:
  459. type: "string"
  460. externalDocs:
  461. description: "Find out more about Swagger"
  462. url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement