Skip to content

Commit

Permalink
Adjust data fields for non–US installations (#17)
Browse files Browse the repository at this point in the history
* Make US–specific state field optional

* stateCode / state_code is also optional

---------

Co-authored-by: C Neale <118273+cdn@users.noreply.github.com>
  • Loading branch information
definitelycn and cdn authored Mar 12, 2023
1 parent 3703c9a commit 43e2906
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/accounts_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub struct AccountLocation {
pub country: String,

/// State of the SolarEdge inverter.
pub state: String, // seems US specific. should this be Option<String>?
pub state: Option<String>, // seems US specific. should this be Option<String>? probably

/// City of the SolarEdge inverter.
pub city: String,
Expand All @@ -140,7 +140,7 @@ pub struct AccountLocation {
/// Address line 2 of the SolarEdge inverter.
pub address2: String,

/// Zip code 1 of the SolarEdge inverter.
/// Zip code 1 of the SolarEdge inverter. Used in UK, in EU?
pub zip: String, // seems US specific. should this be Option<String>?
}

Expand Down
6 changes: 3 additions & 3 deletions src/site_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct SiteLocation {
pub country: String,

/// State of the SolarEdge inverter.
pub state: String, // seems US specific. should this be Option<String>?
pub state: Option<String>, // seems US specific. should this be Option<String>? probably

/// City of the SolarEdge inverter.
pub city: String,
Expand All @@ -21,7 +21,7 @@ pub struct SiteLocation {
/// Address line 2 of the SolarEdge inverter.
pub address2: String,

/// Zip code 1 of the SolarEdge inverter.
/// Zip code 1 of the SolarEdge inverter. Used in UK, in EU?
pub zip: String, // seems US specific. should this be Option<String>?

/// Time zone of the SolarEdge inverter.
Expand All @@ -31,7 +31,7 @@ pub struct SiteLocation {
pub country_code: String,

/// State (abbreviation) of the SolarEdge inverter.
pub state_code: String, // seems US specific. should this be Option<String>?
pub state_code: Option<String>, // seems US specific. should this be Option<String>?
}

#[cfg(test)]
Expand Down

0 comments on commit 43e2906

Please sign in to comment.