|
7 | 7 | "paths": { |
8 | 8 | "/billing/payable-charges": { |
9 | 9 | "get": { |
10 | | - "tags": [ "PayableCharges" ], |
| 10 | + "tags": [ |
| 11 | + "PayableCharges" |
| 12 | + ], |
11 | 13 | "summary": "GetPayableCharges", |
12 | 14 | "description": "Get your payable charges data for a specific billing period. There are three types of charges that are included in\r\nthe data returned: recurring, usage, and setup.", |
13 | 15 | "operationId": "GetPayableCharges", |
|
25 | 27 | "name": "Accept-Language", |
26 | 28 | "in": "header", |
27 | 29 | "description": "Specify language (and culture) following [RFC 7231, section 5.3.5: Accept-Language].", |
28 | | - "schema": { "type": "string" } |
| 30 | + "schema": { |
| 31 | + "type": "string" |
| 32 | + } |
29 | 33 | } |
30 | 34 | ], |
31 | 35 | "responses": { |
32 | 36 | "200": { |
33 | 37 | "description": "Success", |
34 | | - "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayableCharges" } } } |
| 38 | + "content": { |
| 39 | + "application/json": { |
| 40 | + "schema": { |
| 41 | + "$ref": "#/components/schemas/PayableCharges" |
| 42 | + } |
| 43 | + } |
| 44 | + } |
35 | 45 | } |
36 | 46 | } |
37 | 47 | } |
38 | 48 | } |
39 | 49 | }, |
40 | 50 | "components": { |
41 | 51 | "schemas": { |
42 | | - "ChargeType": { |
43 | | - "enum": [ "Setup", "Recurring", "Usage", "Unknown" ], |
44 | | - "type": "string", |
45 | | - "description": "Setup (occurs only once and can be used for activation, cancellation or setup fees),\r\nRecurring (invoiced on a monthly or yearly basis),\r\nUsage (varies based on the quantity of the product or service consumed by the customer),\r\nUnknown (charge type not found. This may happen when querying data from older invoices)." |
46 | | - }, |
47 | | - "DeductionType": { |
48 | | - "enum": [ "PromotionalMoney", "PromotionalPercentage", "PerformancePercentage" ], |
49 | | - "type": "string", |
50 | | - "description": "PromotionalMoney (fixed price promotional discount),\r\nPromotionalPercentage (promotional percentage discount),\r\nPerformancePercentage (deduction linked to performance tier)." |
51 | | - }, |
52 | | - "Deduction": { |
53 | | - "type": "object", |
54 | | - "properties": { |
55 | | - "code": { |
56 | | - "type": "string", |
57 | | - "nullable": true |
58 | | - }, |
59 | | - "name": { |
60 | | - "type": "string", |
61 | | - "nullable": true |
62 | | - }, |
63 | | - "deductionType": { "$ref": "#/components/schemas/DeductionType" }, |
64 | | - "value": { |
65 | | - "type": "number", |
66 | | - "format": "double" |
67 | | - }, |
68 | | - "unitValue": { |
69 | | - "type": "number", |
70 | | - "description": "Deduction value prorated per unit.", |
71 | | - "format": "double" |
72 | | - }, |
73 | | - "totalValue": { |
74 | | - "type": "number", |
75 | | - "description": "Deduction value for line (unitValue * quantity).", |
76 | | - "format": "double" |
77 | | - } |
78 | | - }, |
79 | | - "additionalProperties": false, |
80 | | - "description": "Deduction applied to a charge." |
81 | | - }, |
82 | | - "Fee": { |
83 | | - "type": "object", |
84 | | - "properties": { |
85 | | - "name": { |
86 | | - "type": "string", |
87 | | - "nullable": true |
88 | | - }, |
89 | | - "unitValue": { |
90 | | - "type": "number", |
91 | | - "format": "double" |
92 | | - }, |
93 | | - "totalValue": { |
94 | | - "type": "number", |
95 | | - "format": "double" |
96 | | - }, |
97 | | - "isTaxable": { "type": "boolean" } |
98 | | - }, |
99 | | - "additionalProperties": false, |
100 | | - "description": "Fee associated with a charge." |
101 | | - }, |
102 | | - "Invoice": { |
103 | | - "type": "object", |
104 | | - "properties": { |
105 | | - "number": { |
106 | | - "type": "string", |
107 | | - "nullable": true |
108 | | - }, |
109 | | - "date": { |
110 | | - "type": "string", |
111 | | - "format": "date" |
112 | | - }, |
113 | | - "periodFrom": { |
114 | | - "type": "string", |
115 | | - "format": "date" |
116 | | - }, |
117 | | - "periodTo": { |
118 | | - "type": "string", |
119 | | - "format": "date" |
120 | | - } |
121 | | - }, |
122 | | - "additionalProperties": false, |
123 | | - "description": "Information on the invoice where the charge was applied." |
124 | | - }, |
125 | | - "Tax": { |
126 | | - "type": "object", |
127 | | - "properties": { |
128 | | - "name": { |
129 | | - "type": "string", |
130 | | - "nullable": true |
131 | | - }, |
132 | | - "appliedRate": { |
133 | | - "type": "number", |
134 | | - "format": "double" |
135 | | - } |
136 | | - }, |
137 | | - "additionalProperties": false, |
138 | | - "description": "Tax rate applied to a charge." |
139 | | - }, |
140 | | - "Tag": { |
141 | | - "type": "object", |
142 | | - "properties": { |
143 | | - "name": { |
144 | | - "type": "string", |
145 | | - "nullable": true |
146 | | - }, |
147 | | - "value": { |
148 | | - "type": "string", |
149 | | - "nullable": true |
150 | | - } |
151 | | - }, |
152 | | - "additionalProperties": false, |
153 | | - "description": "Additional information about the charge, including customer information." |
154 | | - }, |
155 | 52 | "BillingCycleType": { |
156 | | - "enum": [ "OneTime", "Monthly", "Yearly" ], |
| 53 | + "enum": [ |
| 54 | + "OneTime", |
| 55 | + "Monthly", |
| 56 | + "Yearly" |
| 57 | + ], |
157 | 58 | "type": "string", |
158 | 59 | "description": "OneTime (charged once, with no recurrence),\r\nMonthly (charged monthly),\r\nYearly (charged yearly)." |
159 | 60 | }, |
|
182 | 83 | "type": "string", |
183 | 84 | "nullable": true |
184 | 85 | }, |
185 | | - "chargeType": { "$ref": "#/components/schemas/ChargeType" }, |
186 | | - "billingCycleType": { "$ref": "#/components/schemas/BillingCycleType" }, |
| 86 | + "chargeType": { |
| 87 | + "$ref": "#/components/schemas/ChargeType" |
| 88 | + }, |
| 89 | + "billingCycleType": { |
| 90 | + "$ref": "#/components/schemas/BillingCycleType" |
| 91 | + }, |
187 | 92 | "periodFrom": { |
188 | 93 | "type": "string", |
189 | 94 | "format": "date" |
|
229 | 134 | }, |
230 | 135 | "deductions": { |
231 | 136 | "type": "array", |
232 | | - "items": { "$ref": "#/components/schemas/Deduction" }, |
| 137 | + "items": { |
| 138 | + "$ref": "#/components/schemas/Deduction" |
| 139 | + }, |
233 | 140 | "nullable": true |
234 | 141 | }, |
235 | 142 | "fees": { |
236 | 143 | "type": "array", |
237 | | - "items": { "$ref": "#/components/schemas/Fee" }, |
| 144 | + "items": { |
| 145 | + "$ref": "#/components/schemas/Fee" |
| 146 | + }, |
238 | 147 | "nullable": true |
239 | 148 | }, |
240 | | - "invoice": { "$ref": "#/components/schemas/Invoice" }, |
| 149 | + "invoice": { |
| 150 | + "$ref": "#/components/schemas/Invoice" |
| 151 | + }, |
241 | 152 | "taxes": { |
242 | 153 | "type": "array", |
243 | | - "items": { "$ref": "#/components/schemas/Tax" }, |
| 154 | + "items": { |
| 155 | + "$ref": "#/components/schemas/Tax" |
| 156 | + }, |
244 | 157 | "nullable": true |
245 | 158 | }, |
246 | 159 | "tags": { |
247 | 160 | "type": "array", |
248 | | - "items": { "$ref": "#/components/schemas/Tag" }, |
| 161 | + "items": { |
| 162 | + "$ref": "#/components/schemas/Tag" |
| 163 | + }, |
249 | 164 | "nullable": true |
250 | 165 | } |
251 | 166 | }, |
252 | 167 | "additionalProperties": false, |
253 | 168 | "description": "A product is constituted of one or multiple charges." |
254 | 169 | }, |
| 170 | + "ChargeType": { |
| 171 | + "enum": [ |
| 172 | + "Setup", |
| 173 | + "Recurring", |
| 174 | + "Usage", |
| 175 | + "Unknown" |
| 176 | + ], |
| 177 | + "type": "string", |
| 178 | + "description": "Setup (occurs only once and can be used for activation, cancellation or setup fees),\r\nRecurring (invoiced on a monthly or yearly basis),\r\nUsage (varies based on the quantity of the product or service consumed by the customer),\r\nUnknown (charge type not found. This may happen when querying data from older invoices)." |
| 179 | + }, |
| 180 | + "Deduction": { |
| 181 | + "type": "object", |
| 182 | + "properties": { |
| 183 | + "code": { |
| 184 | + "type": "string", |
| 185 | + "nullable": true |
| 186 | + }, |
| 187 | + "name": { |
| 188 | + "type": "string", |
| 189 | + "nullable": true |
| 190 | + }, |
| 191 | + "deductionType": { |
| 192 | + "$ref": "#/components/schemas/DeductionType" |
| 193 | + }, |
| 194 | + "value": { |
| 195 | + "type": "number", |
| 196 | + "format": "double" |
| 197 | + }, |
| 198 | + "unitValue": { |
| 199 | + "type": "number", |
| 200 | + "description": "Deduction value prorated per unit.", |
| 201 | + "format": "double" |
| 202 | + }, |
| 203 | + "totalValue": { |
| 204 | + "type": "number", |
| 205 | + "description": "Deduction value for line (unitValue * quantity).", |
| 206 | + "format": "double" |
| 207 | + } |
| 208 | + }, |
| 209 | + "additionalProperties": false, |
| 210 | + "description": "Deduction applied to a charge." |
| 211 | + }, |
| 212 | + "DeductionType": { |
| 213 | + "enum": [ |
| 214 | + "PromotionalMoney", |
| 215 | + "PromotionalPercentage", |
| 216 | + "PerformancePercentage" |
| 217 | + ], |
| 218 | + "type": "string", |
| 219 | + "description": "PromotionalMoney (fixed price promotional discount),\r\nPromotionalPercentage (promotional percentage discount),\r\nPerformancePercentage (deduction linked to performance tier)." |
| 220 | + }, |
| 221 | + "Fee": { |
| 222 | + "type": "object", |
| 223 | + "properties": { |
| 224 | + "name": { |
| 225 | + "type": "string", |
| 226 | + "nullable": true |
| 227 | + }, |
| 228 | + "unitValue": { |
| 229 | + "type": "number", |
| 230 | + "format": "double" |
| 231 | + }, |
| 232 | + "totalValue": { |
| 233 | + "type": "number", |
| 234 | + "format": "double" |
| 235 | + }, |
| 236 | + "isTaxable": { |
| 237 | + "type": "boolean" |
| 238 | + } |
| 239 | + }, |
| 240 | + "additionalProperties": false, |
| 241 | + "description": "Fee associated with a charge." |
| 242 | + }, |
| 243 | + "Invoice": { |
| 244 | + "type": "object", |
| 245 | + "properties": { |
| 246 | + "number": { |
| 247 | + "type": "string", |
| 248 | + "nullable": true |
| 249 | + }, |
| 250 | + "date": { |
| 251 | + "type": "string", |
| 252 | + "format": "date" |
| 253 | + }, |
| 254 | + "periodFrom": { |
| 255 | + "type": "string", |
| 256 | + "format": "date" |
| 257 | + }, |
| 258 | + "periodTo": { |
| 259 | + "type": "string", |
| 260 | + "format": "date" |
| 261 | + } |
| 262 | + }, |
| 263 | + "additionalProperties": false, |
| 264 | + "description": "Information on the invoice where the charge was applied." |
| 265 | + }, |
255 | 266 | "PayableCharges": { |
256 | 267 | "type": "object", |
257 | 268 | "properties": { |
|
265 | 276 | }, |
266 | 277 | "charges": { |
267 | 278 | "type": "array", |
268 | | - "items": { "$ref": "#/components/schemas/Charge" }, |
| 279 | + "items": { |
| 280 | + "$ref": "#/components/schemas/Charge" |
| 281 | + }, |
269 | 282 | "nullable": true |
270 | 283 | } |
271 | 284 | }, |
272 | 285 | "additionalProperties": false, |
273 | 286 | "description": "All charges to pay for a billing period." |
| 287 | + }, |
| 288 | + "Tag": { |
| 289 | + "type": "object", |
| 290 | + "properties": { |
| 291 | + "name": { |
| 292 | + "type": "string", |
| 293 | + "nullable": true |
| 294 | + }, |
| 295 | + "value": { |
| 296 | + "type": "string", |
| 297 | + "nullable": true |
| 298 | + } |
| 299 | + }, |
| 300 | + "additionalProperties": false, |
| 301 | + "description": "Additional information about the charge, including customer information." |
| 302 | + }, |
| 303 | + "Tax": { |
| 304 | + "type": "object", |
| 305 | + "properties": { |
| 306 | + "name": { |
| 307 | + "type": "string", |
| 308 | + "nullable": true |
| 309 | + }, |
| 310 | + "appliedRate": { |
| 311 | + "type": "number", |
| 312 | + "format": "double" |
| 313 | + } |
| 314 | + }, |
| 315 | + "additionalProperties": false, |
| 316 | + "description": "Tax rate applied to a charge." |
274 | 317 | } |
275 | 318 | } |
276 | 319 | } |
|
0 commit comments