REST API, RT#28181
[freeside.git] / FS / FS / part_pkg / API.pm
diff --git a/FS/FS/part_pkg/API.pm b/FS/FS/part_pkg/API.pm
new file mode 100644 (file)
index 0000000..3210aa0
--- /dev/null
@@ -0,0 +1,17 @@
+package FS::part_pkg::API;
+
+use strict;
+
+sub API_getinfo {
+  my $self = shift;
+  #my( $self, %opt ) = @_;
+
+  +{ ( map { $_=>$self->$_ } $self->fields ),
+     ( map { $_=>$self->option($_) }
+         qw(setup_fee recur_fee)
+     ),
+   };
+
+}
+
+1;