Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SegmentOptsInfo#conditions not complete #13

Open
ibrusic opened this issue Mar 27, 2017 · 2 comments
Open

SegmentOptsInfo#conditions not complete #13

ibrusic opened this issue Mar 27, 2017 · 2 comments

Comments

@ibrusic
Copy link

ibrusic commented Mar 27, 2017

As it stands in the current release, 3.0-0.9.6, the conditions field of SegmentOptsInfo expects a List of Strings. However, it is actually a list of a more detailed object:

https://github.com/Ecwid/maleorang/blob/3.0-0.9.6/src/main/java/com/ecwid/maleorang/method/v3_0/campaigns/CampaignInfo.kt#L110

https://developer.mailchimp.com/documentation/mailchimp/reference/campaigns/#read-get_campaigns

{
    "id": "f6276207cc",
    ....
    "recipients": {
      ...
      "segment_opts": {
        "saved_segment_id": 48501,
        "match": "any",
        "conditions": [
          {
            "field": "static_segment",
            "op": "static_is",
            "value": 48501
          }
        ]
      }
    }
 }

Easy enough to enhance, but I would need to learn Kotlin first. :) Syntax is easy enough, would just need to learn the environment (build tools, etc...)

@basiliscus
Copy link

Hi @ibrusic ,

Thanks for reporting. @REDGML - FYI.

I personally don't want to spend time on implementing the conditions structure. Contributions are welcome. However, I can remove the conditions field, if that solves the problem.

Easy enough to enhance, but I would need to learn Kotlin first. :) Syntax is easy enough, would just need to learn the environment (build tools, etc...)

If you use Intellij Idea, nothing special needs to be done. Just install the kotlin plugin and import the project.

@vbsteven
Copy link

vbsteven commented Mar 3, 2019

I just created a simple pull request to support this.
#28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants