luisruiz

Untitled

Jan 8th, 2021
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.16 KB | None | 0 0
  1.  
  2. orders = [
  3. {
  4. "id": 63,
  5. "order_number": "63",
  6. "created_at": "2021-01-04T15:19:52Z",
  7. "updated_at": "2021-01-04T15:19:53Z",
  8. "completed_at": "1970-01-01T00:00:00Z",
  9. "status": "processing",
  10. "currency": "CLP",
  11. "total": "13600.00",
  12. "subtotal": "12600.00",
  13. "total_line_items_quantity": 7,
  14. "total_tax": "0.00",
  15. "total_shipping": "1000.00",
  16. "cart_tax": "0.00",
  17. "shipping_tax": "0.00",
  18. "total_discount": "0.00",
  19. "shipping_methods": "Flat rate",
  20. "payment_details": {
  21. "method_id": "cod",
  22. "method_title": "Cash on delivery",
  23. "paid": false
  24. },
  25. "billing_address": {
  26. "first_name": "isaac",
  27. "last_name": "ya\u00f1ez",
  28. "company": "isaac",
  29. "address_1": "djapsojdasojdas",
  30. "address_2": "",
  31. "city": "chillan",
  32. "state": "nuble",
  33. "postcode": "38000",
  34. "country": "CL",
  35. "email": "[email protected]",
  36. "phone": "936550773"
  37. },
  38. "shipping_address": {
  39. "first_name": "isaac",
  40. "last_name": "ya\u00f1ez",
  41. "company": "isaac",
  42. "address_1": "djapsojdasojdas",
  43. "address_2": "",
  44. "city": "chillan",
  45. "state": "nuble",
  46. "postcode": "38000",
  47. "country": "CL"
  48. },
  49. "note": "",
  50. "customer_ip": "190.5.34.112",
  51. "customer_user_agent": "Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/86.0.4240.183 Safari\/537.36 OPR\/72.0.3815.320",
  52. "customer_id": 2,
  53. "view_order_url": "https:\/\/copargo.cl\/my-account\/view-order\/63\/",
  54. "line_items": [
  55. {
  56. "id": 3,
  57. "subtotal": "12600.00",
  58. "subtotal_tax": "0.00",
  59. "total": "12600.00",
  60. "total_tax": "0.00",
  61. "price": "1800.00",
  62. "quantity": 7,
  63. "tax_class": "",
  64. "name": "producto prueba",
  65. "product_id": 22,
  66. "sku": "001",
  67. "meta": [
  68.  
  69. ]
  70. }
  71. ],
  72. "shipping_lines": [
  73. {
  74. "id": 4,
  75. "method_id": "flat_rate",
  76. "method_title": "Flat rate",
  77. "total": "1000.00"
  78. }
  79. ],
  80. "tax_lines": [
  81.  
  82. ],
  83. "fee_lines": [
  84.  
  85. ],
  86. "coupon_lines": [
  87.  
  88. ],
  89. "customer": {
  90. "id": 2,
  91. "created_at": "2020-11-26T18:34:49Z",
  92. "email": "[email protected]",
  93. "first_name": "Felipe",
  94. "last_name": "Cornejo",
  95. "username": "Directiva",
  96. "role": "administrator",
  97. "last_order_id": 63,
  98. "last_order_date": "2021-01-04T15:19:52Z",
  99. "orders_count": 2,
  100. "total_spent": "18200.00",
  101. "avatar_url": "https:\/\/secure.gravatar.com\/avatar\/122c57b910d99de5ced2e90fb44e748e?s=96&d=mm&r=g",
  102. "billing_address": {
  103. "first_name": "isaac",
  104. "last_name": "ya\u00f1ez",
  105. "company": "isaac",
  106. "address_1": "djapsojdasojdas",
  107. "address_2": "",
  108. "city": "chillan",
  109. "state": "nuble",
  110. "postcode": "38000",
  111. "country": "CL",
  112. "email": "[email protected]",
  113. "phone": "936550773"
  114. },
  115. "shipping_address": {
  116. "first_name": "isaac",
  117. "last_name": "ya\u00f1ez",
  118. "company": "isaac",
  119. "address_1": "djapsojdasojdas",
  120. "address_2": "",
  121. "city": "chillan",
  122. "state": "nuble",
  123. "postcode": "38000",
  124. "country": "CL"
  125. }
  126. }
  127. },
  128. {
  129. "id": 23,
  130. "order_number": "23",
  131. "created_at": "2020-12-01T03:31:01Z",
  132. "updated_at": "2020-12-01T03:31:01Z",
  133. "completed_at": "1970-01-01T00:00:00Z",
  134. "status": "processing",
  135. "currency": "USD",
  136. "total": "4600.00",
  137. "subtotal": "3600.00",
  138. "total_line_items_quantity": 2,
  139. "total_tax": "0.00",
  140. "total_shipping": "1000.00",
  141. "cart_tax": "0.00",
  142. "shipping_tax": "0.00",
  143. "total_discount": "0.00",
  144. "shipping_methods": "Flat rate",
  145. "payment_details": {
  146. "method_id": "cod",
  147. "method_title": "Cash on delivery",
  148. "paid": false
  149. },
  150. "billing_address": {
  151. "first_name": "isaac",
  152. "last_name": "ya\u00f1ez",
  153. "company": "empresa opcional",
  154. "address_1": "calle1",
  155. "address_2": "",
  156. "city": "chillan",
  157. "state": "nuble",
  158. "postcode": "38000",
  159. "country": "CL",
  160. "email": "[email protected]",
  161. "phone": "936550773"
  162. },
  163. "shipping_address": {
  164. "first_name": "isaac",
  165. "last_name": "ya\u00f1ez",
  166. "company": "empresa opcional",
  167. "address_1": "calle1",
  168. "address_2": "",
  169. "city": "chillan",
  170. "state": "nuble",
  171. "postcode": "38000",
  172. "country": "CL"
  173. }
  174. ]
  175.  
  176. neworders = orders.map(order => {
  177.  
  178. cacheOrder = {}
  179. cacheOrder.id = order.id;
  180. cacheOrder.otroparametro = ''
  181. return cacheOrder
  182. }
  183.  
Advertisement
Add Comment
Please, Sign In to add comment