beanie 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +4 -0
  3. data/README.md +79 -16
  4. data/Rakefile +8 -1
  5. data/beanie.gemspec +44 -25
  6. data/docs/BankAccount.md +24 -0
  7. data/docs/BankAccountApi.md +154 -0
  8. data/docs/BankAccountInput.md +24 -0
  9. data/docs/ErrorModel.md +9 -0
  10. data/git_push.sh +55 -0
  11. data/lib/beanie/api/bank_account_api.rb +183 -0
  12. data/lib/beanie/api_client.rb +388 -0
  13. data/lib/beanie/api_error.rb +38 -0
  14. data/lib/beanie/configuration.rb +202 -0
  15. data/lib/beanie/models/bank_account.rb +358 -0
  16. data/lib/beanie/models/bank_account_input.rb +357 -0
  17. data/lib/beanie/models/error_model.rb +202 -0
  18. data/lib/beanie/version.rb +13 -30
  19. data/lib/beanie.rb +32 -115
  20. data/spec/api/bank_account_api_spec.rb +71 -0
  21. data/spec/api_client_spec.rb +226 -0
  22. data/spec/configuration_spec.rb +42 -0
  23. data/spec/models/bank_account_input_spec.rb +137 -0
  24. data/spec/models/bank_account_spec.rb +137 -0
  25. data/spec/models/error_model_spec.rb +47 -0
  26. data/spec/spec_helper.rb +111 -0
  27. metadata +174 -71
  28. data/.gitignore +0 -17
  29. data/VERSION +0 -1
  30. data/lib/beanie/api.rb +0 -182
  31. data/lib/beanie/bank_account.rb +0 -44
  32. data/lib/beanie/bank_statement.rb +0 -45
  33. data/lib/beanie/bank_statement_data.rb +0 -51
  34. data/lib/beanie/beanie_alert.rb +0 -66
  35. data/lib/beanie/bill_of_material.rb +0 -44
  36. data/lib/beanie/billable.rb +0 -46
  37. data/lib/beanie/bom_item.rb +0 -44
  38. data/lib/beanie/company.rb +0 -66
  39. data/lib/beanie/company_member.rb +0 -43
  40. data/lib/beanie/config_type.rb +0 -62
  41. data/lib/beanie/config_value.rb +0 -42
  42. data/lib/beanie/customer.rb +0 -51
  43. data/lib/beanie/customer_address.rb +0 -63
  44. data/lib/beanie/customer_note.rb +0 -42
  45. data/lib/beanie/document.rb +0 -71
  46. data/lib/beanie/fixed_asset.rb +0 -45
  47. data/lib/beanie/journal.rb +0 -44
  48. data/lib/beanie/journal_item.rb +0 -44
  49. data/lib/beanie/nominal_account.rb +0 -73
  50. data/lib/beanie/nominal_account_category.rb +0 -49
  51. data/lib/beanie/product.rb +0 -52
  52. data/lib/beanie/product_category.rb +0 -43
  53. data/lib/beanie/product_price.rb +0 -44
  54. data/lib/beanie/production_order.rb +0 -76
  55. data/lib/beanie/purchase_invoice.rb +0 -55
  56. data/lib/beanie/purchase_order.rb +0 -46
  57. data/lib/beanie/purchase_order_item.rb +0 -60
  58. data/lib/beanie/sales_invoice.rb +0 -83
  59. data/lib/beanie/sales_invoice_item.rb +0 -50
  60. data/lib/beanie/sales_order.rb +0 -74
  61. data/lib/beanie/sales_order_item.rb +0 -126
  62. data/lib/beanie/stock_adjustment.rb +0 -70
  63. data/lib/beanie/stock_category.rb +0 -44
  64. data/lib/beanie/stock_item.rb +0 -58
  65. data/lib/beanie/stock_location.rb +0 -42
  66. data/lib/beanie/stock_supplier.rb +0 -48
  67. data/lib/beanie/supplier.rb +0 -48
  68. data/lib/beanie/supplier_address.rb +0 -53
  69. data/lib/beanie/supplier_note.rb +0 -42
  70. data/lib/beanie/tax_registration.rb +0 -59
  71. data/lib/beanie/vat_record.rb +0 -66
  72. data/lib/beanie/vat_return.rb +0 -60
  73. data/lib/beanie/work_centre.rb +0 -99
  74. data/lib/beanie/work_centre_group.rb +0 -50
@@ -1,45 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class BankStatement < Api
32
- attr_accessor :id, :end_date, :start_date, :upload_file, :bank_account_id, :document_id
33
-
34
- #
35
- # Initialize instance variables
36
- def initialize
37
- @id = nil
38
- @end_date = nil
39
- @start_date = nil
40
- @upload_file = nil
41
- @bank_account_id = nil
42
- @document_id = nil
43
- end
44
- end
45
- end
@@ -1,51 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class BankStatementData < Api
32
- attr_accessor :id, :cr_amount, :date, :dr_amount, :balance, :bank_statement_id
33
- attr_accessor :narrative1, :narrative2, :narrative3, :narrative4, :narrative5
34
-
35
- #
36
- # Initialize instance variables
37
- def initialize
38
- @id = nil
39
- @cr_amount = nil
40
- @date = nil
41
- @dr_amount = nil
42
- @balance = nil
43
- @bank_statement_id = nil
44
- @narrative1 = nil
45
- @narrative2 = nil
46
- @narrative3 = nil
47
- @narrative4 = nil
48
- @narrative5 = nil
49
- end
50
- end
51
- end
@@ -1,66 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class BeanieAlert < Api
32
- attr_accessor :id, :state, :message, :url, :member_id
33
-
34
- STATE_NEW = 0
35
- STATE_READ = 1
36
- STATE_ARCHIVED = 2
37
-
38
- STATE_NAMES = [
39
- ["New (Unread)", STATE_NEW],
40
- ["Acknowledged (Read)", STATE_READ],
41
- ["Archived", STATE_ARCHIVED]
42
- ].freeze
43
-
44
- #
45
- # Initialize instance variables
46
- def initialize
47
- @id = nil
48
- @state = nil
49
- @message = nil
50
- @url = nil
51
- @member_id = nil
52
- end
53
-
54
- #
55
- # Printable form of the state name
56
- def state_name
57
- STATE_NAMES[state][0]
58
- end
59
-
60
- #
61
- # Is this an unread message?
62
- def unread?
63
- state == STATE_NEW
64
- end
65
- end
66
- end
@@ -1,44 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class ProductionOrder < Api
32
- attr_accessor :id, :name, :revision, :description, :stock_item_id
33
-
34
- #
35
- # Initialize instance variables
36
- def initialize
37
- @id = nil
38
- @name = nil
39
- @revision = nil
40
- @description = nil
41
- @stock_item_id = nil
42
- end
43
- end
44
- end
@@ -1,46 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class Billable < Api
32
- attr_accessor :id, :sales_invoice_item_id, :sales_order_item_id
33
- attr_accessor :quantity, :start, :description
34
-
35
- #
36
- # Initialize instance variables
37
- def initialize
38
- @id = nil
39
- @sales_invoice_item_id = nil
40
- @sales_order_item_id = nil
41
- @quantity = nil
42
- @start = nil
43
- @description = nil
44
- end
45
- end
46
- end
@@ -1,44 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class BomItem < Api
32
- attr_accessor :id, :stock_item_id, :quantity, :notes, :designators
33
-
34
- #
35
- # Initialize instance variables
36
- def initialize
37
- @id = nil
38
- @stock_item_id = nil
39
- @quantity = nil
40
- @notes = nil
41
- @designators = nil
42
- end
43
- end
44
- end
@@ -1,66 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class Company < Api
32
- attr_accessor :id, :name, :email, :address1, :address2, :address3, :city
33
- attr_accessor :state_county, :website, :phone, :fax, :zip_postcode
34
- attr_accessor :registration, :next_fye, :country, :currency
35
- attr_accessor :invoice_template_id, :purchase_shipping_nominal_account_id
36
- attr_accessor :sales_shipping_nominal_account_id
37
- attr_accessor :accounts_receivable_nominal_account_id
38
- attr_accessor :accounts_payable_nominal_account_id
39
-
40
- #
41
- # Initialize instance variables
42
- def initialize
43
- @id = nil
44
- @name = nil
45
- @email = nil
46
- @address1 = nil
47
- @address2 = nil
48
- @address3 = nil
49
- @city = nil
50
- @state_county = nil
51
- @website = nil
52
- @phone = nil
53
- @fax = nil
54
- @zip_postcode = nil
55
- @registration = nil
56
- @next_fye = nil
57
- @country = nil
58
- @currency = nil
59
- @invoice_template_id = nil
60
- @purchase_shipping_nominal_account_id = nil
61
- @sales_shipping_nominal_account_id = nil
62
- @accounts_receivable_nominal_account_id = nil
63
- @accounts_payable_nominal_account_id = nil
64
- end
65
- end
66
- end
@@ -1,43 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class CompanyMember < Api
32
- attr_accessor :id, :member_id, :role, :member_email
33
-
34
- #
35
- # Initialize instance variables
36
- def initialize
37
- @id = nil
38
- @member_id = nil
39
- @role = nil
40
- @member_email = nil
41
- end
42
- end
43
- end
@@ -1,62 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class ConfigType < Api
32
- attr_accessor :id, :defvalue, :description, :name, :regexp, :tag, :typecode
33
-
34
- #
35
- # Initialize instance variables
36
- def initialize
37
- @id = nil
38
- @defvalue = nil
39
- @description = nil
40
- @name = nil
41
- @regexp = nil
42
- @tag = nil
43
- @typecode = nil
44
- end
45
-
46
- TYPE_BOOLEAN = 0
47
- TYPE_INTEGER = 1
48
- TYPE_STRING = 2
49
-
50
- TYPE_NAMES = [
51
- ["Boolean", TYPE_BOOLEAN],
52
- ["Integer", TYPE_INTEGER],
53
- ["String", TYPE_STRING]
54
- ].freeze
55
-
56
- #
57
- # Give me a useful name for the state
58
- def typecode_name
59
- TYPE_NAMES[typecode][0]
60
- end
61
- end
62
- end
@@ -1,42 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class ConfigValue < Api
32
- attr_accessor :id, :value, :config_type
33
-
34
- #
35
- # Initialize instance variables
36
- def initialize
37
- @id = nil
38
- @value = nil
39
- @config_type = nil
40
- end
41
- end
42
- end
@@ -1,51 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class Customer < Api
32
- attr_accessor :id, :name, :state, :balance, :terms, :customer_vat, :currency
33
- attr_accessor :internal_ref, :credit_limit, :credit_hold, :invoice_method
34
-
35
- #
36
- # Initialize instance variables
37
- def initialize
38
- @id = nil
39
- @name = nil
40
- @state = nil
41
- @balance = nil
42
- @terms = nil
43
- @customer_vat = nil
44
- @currency = nil
45
- @internal_ref = nil
46
- @credit_limit = nil
47
- @credit_hold = nil
48
- @invoice_method = nil
49
- end
50
- end
51
- end
@@ -1,63 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class CustomerAddress < Api
32
- attr_accessor :customer_id, :id, :label, :name, :address1, :address2, :address3, :city
33
- attr_accessor :state_county, :zip_postcode, :country_id, :email, :phone, :website
34
-
35
- #
36
- # Initialize instance variables
37
- def initialize
38
- @id = nil
39
- @customer_id = nil
40
- @label = nil
41
- @name = nil
42
- @address1 = nil
43
- @address2 = nil
44
- @address3 = nil
45
- @city = nil
46
- @state_county = nil
47
- @zip_postcode = nil
48
- @country = nil
49
- @email = nil
50
- @phone = nil
51
- @website = nil
52
- end
53
-
54
- #
55
- # Construct the path a little differently...
56
- def construct_path(opts = {})
57
- raise ":customer_id is not defined" unless opts[:customer_id]
58
- path = "/customers/#{opts[:customer_id]}/customer_addresses"
59
- opts.delete(:customer_id)
60
- path
61
- end
62
- end
63
- end
@@ -1,42 +0,0 @@
1
- #
2
- # Copyright (c) 2017-2018, AltoYield Limited. All rights reserved.
3
- #
4
- # This is free software; you can redistribute it and/or modify it
5
- # under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation; either version 2, or (at your option)
7
- # any later version.
8
- #
9
- # It is distributed in the hope that it will be useful, but WITHOUT
10
- # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
- # for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License along
15
- # with this product; see the file COPYING. If not, write to the Free
16
- # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY ALTOYIELD LIMITED "AS IS" AND ANY EXPRESS
19
- # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- # ARE DISCLAIMED. IN NO EVENT SHALL ALTOYIELD LIMITED BE LIABLE FOR
22
- # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
- # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
- # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27
- # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- # POSSIBILITY OF SUCH DAMAGE.
29
- #
30
- module Beanie
31
- class CustomerNote < Api
32
- attr_accessor :id, :member, :note
33
-
34
- #
35
- # Initialize instance variables
36
- def initialize
37
- @id = nil
38
- @member = nil
39
- @note = nil
40
- end
41
- end
42
- end