-
Notifications
You must be signed in to change notification settings - Fork 31
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
New Methods for Integration Tools #7
base: master
Are you sure you want to change the base?
Changes from 5 commits
181e629
f0c7045
a24d259
a50ce33
91ce006
9d6e97c
c159b1c
f5747a8
5dfe3dd
e7bbf49
7911d6e
c5be5b9
b7de3bc
be94f38
4bfb690
9a412f0
2fe9b4b
b5d637f
7a18942
f8fab25
28af9a1
769ab6c
f393c9c
24cb92d
9bd83e2
15fa34b
2cd7161
9f7e202
87faafc
5b22bdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ apply plugin: 'signing' | |
|
||
group = 'com.ecwid' | ||
archivesBaseName = "maleorang" | ||
version = '3.0-0.9.4' | ||
version = '3.0-0.9.5' | ||
|
||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
|
@@ -64,6 +64,11 @@ if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePass | |
name 'Vasily Karyaev' | ||
email '[email protected]' | ||
} | ||
developer { | ||
id 'lararojasmr' | ||
name 'Manuel Lara' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.ecwid.maleorang.method.v3_0.campaign | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignInfo : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var id: String? = null | ||
|
||
@JvmField | ||
@Field | ||
var type: String? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can use an Enum for field "type": |
||
|
||
@JvmField | ||
@Field | ||
var create_time: String? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field should be of type Date There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ready my friend! |
||
|
||
@JvmField | ||
@Field | ||
var archive_url: String? = null | ||
|
||
@JvmField | ||
@Field | ||
var long_archive_url: String? = null | ||
|
||
@JvmField | ||
@Field | ||
var status: String? = null | ||
|
||
@JvmField | ||
@Field | ||
var emails_sent: Int? = null | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add TODOs for fields that are not yet included. It will be easier to track them and add them afterwords. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added my friend There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ready |
||
@JvmField | ||
@Field | ||
var content_type: String? = null | ||
|
||
@JvmField | ||
@Field | ||
var recipients: RecipientsCampaignInfo? = null | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO settings There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. _links field has already been created in my last pull request. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.ecwid.maleorang.method.v3_0.campaign | ||
|
||
|
||
import com.ecwid.maleorang.MailchimpMethod | ||
import com.ecwid.maleorang.annotation.* | ||
import org.apache.commons.codec.digest.DigestUtils | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
@Method(httpMethod = HttpMethod.GET, version = APIVersion.v3_0, path = "/campaigns/{campaign_id}") | ||
class GetCampaignMethod( | ||
@JvmField | ||
@PathParam | ||
val campaign_id: String | ||
) : MailchimpMethod<CampaignInfo>() { | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var fields: String? = null | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var exclude_fields: String? = null | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package com.ecwid.maleorang.method.v3_0.campaign | ||
|
||
|
||
import com.ecwid.maleorang.MailchimpMethod | ||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.* | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
@Method(httpMethod = HttpMethod.GET, version = APIVersion.v3_0, path = "/campaigns") | ||
class GetCampaignsMethod : MailchimpMethod<GetCampaignsMethod.Response>() { | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var fields: String? = null | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var exclude_fields: String? = null | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var count: Int? = null | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var offset: Int? = null | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var type: String? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we added a enum for types, shouldn't this be a TypeCampaign? |
||
|
||
@JvmField | ||
@QueryStringParam | ||
var status: String? = null | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var before_send_time: String? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field should be of type Date There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, you got right! i changed that. |
||
|
||
@JvmField | ||
@QueryStringParam | ||
var since_send_opt: String? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Field name is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field should be of type Date There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ready There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be a Date field |
||
|
||
@JvmField | ||
@QueryStringParam | ||
var before_create_time: String? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field should be of type Date There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ready |
||
|
||
@JvmField | ||
@QueryStringParam | ||
var since_create_time: String? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field should be of type Date There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ready |
||
|
||
@JvmField | ||
@QueryStringParam | ||
var list_id: String? = null | ||
|
||
@JvmField | ||
@QueryStringParam | ||
var folder_id: String? = null | ||
|
||
class Response : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var campaings: List<CampaignInfo>? = null | ||
|
||
@JvmField | ||
@Field | ||
var total_items: Int? = null | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO _links There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i will add this in the super class. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.ecwid.maleorang.method.v3_0.campaign | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class RecipientsCampaignInfo : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var list_id: String? = null | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO list_name |
||
@JvmField | ||
@Field | ||
var segment_opts: MailchimpObject? = null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO Create |
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.ecwid.maleorang.method.v3_0.reports | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignBounceReport : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var hard_bounces: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var soft_bounces: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var syntax_errors: Int? = null | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.ecwid.maleorang.method.v3_0.reports | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignClicksReport : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var clicks_total: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var unique_clicks: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var unique_subscriber_clicks: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var click_rate: Double? = null | ||
|
||
@JvmField | ||
@Field | ||
var last_click: Date? = null | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.ecwid.maleorang.method.v3_0.reports | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignDeliveryStatusReport : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var enabled: Boolean? = null | ||
|
||
@JvmField | ||
@Field | ||
var can_cancel: Boolean? = null | ||
|
||
@JvmField | ||
@Field | ||
var status: String? = null | ||
|
||
@JvmField | ||
@Field | ||
var emails_sent: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var emails_canceled: Int? = null | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.ecwid.maleorang.method.v3_0.reports | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignEcommerceReport : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var total_orders: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var total_spent: Double? = null | ||
|
||
@JvmField | ||
@Field | ||
var total_revenue: Double? = null | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.ecwid.maleorang.method.v3_0.reports | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignFacebookLikesReport : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var recipient_likes: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var unique_likes: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var facebook_likes: Int? = null | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.ecwid.maleorang.method.v3_0.reports | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignForwardsReport : MailchimpObject() { | ||
@JvmField | ||
@Field | ||
var forwards_count: Int? = null | ||
|
||
@JvmField | ||
@Field | ||
var forwards_opens: Int? = null | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.ecwid.maleorang.method.v3_0.reports | ||
|
||
import com.ecwid.maleorang.MailchimpObject | ||
import com.ecwid.maleorang.annotation.Field | ||
import java.util.* | ||
|
||
/** | ||
* Created by: Manuel Lara <[email protected]> | ||
*/ | ||
|
||
class CampaignIndustryStatsReport : MailchimpObject() { | ||
|
||
@JvmField | ||
@Field | ||
var type: String? = null | ||
|
||
@JvmField | ||
@Field | ||
var open_rate: Double? = null | ||
|
||
@JvmField | ||
@Field | ||
var click_rate: Double? = null | ||
|
||
@JvmField | ||
@Field | ||
var bounce_rate: Double? = null | ||
|
||
@JvmField | ||
@Field | ||
var unopen_rate: Double? = null | ||
|
||
@JvmField | ||
@Field | ||
var unsub_rate: Double? = null | ||
|
||
@JvmField | ||
@Field | ||
var abuse_rate: Double? = null | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the version change. I will update the version number myself when release a new version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready!