-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
26 changed files
with
406 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,7 @@ GEM | |
concurrent-ruby (~> 1.0) | ||
|
||
PLATFORMS | ||
arm64-darwin-21 | ||
x86_64-darwin-20 | ||
|
||
DEPENDENCIES | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module Cephalopod | ||
module Models | ||
class Charge < Base | ||
|
||
attribute :value_exc_vat, Types::Strict::Float | ||
attribute :value_inc_vat, Types::Strict::Float | ||
attribute :valid_from, Types::JSON::DateTime | ||
attribute :valid_to, Types::JSON::DateTime | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Cephalopod | ||
module Models | ||
class Consumption < Base | ||
|
||
attribute :consumption, Types::Strict::Float | ||
attribute :interval_start, Types::JSON::DateTime | ||
attribute :interval_end, Types::JSON::DateTime | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Cephalopod | ||
module Models | ||
class GSP < Base | ||
|
||
attribute :group_id, Types::Strict::String | ||
|
||
end | ||
end | ||
end | ||
|
2 changes: 1 addition & 1 deletion
2
...halopod/models/electricity_meter_point.rb → lib/cephalopod/models/meter_point.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module Cephalopod | ||
module Models | ||
class ProductSummary < Base | ||
|
||
attribute :code, Types::Strict::String | ||
attribute :direction, Types::Strict::String | ||
attribute :full_name, Types::Strict::String | ||
attribute :display_name, Types::Strict::String | ||
attribute :description, Types::Strict::String | ||
attribute :is_variable, Types::Strict::Bool | ||
attribute :is_green, Types::Strict::Bool | ||
attribute :is_tracker, Types::Strict::Bool | ||
attribute :is_prepay, Types::Strict::Bool | ||
attribute :is_business, Types::Strict::Bool | ||
attribute :is_restricted, Types::Strict::Bool | ||
attribute :term, Types::Integer.optional | ||
attribute :brand, Types::Strict::String | ||
attribute :available_from, Types::Params::DateTime | ||
attribute :available_to, Types::Params::DateTime.optional | ||
attribute :links, Types::Strict::Array.of(Cephalopod::Models::Link) | ||
|
||
def details | ||
@details ||= Cephalopod::Repos::V1::Products::Resource.new.get(code: code) | ||
end | ||
|
||
alias_method :variable?, :is_variable | ||
alias_method :green?, :is_green | ||
alias_method :tracker?, :is_tracker | ||
alias_method :prepay?, :is_prepay | ||
alias_method :business?, :is_business | ||
alias_method :is_restricted?, :is_restricted | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module Cephalopod | ||
module Models | ||
module Products | ||
class DualRegisterCharge < Base | ||
|
||
attribute :code, Types::Strict::String | ||
attribute :standing_charge_exc_vat, Types::Coercible::Float | ||
attribute :standing_charge_inc_vat, Types::Coercible::Float | ||
attribute :online_discount_exc_vat, Types::Coercible::Float | ||
attribute :online_discount_inc_vat, Types::Coercible::Float | ||
attribute :dual_fuel_discount_exc_vat, Types::Coercible::Float | ||
attribute :dual_fuel_discount_inc_vat, Types::Coercible::Float | ||
attribute :exit_fees_exc_vat, Types::Coercible::Float | ||
attribute :exit_fees_inc_vat, Types::Coercible::Float | ||
attribute :exit_fees_type, Types::Strict::String | ||
attribute :day_unit_rate_exc_vat, Types::Coercible::Float | ||
attribute :day_unit_rate_inc_vat, Types::Coercible::Float | ||
attribute :night_unit_rate_exc_vat, Types::Coercible::Float | ||
attribute :night_unit_rate_inc_vat, Types::Coercible::Float | ||
|
||
attribute :links, Types::Strict::Array.of(Cephalopod::Models::Link) | ||
|
||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Cephalopod | ||
module Models | ||
module Products | ||
class SingleRegisterCharge < Base | ||
|
||
attribute :code, Types::Strict::String | ||
attribute :standing_charge_exc_vat, Types::Coercible::Float | ||
attribute :standing_charge_inc_vat, Types::Coercible::Float | ||
attribute :online_discount_exc_vat, Types::Coercible::Float | ||
attribute :online_discount_inc_vat, Types::Coercible::Float | ||
attribute :dual_fuel_discount_exc_vat, Types::Coercible::Float | ||
attribute :dual_fuel_discount_inc_vat, Types::Coercible::Float | ||
attribute :exit_fees_exc_vat, Types::Coercible::Float | ||
attribute :exit_fees_inc_vat, Types::Coercible::Float | ||
attribute :exit_fees_type, Types::Strict::String | ||
attribute :standard_unit_rate_exc_vat, Types::Coercible::Float | ||
attribute :standard_unit_rate_inc_vat, Types::Coercible::Float | ||
|
||
attribute :links, Types::Strict::Array.of(Cephalopod::Models::Link) | ||
|
||
end | ||
end | ||
end | ||
end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
lib/cephalopod/repos/v1/electricity_meter_points/consumption/collection.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Cephalopod | ||
module Repos | ||
module V1 | ||
module ElectricityMeterPoints | ||
module Consumption | ||
class Collection < Base | ||
|
||
model Cephalopod::Models::Consumption | ||
resource_route '/v1/electricity-meter-points/:mpan/meters/:serial_number/consumption/' | ||
|
||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
14 changes: 14 additions & 0 deletions
14
lib/cephalopod/repos/v1/electricity_meter_points/resource.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Cephalopod | ||
module Repos | ||
module V1 | ||
module ElectricityMeterPoints | ||
class Resource < Base | ||
|
||
model Cephalopod::Models::MeterPoint | ||
resource_route '/v1/electricity-meter-points/:mpan/' | ||
|
||
end | ||
end | ||
end | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
lib/cephalopod/repos/v1/gas_meter_points/consumption/collection.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Cephalopod | ||
module Repos | ||
module V1 | ||
module GasMeterPoints | ||
module Consumption | ||
class Collection < Base | ||
|
||
model Cephalopod::Models::Consumption | ||
resource_route '/v1/gas-meter-points/:mpan/meters/:serial_number/consumption/' | ||
|
||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.