You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two other interesting attributes of the PartnerApplication client are:
226
226
227
227
> **`#expires_at`**: Time this AccessToken will expire (usually 30 minutes into the future).
@@ -245,6 +245,10 @@ session.
245
245
246
246
If you lose these details at any stage you can always reauthorise by redirecting the user back to the Xero OAuth gateway.
247
247
248
+
#### Branding Themes API
249
+
250
+
Once you are approved as a Xero Partner you can request unofficial documentation to do with customizing Payment Services and Branding Themes using the API. There is more info on that [here](https://github.com/waynerobinson/xeroizer/pull/439).
251
+
248
252
Retrieving Data
249
253
---------------
250
254
@@ -264,10 +268,10 @@ saved = new_contact.save
264
268
265
269
### \#all([options])
266
270
267
-
Retrieves list of all records with matching options.
271
+
Retrieves list of all records with matching options.
268
272
269
273
**Note:** Some records (Invoice, CreditNote) only return summary information for the contact and no line items
270
-
when returning them this list operation. This library takes care of automatically retrieving the
274
+
when returning them this list operation. This library takes care of automatically retrieving the
271
275
contact and line items from Xero on first access however, this first access has a large performance penalty
272
276
and will count as an extra query towards your 5,000/day and 60/minute request per organisation limit.
273
277
@@ -281,6 +285,18 @@ Valid options are:
281
285
282
286
> Field to order by. Should be formatted as Xero-based field (e.g. 'Name', 'ContactID', etc)
283
287
288
+
> **:status**
289
+
290
+
> Status field for PurchaseOrder. Should be a valid Xero purchase order status.
291
+
292
+
> **:date_from**
293
+
294
+
> DateFrom field for PurchaseOrder. Should be in YYYY-MM-DD format.
295
+
296
+
> **:date_to**
297
+
298
+
> DateTo field for PurchaseOrder. Should be in YYYY-MM-DD format.
299
+
284
300
> **:where**
285
301
286
302
> __See *Where Filters* section below.__
@@ -305,11 +321,11 @@ You can specify find filters by providing the :where option with a hash. For exa
Have a look at the models in `lib/xeroizer/models/` to see the valid attributes, associations and
473
+
474
+
Have a look at the models in `lib/xeroizer/models/` to see the valid attributes, associations and
459
475
minimum validation requirements for each of the record types.
460
476
477
+
Some Xero endpoints, such as Payment, will only accept specific attributes for updates. Because the library does not have this knowledge encoded (and doesn't do dirty tracking of attributes), it's necessary to construct new objects instead of using the ones retrieved from Xero:
Xero has a hard daily limit on the number of API requests you can make (currently 5,000 requests
@@ -501,7 +524,7 @@ saved = contact.save
501
524
502
525
# contact.errors will contain [[:name, "can't be blank"]]
503
526
```
504
-
527
+
505
528
\#errors\_for(:attribute\_name) is a helper method to return just the errors associated with
506
529
that attribute. For example:
507
530
@@ -582,16 +605,16 @@ trial_balance.rows.each do | row |
582
605
case row
583
606
whenXeroizer::Report::HeaderRow
584
607
# do something with header
585
-
608
+
586
609
whenXeroizer::Report::SectionRow
587
610
# do something with section, will need to step into the rows for this section
588
-
611
+
589
612
whenXeroizer::Report::Row
590
613
# do something for standard report rows
591
-
614
+
592
615
whenXeroizer::Report::SummaryRow
593
616
# do something for summary rows
594
-
617
+
595
618
end
596
619
end
597
620
```
@@ -686,7 +709,7 @@ This option adds the unitdp=4 query string parameter to all requests for models
686
709
Tests
687
710
-----
688
711
689
-
The tests within the repository can be run by setting up a [Private App](https://developer.xero.com/documentation/auth-and-limits/private-applications). You can create a Private App in the [developer portal](https://developer.xero.com/myapps/), it's suggested that you create it against the [Demo Company](https://developer.xero.com/documentation/getting-started/development-accounts) (note: the Demo Company expires after 28 days, so you will need to reset it and create a new Private App if you Demo Company has expired).
712
+
The tests within the repository can be run by setting up a [Private App](https://developer.xero.com/documentation/auth-and-limits/private-applications). You can create a Private App in the [developer portal](https://developer.xero.com/myapps/), it's suggested that you create it against the [Demo Company (AU)](https://developer.xero.com/documentation/getting-started/development-accounts). Demo Company expires after 28 days, so you will need to reset it and create a new Private App if you Demo Company has expired. Make sure you create the Demo Company in Australia region.
690
713
691
714
Once you have created your Private App, set these environment variables:
692
715
```
@@ -704,6 +727,6 @@ rake test
704
727
705
728
706
729
### Contributors
707
-
Xeroizer was inspired by the https://github.com/tlconnor/xero_gateway gem created by Tim Connor
708
-
and Nik Wakelin and portions of the networking and authentication code are based completely off
730
+
Xeroizer was inspired by the https://github.com/tlconnor/xero_gateway gem created by Tim Connor
731
+
and Nik Wakelin and portions of the networking and authentication code are based completely off
709
732
this project. Copyright for these components remains held in the name of Tim Connor.
0 commit comments