vogogo_ruby 0.0.2 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/vogogo_ruby.rb +4 -11
- data/lib/vogogo_ruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efd0f47240fc0b522c23e08177e2ab67d601c668
|
4
|
+
data.tar.gz: 0ed05c2c024fd6cf403932ac6b987dfaab7aac70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 631e58eece429bbf6c9aa1d90f7b00c512d5881fd406014f850a7e804e2d410da4edfc9a3681027174f7d423851df212b29b073ceb1cd98ddf841ef631a3ed36
|
7
|
+
data.tar.gz: 9c0c2d8d30323b97b35edb1460c2e04050f812bfd0a05aa453d0902c3b777bfee0b9b30111503a0909ee6f702b9d993eeb1cbc5a1bea555c47e9219a12e54213
|
data/lib/vogogo_ruby.rb
CHANGED
@@ -41,14 +41,13 @@ module VogogoRuby
|
|
41
41
|
|
42
42
|
def create_invoice data
|
43
43
|
raise DataHashError.new 'invoice details hash cannot be empty' if data.nil? || data.empty?
|
44
|
-
|
44
|
+
create INVOICE, data
|
45
45
|
end
|
46
46
|
|
47
47
|
def update_invoice invoice_id, data
|
48
48
|
raise DataHashError.new 'invoice details hash cannot be empty' if data.nil? || data.empty?
|
49
49
|
raise IdentifierError.new 'invoice_id cannot be empty' if invoice_id.nil? || invoice_id.empty?
|
50
50
|
response = update INVOICE, invoice_id, data
|
51
|
-
response.response.code == '202' ? true : false
|
52
51
|
end
|
53
52
|
|
54
53
|
def list_invoices
|
@@ -58,18 +57,16 @@ module VogogoRuby
|
|
58
57
|
def delete_invoice invoice_id
|
59
58
|
raise IdentifierError.new 'invoice_id cannot be empty' if invoice_id.nil? || invoice_id.empty?
|
60
59
|
response = delete INVOICE, invoice_id
|
61
|
-
response.response.code == '204' ? true : false
|
62
60
|
end
|
63
61
|
|
64
62
|
def create_item data
|
65
63
|
raise DataHashError.new 'item details hash cannot be empty' if data.nil? || data.empty?
|
66
|
-
|
64
|
+
create ITEM, data
|
67
65
|
end
|
68
66
|
|
69
67
|
def delete_item item_id
|
70
68
|
raise IdentifierError.new 'item_id cannot be empty' if item_id.nil? || item_id.empty?
|
71
69
|
response = delete ITEM, item_id
|
72
|
-
response.response.code == '204' ? true : false
|
73
70
|
end
|
74
71
|
|
75
72
|
def get_item item_id
|
@@ -85,18 +82,16 @@ module VogogoRuby
|
|
85
82
|
raise DataHashError.new 'item details hash cannot be empty' if data.nil? || data.empty?
|
86
83
|
raise IdentifierError.new 'item_id cannot be empty' if item_id.nil? || item_id.empty?
|
87
84
|
response = update ITEM, item_id, data
|
88
|
-
response.response.code == '202' ? true : false
|
89
85
|
end
|
90
86
|
|
91
87
|
def create_customer data
|
92
88
|
raise DataHashError.new 'customer details hash cannot be empty' if data.nil? || data.empty?
|
93
|
-
|
89
|
+
create CUSTOMER, data
|
94
90
|
end
|
95
91
|
|
96
92
|
def delete_customer customer_id
|
97
93
|
raise IdentifierError.new 'customer_id cannot be empty' if customer_id.nil? || customer_id.empty?
|
98
94
|
response = delete CUSTOMER, customer_id
|
99
|
-
response.response.code == '204' ? true : false
|
100
95
|
end
|
101
96
|
|
102
97
|
def get_customer customer_id
|
@@ -112,18 +107,16 @@ module VogogoRuby
|
|
112
107
|
raise DataHashError.new 'customer details hash cannot be empty' if data.nil? || data.empty?
|
113
108
|
raise IdentifierError.new 'customer_id cannot be empty' if customer_id.nil? || customer_id.empty?
|
114
109
|
response = update CUSTOMER, customer_id, data
|
115
|
-
response.response.code == '202' ? true : false
|
116
110
|
end
|
117
111
|
|
118
112
|
def create_customer_account data
|
119
113
|
raise DataHashError.new 'customer account details hash cannot be empty' if data.nil? || data.empty?
|
120
|
-
|
114
|
+
create CUSTOMER_ACCOUNT, data
|
121
115
|
end
|
122
116
|
|
123
117
|
def delete_customer_account customer_account_id
|
124
118
|
raise IdentifierError.new 'customer_account_id cannot be empty' if customer_account_id.nil? || customer_account_id.empty?
|
125
119
|
response = delete CUSTOMER_ACCOUNT, customer_account_id
|
126
|
-
response.response.code == '204' ? true : false
|
127
120
|
end
|
128
121
|
|
129
122
|
def get_customer_account customer_account_id
|
data/lib/vogogo_ruby/version.rb
CHANGED