diff --git a/lib/ioki/model/operator/product.rb b/lib/ioki/model/operator/product.rb index 94029320..ad552205 100644 --- a/lib/ioki/model/operator/product.rb +++ b/lib/ioki/model/operator/product.rb @@ -29,6 +29,10 @@ class Product < Base on: :read, class_name: 'Provider' + attribute :provider_id, + type: :string, + on: :read + attribute :area, type: :object, on: :read, diff --git a/lib/ioki/model/operator/provider.rb b/lib/ioki/model/operator/provider.rb index faa9204c..0ce181f8 100644 --- a/lib/ioki/model/operator/provider.rb +++ b/lib/ioki/model/operator/provider.rb @@ -61,6 +61,11 @@ class Provider < Base on: :read, type: :string + attribute :products, + on: :read, + type: :array, + class_name: 'Product' + attribute :psp, on: :read, type: :string @@ -93,10 +98,6 @@ class Provider < Base attribute :tip_payment_method_types, on: :read, type: :array - - attribute :version, - on: :read, - type: :integer end end end diff --git a/spec/ioki/model/operator/product_spec.rb b/spec/ioki/model/operator/product_spec.rb index 245e4c4d..15f6ee1d 100644 --- a/spec/ioki/model/operator/product_spec.rb +++ b/spec/ioki/model/operator/product_spec.rb @@ -8,6 +8,7 @@ it { is_expected.to define_attribute(:version).as(:integer) } it { is_expected.to define_attribute(:name).as(:string) } it { is_expected.to define_attribute(:provider).as(:object).with(class_name: 'Provider') } + it { is_expected.to define_attribute(:provider_id).as(:string) } it { is_expected.to define_attribute(:area).as(:object).with(class_name: 'Geojson') } it { is_expected.to define_attribute(:ad_hoc_bookable).as(:boolean) } it { is_expected.to define_attribute(:available_area_types).as(:array) }